NI Switch Executive

Content Type
Programming Language
Current manual

niSE Connect And Disconnect VI

niSE Connect And Disconnect VI

Connects the routes specified by the Connection Specification. When connecting, it may allow for multiconnection based on the Multiconnect Mode. Disconnects the routes specified in the Disconnection Specification. This VI is useful for switching from one state to another state.

This function will not wait for debounce. Call the niSE Wait for Debounce function to wait for debounce.

Details

niSE Connect And Disconnect

ci32.gif

Multiconnect Mode (Use Default Mode) sets the connection mode for the VI.

The mode may be one of the following:

Default (-1)

Uses the mode selected as the default for the route in the NI Switch Executive virtual device configuration. If a mode has not been selected for the route in the NI Switch Executive virtual device, this parameter defaults to Multiconnect Routes.

No Multiconnect (0)

Routes specified in the connection specification must be disconnected before they can be reconnected. Calling the niSE Connect VI on a route that was connected using No Multiconnect mode results in an error condition.

Multiconnect Routes (1)

Routes specified in the connection specification can be connected multiple times. The first call to the niSE Connect VI performs the physical hardware connection. Successive calls to the niSE Connect VI increase a connection reference count. Similarly, calls to the niSE Disconnect VI decrease the reference count. When it reaches 0, the hardware is physically disconnected. This behavior is slightly different with SPDT relays. For more information, refer to Exclusions and SPDT Relays. Multiconnecting routes applies to entire routes and not to route segments.

crn.gif

NISE Session (in) is the session referencing this NI Switch Executive virtual device. Session handles are created through a call to the niSE Open Session VI.

cstr.gif

Connection Specification ("") is the string describing the connections to be made. Refer to Route Specification Strings for more information.

cstr.gif

Disconnection Specification ("") is the string describing the disconnections to be made. Refer to Route Specification Strings for more information.

You can use an asterisk in this parameter to accomplish the following:

1. For NISE_VAL_BREAK_BEFORE_MAKE operation order, an asterisk (*) will disconnect all connections currently connected and connect what is in the Connection Specification parameter. However, this action maintains as closed those connections currently connected that also exist in the Connection Specification parameter. This behavior minimizes relay actuation and thus extends the life of the relays.

2. For NISE_VAL_BREAK_AFTER_MAKE operation order, the VI connects what is in the Connection Specification parameter and the asterisk (*) will disconnect all other connections. As in case 1, this action maintains as closed those connections currently connected that also exist in the Connection Specification parameter. This behavior minimizes relay actuation and thus extends the life of the relays.

cerrcodeclst.gif

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

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.

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.

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.

cbool.gif

Wait For Debounce (T), if TRUE, waits for all switches to debounce before it returns. If FALSE, it immediately returns after the switch control is completed.

Note  In either case, the wait for debounce occurs after the connection portion of operation. If you need finer grained control of this debounce behavior, consider calling the niSE Connect VI and the niSE Disconnect VI separately.
ci32.gif

Operation Order (Break After Make) sets the order of the operation for the VI. Defined values are Break Before Make and Break After Make.

Break Before Make (1)

The VI disconnects the routes specified in the Disconnection Specification before connecting the routes specified in the Connection Specification. Break Before Make is the typical mode of operation.

Break After Make (2)

The VI connects the routes specified in the Connection Specification before connecting the routes specified in the Disconnection Specification. This mode of operation is normally used when you are switching current and want to ensure that a load is always connected to your source. The order of operation is to connect first or disconnect first.

irn.gif

NISE Session (out) is the session referencing this NI Switch Executive virtual device. Session handles are created through a call to the niSE Open Session VI. This session handle is the copy of the session handle that was passed in and provides for easier wiring between NI Switch Executive VIs.

ierrcodeclst.gif

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

ibool.gif

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

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.

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.

Details

The niSE Connect And Disconnect VI manipulates the hardware connections and disconnections only when the routes are different between the connection and disconnection specifications. If any routes are common between the connection and disconnection specifications, NI Switch Executive determines whether the relays need to be switched. This functionality has the distinct advantage of increased throughput for shared connections, because hardware does not have to be involved and potentially increases relay lifetime by decreasing the number of times that the relay has to be switched.

In the event of an error, the call to the niSE Connect And Disconnect VI attempts to undo any connections made, but does not attempt to reconnect disconnections. Some errors can be caught before manipulating hardware, although it is feasible that a hardware call could fail causing some connections to be momentarily closed and then reopened.

In This Section
Was this information helpful?