DOChannel.Tristate Property
- Updated2023-02-21
- 2 minute(s) read
DOChannelTristate Property
Namespace: NationalInstruments.DAQmx
Assembly: NationalInstruments.DAQmx (in NationalInstruments.DAQmx.dll) Version: 20.7.40.49302
Syntax
public bool Tristate { get; set; }
Public Property Tristate As Boolean Get Set
Property Value
Type: BooleanSpecifies whether to stop driving the channel and set it to a high-impedance state. You must commit the task for this setting to take effect.
Exceptions
Exception | Condition |
---|---|
DaqException | The NI-DAQmx driver returned an error. |
Remarks
Setting this property before you commit the task determines whether NI-DAQmx drives data on the channel or tristates the channel after the task transitions to the committed state.
Use this property when you want to read and write to channels in a task. Set this property to before you read from the channel and set this property to before you write to the channel.
When you read from an output channel that is not tristated, the value corresponds to the current value you are driving on the channel.
When you write to a channel that is tristated, no change occurs until you set this property to . After you set this property to , the value NI-DAQmx drives on the channel corresponds to the last value written to the channel.
Ensure the channel is tristated before any external devices that you connect to the channel drive data onto the channel. Failure to do so could result in double-driving the channel and damaging the device.
This property is supported only for line-configurable, bidirectional ports.