NI CompactRIO Device Drivers Help
»View Product Info
Channels in Digital In mode on the NI 9219 have a 0–60 V unipolar threshold. The default value of the Digital In mode threshold is 1.5 V. You can configure the threshold at edit time using the C Series Module Properties dialog box. You can programmatically change the threshold at run time using the FPGA I/O Property Node. The execution of an I/O Property Node that is configured with a Digital Threshold property overwrites the value you configured in the C Series Module Properties dialog box.
Configuring the Digital In Threshold Using the C Series Module Properties Dialog Box
Complete the following steps to configure the Digital In threshold for the NI 9219 using the C Series Module Properties dialog box.
- Configure the CompactRIO system, and add an NI 9219.
- Right-click the NI 9219 in the Project Explorer window and select Properties from the shortcut menu to display the C Series Module Properties dialog box.
- Select the channel(s) for which you want to configure the Digital In threshold from the Channels table. You can select more than one channel by holding the <Ctrl> or <Shift> key when selecting channels.
- Select Digital In from the Channel Mode pull-down menu.
- Enter a value between 0 and 60 in the Threshold text box for the selected channel(s).
- Click the OK button.
- Select File»Save All in the Project Explorer window.
Configuring the Digital In Threshold Using the FPGA I/O Property Node
Complete the following steps to configure the Digital In threshold using the FPGA I/O Property Node.
- Create FPGA I/O items for the channel of the NI 9219 for which you want to configure the Digital Threshold property. The channel must be set to Digital In mode.
- Place an FPGA I/O Property Node on the block diagram and configure it for the NI 9219 channel for which you want to configure the Digital In threshold.
- Click the Property section and select Digital Threshold from the shortcut menu.
- Right-click the Digital Threshold input and select Create»Control from the shortcut menu.
- On the front panel of the VI, enter a binary value in the Digital Threshold control. You can use the following equation in the host VI to calculate the threshold value:
Threshold (binary) = Threshold (volts) x 224 ÷ 60
You can change the Digital In threshold at run time by writing to the control from the host VI. Refer to the NI 9219 Digital Threshold VI in the labview\examples\CompactRIO\Module Specific\NI 9219\NI 9219 Digital Threshold\NI 9219 Digital Threshold.lvproj for an example of configuring the NI 9219 Digital In threshold using the FPGA I/O Property Node.