IviSwtch_Disconnect

CVI/LabWindows IVI Class Driver

IviSwtch_Disconnect

IviSwtchBase Capability Group

C Function Prototype

ViStatus IviSwtch_Disconnect (ViSession vi, ViConstString channel1, ViConstString channel2);

Purpose

This function allows you to destroy the path between two channels that you create with the IviSwtch_Connect or the IviSwtch_SetPath function. Because the paths created by the switch module are bi-directional, the order of the two channels in the disconnection operation does not need to be the same as the connection operation.

This function returns as soon as the disconnect command is given to the instrument and the switch module is ready for another command. This may be before or after the switches involved settle. Use the IviSwtch_IsDebounced function to see if the switch has settled. Use the IviSwtch_WaitForDebounce function if you want to wait until the switch has debounced.

If some connections remain after disconnecting the two specified channels, this function returns the warning IVISWTCH_WARN_PATH_REMAINS.

If no explicit path exists between the two specified channels, this function returns the IVISWTCH_ERROR_NO_SUCH_PATH error without performing any disconnection operation.

Parameters

Name Type Description
vi ViSession The instrument handle that you obtain from the IviSwtch_init or IviSwtch_InitWithOptions functions. The handle identifies a particular IVI session.
channel1 ViConstString You identify a path with two channels. Pass one of the virtual channel names for which you want to destroy a path. Pass the other channel name as the channel2 parameter.

Virtual channel names are aliases for instrument specific channel strings. The instrument specific channel strings can differ from one instrument to another. Virtual channel names allow you to use and swap instruments without having to change the channel names in your source code. You assign a virtual channel name to an instrument specific channel through MAX. This control accepts virtual channel names you have assigned to the specific instrument you are using. This control also accepts the instrument specific channel names.

Note  You can specify the channel name as a string variable or as a literal enclosed in double quotes.
channel2 ViConstString You identify a path with two channels. Pass one of the virtual channel names for which you want to destroy a path. Pass the other channel name as the channel1 parameter.

Virtual channel names are aliases for instrument specific channel strings. The instrument specific channel strings can differ from one instrument to another. Virtual channel names allow you to use and swap instruments without having to change the channel names in your source code. You assign a virtual channel name to an instrument specific channel through MAX. This control accepts virtual channel names you have assigned to the specific instrument you are using. This control also accepts the instrument specific channel names.

Note  You can specify the channel name as a string variable or as a literal enclosed in double quotes.

Return Values