Analog input data format, Handling buffer overruns with the stall property – Measurement Computing DAQFlex User Manual
Page 6

DAQFlex Message-based Firmware Specification
Analog input data format
6
Notes
When "DEV:DATATYPE=ENABLE" the input response sets the first byte to the data type used. A
valid SendMessage without a RAW return will return a 0 length packet. Only invalid StringMessages
will return 0xFF.
When "DEV:DATATYPE=DISABLE", the data will not include the DATATYPE byte.
Analog input data format
When performing analog input operations with the "AI" component, the return data is LSB (Least
Significant Bit) justified with a value of 0 as Min Scale.
Example: The bit table below shows 12-bits of data acquired using a typical DAQFlex-supported device
installed with firmware version 2.03 or later.
A/D Converter Values
Bit
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Data
0
0
0
0
x
x
x
x
x
x
x
x
x
x
x
x
where x the actual conversion value.
Note
Some devices return data as 12-bit MSB (Most Significant Bit) justified, and require conversion to the
LSB justified data format shown above. Refer to the device-specific information in the
chapter on page 20 for details.
Handling buffer overruns with the STALL property
You can enable the AINSCAN:STALL property to stop scanning if a buffer overrun occurs.
When STALL is enabled, the USB pipe enters a stall condition in the event of a buffer overrun.
When STALL is disabled, the software must check the scan state using the AISCAN:STATUS
message to see that an overrun occurs.