- 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 FileAfter getting the relay count value, it can be compared against the expected relay life value in the specifications sheet of the switch modeule to know when it should be replaced or when it is close to its end of life.