Hello Peg,
Reset device is only necessary if the device is left in a state that
the driver will not be able to communicate. This can happen if a
previous task is not stopped/cleared and a new task is created or
sometimes when going from one driver to another (Traditional DAQ to
DAQmx or vice versa).
If you are not getting an error when you start your code, the reset is
not necessary. If you happen to get an error, you can manually reset
your device in MAX, or you can even conditionally reset the card in
your code (i.e. try to create and start your task and if an error
occurs, call the reset device function and rerun the code.
You do not need to completely run a task to set the idle state. You
can use a DAQmx Control Task function with the action set as "commit"
to make the idle state take effect. First you would configure the task
you eventually want to run on the counter, then commit it. Later when
you want the counter output pulse to run you can call the DAQmx Start
Task function. When you need to change the idle state, simply clear the
task and begin a new one in the same manner with the appropriate idle
setting. A digital line is an alternate option which can be simply
written high or low.
Hope this helps,
Jennifer O.
Applications Engineer
National Instruments