pi40iv_CanConnect
ViStatus pi40iv_CanConnect (ViSession instrumentHandle,
ViChar _VI_FAR channel1[],
ViChar _VI_FAR channel2[],
ViPInt32 pathCapability);
Purpose
This function verifies that the switch module is capable of creating a path between the two channels you specify with the Channel 1 and Channel 2 parameters. If the switch module is capable of creating a path, this function indicates whether the path is currently available given the existing connections.
If the path is not available due to the currently existing connections, but the implicit connection between the two channels already exists, the function returns the PI40IV_WARN_IMPLICIT_CONNECTION_EXISTS (0x3FFA2002) warning.
Parameters
Input |
Name |
Type |
Description |
instrumentHandle |
ViSession |
The ViSession handle that you obtain from the pi40iv_init or pi40iv_InitWithOptions function. The handle identifies a particular instrument session.
Default Value: None
|
channel1 |
ViChar[] |
You identify a path with two channels. Pass one of the channel names for which you want to verify a path. Pass the other channel name as the Channel 2 parameter.
Valid Channel Names: x1,x2,y1,y2
Default Value: ""
|
channel2 |
ViChar[] |
You identify a path with two channels. Pass one of the channel names for which you want to verify a path. Pass the other channel name as the Channel 1 parameter.
Valid Channel Names: x1,x2,y1,y2
Default Value: ""
|
Output |
Name |
Type |
Description |
pathCapability |
ViInt32 (passed by reference) |
Indicates whether a path is valid. Possible values include:
Status Name Actual Value
--------------------------------------------------
PI40IV_VAL_PATH_AVAILABLE 1
PI40IV_VAL_PATH_EXISTS 2
PI40IV_VAL_PATH_UNSUPPORTED 3
PI40IV_VAL_RSRC_IN_USE 4
PI40IV_VAL_SOURCE_CONFLICT 5
PI40IV_VAL_CHANNEL_NOT_AVAILABLE 6
Notes:
(1) PI40IV_VAL_PATH_AVAILABLE indicates that the driver can create the path at this time.
(2) PI40IV_VAL_PATH_EXISTS indicates that the path already exists.
(3) PI40IV_VAL_PATH_UNSUPPORTED indicates that the instrument is not capable of creating a path between the channels you specify.
(4) PI40IV_VAL_RSRC_IN_USE indicates that although the path is valid, the driver cannot create the path at this moment because the switch module is currently using one or more of the required channels to create another path. You must destroy the other path before creating this one.
(5) PI40IV_VAL_SOURCE_CONFLICT indicates that the instrument cannot create a path because both channels are connected to a different source channel.
(6) PI40IV_VAL_CHANNEL_NOT_AVAILABLE indicates that the driver cannot create a path between the two channels because one of the channels is a configuration channel and thus unavailable for external connections.
|
Return Value
Name |
Type |
Description |
status |
ViStatus |
Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. You examine the status code from each call to an instrument driver function to determine if an error occurred.
To obtain a text description of the status code, call the pi40iv_error_message function. To obtain additional information about the error condition, call the pi40iv_GetErrorInfo function. To clear the error information from the driver, call the pi40iv_ClearErrorInfo function.
The general meaning of the status code is as follows:
Value Meaning
-------------------------------
0 Success
Positive Values Warnings
Negative Values Errors
This driver defines the following status codes:
Status Description
-------------------------------------------------
WARNINGS:
/*=CHANGE:===================================================*
Insert Instrument-defined warning codes here.
*================================================END=CHANGE=*/
ERRORS:
/*=CHANGE:===================================================*
Insert Instrument-defined error codes here.
*================================================END=CHANGE=*/
This instrument driver also returns errors and warnings defined by other sources. The following table defines the ranges of additional status codes that this driver can return. The table lists the different include files that contain the defined constants for the particular status codes:
Numeric Range (in Hex) Status Code Types
-------------------------------------------------
3FFA2000 to 3FFA3FFF IviSwtch Warnings
3FFA0000 to 3FFA1FFF IVI Warnings
3FFF0000 to 3FFFFFFF VISA Warnings
3FFC0000 to 3FFCFFFF VXIPnP Driver Warnings
BFFA2000 to BFFA3FFF IviSwtch Errors
BFFA0000 to BFFA1FFF IVI Errors
BFFF0000 to BFFFFFFF VISA Errors
BFFC0000 to BFFCFFFF VXIPnP Driver Errors
|
References
Route
Pickering Interfaces PXI/LXI IVI Switch
Alphabetical Function Index
Hierarchical Function Index