GetSwitchRelayCount(string)
- Updated2026-02-05
- 1 minute(s) read
Obsolete: This method is obsolete. Will warn if used
Returns the number of times a relay has actuated on switches that support querying the relay count.
Syntax
Namespace: NationalInstruments.DAQmx
public long GetSwitchRelayCount(string relay)
Remarks
You must wait for the switch to settle before this method can determine an accurate relay count. Use this method to track relay lifetime and usage.
Parameters
| Name | Type | Description |
|---|---|---|
| relay | string | The relay you want to query. |
Returns
The number of times the relay has been activated.
Exceptions
| Type | Description |
|---|---|
| NationalInstruments.DAQmx.DaqException | The NI-DAQmx driver returned an error. |