LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to set digital output high/low on an NI-9402 in CVI ?

Hi all,

I'm trying to set the digital output value on 1 channel of an NI-9402 in my cDAQ chassis.  I've found LOTS of functions to configure the channel, but I'm failing to find the most "basic" function which sets the output high (5V) or low (0V).

 

Can anyone point me to the DAQmX CVI function that sets the value of the digital output high or low ?

 

Thanks !

 

Erik

0 Kudos
Message 1 of 2
(2,816 Views)

OK...I figured out the solution on my own in the lab by running NI-MAX and looking a bit closer at what it was doing/showing on-screen.   I figured out I could use the DAQmx function DAQmxWriteDigitalU8() to write an 8-bit value to the "port0" of the NI-9402;  and since there are only 4 outputs, the upper 4 bits are ignored and the lower 4 bits control the digital outputs ( 1 = 5V, 0 = 0V).  The function actually writes an array of 8-bit numbers, so it felt a little odd writing an "array" of just 1 value, but it worked.

 

I got a similar suggestion via my service request from Andrew Benson, so thanks for his efforts.

 

0 Kudos
Message 2 of 2
(2,807 Views)