07-05-2005 10:53 AM
07-06-2005 02:59 PM
07-06-2005 05:22 PM
JSA,
You don't need to create and destroy a task each time you want to change direction on a line. Instead, create a digital output task and set the tristate property to true when you want to read from the line and set the tristate property to false when you want to begin driving the line again. You can set the tristate property by using the DAQmxSetDOTristate function. By using the tristate property in conjunction with the appropriate Read and Write functions, you can program the direction of the lines without having to destroy and create a new task each time. I don't know if this will be as fast as the Traditional DAQ performance, but it should be much faster than the 275 ms you're currently observing.
07-07-2005 08:14 AM
01-03-2006 07:47 PM
This was very helpful!! I spent hours reading through help and finally found this. BTW, if I simply toggle the TriState state, then the original value is lost. That is, if I write a '0' to the output port, then tristate then un-tristate, the output is actually a '1'??
rjmiller
01-04-2006 01:41 PM
01-04-2006 04:04 PM
01-05-2006 11:06 AM
Hi RJM,
Once you change the Tristate property back to false, you can set the line to be low again. If you set the Tristate property to true, the line is set to a state of high impedance. Once the Tristate property is set to false, it remains in that state of high impedance because nothing is driving the line low or high yet. However, once the property is set to false, you can drive the line to your preference. A more detailed description of the Tristate Property is available in the LabVIEW Help. Go to Help >> Search the LabVIEW Help >> Property and Method Reference >> NI-DAQmx Properties >> DAQmx Channel >> Digital Output >> Tristate.
Regards,
Hal L.