niSwitch_RelayControl

NI Switches Help

Edition Date: April 2015

Part Number: 375472H-01

»View Product Info
Download Help (Windows Only)

Specific Function

C Function Prototype

ViStatus niSwitch_RelayControl (ViSession vi, ViConstString relayNames, ViInt32 relayAction);

Purpose

Controls individual relays of the switch. When controlling individual relays, the protection offered by setting the usage of source channels and configuration channels, and by enabling or disabling analog bus sharing on the NI SwitchBlock, does not apply.

Refer to Devices to determine if the switch supports individual relay control.

Parameters

Name Type Description
vi ViSession A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls.

relayNames ViConstString Name of the relay or set of relays to control. You can supply a single relay name or a comma-delimited list of relay names to control these relays. Refer to Devices for a list of valid relay names for the switch module.



Examples of valid relay names:

ch0, ab0, 1wire, hlselect
relayAction ViInt32 Specifies whether to open or close a given relay.

Defined values:
NISWITCH_VAL_OPEN_RELAY
NISWITCH_VAL_CLOSE_RELAY (default).

Related Information

WAS THIS ARTICLE HELPFUL?

Not Helpful