Returns the specified serial-out channel last transmitted 64-bit of data (for diagnostic only).
Gx3756SerialOutGetlLastTxData (nHandle, nChannel, pdwMostSigWord, pdwLeastSigWord, 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. |
pdwMostSigWord |
PDWORD |
Returns the specified serial-out channel most significant word that was last transmitted. |
pdwLeastSigWord |
PDWORD |
Returns the specified serial-out channel least significant word that was that was last transmitted. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
Note: this function should be used for diagnostic only. The read back samples the output transition at the middle of the bit rate set time. If the data bits pulse width for the logic high is less than half the bit rate then the read back will not be correct. If the data bits pulse width for the logic low time is greater than half the bit rate then the read back will not be correct.
The function returns the specified serial-out channel 64-bit last transmitted. The board always record back any transmitted data on each channel in order to verify the actual output data. The last transmitted most significant word and last transmitted least significant word will be set to zero whenever setting the Arm to ON, and priors any new trigger. The user can call Gx3756SerialOutGetStatus() API to check if new data was sent.
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 initializes and resets the GX3756 board:
SHORT nHandle, nStatus;
DWORD dwMostSigWord, dwLeastSigWord;
Gx3756SerialOutGetlLastTxData (nHandle, &dwMostSigWord, &dwLeastSigWord, &nStatus);
Gx3756SerialOutReset, Gx3756SerialOutSetArmState, Gx3756SerialOutSetBitRate, Gx3756SerialOutSetData, Gx3756SerialOutSetDataBitsPulseWidth, Gx3756SerialOutSetTriggerSource, Gx3756SerialOutSetMode,
Gx3756SerialOutSetNumOfDataBits, Gx3756SerialOutSetShiftMode, Gx3756SerialOutSetTriggerDelay, Gx3756SerialOutSetTriggerSource, Gx3756SerialOutTrig, GxFpgaGetErrorString