Table Of Contents

Connect And Disconnect (G Dataflow)

Version:
    Last Modified: September 16, 2017

    Connects routes as defined by the connection specification and supports multiconnect mode. Disconnects routes as defined by the disconnection specification.

    Use Connect And Disconnect for switching from one state to another state. Connect And Disconnect 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, 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.

    Programming Patterns

    Connect And Disconnect does not wait for debounce. Call the Wait for Debounce node to wait for debounce.

    connector_pane_image
    datatype_icon

    multiconnect mode

    Connection mode that defines whether a route can be connected multiple times or must be disconnected before it can be reconnected.

    Name Value Description
    Use Default Mode -1

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

    Multiconnect Routes 1

    Routes defined by the connection specification input can be connected multiple times. The first call to Connect performs the physical hardware connection. Successive calls to Connect increase a connection reference count. Similarly, calls to Disconnect decrease the reference count. When the reference count reaches zero, the hardware is physically disconnected. Multiconnecting routes applies to entire routes and not to route segments.

    No Multiconnect 0

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

    Default: Use Default Mode

    datatype_icon

    session in

    Handle that identifies your Switch Executive virtual device session previously allocated by Open Session.

    datatype_icon

    error in

    Error conditions that occur before this node runs.

    The node responds to this input according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Default: No error

    datatype_icon

    connection specification

    String defining the channel connections to be made.

    datatype_icon

    disconnection specification

    String defining the channel disconnections to be made.

    Asterisk Functionality in disconnection specification Strings with Connect and Disconnect

    • operation order set to Break Before Make—an asterisk (*) will disconnect all connections currently connected and connect what is in the connection specification input.
    • operation order set to Break After Make—an asterisk (*) will disconnect all connections except what is in the connection specification input.

    With either setting, this action maintains currently connected connections as closed if the connections also exist in the connection specification input. This behavior minimizes relay actuation and thus extends the life of the relays.

    datatype_icon

    wait for debounce

    Boolean value that controls whether switches wait to debounce.

    True Waits for all switches to debounce.
    False Immediately returns after the switch control is completed.
    datatype_icon

    operation order

    Order of the operation for the node.

    Name Value Description
    Break Before Make 1 Disconnects the routes defined by the disconnection specification input before connecting the routes defined by the connection specification input.
    Break After Make 2 Connects the routes defined by the connection specification input before connecting the routes defined by the disconnection specification input.

    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.

    datatype_icon

    session out

    Reference to your virtual device session to wire to the next node.

    datatype_icon

    error out

    Error information.

    The node produces this output according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Route Connection Behavior With Error Conditions

    In the event of an error, Connect And Disconnect attempts to undo any connections made so that the system is left in the same state it was in before the call to Connect And Disconnect, but does not attempt to reconnect disconnections. Some errors can be caught before manipulating hardware, but it is possible that a hardware call could fail, causing some connections to be momentarily closed and then reopened.

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported

    Web Server: Not supported in VIs that run in a web application


    Recently Viewed Topics