using (NationalInstruments.DAQmx.Task task = new NationalInstruments.DAQmx.Task("tristate task"))
{
var channel = task.DOChannels.CreateChannel("PXI1Slot6/port3/line2, "", ChannelLineGrouping.OneChannelForEachLine);
channel.LineStatesDoneState = DOLineStatesDoneState.Tristate;
DigitalSingleChannelWriter writer = new DigitalSingleChannelWriter(task.Stream);
writer.WriteSingleSampleSingleLine(true, true);
}
I did a bit more digging through the API, and found the DOChannel.LineStatesDoneState, which looks excactly what I want to so. So I tried the above code, and now it's throwing a DaqException.
NationalInstruments.DAQmx.DaqException: NationalInstruments.DAQmx.DaqException: Property requested is incompatible with the given Timing Type.
NI-DAQmx can automatically select a compatible property value for you. To use the requested Timing Type, do not set the specified property and allow NI-DAQmx to set it for you.
To use the requested property value, chose a different value for the Timing Type.
Property: NationalInstruments.DAQmx.Timing.SampleTimingType
Requested Value: NationalInstruments.DAQmx.SampleTimingType.SampleClock
Property: NationalInstruments.DAQmx.DOChannel.LineStatesDoneState
Requested Value: NationalInstruments.DAQmx.DOLineStatesDoneState.Tristate
Possible Values: NationalInstruments.DAQmx.DOLineStatesDoneState.NoChange
Task Name: tristate task
Status Code: -201122.
What does the done state have to do with the sample timing type?