pipx40_operateSwitch

ViStatus pipx40_operateSwitch (ViSession instrumentHandle, ViUInt32 subunitNumber, ViUInt32 switchFunction, ViUInt32 segmentNumber, ViUInt32 switchNumber, ViUInt32 subswitch, ViUInt32 switchAction, ViPBoolean state);

Purpose

For matrix sub-units having auto-isolation and/or auto-loopthru features; sets (optionally) and reads the state of an individual switch, supporting customized modes of operation for applications such as fault diagnostics.
Please consult the pipx40 driver programming manual for a complete description of the use of this function.

Parameters

Input
Name Type Description
instrumentHandle ViSession

Instrument handle obtained by the pipx40_init call used to open the card.

subunitNumber ViUInt32

The number of the sub-unit to access.
This function is only applicable to certain sub-unit types (matrix with auto-isolation and/or auto-loopthru features).

switchFunction ViUInt32

A code indicating the functional group to which the switch belongs.
Valid codes:
0 = pipx40_SW_FUNC_CHANNEL
A channel (matrix crosspoint) switch
1 = pipx40_SW_FUNC_X_ISO
A matrix X-isolation switch
2 = pipx40_SW_FUNC_Y_ISO
A matrix Y-isolation switch
3 = pipx40_SW_FUNC_X_LOOPTHRU
A matrix X-loopthru switch
4 = pipx40_SW_FUNC_Y_LOOPTHRU
A matrix Y-loopthru switch

segmentNumber ViUInt32

The number of the segment in which the switch is located.

switchNumber ViUInt32

The logical number of the switch.
For matrix crosspoint switches this can be either:
1) If "segment number" is zero, the global logical number of the switch, as used by "pipx40 Set Channel State.vi".
2) If "segment number" is non-zero, the segment-local number of the switch, calculated in a similar way to the above.
For other switches the appropriate segment number must always be specified.

subswitch ViUInt32

The number of the subswitch to access.
A logical switch may be implemented using multiple physical switches that are independently controlled.

switchAction ViUInt32

A code indicating the switch action to be performed.
Valid codes:
0 = pipx40_SW_ACT_NONE
No switch change - just set state result
1 = pipx40_SW_ACT_OPEN
Open switch
2 = pipx40_SW_ACT_CLOSE
Close switch

Output
Name Type Description
state ViBoolean (passed by reference)

Variable to receive the state of the chosen switch (after performing the specified action).
Values:        VI_OFF = switch is OFF
VI_ON  = switch is ON

Return Value

Name Type Description
status ViStatus

A numeric code indicating the success or failure of the operation.
VI_SUCCESS = Successful operation.
Negative values are error codes and positive values are warnings.
To get a description of an error, pass the error code to pipx40_error_message.

References

Specialised Switching
Pickering Interfaces PXI VISA
Alphabetical Function Index
Hierarchical Function Index