You can turn off the excitation voltage in a few ways:
- Unplug or remove power to your hardware and plug it back in.
- Reset your hardware, either using a switch on the hardware or programmatically through NI MAX.
- In LabVIEW, you can commit a value of zero to the Excitation Value property using a DAQmx Channel Property Node and the DAQmx Control Task VI (see code snippet below).
Note: The NI-9237 does not provide a programmatic method for disabling excitation voltage. Some level of excitation will always be present when the card is plugged into a chassis.
When a DAQmx task is stopped or cleared, the settings and properties held in your application's memory are cleared, but the values written onto your hardware's memory persist. Therefore, if you have configured a channel to output excitation, it will continue to do so until you reset your hardware or until new values are written onto the hardware memory.
The example above shows how you can programmatically shut off excitation current in LabVIEW using a DAQmx Channel Property Node
and the DAQmx Control Task.vi
. See below for a detailed explanation of the code:
- The excitation current source and value are set using the DAQmx Create Virtual Channel.vi, but have not yet been written to the hardware.
- When the AAQmx Start Task.vi is called, the configuration values set previously are committed and written to the hardware memory.
- The DAQmx Stop Task.vi returns the task from the Running state to an idle state. However, the hardware will continue outputting excitation current.
- Once the task is idle, new channel property values, like the excitation value, can be configured using a DAQmx Channel Property Node.
- Using the DAQmx Control Task.vi, these values can then be committed and written to the hardware memory. At this point, the excitation current will stop.
- The DAQmx Clear Task.vi removes the task from memory and closes references to the hardware.