Hello Jing,As described in the NI Digital Waveform Generator/Analyzer Help: "The Initial state configures the state of the data
generation channels after a session has been configured but before the device
starts generating the waveform. The Initial state is often useful while the
device is waiting for a Start trigger.
The Idle state configures the state of the data
generation channels after the waveform generation has begun and the generation
has paused or stopped."The Idle and Initial states are only valid when the NI-HSDIO driver session is open because the state of the channel is not controlled by the driver after the session is closed. Rather than using a programmatic solution, I think you should consider using hardware to control the state of the line. If you would like the line to remain high when not in use, you could add an external pull-up resistor. This concept is discussed in greater detail in a tutorial online <a href="http://zone.ni.com/devzone/cda/tut/p/id/3094" target="_blank">here</a>. However, you need to consider the channel electronics of the device when selecting the appropriate value for the pull-up resistor. For example, the section called "Channel Electronics" in the NI Digital Waveform Generator/Analyzer Help, shows that the NI 6541 has an internal 10 kOhm pull-down resistor on each of the DIO channels. You also need to consider the logic level that you are trying to maintain when selecting this value. Different pull-up resistors will change the voltage level on the channel, and you need to be sure that the level still works with your application.For your reference, the NI Digital Waveform Generator/Analyzer Help can be found by navigating to Start>>All Programs>>National Instruments>>NI-HSDIO>>Documentation.