Download User Manual Advantech APAX series
Transcript
call GetLastError function.
Example
WORD wSlotID = 1; /* Slot ID */
WORD wChannel = 7; /* Channel ID */
if(ERR_SUCCESS != AIO_SetZeroCalibration (lDriverHandle, wSlotID,
wChannel, 0))
printf("Fail to set zero-calibration \n");
2.23. AO_BufValues
Users can use this function to buffer the AO values of the indicated slot. This function
is used along with OUT_FlushBufValues for a synchronized write Output. Once all
slots are buffered, then OUT_FlushBufValues function triggers the synchronized
buffer write of all masked slots.
Syntax
AO_BufValues(
LONG handle,
WORD i_wSlot,
DWORD i_dwMask,
WORD* i_wValues
);
Parameters
Name
Direction
Description
handle
Input
[in] The driver handler.
i_wSlot
Input
[in] The slot ID which is ranged from 0 to 15.
i_dwMask
Input
[in] The channels mask.
*Note:
From LSB to MSB of the value indicate the slot-0 to
slot-31 mask. If the bit is 1, it means that the
channel must buffer value.
i_wValues
Input
[in] The AO values to be bufferred.
Return Value
If the function succeeds, the return value is 0 (ERR_SUCCESS). If the function fails,
the return value is 325 (ERR_INTERNAL_FAILED). To get extended error information,