05-26-2016 03:55 PM
Hi everyone,
I am very new to NI & seeking guidance from all of you, experts out there.
As the subject says it, I am trying to set digital output channel to tristate using DAQmx & C#. I found link on Tristate property, but I do not know how to use it. http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/bd33b0d/
Any help would be very much appreciated!
Thank you.
Solved! Go to Solution.
05-27-2016 12:57 PM
Hi kasrus,
You would set the property using the following syntax (after creating your task):
digitalWriteTask.DOChannels.All.Tristate = true;
As the help document indicates: "You must commit the task for this setting to take effect." The help document also highlights when to set the property in relation to a read or write.
This is referring to the DAQmx Task State Model:
Task State Model
http://zone.ni.com/reference/en-XX/help/370466AC-01/mxcncpts/taskstatemodel/
The configuration methods will move your task through this state model, but you can also control them using the syntax in the below article:
Verifying, Committing, Starting, and Stopping NI-DAQmx Tasks Programmatically
http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/verifycommitstartstopdaqtask/
Regards,
Kyle S.
Applications Engineer
National Instruments