Monitoring the Position of NI Switch (Open vs. Closed)

Updated May 16, 2023

Reported In

Hardware

  • PXI Multiplexer Switch Module
  • PXI Matrix Switch Module
  • PXI RF Matrix Switch Module
  • PXI RF Multiplexer Switch Module

Software

  • LabVIEW

Driver

  • NI-SWITCH

Issue Details

I have an NI Switch device and I would like to monitor the switches state in order to know if they are currently open or closed. Do the switches have a readable state verification so I can monitor the state (open or closed) of the switches?

Solution

In LabVIEW, this can be done by using the niSwitch Get Relay Position VI. The output of this VI will be Open or Closed depending on the switch name you specify. 

Note: The niSwitch Get Relay Position VI requires the name of the switch. You can take advantage of the Number of Relays property and the niSwitch Get Relay Name VI to find the names programmatically.

Additional Information

Alternatively, you can run the NI-Switch Soft Front Panel while the switch is being used to read the current state of the switches.
Note: The switch state cannot be read in Scanning Mode.