Sets the specified serial-out channel arm state.
Gx3756SerialOutSetArmState (nHandle, nChannel, nArmState, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle to a GX3756 board. |
nChannel |
SHORT |
Channel to get, channels are 0-3 board based (channels 0-3 in group 0):0. GX3756_SERIAL_CH0: Channel 0.1. GX3756_SERIAL_CH1: Channel 1.2. GX3756_SERIAL_CH2: Channel 2.3. GX3756_SERIAL_CH3: Channel 3. |
nArmState |
SHORT |
Arm state:0. GX3756_SERIAL_ARM_STATE_OFF: Arm is OFF, the channel will not response to any trigger.1. GX3756_SERIAL_ARM_STATE_ON: Arm is OFF, the channel will response to any trigger. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
When the specified channel arm state set to ON, and trigger mode set to continuous, each trigger (regardless of its source), will transmit the programmed data. If the trigger mode set to One-Short, after each trigger the Arm state will be set to Off state, require the user to set the Arm state again. This ensures that only a single trigger will be executed.
Channels 0-3 (Group 0) can be programmed to operate as serial-out transmitter or as Static I/O, see Gx3756SerialOutSetMode() API for more details. When any of Channels 0-3 (Group 0) are set to Serial Out, all 4 channels direction is set to output.
Channels 3-7 (Group 1) can be programmed as an external trigger source to channels 0-3 (Group 0), when they are set to serial-out operation mode. See Gx3756SerialOutSetMode(), and Gx3756SerialOutGetTriggerSource() APIs for more details.
See the Gx3756SerialOutGetStatus () API for complete example.
The following example sets channel 0 arm state to ON:
SHORT nHandle, nStatus;
Gx3756SerialOutSetArmState (nHandle, GX3756_SERIAL_CH0, GX3756_SERIAL_ARM_STATE_ON, &nStatus);
Gx3756SerialOutSetBitRate, Gx3756SerialOutSetData, Gx3756SerialOutSetDataBitsPulseWidth, Gx3756SerialOutSetTriggerSource, Gx3756SerialOutSetMode,
Gx3756SerialOutSetNumOfDataBits, Gx3756SerialOutSetShiftMode, Gx3756SerialOutSetTriggerDelay, Gx3756SerialOutSetTriggerSource, Gx3756SerialOutTrig, GxFpgaGetErrorString