niSwitch Get Relay Count VI
- Updated2025-10-06
- 2 minute(s) read
Returns the number of times the relay has changed from Closed to Open. Relay count is useful for tracking relay life and use. Call the niSwitch Wait For Debounce VI before this VI to ensure an accurate count.
Refer to Relay Count to determine if the switch module supports relay counting.
Related Topic

Inputs/Outputs
instrument handle
—
instrument handle identifies a particular NI-SWITCH session established with the niSwitch Initialize With Topology VI, the niSwitch Initialize With Options VI, or the niSwitch Initialize VI.
relay name
—
relay name specifies the name of the relay.
error in (no error)
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
instrument handle out
—
instrument handle out identifies a particular NI-SWITCH session established with the niSwitch Initialize With Topology VI, the niSwitch Initialize With Options VI, or the niSwitch Initialize VI and used for all subsequent NI-SWITCH calls.
count
—
count is the number of relay cycles.
error out
—
error out contains error information. This output provides standard error out functionality. |
instrument handle
—
relay name
—
error in (no error)
—
instrument handle out
—
count
—
error out
—