From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-6254 DIO Read - Need to know how to trigger the Read operation??

Hi,
Can anyone help me with DIO Read operation using PCI-6254 (DAQmx)??

here'e the breakdown of the issue i'm having:

i'm doing a DIO Read using DAQmx drivers, and am using "one channel for each line" on the Port 0.
i'm using another line for DIO Write at the same time...infact the DIO write sends the bit pattern
and inturn triggers an external device, and am trying to capture the response of ext. device on
other line thro' DIO READ...

now, i do see the bit pattern on the Oscope, but am not reading the bit pattern using DAQmx Read?
(i'm reading all ZEROS)
Currently, i'm not using DAQmx Trigger? i tried using it, but was getting an error...
i guess i need to trigger the read when the line goes high/low (for ex)

can anyone help me with this?
Regards,
rkpat
0 Kudos
Message 1 of 2
(2,366 Views)
Hi rkphat,

DIO operations on an M Series device cannot be configured for triggers. The source of the DIO sample clock must be set up for the trigger and the DIO operation should just be configured to receive that clock. You must provide an external clock or a clock generated by another subsystem, such as an analog input sample clock or a counter pulse train output, to clock digital operations. For example, if you were going to use the analog input sample clock to clock your digital measurements, you would configure your AI subsystem to receive a start trigger and to use an internal clock. Once the trigger arrives, the AI Sample clock is generated and passed to the DIO subsystem. Or if you wanted to use a counter to generate the clock, you would set the counter up for pulse train generation with a digital start trigger.

If you post your code we can find out why the Digital Read is not returning the correct data.

Cheers,
Lesley Y.
0 Kudos
Message 2 of 2
(2,348 Views)