We are using an NIDaqmx (NI-PXIe-6363) with Python. We try to register an digital input as trigger source to an task.
Code snip :
self.myTask = nidaqmx.Task( new_task_name='digital line event change detection') self.myTask.di_channels.add_di_chan("/PXI1Slot2/PFI8") self.myTask.stop() self.myTask.timing.cfg_change_detection_timing(falling_edge_chan="/PXI1Slot2/PFI8", rising_edge_chan=None, sample_mode=AcquisitionType.FINITE, samps_per_chan=1000)
When executing the function register_signal_event() , we got following error message :
nidaqmx.errors.DaqError: Selected lines do not support buffered operations. Ensure only lines that support buffered operations are being used in the task. If using change detection timing, the task must be changed to non-buffered to support these lines. Device: PXI1Slot2 Physical Channel: PFI8 Task Name: digital line event change detection Status Code: -201062
Software versions we use :
Windows: 7 , Python 3.6.3 , nidaqmx (0.5.7) , NI-PXIe-6363 device driver :17.0.0ff0
Installed python libraries :
We find this error message is a bit contradictory. How can this issue be resolve?
We thank you in advance.
With best regards.
Christian , drivetekag
Solved! Go to Solution.
Change detection is supported *only* on port 0 of your DAQ board (and other X-series and M-series boards). Port 0 lines are not dual-purposed as PFI inputs. (And in general, I don't believe you can create a digital task by referring to a pin by its PFI line number. You need syntax like "Dev1/port2/line3".)
Wire your signal to PXI1Slot2/port0/line0 and configure your task to include it. If other parts of your system need the signal at PFI8, just jumper it over.
Thank you for your answer.
Our solution is:
We have now wired our trigger signals from port 2 to port 0.
We changed our code to following snip :
channel_info = "Dev2/Port0/Line1"
self.myTask = nidaqmx.Task(new_task_name='digital line event change detection') self.myTask.stop() logging.info('The digital channel to observe: ' + channel_info) self.myTask.di_channels.add_di_chan(channel_info)
sample_mode=AcquisitionType.CONTINUOUS , samps_per_chan = 2) self.myTask.register_signal_event(Signal.CHANGE_DETECTION_EVENT, self.callback_digital_line)
It seems to work that way for us. We thank you for the proposed solution.
Christian , drivetekAG