GetRelayCount Method
- Updated2023-02-21
- 2 minute(s) read
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
- Type: System..::.StringThe 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
Exception | Condition |
---|---|
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.