RelayControl(string, SwitchRelayAction)
- Updated2026-01-20
- 1 minute(s) read
Controls individual relays of the switch.
Syntax
Namespace: NationalInstruments.ModularInstruments.NISwitch
public void RelayControl(string relayNames, SwitchRelayAction relayAction)
Remarks
Defined values
Parameters
| Name | Type | Description |
|---|---|---|
| relayNames | string | Name of the relay or set of relays to control. |
| relayAction | SwitchRelayAction | Specifies whether to open or close a given relay. |
Exceptions
| Type | Description |
|---|---|
| System.ObjectDisposedException | The RelayControl method was accessed after the associated NISwitch object was disposed. |