niSwitch Initialize With Topology VI

NI Switches Help

Edition Date: April 2015

Part Number: 375472H-01

»View Product Info
Download Help (Windows Only)

Returns a session handle used to identify the switch module in all subsequent instrument driver calls and sets the topology of the switch module.

This VI creates a new IVI instrument driver session for the switch module specified in the resource name parameter. NI-SWITCH uses the topology specified in the topology name parameter and overrides the topology specified in MAX.

By default, the switch module is reset to a known state.

Enable simulation by specifying the topology and setting the simulate parameter to True.

Related Topics

niSwitch Initialize With Topology

/images/reference/en-XX/help/375472H-01/cio.gif

resource name specifies the resource name of the switch module to initialize. IVI logical names are also valid resource names.

Syntax:

Optional fields are shown in square brackets ([]). The default values for optional fields are as follows:

chassis ID = 1

bus number = 0

Configured in MAX Under Valid Syntax
Devices and Interfaces DeviceName
Traditional NI-DAQ (Legacy) Devices SCXI[chassis ID]::slot number
PXI System PXI[bus number]::device number

The following table lists example resource names.

Resource Name Description
SC1Mod3 NI-DAQmx module in chassis SC1 Slot 3
MySwitch NI-DAQmx module renamed to MySwitch
SCXI1::3 Traditional NI-DAQ (Legacy) module in chassis 1, Slot 3
SCXI::3 Traditional NI-DAQ (Legacy) module in chassis 1, Slot 3
PXI0::16 PXI bus 0, device number 16
PXI::16 PXI bus 0, device number 16
/images/reference/en-XX/help/375472H-01/cstr.gif

topology name specifies the topology to use for the switch module specified in resource name. Create a control for topology name to select from a list of topologies.

/images/reference/en-XX/help/375472H-01/cbool.gif

reset device specifies whether to reset the switch module during initialization. The default value is TRUE (1).

Note  The first call to the niSwitch Initialize With Topology VI after you reboot your computer will reset the hardware. This is the only case when the Reset flag is not honored.
TRUE (1)

The device will reset.

FALSE (0)

The device will not reset.

/images/reference/en-XX/help/375472H-01/cerrcodeclst.gif

error in describes error conditions that occur before this node runs. This input provides standard error in functionality.

/images/reference/en-XX/help/375472H-01/cbool.gif

status is TRUE (X) if an error occurred before this VI ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI ran. The default is FALSE.

/images/reference/en-XX/help/375472H-01/ci32.gif

code is the error or warning code. The default is 0. If status is TRUE, code is a non-zero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/375472H-01/cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI that produced the error or warning. The default is an empty string.

/images/reference/en-XX/help/375472H-01/cbool.gif

simulate enables simulation of the switch module specified in resource name. The default value is FALSE (0).

TRUE (1)

The module will be simulated.

FALSE (0)

The module will not be simulated.

/images/reference/en-XX/help/375472H-01/iio.gif

instrument handle out identifies a particular NI-SWITCH session established with the niSwitch Initialize With Topology VI, the niSwitch Initialize With Options VI, or the niSwitch Initialize VI and used for all subsequent NI-SWITCH calls.

/images/reference/en-XX/help/375472H-01/ierrcodeclst.gif

error out contains error information. This output provides standard error out functionality.

/images/reference/en-XX/help/375472H-01/ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

/images/reference/en-XX/help/375472H-01/ii32.gif

code is the error or warning code. If status is TRUE, code is a non-zero error code. If status is FALSE, code is 0 or a warning code.

/images/reference/en-XX/help/375472H-01/istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI that produced the error or warning.

WAS THIS ARTICLE HELPFUL?

Not Helpful