Configuring the Initial Line Direction for the NI 9401 (FPGA Interface)
Each digital port on the NI 9401 is initially configured as a digital input. You can configure the initial line direction for each port on the NI 9401 at edit time using the C Series Module Properties dialog box. You can programmatically change the line direction for each port at run time using the FPGA I/O Method Node. The execution of an I/O Method Node that is configured with a Set Line Direction method overwrites the value you configured in the C Series Module Properties dialog box.
Configuring Line Direction Using the C Series Module Properties Dialog Box
Complete the following steps to configure the line direction of each digital port using the C Series Module Properties dialog box.
- Configure the CompactRIO system, and add an NI 9401.
- Right-click the NI 9401 in the Project Explorer window and select Properties from the shortcut menu to display the C Series Module Properties dialog box.
- Select the direction for each port from the Initial Line Direction pull-down menus.
- Click the OK button.
- Select File»Save All in the Project Explorer window.
Configuring Line Direction Using the FPGA I/O Method Node
Complete the following steps to configure the line direction of each digital port using the FPGA I/O Method Node.
- Place an FPGA I/O Method Node on the block diagram and configure it for the NI 9401.
- Click the Method section and select the Set Line Direction method from the shortcut menu.
- Right-click each digital port input and select Create»Control from the shortcut menu.
- On the front panel of the VI, select the direction for each port from the digital port pull-down menus.