9 s826_adcstatusread, 10 s826_adcread, S826_adcstatusread – Sensoray 826 User Manual
Page 25: S826_adcread
int S826_AdcEnableRead(
uint board, // board identifier
uint *enable // enable status
);
Parameters
board
826 board number. This must match the settings of the board's dip switches as described in section 2.2.
enable
Buffer that will receive the ADC system enable status: 1 = enabled, 0 = disabled.
Return Values
If the function succeeds, the return value is zero.
If the function fails, the return value is an error code.
Remarks
This function returns the ADC system's enable status that was previously configured by a board reset or a call to
S826_AdcEnableWrite.
5.3.9 S826_AdcStatusRead
The S826_AdcStatusRead function reads the ADC conversion status.
int S826_AdcStatusRead(
uint board, // board identifier
uint *status // conversion status
);
Parameters
board
826 board number. This must match the settings of the board's dip switches as described in section 2.2.
status
Pointer to a buffer that will receive the conversion status for all slots. Each bit corresponds to one slot; bits 0 to 15
correspond to slots 0 to 15. A bit will be set to '1' if new (unread) data is available in the slot's result register, or '0'
when the result register is empty (or has been read).
Return Values
If the function succeeds, the return value is zero.
If the function fails, the return value is an error code.
Remarks
This function returns status information without altering the state of the ADC system.
5.3.10 S826_AdcRead
The S826_AdcRead function fetches ADC data from one or more timeslots.
int S826_AdcRead(
uint board, // board identifier
int buf[16], // pointer to adc result buffer
uint tstamp[16], // pointer to timestamps buffer
uint *slotlist, // pointer to slotlist
uint tmax // maximum time to wait
);
826 Instruction Manual
20
Analog Inputs