GX3104, GX3116e
Sets the specified array of channels output relay state.
GxSmuSourceSetOutputStateArray (nHandle, nChannelListArraySize, panChannelListArray, nState, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle to a GX3104 or GX3116e board. |
nChannelListArraySize |
SHORT |
Specifies the number of channels in panChannelListArray. If nChannelListArraySize=-1, then panChannelListArray parameter is ignored (can be set to NULL) and settings will be applied to all the channels. |
panChannelListArray |
PSHORT |
Array specifying the channels numbers to be set:GX3104: 0 (GX3104_CHANNEL_1) to 3 GX3104_CHANNEL_4.GX3116e: 0 (GX3116_CHANNEL_1) to 15 GX3116_CHANNEL_16. |
nState |
SHORT |
Specified array of channels output relay state:0. GXSMU_SOURCE_OUTPUT_OFF: the specified channel’s output is disconnected from the connector.1. GXSMU_SOURCE_OUTPUT_ON: the specified channel’s output is connected to the connector. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The function controls the specified channel’s output relay. The user can connect and disconnect the channel at any time.
The following example connect channel 0 and 2 output and returns the output state, and returns the settings:
SHORT nState, nStatus;
SHORT anChannelListArray [2];
// Fill channel array
anChannelListArray [0] = 0;
anChannelListArray [1] = 2;
GxSmuSourceSetOutputStateArray (nHandle, 2, anChannelListArray, GXSMU_SOURCE_OUTPUT_ON, &nStatus);
GxSmuSourceGetOutputState (nHandle, GX3104_CHANNEL_1, &nState, &nStatus);
GxSmuSourceSetCurrent, GxSmuSourceSetCurrentLimit, GxSmuSourceSetCurrentClamps, GxSmuSourceSetCurrentRange, GxSmuSourceSetMode, GxSmuSourceGetOutputState, GxSmuSourceSetRangeMode, GxSmuSourceSetVoltage, GxSmuSourceSetVoltageLimit, GxSmuGetErrorString