Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NIDaqmx (NI-PXIe-6363) Python: register signal event

Solved!
Go to solution

Hello ,

 

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)
self.myTask.register_signal_event(Signal.CHANGE_DETECTION_EVENT, self.callback_digital_line)

 

 

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 :

 

Spoiler

 

cycler (0.10.0)

et-xmlfile (1.0.1)

future (0.16.0)

iso8601 (0.1.12)

jdcal (1.3)

matplotlib (2.1.1)

nidaqmx (0.5.7)

nidcpower (1.0.1)

nidmm (1.0.0)

niswitch (1.0.1)

numpy (1.13.3)

openpyxl (2.4.9)

pip (9.0.1)

Pykka (1.2.1)

pyparsing (2.2.0)

PyQt5 (5.9.2)

pyqtgraph (0.10.0)

pyserial (3.4)

python-can (2.2.1)

python-dateutil (2.6.1)

pytz (2017.3)

PyYAML (3.13)

setuptools (28.8.0)

sip (4.19.6)

six (1.11.0)

typing (3.6.6)

windows-curses (1.0)

wrapt (1.10.11)

 

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

0 Kudos
Message 1 of 3
(3,386 Views)
Solution
Accepted by topic author drivetekag

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.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
Message 2 of 3
(3,356 Views)

Hi Kevin_Price

 

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)
self.myTask.timing.cfg_change_detection_timing(falling_edge_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.

 

Best regards

Christian , drivetekAG

0 Kudos
Message 3 of 3
(3,313 Views)