LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Read True False issue

Solved!
Go to solution

Hello,

 

I am using DAQmx Write (Digital Bool 1Line 1Point) to send out a boolean sample to a digital output channel.  I want to be able tell if the signal is high or low, so I use DAQmx Read (Digital Bool 1Line 1Point) to take the task as an input and then connect an indicator light to the data output.  The problem is the indicator lights up when I pass False to the DAQmx Write VI, and does not light up when I pass True to the DAQmx Write VI.  Shouldn't the DAQMx Read VI be outputting the same boolean as input to the DAQmx Write VI?  In otherwords, should I not get a True from the DAQmx Read VI if I pass a True into the DAQmx Write VI, and likewise for a False case?

 

See attached code for simplified example of what I'm trying to do.

 

Thanks,

Jason

0 Kudos
Message 1 of 4
(3,374 Views)

How is your task configured?  My guess is that you have the line set to be inverted.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(3,364 Views)

Hi crossrulz,

 

Yes you were correct that the line was inverted, so that is part of my mystery solved.  Now that I uninverted it though, a False input to the DAQmx Write results in the digital line output going High, and a True input results in the digital line output line going low (Im using a USB-6009 device).  This seems to be counterintuative.  Any ideas why this is the case?

 

Thanks,

Jason

0 Kudos
Message 3 of 4
(3,355 Views)
Solution
Accepted by topic author jasonwfox

That would make sense if the channel is set up as an open-collector output.  That would mean the line is pulled low when you write a TRUE and left floating when you write a FALSE.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(3,328 Views)