Controlling the Digital I/O for NI-IMAQ I/O Devices

NI-IMAQ I/O Control

Controlling the Digital I/O for NI-IMAQ I/O Devices

The following table shows the VI icons you use to control the digital I/O on NI-IMAQ I/O devices.

Icon VI
Open IMAQ IO VI
Read/Write Control
Close FPGA VI Reference VI

Complete the following steps to control the digital I/O components on the NI-IMAQ I/O device with LabVIEW.

  1. Launch LabVIEW.
  2. If you are targeting an RT target, complete the following substeps. Otherwise, skip this step and its substeps.
    1. Create a project using the Real-Time Project Wizard or the Project Explorer window.
    2. Right-click the project root and select New»Targets and Devices from the shortcut menu to display the Add Targets and Devices dialog box.
    3. Select one of the following types of RT targets:
      • Existing target or device—An RT target that you have configured in Measurement & Automation Explorer (MAX) and connected to the same subnet as the host computer.
      • Existing device on remote subnet—An RT target that you configured in MAX and connected to a remote subnet.
      • New target or device—A target in a project that is not bound to existing RT Series hardware. You must change the properties for the target from the Project Explorer window to bind it to an existing RT Series hardware before you attempt to connect or run a VI on the target.
    4. Click OK. The RT target appears in the Project Explorer window.
  3. Click New to open the New dialog box. Select Blank VI, and click OK.
  4. Place the Open IMAQ IO VI on the block diagram.
  5. Place the Read/Write control on the block diagram.
  6. Wire the FPGA VI Reference Out and error out outputs of the Open IMAQ IO VI to the Read/Write control.
  7. Click the Unselected output of the Read/Write control, and select the NI-IMAQ I/O device feature you want to configure from the shortcut menu.
  8. Right-click the top portion of the Read/Write control and select Add Element (Add Control in LabVIEW 7.x) from the shortcut menu to add another control. Right-click the new control, and select the NI-IMAQ I/O device feature you want to configure. Repeat this step for each of the NI-IMAQ I/O device features you want to configure from the shortcut menu.
  9. To configure the controls you added for the NI-IMAQ I/O device features, wire the appropriate values to the inputs on each of the controls you added to the Read/Write control.
  10. If you want to manage your own run and abort functionality, complete the following steps:
    1. Place the Invoke method on the block diagram.
    2. Wire the FPGA VI Reference Out and error out outputs of the Read/Write Control function to the Invoke method.
    3. Right-click the Invoke method and select the action you want the VI to perform.
  11. Place the Close FPGA VI Reference function on the block diagram.
  12. Wire the FPGA VI Reference Out and error out outputs of the Invoke method to the FPGA VI Reference In and error in inputs of the Close FPGA VI Reference function.

Search the LabVIEW Help by selecting Help»Search the LabVIEW Help for more information about using the LabVIEW FPGA Interface VIs and functions to communicate with LabVIEW FPGA VIs.

Related Topics

NI-IMAQ I/O Controls

IMAQ IO Write Shutdown States

IMAQ IO Read Shutdown States

IMAQ IO Enable Shutdown

IMAQ IO Query Shutdown