01-20-2015 04:26 PM
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
Solved! Go to Solution.
01-20-2015 05:02 PM
How is your task configured? My guess is that you have the line set to be inverted.
01-20-2015 05:28 PM
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
01-20-2015 08:40 PM
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.