Tracking Relay Usage on NI Switch Products

Updated Jun 5, 2023

Environment

Hardware

  • PXI Relay Module

Software

  • Measurement & Automation Explorer (MAX)
  • LabVIEW

Driver

  • NI-SWITCH

Is there a way to get the relay life from the EEPROM of my switch device? I want to track relay usage.

  • In MAX
    You can track the relay usage of some switch modules by reading the relay count from the EEPROM of the device.  The simplest way to find the count of a particular relay is through the Switch Soft Front Panel. Right-click on your NI-Switch module in Measurement & Automation Explorer (MAX) and select Test Panels.

     

    You can access the relay count by either selecting the Relays tab, or going to File»Relay Maintenance and selecting the relay of interest.
     


     
  • In the LabVIEW environment
    Use niSwitch Get Relay Count to get the number of times the relay has changed from Closed to Open.

     

    Often times niSwitch Wait for Debounce is used before niSwitch Get Relay Count to ensure a more accurate count.


     

  • In C programming
    You can use the function called niSwitch_GetRelayCount. The C function prototype is as follows:

    ​ViStatus niSwitch_GetRelayCount (Vi Session vi, ViConstString relayName, ViInt32* relayCount);

Additional Information

Not all switch modules support this function. See Relay Count in NI Switches Help file located on the system under Start»All Programs»National Instruments»NI-SWITCH»Documentation»NI Switches Help.

If you do not have the driver installed, the help file can also be found in Relay Count - Switches Help File