02-05-2009 12:37 PM
I am using DAQmx write to set bits on a 9403 card. When I set a bit high, then try to read that bit in a subseqeuent vi that bit gets set low! Both DAQmx Start and DAQmx Read vis seem to reset the bit low. How is that supposed to happen? I was certain bits would not be reset low unless the device itself was reset.
Solved! Go to Solution.
02-05-2009 05:20 PM
I'm guessing you're creating a digital output channel, calling start, write, and then creating a separate digital input channel, and calling start->read or read.
Creating the input channel changes the direction of the line. This happens at commit (which you go through when calling start, or read with no start). Once the direction changes, you are no longer driving the line. That's why you are always reading zero.
You have two options. You can either call read after write (in the digital output task) or you can mess around with the tristate property. Tristate is a DAQmx channel property (DigitalOutput->Tristate). The help for it is pretty good.
Both ways will let you read the value of the line without changing the current line state.
02-05-2009 08:09 PM