Returns the number of times the relay has changed from closed to open.

Syntax

Namespace: NationalInstruments.ModularInstruments.NISwitch

public int GetRelayCount(string relayName)

Remarks

Relay count is useful for tracking relay lifetime and usage. Call WaitForDebounce before GetRelayCount to ensure an accurate count.

Parameters

NameTypeDescription
relayNamestring

The name of the relay.

Returns

Returns a Int32 that indicates the number of times the relay has changed from closed to open.

Exceptions

TypeDescription
System.ObjectDisposedException

The GetRelayCount method was accessed after the associated NISwitch object was disposed.