NI-SWITCH 19.0 .NET Framework 4.0 API Reference

Table of Contents

GetRelayCount Method

  • Updated2023-02-21
  • 2 minute(s) read
GetRelayCount Method
Returns the number of times the relay has changed from closed to open.

Namespace:  NationalInstruments.ModularInstruments.NISwitch
Assembly:  NationalInstruments.ModularInstruments.NISwitch.Fx40 (in NationalInstruments.ModularInstruments.NISwitch.Fx40.dll) Version: 19.0.0.49152 (19.0.0.49152)
Visual Basic (Declaration)
Public Function GetRelayCount ( _
	relayName As String _
) As Integer
C#
public int GetRelayCount(
	string relayName
)

Parameters

relayName
The name of the relay.

Return Value

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

Exceptions

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

Remarks

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

See Also

Log in to get a better experience