DAQFlex

Message-based Firmware
Specification

Document Revision 9
October 2013
© Copyright 2013

Trademark and Copyright Information
Measurement Computing Corporation, InstaCal, Universal Library, and the Measurement Computing logo are either trademarks
or registered trademarks of Measurement Computing Corporation. Refer to the Copyrights & Trademarks section on
mccdaq.com/legal for more information about Measurement Computing trademarks. Other product and company names
mentioned herein are trademarks or trade names of their respective companies.
© 2013 Measurement Computing Corporation. All rights reserved. No part of this publication may be reproduced, stored in a
retrieval system, or transmitted, in any form by any means, electronic, mechanical, by photocopying, recording, or otherwise
without the prior written permission of Measurement Computing Corporation.

NoticeMeasurement Computing Corporation does not authorize any Measurement Computing Corporation product for use
in life support systems and/or devices without prior written consent from Measurement Computing Corporation.
Life support devices/systems are devices or systems that, a) are intended for surgical implantation into the body, orb) support or sustain life and whose failure to perform can be reasonably expected to result in injury. Measurement
Computing Corporation products are not designed with the components required, and are not subject to the testing
required to ensure a level of reliability suitable for the treatment and diagnosis of people.

SM DAQFlex_Firmware.docx

Table of Contents
Chapter 1

Message-based Firmware Specification ............................................................................................. 4
SMBI data types ................................................................................................................................................. 4
Communication mechanism ............................................................................................................................... 4
Control transfers ............................................................................................................................................................... 4

Message-based control transfers ......................................................................................................................... 5
StringMessage — SMBI string message ........................................................................................................................... 5
RawData — Raw data with SMBI .................................................................................................................................... 5

Analog input data format .................................................................................................................................... 6
Handling buffer overruns with the STALL property .......................................................................................... 6
Chapter 2

Programming and developing applications ....................................................................................... 7
Chapter 3

Updating device firmware .................................................................................................................... 8
Chapter 4

Updating the FPGA configuration bitfile on a non-Windows system .............................................. 9
Get the status of the FPGA configuration ........................................................................................................... 9
Loading a FPGA configuration file onto the device (Linux and Mac OS X) ..................................................... 9
Example code...................................................................................................................................................................10
Chapter 5

Calibrating a device ............................................................................................................................11
Analog input calibration messages ................................................................................................................... 12
Analog output calibration messages ................................................................................................................. 16
Chapter 6

Hardware Reference ...........................................................................................................................20
USB-200 Series ................................................................................................................................................ 21
USB-1208FS-Plus ............................................................................................................................................ 24
USB-1408FS-Plus ............................................................................................................................................ 27
USB-1608FS-Plus ............................................................................................................................................ 30
USB-1608G Series ........................................................................................................................................... 32
USB-2001-TC................................................................................................................................................... 36
USB-2408 Series .............................................................................................................................................. 37
USB-7202 ......................................................................................................................................................... 41
USB-7204 ......................................................................................................................................................... 43
Analog input data format .................................................................................................................................................45
Known issues ...................................................................................................................................................................46

3

Chapter 1

Message-based Firmware Specification
The message-based firmware architecture uses a String Message Based Interface (SMBI) to
communicate with supported devices using a minimal number of device transactions.
For those interested in developing a driver to interface directly with the device, the source code for the
DAQFlex software API may be used as a guide.
Click on a link below for more information about the firmware specification:

SMBI data types

Communication mechanism

Message-based control transfers



Analog input data format

Programming and developing applications

Updating device firmware

Updating the FPGA configuration bitfile on a non-Windows system

Calibrating a deviceHardware reference

Note that not all of the messages supported by the software are supported when talking directly to thedevice firmware.

SMBI data types
Special formatting characters are returned with RAW data (except streaming data from bulk transfers)
to indicate the following data types:
char[64]: String data in a character array

uint8: unsigned 8-bit value

uint16: unsigned 16-bit value

uint32: unsigned 32-bit valuefloat32: float 32-bit value

Communication mechanism
The device enumerates as a USB device using an MCC driver.

Control transfers
Control transfers to endpoint 0 are used to communicate with the device.

The control transfer maximum buffer size is 64 bytes.



The control transfers are vendor transfers.



The command code is in the bRequest field.
o

SMBI uses the 0x80 data type for strings, and the 0x81 data type for RAW data, when
supported.

Parameters passed for OUT control transfers are sent during the data stage.

The SMBI data stage returns RAW data, with LSB first.

4

DAQFlex Message-based Firmware Specification

Message-based control transfers



The DEV component message "DEV:DATATYPE=ENABLED" specifies whether raw data is enabled or
disabled for returned data. When DEV:DATATYPE=ENABLED, the first byte indicates the data typereturned. Refer to the RawData Notes for more information.



The amount of data transferred must be specified in the wLength field.

Message-based control transfers
Digital I/O Commands
Command

DescriptionbRequest

Direction

StringMessage
RawData

Send string messages to the device
Return raw data from the device

0x80
0x81

In/OutIn

StringMessage — SMBI string message
This command reads/writes the string message components of a device. The device stores the various
components and parameters to provide read back.
Output arguments
stringchar[64]; 64 character string including a NULL terminator.

Input arguments
None
Input response
stringchar[64]; 64 character response string including a NULL terminator.

Notes


Invalid output strings result in a STALL to the USB Control Transfer, and the input response returns"INVALID".

RawData — Raw data with SMBIThis command reads the RAW data from the last StringMessage sent to the device. Data is only
returned if the StringMessage has matching RAW data; otherwise a 0 length packet is returned.
Output arguments
N/A – output is not currently supported.
Input arguments
None
Input response
DATATYPE

0x03 – uint8
0x07 – uin16
0x09 – uint32
0x0A – float32
0xFF – Invalid

valueThis depends upon the StringMessage sent, but will have the form of
DATATYPE. Invalid StringMessage result in a 0 length packet, or if
DATATYPE is set to ENABLE, one byte reading 0xFF.

5

DAQFlex Message-based Firmware Specification

Analog input data format

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
Data

15
0

14
0

13
0

12
0

11
x

10
x

9
x

8
x

7
x

6
x

5
x

4
x

3
x

2
x

1
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 Hardware
Reference 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.

60xChapter 2

Programming and developing applications
The firmware architecture uses a String Message Based Interface (SMBI) to communicate with DAQFlex
series hardware. A minimal number of device transactions is required. Communication with the device isaccomplished through the USB driver (mccusb, libusb, or other custom driver).
Device hardware installed on a Mac OS X system is configured with the libusb driver.
Refer to the Windows driver (mccusb) or the Linux driver (libusb) for an example of how tocommunicate with DAQFlex series hardware. You can also use the DAQFlex software API source code asa guide for developing a driver to interface directly with the hardware.

Notes


Experience with CONTROL transfers for asynchronous communications, and BULK transfers forsynchronous communications is recommended.

Only experienced USB programmers should attempt to write a driver for use with the DAQFlex
firmware.



Not all of the messages supported by the software are supported when talking directly to the device
firmware.

7

Chapter 3

Updating device firmware
Note: To determine the firmware version currently installed on a device, run the DAQFlexFWLoader.exe
provided with the DAQFlex for Windows software. The firmware version installed on a device displays in the
Device firmware version field.
Perform the following procedure to update the firmware that is installed on a message-based DAQ device:
1.
2.
3.
4.
5.
6.
7.
8.

Go to the Measurement Computing Firmware Updates page at www.mccdaq.com/fwupdate.
Select the firmware version to download and click the Download button.
Right click on the firmware *.hex file and select the "Save As" option. Note that the option namemay vary depending on the browser.
Save the *.hex file to the FirmwareImages subdirectory of the DAQFlex installation directory("C:\Program Files\Measurement Computing\DAQFlex For Windows\FirmwareImages" by default).
Connect the message-based DAQ device to your computer.
Run the DAQFlex Firmware Loader utility from C:\Program Files\Measurement Computing\DAQFlex
For Windows, and run DAQFlexFWLoader.exe.
From the Device drop down list select the device in which to update the firmware.
Click the Load Firmware button to start installing the firmware.

The progress bar updates as the firmware is installed on the device.
Once the firmware is installed, the Status field displays "Firmware update completed", and the Device
firmware version field displays the current firmware version installed on the device. Click the X in theupper right corner of the dialog to exit the DAQFlex Firmware Loader utility.

8Chapter 4

Updating the FPGA configuration bitfile on a
non-Windows system
For devices that support DEV:FPGACFG, a configuration bitfile must be loaded onto the device's FPGA
before DAQ commands will work with the device.
The FPGA is configured automatically on a Windows operating system, and no action is required by theuser. On Mac OS X and Linux systems, perform the procedure below to load or update the FPGA
configuration bitfile on a device.

Get the status of the FPGA configuration
You can determine whether the device FPGA is configured by sending the "?DEV:FPGACFG" message.
The device returns one of the following messages:
"DEV:FPGA=CONFIGMODE" indicates that the FPGA is not configured,
Perform the procedure below to load the FPGA configuration file onto the device.

"DEV:FPGA=CONFIGURED" indicates that the device FPGA is currently configured.
Perform the procedure below only when you want to update the configuration file.

Loading a FPGA configuration file onto the device (Linux and
Mac OS X)
An FPGA configuration file has an .rbf extension and includes the name of the device. For example, theFPGA configuration file for the USB-1608G device is named USB_1608g.rbf.
FPGA configuration files are installed to the following location:


Mac OS X: the FPGA configuration file is installed to /usr/lib.

Linux: the FPGA configuration file is installed to /usr/lib/daqflex.

To load or update the FPGA configuration file on a device, complete the following steps:
1.

2.
3.

Send "DEV:FPGACFG=<unlock_code>" to the device to put the device into FPGA Configuration
Mode. The device response is "DEV:FPGACFG".
Note: The <unlock_code> is device-specific. Refer to the DEV:FPGACFG message in the hardwarespecific topics to determine the unlock code to set for a device. For example, to put the USB-1608G
into FPGA configuration mode, send the message "DEV:FPGACFG=0XAD"
Stream the bitfile down to the device through endpoint 0:
Send the firmware command FPGA_DATA (0x51) to the device with 64 bytes from the FPGA bitfile.
Specify the number of bytes to write with the wLength field.
Repeat until the entire FPGA bitfile has been sent. The FPGA bitfile is streamed down to the device
through Endpoint 0.

The device automatically exits Configuration Mode after the FPGA image file is successfully downloaded.

9

DAQFlex Message-based Firmware Specification

Loading a FPGA configuration file onto the device (Linux and Mac OS X)

Example code
The following code shows how to load the FPGA configuration bitfile onto a USB-1608G device. The code
below is written in C++/pseudocode, but it can be written in any language.

file = open(USB_1608g.rbf);
size = getSize(file);
while (size > 0);{
count = file read(buffer, 64);
device = ControlTransfer(RT_out, 0x51, count, buffer);size = size – count;}
file close();10

Chapter 5

Calibrating a device
The message-based firmware provides messages that let you calibrate the analog inputs or outputs on a
device.
Calibrating analog inputs
To modify the analog input calibration settings, complete the following steps:
1.

2.

3.
4.
5.
6.

Send the "AICAL:UNLOCK" message to unlock the AICAL component and put the device into
Calibrate Mode.
When the AICAL component is unlocked, sending a message to any component other than AICAL
will lock the AICAL component.
Send the "AICAL:REF=value" message to set the calibration voltage.
Refer to the device-specific information to determine the calibration voltages supported by thedevice.
The calibration voltage value is stored in EEPROM and can be retrieved with the "?AICAL:REFVAL"
query.
Send the "AICAL{ch}:RANGE=value" message to set the channel and range value to calibrate.
Send the "AICAL{ch}:SLOPE=value" message to set the slope for the current range setting.
Send the "AICAL{ch}:OFFSET=value" message to set the offset for the current range setting.
Send the message "AICAL:LOCK" to lock the AICAl component and exit Calibration Mode.
The device returns INVALID if any AICAL property message is sent while the AICAL component islocked.

Note: The channel {ch} message variable is ignored on devices with channels that are not individuallyconfigurable.
Refer to the Analog input calibration messages on page 12 for details about the AI calibration messages .
Calibrating analog outputs
To modify the analog output calibration settings, complete the following steps:
1.

2.
3.
4.
5.
6.

Send the "AOCAL:UNLOCK" message to lock the AOCAL component and put the device into
Calibrate Mode.
When the AOCAL component is unlocked, sending a message to any component other than AOCAL
will lock the AOCAL component.
Send the "AOCAL{ch}:SLOPE=value" message to set the slope for the current range setting.
Send the "AOCAL{ch}:OFFSET=value" message to set the offset for the current range setting.
Send the "AOCAL{ch}:VALUE=value" message to set the value of the AO channel being calibrated.
Send the message "AOCAL:LOCK" to lock the AOCAl component and exit Calibration Mode.
The device returns INVALID if any AOCAL property message is sent while the AOCAL component islocked.

Note: The channel {ch} message variable is ignored on devices with channels that are not individuallyconfigurable.
Refer to the Analog output calibration messages on page 16 for details about the AO calibration messages.

11

DAQFlex Message-based Firmware Specification

Analog input calibration messages

Analog input calibration messages
The AI and AICAL components provide messages for calibrating the analog inputs on a device. Refer tothe device-specific information in the Hardware Reference chapter for the component properties andcommands supported by each DAQ device.

AI component calibration properties (USB-2408 series only)
ADCAL/START, ADCAL/STATUS
ADCAL/STARTStart the A/D internal calibration.
Message"AI:ADCAL/START"

Response"AI:ADCAL/START"ADCAL/STATUS

Get the status of the A/D internal calibration.
Message"?AI:ADCAL/STATUS"

Response"AI:ADCAL/STATUS=value"value

RUNNING, IDLEAICAL component calibration properties (USB-1608G Series and USB-2408 Series only)
LOCK, MODE, OFFSET, RANGE, REF, REFVAL, RES, SLOPE, TCCAL, UNLOCK, VALUELOCKLock the AICAL component.
Message"AICAL:LOCK"

Response"AICAL:LOCK"Note

The device returns INVALID if any AICAL property message is accessed while the AICAL
component is locked.

MODE

Set the calibration channel mode.
Message"AICAL:MODE=value"

Response"AICAL:MODE"
value

Example

AIOFFSET, AIGAIN, TCOFFSET, TCGAIN/POS, TCGAIN/NEG"AICAL:MODE=TCOFFSET"

Get the calibration channel mode.
Message"?AICAL:MODE"

Response"AICAL:MODE=value"value

AIOFFSET, AIGAIN, TCOFFSET, TCGAIN/POS, TCGAIN/NEG

12

DAQFlex Message-based Firmware Specification

Analog input calibration messages

OFFSET

Set the offset in hexadecimal bytes for the current AICAL:RANGE setting.
Message"AICAL{ch}:OFFSET/HEX=hex value"
or"AICAL{ch}:OFFSET=0xhex value"
Refer to the device-specific information in the Hardware Reference chapter to see
whether "/HEX" is supported.

Response"AICAL{ch}:OFFSET"ch

The channel number.

hex value

The calibration offset in hexadecimal bytes.

Example"AICAL{0}:OFFSET/HEX=0x84B575AF"Note

The hex value is used to preserve the precision of the double precision floating pointvalue.

Get the offset in hexadecimal bytes for the current AICAL:RANGE setting.
Message"?AICAL{ch}:OFFSET/HEX"or"?AICAL{ch}:OFFSET"
Refer to the device-specific information in the Hardware Reference chapter to see
whether "/HEX" is supported.

Response"AICAL{ch}:OFFSET=0xhex value"ch

The channel number.

hex value

The calibration offset in hexadecimal bytes.

RANGE


Set the range to calibrate.
Message"AICAL:RANGE=value"

Response"AICAL:RANGE"
value

Example

The range value.

"AICAL:RANGE=BIP10V"

Get the range to calibrate.
Message"?AICAL:RANGE"

Response"AICAL:RANGE=value"value

The range value.

13

DAQFlex Message-based Firmware Specification

Analog input calibration messages

REF

Set the calibration reference voltage.
Message"AICAL:REF=value"

Response"AICAL:REF"
value

The voltage value.

Example"AICAL:REF=+1.250034V"

Note

The voltage value is stored in EEPROM.

REFVAL

Get the actual measured value of the currently set calibration reference voltage.
Message"?AICAL:REFVAL"

Response"AICAL:REFVAL=value"
value

Note


The measured voltage value.

The voltage value is retrieved from the value stored in EEPROM.

Get the actual measured hex value of the currently set calibration reference voltage.
Message"?AICAL:REFVAL/HEX"

Response"AICAL:REFVAL=0xhex value"hex value

Note

The measured voltage hex value.

Omitting "/HEX" from the query results in a loss of precision in the value returned.

RES

Get the A/D resolution.
Message"?AICAL:RES"

Response"AICAL:RES=value"value

The A/D resolution.

SLOPE


Set the slope for the current AICAL:RANGE setting.
Message"AICAL{ch}:SLOPE=value"

Response"AICAL{ch}:SLOPE"

Examplech

The channel number.

value

The calibration slope.

"AICAL{0}:SLOPE=–0.0025"

14

DAQFlex Message-based Firmware Specification

Analog input calibration messages

Set the slope in hexadecimal bytes for the current AICAL:RANGE setting.
Message"AICAL{ch}:SLOPE/HEX=hex value"

Response"AICAL{ch}:SLOPE"ch

The channel number.

hex value

The calibration slope in hexadecimal bytes.

Example"AICAL{0}:SLOPE/HEX=0x14B525A3"

Note

The hex value is used to preserve the precision of the double precision floating pointvalue.

Get the slope in hexadecimal bytes for the current AICAL:RANGE setting.
Message"?AICAL{ch}:SLOPE/HEX"or"?AICAL{ch}:SLOPE"
Refer to the device-specific topics to see whether "/HEX" is supported.

Response"AICAL{ch}:SLOPE=0xhex value"ch

The channel number.

hex value

The calibration slope in hexadecimal bytes.

TCCAL


Enables or disables the TC Cal Measurement option.
Message"AICAL:TCCAL=value"

Response"AICAL:TCCAL"
value

Example

ENABLE, DISABLE"AICAL:TCCAL=ENABLE"

Get the value for the TC Cal Measurement option.
Message"?AICAL:TCCAL"

Response"AICAL:TCCAL=value"value

ENABLE, DISABLE

UNLOCK

Unlock the AICAL component.
Message"AICAL:UNLOCK"

Response"AICAL:UNLOCK"Note

The AICAL component must be unlocked in order to change calibration settings on a
device's analog inputs.
When AICAL is unlocked, sending a message to any component other than AICAL willlock the AICAL component.

15

DAQFlex Message-based Firmware Specification

Analog output calibration messages

VALUE


Get the value of the analog input channel being calibrated.
Message"?AICAL{ch}:VALUE"

Response"AICAL{ch}:VALUE=value"

Examplech

The AI channel being calibrated.

value

The AI channel value in counts.

"?AICAL{0}:VALUE"

Analog output calibration messages
The AOCAL component provides messages for calibrating the analog outputs on a USB-1608G Series
and USB-2408 Series device.
Refer to the device-specific information in the Hardware Reference chapter for the component properties
and commands supported by each DAQ device.

AOCAL component calibration properties (USB-1608G Series and USB-2408 Series only)
AIOFFSET, AIRANGE, AIRES, AISLOPE, AIVALUE, LOCK, OFFSET, RES, SLOPE, UNLOCK, VALUEAIOFFSET

Get the offset for the current AICAL:RANGE setting.
Message"?AOCAL{ch}:AIOFFSET/HEX"

Response"AOCAL{ch}:AIOFFSET=0xhex value"ch

The analog output channel.

hex value

The offset currently set for AICAL:RANGE.

Example"AOCAL{0}:AIOFFSET=0x84B575AF"Note

The hex value is used to preserve the precision of the double precision floating pointvalue.

AIRANGE

Get the analog input range.
Message"?AOCAL{ch}:AIRANGE"

Response"AOCAL{ch}:AIRANGE=value"

Examplech

The analog output channel.

value

BIP10V.

"AOCAL{0}:AIRANGE=BIP10V"

16

DAQFlex Message-based Firmware Specification

Analog output calibration messages

AIRES


Get the resolution of the A/D used for calibrating the D/A.
Message"?AOCAL:AIRES"

Response"AOCAL:AIRES=value"value

The A/D resolution.

Example"AOCAL:AIRES=S24"

Note

The first character in the value returned indicates that the value is signed.

AISLOPE

Get the slope for the current AICAL:RANGE setting.
Message"?AOCAL{ch}:AISLOPE/HEX"

Response"AOCAL{ch}:AISLOPE=0xhex value"ch

The analog output channel.

hex value

The slope currently set for AICAL:RANGE.

Example"AOCAL{0}:AISLOPE=0x14B525A3"

Note

The hex value is used to preserve the precision of the double precision floating pointvalue.

AIVALUE

Get the value of the analog input channel being calibrated.
Message"?AOCAL{ch}:AIVALUE"

Response"AOCAL{ch}:AIVALUE=value"

Note

ch

The AI channel being calibrated.

value

The AI channel value in counts.

When this message is sent, the device switches the internal CalConfig to the DAC
channel that is specified in the message.

LOCKLock the AOCAL component.
Message"AOCAL:LOCK"

Response"AOCAL:LOCK"Note

The device returns INVALID if any AOCAL property message is accessed while the
AOCAL component is locked.

17

DAQFlex Message-based Firmware Specification

Analog output calibration messages

OFFSET

Set the offset in hexadecimal bytes for the current AICAL:RANGE setting.
Message"AICAL{ch}:OFFSET/HEX=0xhex value"
or"AICAL{ch}:OFFSET=0xhex value"
Refer to the device-specific topics to see whether "/HEX" is supported.

Response"AICAL{ch}:OFFSET"ch

The channel number.

hex value

The calibration offset in hexadecimal bytes.

Example"AICAL{0}:OFFSET/HEX=0x84B575AF"Note

The hex value is used to preserve the precision of the double precision floating pointvalue.

Get the offset in hexadecimal bytes for the current AICAL:RANGE setting.
Message"?AICAL{ch}:OFFSET/HEX"or"?AICAL{ch}:OFFSET"
Refer to the device-specific topics to see whether "/HEX" is supported.

Response"AICAL{ch}:OFFSET=0xhex value"ch

The channel number.

hex value

The calibration offset in hexadecimal bytes.

RES

Get the D/A resolution.
Message"?AICAL:RES"

Response"AICAL:RES=value"value

The A/D resolution.

SLOPE


Set the slope for the current AICAL:RANGE setting.
Message"AICAL{ch}:SLOPE=value"

Response"AICAL{ch}:SLOPE"

Examplech

The channel number.

value

The calibration slope.

"AICAL{0}:SLOPE=–0.0025"

18

DAQFlex Message-based Firmware Specification

Analog output calibration messages

Set the slope in hexadecimal bytes for the current AICAL:RANGE setting.
Message"AICAL{ch}:SLOPE/HEX=0xhex value"

Response"AICAL{ch}:SLOPE"ch

The channel number.

hex value

The calibration slope in hexadecimal bytes.

Example"AICAL{0}:SLOPE/HEX=0x14B525A3"

Note

The hex value is used to preserve the precision of the double precision floating pointvalue.

Get the slope in hexadecimal bytes for the current AICAL:RANGE setting.
Message"?AICAL{ch}:SLOPE/HEX" or "?AICAL{ch}:SLOPE"
Refer to the device-specific topics to see whether "/HEX" is supported.

Response"AICAL{ch}:SLOPE=0xhex value"ch

The channel number.

hex value

The calibration slope in hexadecimal bytes.

UNLOCK

Unlock the AOCAL component.
Message"AOCAL:UNLOCK"

Response"AOCAL:UNLOCK"

Note The AOCAL component must be unlocked in order to change calibration settings on a
device's analog outputs.

 When AOCAL is unlocked, sending a message to any component other than AOCAL
will lock the AOCAL component.

VALUE


Set the value of the analog output channel being calibrated.
Message"?AOCAL{ch}:VALUE=value"

Response"AOCAL{ch}:VALUE"

Examplech

The AO channel being calibrated.

value

The AO channel value in counts.

"AOCAL{0}:VALUE=4095"

Get the value of the analog output channel being calibrated.
Message"?AOCAL{ch}:VALUE"

Response"AOCAL{ch}:VALUE=value"ch

The AO channel being calibrated.

value

The AO channel value in counts.

19

Chapter 6

Hardware Reference
Select your DAQFlex-supported device below for the components and programming messages supportedby the firmware.
USB-200 Series

USB-1208FS-Plus

USB-1408FS-Plus

USB-1608FS-Plus

USB-1608G SeriesUSB-2408 SeriesUSB-2001-TC



USB-7202



USB-7204

Refer to the DAQFlex Software User's Guide for a description of each component and property. Note that
not all of the messages supported by the software are supported when talking directly to the device
firmware.

20

Hardware Reference – USB-200 Series

DAQFlex Message-based Firmware Specification

USB-200 Series
The USB-200 Series includes the following devices:USB-201, USB-201-OEM



USB-202, USB-202-OEM



USB-204, USB-204-OEM



USB-205, USB-205-OEM

Use the components below to set or get device properties.
Refer to the DAQFlex Software User's Guide for a description of each component and property.

Component

AI

AI{ch}

AIQUEUEAIQUEUE{element}

Supported
Property/Command
CHMODEOFFSET
RANGE
SLOPE
OFFSET
RANGE
SLOPE
VALUE
CLEAR
COUNT
CHAN
CHMODERANGE
EXTPACERHIGHCHAN
LOWCHAN
QUEUE

Set/GetSupported Values

Get
Get
Get
Get
Get
Get
Get
Get
Get

8
SE
4-byte floating point numeric
BIP10V
4-byte floating point numeric
4-byte floating point numeric
BIP10V
4-byte floating point numeric
Unsigned integer numeric

Get
Set/GetGet
Get
Set/GetSet/GetSet/GetSet/Get0 to 7 elements
0 to 7 single-ended
SE, DIFF
BIP10V, BIP5V, BIP2V, BIP1V
ENABLE, DISABLE
0 to 70 to 7ENABLE, DISABLE, RESET
channel: 0 to 7
value: BIP10V
USB-204/USB-204-OEM andUSB-205/ USB-205-OEM: 500,000 Hz

RANGE{ch}

Get

RATE

Set/GetUSB-201/USB-201-OEM andUSB-202/USB-202-OEM: 100,000 Hz

AISCANAITRIGRESET

Set

SAMPLES

Set/Get

STALL
START
STATUSSTOPTRIGXFRMODE
SRC

Set/Get0 to N(0 = continuous scan; N = 32-bit)
ENABLE, DISABLE

Get

IDLE, RUNNING, OVERRUN

Set/GetSet/GetSet/GetTYPE

Set/GetENABLE, DISABLEBLOCKIO, SINGLEIOHWSTART/DIG
EDGE/RISING, EDGE/FALLING,
LEVEL/HIGH, LEVEL/LOW

21

Hardware Reference – USB-200 Series

DAQFlex Message-based Firmware Specification

Component

Supported
Property/Command

Set/Get

AO

RES

Get

AO{ch}OFFSET
RANGE
SLOPE
VALUE

Get
Get
Get
Set/GetD/A resolution
U12 (unsigned 12-bit integer)
4-byte floating point numeric
UNI5V
4-byte floating point numeric
0 to 4,095 counts

Get

1

DATATYPEFLASHLED/{n}Set
Get
Set/Get
Set

FWV

Get

ID
MFGCALMFGCAL{item}

Set/GetGet
Get

MFGSERRESET/{value}

Get
Set

0
0 to 4,294,967,295
ENABLE, DISABLE
0 to 255
Firmware version; MM.mm (M = major;m = minor)
Up to 56 characters
yyyy-mm-dd HH:MM:SS
YEAR as yyyy; 20xx
MONTH as mm; 01 to 12
DAY as dd; 01 to 31
HOUR as HH; 01 to 23
MINUTE as MM; 01 to 59
SECOND as SS; 01 to 59
Up to 8 hexadecimal digits
DEFAULT, SYSTEM

Get

1 (number of ports)

DIR
LATCH
VALUE
DIR

Get
Set/GetSet/GetSet/GetSet/GetLATCH

Set/GetVALUE

Set/Get

8 (number of bits on the port)
IN, OUT
0 to 255
0 to 255
IN, OUT
port number: 0
bit number: 0 to 7
port value: 0 to 255
bit value: 0, 1
port number: 0
bit number: 0 to 7
port value: 0 to 255
bit value: 0, 1

1

1

CTR
CTR{ch}

DEV

VALUE

DIO

DIO{port}

DIO{port/bit}

Supported Values

Hardware features

Eight 12-bit single-ended analog inputs, numbered 0 to 7.
Analog input range is fixed at ±10 V.



Two 12-bit analog outputs, numbered 0 to 1 (USB-202/USB-202-OEM and USB-205/USB-205-OEMonly).
Analog output range is fixed at 0 V to 5 V.



8-bit digital port. Each bit is individually configurable as input or output.

External digital trigger input.

External pacer input/output. This feature allows multiple devices to acquire synchronized samples.



1,024 bytes of nonvolatile EEPROM memory; used for storing configuration information, calibration
data, and user data.

22

Hardware Reference – USB-200 Series

DAQFlex Message-based Firmware Specification



RATE takes a float value. An error is generated if value set is less than the device minimum
sampling rate or greater than the device maximum sampling rate.

Bulk transfersoBulk transfers from endpoint 1 IN are used for analog input scans.

oThe bulk in max packet size is 64 bytes.

oThe bulk transfer size must be a multiple of the USB maximum bulk packet size.

oBulk transactions are complete when a packet is sent that is less than the max packet size.
When sending an integer multiplier of the max packet size of data during a transaction, include
an empty packet to indicate the end of the transaction.

23

Hardware Reference – USB-1208FS-Plus

DAQFlex Message-based Firmware Specification

USB-1208FS-Plus
Use the components below to set or get device properties.
Refer to the DAQFlex Software User's Guide for a description of each component and property.

Component

AI{ch}

AIQUEUE

Supported
Property/Command

Set/GetSupported Values

CAL
CHMODERANGE

Set/GetSet
Set/GetRES
OFFSET

Get
Get

RANGE

Set/Get

SLOPE
VALUE
CLEAR
COUNT

Get
Get

ENABLE, DISABLE
SE, DIFF
BIP20V, BIP10V, BIP5V, BIP4V, BIP2PT5V,
BIP2V, BIP1PT25V, BIP1V (differential
mode)
BIP10V (single-ended mode)
U12
4-byte floating point numeric
BIP20V, BIP10V, BIP5V, BIP4V, BIP2PT5V,
BIP2V, BIP1PT25V, BIP1V (differential
mode)
BIP10V (single-ended mode)
4-byte floating point numeric
Unsigned integer numeric

CHAN

Set/GetGet

value: 0 to 7 single-ended; 0 to 3
differential
element: 0 to 7 single-ended; 0 to 3
differential

AIQUEUE{element}
RANGE

Set/Get

EXTPACER

Set/GetHIGHCHAN
LOWCHAN
QUEUE

Set/GetSet/GetSet/GetRANGE
Set/GetRANGE{ch}AISCAN

0 to 8 elements
element: 0 to 7 single-ended; 0 to 3
differential

value: BIP20V, BIP10V, BIP5V, BIP4V,
BIP2PT5V, BIP2V, BIP1PT25V, BIP1V(differential mode)
BIP10V (single-ended mode)
ENABLE/MASTER, ENABLE/SLAVE
0 to 7 single-ended, 0 to 3 differential
0 to 7 single-ended, 0 to 3 differential
ENABLE, DISABLE
BIP20V, BIP10V, BIP5V, BIP4V, BIP2PT5V,
BIP2V, BIP1PT25V, BIP1V (differential
mode)

RATE

Set/GetSAMPLES

Set/Get

STALL
START
STATUSSTOPTRIGXFRMODE

Set/Get

BIP10V (single-ended mode)
0.014 S/s to 50 kS/s
0 to N(0 = continuous scan; N = 32-bit FIFO)ENABLE, DISABLE

Get

IDLE, RUNNING, OVERRUN

Set/GetSet/GetENABLE, DISABLEBLOCKIO, SINGLEIO

24

Hardware Reference – USB-1208FS-Plus

DAQFlex Message-based Firmware Specification

Component

AITRIGAO
AO{ch}AOSCAN

CTR{ch}DEV

DIO{port}

Supported
Property/Command

Set/GetSupported Values

REARM

Set/GetTYPE

Set/Get

RES

Get

RANGE
VALUE
HIGHCHAN

Get
Set
Set/GetENABLE, DISABLE
EDGE/RISING, EDGE/FALLING,
LEVEL/HIGH, LEVEL/LOW
D/A resolution
U12 (unsigned 12-bitinteger)
UNI5V
0 to 4095
0 to 1LOWCHANRATE

Set/GetSet/GetSAMPLES

Set/Get

STALL
START
STATUSSTOPDATATYPEFLASHLED/{n}Set/Get
Set
Get
Set
Set
Get
Set/Get
Set

FWV

Get

ID
MFGCALMFGCAL{item}

Set/GetGet
Get

MFGSERRESET/{value}
DIR
LATCH
VALUE
DIR

Get

LATCH

Set/GetVALUE

Set/GetDELAY
DUTYCYCLEIDLESTATEPERIOD

Set/GetSet/GetSet/GetSet/Get

PULSECOUNT

Set/Get

START
STOP

Set
Set

VALUE

Set/GetSet/GetSet/GetSet/GetDIO{port/bit}

TMR{ch}25

0 to 10.01 S/s to 50 kS/s
0 to N(0 = continuous scan; N = 32-bit FIFO)ENABLE, DISABLE
IDLE, RUNNING, UNDERRUN
0 (resets the counter to 0)
0 to 4,294,967,295
ENABLE, DISABLE
0 - 255
Firmware version; MM.mm (M = major;m = minor)
Up to 56 characters
yyyy-mm-dd HH:MM:SS
YEAR as yyyy; 20xx
MONTH as mm; 01 to 12
DAY as dd; 01 to 31
HOUR as HH; 01 to 23
MINUTE as MM; 01 to 59
SECOND as SS; 01 to 59
Up to 8 hexadecimal digits
DEFAULT
IN, OUT
0 to 255
0 to 255
IN, OUT
port number: 0, 1
bit number: 0 to 7
port value: 0 to 255
bit value: 0, 1
port number: 0, 1
bit number: 0 to 7
port value: 0 to 255
bit value: 0, 1
0 to 67,110 mS
0 to 100%
LOW, HIGH
0.00003125 mS to 67110 mS
0 to 4,294,967,295 (a value of 0 indicatescontinuous pulse generation)

Hardware Reference – USB-1208FS-Plus

DAQFlex Message-based Firmware Specification

Component
1

Supported
Property/Command

Set/GetSupported Values

Analog output is supported on the USB-202/USB-202-OEM and USB-205/USB-205-OEM only.

Hardware features

Eight 12-bit single-ended analog inputs, numbered 0 to 7oAnalog input range is fixed at ±10 V.

Two 12-bit analog outputs, numbered 0 to 1 (USB-202/USB-202-OEM and USB-205/USB-205-OEMonly).
oAnalog input range is fixed at 0 V to 5 V8-bit digital port. Each bit is individually configurable as input or output.

Timer output channelExternal digital trigger inputExternal pacer input/output.
This feature allows multiple devices to acquire synchronized samples.



1,024 bytes of nonvolatile EEPROM memory; used for storing configuration information, calibration
data, and user data.



RATE takes a float value.
An error is generated if value is set is less than the device's minimum sampling rate or greater thanthe device's maximum sampling rate.

26

Hardware Reference – USB-1408FS-Plus

DAQFlex Message-based Firmware Specification

USB-1408FS-Plus
Use the components below to set or get device properties.
Refer to the DAQFlex Software User's Guide for a description of each component and property.

Component

AI{ch}

AIQUEUE

Supported
Property/Command

Set/GetSupported Values

CAL
CHMODERANGE

Set/GetSet
Set/GetRES
OFFSET

Get
Get

RANGE

Set/Get

SLOPE
VALUE
CLEAR
COUNT

Get
Get

ENABLE, DISABLE
SE, DIFF
BIP20V, BIP10V, BIP5V, BIP4V, BIP2PT5V,
BIP2V, BIP1PT25V, BIP1V (differential
mode)
BIP10V (single-ended mode)
U14
4-byte floating point numeric
BIP20V, BIP10V, BIP5V, BIP4V, BIP2PT5V,
BIP2V, BIP1PT25V, BIP1V (differential
mode)
BIP10V (single-ended mode)
4-byte floating point numeric
Unsigned integer numeric

CHAN

Set/GetRANGE

Set/Get

EXTPACER

Set/GetHIGHCHAN
LOWCHAN
QUEUE

Set/GetSet/GetSet/GetGet

AIQUEUE{element}

RATE

Set/GetSAMPLES

Set/Get

STALL
START
STATUSSTOPTRIGXFRMODE

Set/GetGet

IDLE, RUNNING, OVERRUN

Set/GetSet/GetENABLE, DISABLEBLOCKIO, SINGLEIOREARM

Set/GetENABLE, DISABLE

TYPE

Set/Get

EDGE/RISING, EDGE/FALLING,
LEVEL/HIGH, LEVEL/LOW

Set/GetRANGE{ch}AITRIG

value: BIP20V, BIP10V, BIP5V, BIP4V,
BIP2PT5V, BIP2V, BIP1PT25V, BIP1V(differential mode)
BIP10V (single-ended mode)
ENABLE/MASTER, ENABLE/SLAVE
0 to 7 single-ended, 0 to 3 differential
0 to 7 single-ended, 0 to 3 differential
ENABLE, DISABLE
BIP20V, BIP10V, BIP5V, BIP4V, BIP2PT5V,
BIP2V, BIP1PT25V, BIP1V (differential
mode)
BIP10V (single-ended mode)
0.014 S/s to 48 kS/s
0 to N(0 = continuous scan; N = 32-bit FIFO)ENABLE, DISABLE

RANGE

AISCAN

0 to 8 elements
element: 0 to 7 single-ended;
0 to 3 differential
value: 0 to 7 single-ended; 0 to 3
differential
element: 0 to 7 single-ended;
0 to 3 differential

27

Hardware Reference – USB-1408FS-Plus

DAQFlex Message-based Firmware Specification

Component

Supported
Property/Command

AO

RES

AO{ch}AOSCAN

CTR{ch}DEV

Supported Values

Get

D/A resolution
U12 (unsigned 12-bitinteger)
UNI5V
0 to 4095
0 to 1RANGE
VALUEHIGHCHAN

Get
Set/GetSet/GetLOWCHANRATE

Set/GetSet/GetSAMPLES

Set/Get

STALL
START
STATUSSTOPDATATYPEFLASHLED/{n}Set/Get
Set
Get
Set
Set
Get
Set/Get
Set

FWV

Get

ID
MFGCALMFGCAL{item}

Set/GetGet
Get

MFGSERRESET/{value}

Get

VALUE

IDLE, RUNNING, UNDERRUN
0 (resets the counter to 0)
0 to 4,294,967,295
ENABLE, DISABLE
0 - 255
Firmware version; MM.mm (M = major;m = minor)
Up to 56 characters
yyyy-mm-dd HH:MM:SS
YEAR as yyyy; 20xx
MONTH as mm; 01 to 12
DAY as dd; 01 to 31
HOUR as HH; 01 to 23
MINUTE as MM; 01 to 59
SECOND as SS; 01 to 59
Up to 8 hexadecimal digits
DEFAULT
2

DIR
LATCH
VALUE
DIR

Set/GetSet/GetSet/GetSet/GetLATCH

Set/GetVALUE

Set/GetDELAY
DUTYCYCLEIDLESTATEPERIOD

Set/GetSet/GetSet/GetSet/Get

PULSECOUNT

Set/GetIN, OUT
0 to 255
0 to 255
IN, OUT
port number: 0, 1
bit number: 0 to 7
port value: 0 to 255
bit value: 0, 1
port number: 0, 1
bit number: 0 to 7
port value: 0 to 255
bit value: 0, 1
0 to 67110 mS
0 to 100%
LOW, HIGH
0.00003125 mS to 67110 mS
0 to 4,294,967,295 (a value of 0 indicatescontinuous pulse generation)

START
STOP

Set
Set

DIO{port/bit}

TMR{ch}0 to 10.01 S/s to 50 kS/s
0 to N(0 = continuous scan; N = 32-bit FIFO)ENABLE, DISABLE

Get

DIO

DIO{port}

Set/Get28

Hardware Reference – USB-1408FS-Plus

DAQFlex Message-based Firmware Specification

Hardware features

8 single-ended (0 to 7), 4 differential (0 to 3) analog input channelsoAnalog input ranges:
Single-ended mode: ±10V
Differential mode: ±20V, ±10V, ±5V, ±4V, ±2.5V, ±1.25V, ±1V, ±1.25VoSampling rate: 50 kS/s max rateoChannel-gain queue: Up to eight unique, ascending elements; one gain element perchannel.

oResolution: 14-bit differential mode, 13-bit single-ended mode.



2 analog output channels. The analog output range is 0 V to 5 V.



16 DIO configured as two 8-bit ports. Each port is configurable for input or output.

External digital trigger

Bidirectional external clock

32-bit event counterBulk transfers:oThe bulk in max packet size is 64 bytes.

oThe bulk transfer size must be a multiple of the USB maximum bulk packet size.

oBulk transactions are complete when a packet is sent that is less than the max packet size.
When sending an integer multiplier of the max packet size of data during a transaction, include
an empty packet to indicate the end of the transaction.

29

Hardware Reference – USB-1608FS-Plus

DAQFlex Message-based Firmware Specification

USB-1608FS-Plus
Use the components below to set or get device properties.
Refer to the DAQFlex Software User's Guide for a description of each component and property.

Component

Supported
Property/Command

Set/GetSupported Values

AI

RES

Get

U16

OFFSET
RANGE
SLOPE
VALUE
CLEAR
COUNT

Get
Set/Get
Get
Get
Set
Get

4-byte floating point numeric
BIP10V, BIP5V, BIP2V, BIP1V
4-byte floating point numeric
Unsigned integer numeric

CHAN

Set/GetRANGE

Set/Get

EXTPACERHIGHCHAN
LOWCHAN
QUEUE
RATE
RANGE
Range{ch}RESET

Set/GetSet/GetSet/GetSet/GetSet/Get0 to 7 elements
element: 0 to 7
value: 0 to 7
element: 0 to 7
value: BIP10V, BIP5V, BIP2V, BIP1V
ENABLE/MASTER, ENABLE/SLAVE, DISABLE
0 to 7 single-ended
0 to 7 single-ended
ENABLE, DISABLE
0.009 S/s to 100 kS/s

Set/Get

BIP10V, BIP5V, BIP2V, BIP1V

SAMPLES

Set/Get

STALL
START
STATUSSTOPTRIGXFRMODE

Set/Get
Set
Get
Set
Set/GetSet/GetAITRIG

TYPE

Set/Get

EDGE/RISING, EDGE/FALLING

CTR{ch}VALUEDATATYPEFLASHLED/{n}Get
Set
Set/Get
Set

FWV

Get

ID
MFGCALMFGCAL{item}

Set/GetGet
Get

MFGSERGet

0 to 4,294,967,295
0
ENABLE, DISABLE
0 to 255
Firmware version of the device
MM.mm (M = major; m = minor)
Up to 56 characters
yyyy-mm-dd HH:MM:SS
YEAR as yyyy; 20xx
MONTH as mm; 01 to 12
DAY as dd; 01 to 31
HOUR as HH; 01 to 23
MINUTE as MM; 01 to 59
SECOND as SS; 01 to 59
Up to 8 hexadecimal digits

RESET/{value}

Set

DEFAULTAI{ch}

AIQUEUEAIQUEUE{element}

AISCAN

Set

DEV

30

0 to N(0 = continuous scan; N = 32-bit FIFO)ENABLE, DISABLE
IDLE, RUNNING, OVERRUNENABLE, DISABLEBLOCKIO, SINGLEIO, BURSTIOHardware Reference – USB-1608FS-Plus

DAQFlex Message-based Firmware Specification

Component

DIO{port}

Supported
Property/Command

Set/GetSupported Values

DIR
LATCH
VALUE
DIR

Set/GetSet/GetSet/GetSet/GetLATCH

Set/GetVALUE

Set/GetIN, OUT
0 to 255
0 to 255
IN, OUT
port number: 0
bit number: 0 to 7
port value: 0 to 255
bit value: 0, 1
port number: 0
bit number: 0 to 7
port value: 0 to 255
bit value: 0, 1

DIO{port/bit}

Hardware features

8 single-ended, 16-bit, simultaneous analog input channels, numbered 0 to 7.
Analog voltage input ranges:



o

±10V

o

±5V

o

±2V

o

±1V

Sampling rate:o

100 kS/s max rate for one channelo

400 kS/s max aggregate rate, streaming. Limited by USB transfer speed; 800 kS/s max to 32K
sample FIFOoChannel-gain queue:
Eight elements - one gain element per channel.



8 DIO, individually configurable

External digital trigger

Bidirectional external clock

32-bit event counter

1024 bytes of nonvolatile EEPROM memory; used for storing configuration information, calibration
data, and user data.



Bulk transfers:oThe bulk in max packet size is 64 bytes.

oThe bulk transfer size must be a multiple of the USB maximum bulk packet size.

oBulk transactions are complete when a packet is sent that is less than the max packet size.
When sending an integer multiplier of the max packet size of data during a transaction, include
an empty packet to indicate the end of the transaction.

31

Hardware Reference – USB-1608G Series

DAQFlex Message-based Firmware Specification

USB-1608G Series
The USB-1608G Series includes the following devices:

USB-1608G

USB-1608GX

USB-1608GX-2AO

Use the components below to set or get device properties.
Refer to the DAQFlex Software User's Guide for a description of each component and property.

Component

Supported
Property/Command

Set/Get

AI

RES

Get

CHMODEOFFSET
RANGE
SLOPE
VALUE
LOCK
RANGE

Get
Get
Set/Get
Get
Get
Set
Set/GetREF

Set/GetREFVAL

Get

RES

Get

UNLOCKSet

OFFSET

Set/GetSLOPE

Set/Get

VALUE

Get

AI{ch}AICAL

AICAL{ch}AIQUEUEAIQUEUE{element}

AISCAN

CLEAR
COUNT
CHAN
CHMODERANGE
BURSTMODE
EXTPACERHIGHCHAN
LOWCHANQUEUE
RANGE
RANGE{ch}RATE

Supported Values
A/D resolution
S24 (24-bit signed value)SE, DIFF, MIXED
4-byte floating point numeric
BIP10V, BIP5V, BIP2V, BIP1V
4-byte floating point numeric
Unsigned integer numeric
BIP10V, BIP5V, BIP2V, BIP1V
0.0V, +1.0V, –1.0V, +2.0V, –2.0V, +5.0V,–5.0V, +10.0V, –10.0V
The measured calibration reference
voltage stored in EEPROM memory.
A/D resolution
S24 (24-bit signed value)
4-byte floating point numeric. The channel
is ignored.
4-byte floating point numeric. The channel
is ignored.
The value in counts of the AI channel
being calibrated.

Get
Set/GetSet/GetSet/GetSet/GetSet/GetSet/GetSet/GetSet/Get0 to 16 elements
0 to 15 single-ended, 0 to 7 differential
SE, DIFF
BIP10V, BIP5V, BIP2V, BIP1V
ENABLE, DISABLE
ENABLE, DISABLE
0 to 15 single-ended, 0 to 7 differential
0 to 15 single-ended, 0 to 7 differential
ENABLE, DISABLE, RESET

Set/Get

BIP10V, BIP5V, BIP2V, BIP1V

Set/GetUSB-1608G: 0.01 Hz to 250,000 Hz(1 channel)
USB-1608GX: 0.01 Hz to 500,000 Hz(1 channel)
USB-1608GX-2AO: 0.01 Hz to 500,000 Hz(1 channel)

32

Hardware Reference – USB-1608G Series

DAQFlex Message-based Firmware Specification

Component

AITRIG

1

AO

1

AO{ch}AOCAL

AOCAL{ch}Supported
Property/Command

Set/Get

RESET

Set

SAMPLES

Set/Get

STALL
START
STATUSSTOPTRIGXFRMODEREARM

Set/Get0 to N(0 = continuous scan; N = 32-bit)
ENABLE, DISABLE

Get

IDLE, RUNNING, OVERRUN

Set/GetSet/GetSet/GetENABLE, DISABLEBLOCKIO, SINGLEIOENABLE, DISABLE
EDGE/{condition}, LEVEL/{condition}

TYPE

Set/GetRES

Get

OFFSET
RANGE
SLOPE
VALUE
AIRES
LOCK
RES
UNLOCK

Get
Get
Get
Set/Get
Get
Set
Get
Set

condition:
RISING, FALLING when TYPE is EDGE
HIGH, LOW when TYPE is LEVEL
D/A resolution
U16 (unsigned 16-bitinteger)
4-byte floating point numeric
BIP10V
4-byte floating point numeric
0 to 65,535 counts
S24 (24-bit signed value)

AIOFFSET

Get

AIRANGEGet

AISLOPEGet

AIVALUEOFFSETSLOPE
VALUE
EXTPACERHIGHCHAN
LOWCHAN
RANGE
RATE

Get
Set/GetSet/GetSet/GetSet/GetSet/GetSet/GetGet
Set/GetSAMPLES

Set/Get

STALL
START
STATUS
STOP
START
STOP

Set/Get
Set
Get
Set

1

AOSCAN

CTR{ch}

VALUE

Set
Get

33

Supported Values

U16 (16-bit unsigned value)
Double precision floating point numeric(hex bytes). The channel is ignored.
BIP10V
Double precision floating point numeric(hex bytes). The channel is ignored.
CountsDouble precision floating point numeric
Double precision floating point numeric
0 to 65,535 counts
ENABLE, DISABLE
0 to 1
0 to 1
BIP10V
1 kHz to 500 kHz (1 channel)
0 to N(0 = continuous scan; N = 32-bit)
ENABLE, DISABLE
IDLE, RUNNING, UNDERRUN

0
0 – 4,294,967,295

Hardware Reference – USB-1608G Series

DAQFlex Message-based Firmware Specification

Component

Supported
Property/Command

Set/GetSupported Values

DATATYPEFLASHLED/{n}FPGAV

Set/Get
Set
Get
Set
Get

ENABLE, DISABLE
0 - 255FPGA firmware version
0xAD
CONFIGMODE, CONFIGURED
Firmware version; MM.mm (M = major;m = minor)
Up to 16 characters
yyyy-mm-dd HH:MM:SS
YEAR as yyyy; 20xx
MONTH as mm; 01 to 12
DAY as dd; 01 to 31
HOUR as HH; 01 to 23
MINUTE as MM; 01 to 59
SECOND as SS; 01 to 59
Up to 8 hexadecimal digits
DEFAULT, SYSTEMºC
8IN, OUT
0 to 255
0 to 255
IN, OUT
port number: 0
bit number: 0 to 7
port value: 0 to 255
bit value: 0, 1
port number: 0
bit number: 0 to 7
port value: 0 to 255
bit value: 0, 1
0 to 67110 mS
0 to 100%
LOW, HIGH
0.00003125 mS to 67110 mS
0 to 4,294,967,295 (a value of 0 indicatescontinuous pulse generation)

FPGACFGDEV

DIO{port}

FWV

Get

ID
MFGCALMFGCAL{item}

Set/GetGet
Get

MFGSERRESET/{value}
TEMP

Get

DIR
LATCH
VALUE
DIR

Get
Get
Set/GetSet/GetSet/GetSet/GetLATCH

Set/GetVALUE

Set/GetDELAY
DUTYCYCLEIDLESTATEPERIOD

Set/GetSet/GetSet/GetSet/Get

PULSECOUNT

Set/Get

START
STOP

Set
Set

DIO{port/bit}

TMR{ch}1

Analog output is supported on the USB-1608GX-2AO only.

Hardware features

16 analog input channels, numbered 0 to 15.

Analog input mode is configurable for single-ended (16 channels) or differential (8 channels).
Analog input ranges:
o

±10V

o

±5V

o

±2V

o

±1V

34

Hardware Reference – USB-1608G Series

DAQFlex Message-based Firmware Specification



2 analog output channels, numbered 0 to 1 (USB-1608GX-2AO only)
Analog output range is fixed at ±10V.



1 digital port (8 bits)
Each bit is individually configurable as input or output.



1 timer output channel



1 external trigger inputExternal pacer input/output
This feature allows multiple devices to acquire synchronized samples.



1024 bytes of nonvolatile EEPROM memory; used for storing configuration information, calibration
data, and user data.



RATE takes a float value
An error is generated if the input scan rate requested is less than the device's minimum sampling
rate or greater than the device's maximum sampling rate.

Calibration operationso

AICAL:LOCK locks the AICAL component from performing calibration operations on the analog
inputs. In order to calibrate the analog inputs, you must first unlock the component using the
AICAL:UNLOCK message.

o

AOCAL:LOCK locks the AOCAL component from performing calibration operations on the analog
outputs. In order to calibrate the analog outputs, you must first unlock the component using
the AOCAL:UNLOCK message.

Refer to Analog input calibration messages and Analog output calibration messages for thecalibration messages provided by the firmware.
Bulk transfers:oBulk transfers from endpoint 6 IN are used for analog input scans. Bulk transfers to endpoint
2 OUT are used for analog output scans.

oThe bulk in and bulk out max packet sizes are 512 bytes when enumerated as a high-speed
device and 64 bytes when enumerated as a full-speed device.

o

The bulk transfer size must be a multiple of the USB maximum bulk packet size.

oBulk transactions are complete when a packet is sent that is < the max packet size. Whensending an integer multiplier of the max packet size of data during a transaction, include an
empty packet to indicate the end of the transaction.

35

Hardware Reference – USB-2001-TC

DAQFlex Message-based Firmware Specification

USB-2001-TC
Use the components below to set or get device properties.
Refer to the DAQFlex Software User's Guide for a description of each component and property.

Component

Supported
Property/Command

Set/GetSupported Values

AI

CJC/format
OFFSETSENSORSLOPE
STATUS
VALUE

Get
Get
Set/Get
Get
Get
Get

AI{ch}RANGE

Set/Get

FLASHLED/{n}FWVID
MFGCALMFGCAL{item}

Set
Get
Set/GetGet
Get

MFGSERRESET/{value}Get

CJC/DEGC, CJC/DEGF, CJC/KELVIN
Floating point numeric
TC/char
Floating point numeric
BUSY, ERROR, READY
Unsigned integer numeric
BIP73.125E-3V (±0.073125 volts)
BIP146.25E-3V (±0.14625 volts)
0 to 255
Firmware version
Up to 56 characters
yyyy-mm-dd HH:MM:SS
YEAR as yyyy; 20xx
MONTH as mm; 01 to 12
DAY as dd; 01 to 31
HOUR as HH; 01 to 23
MINUTE as MM; 01 to 59
SECOND as SS; 01 to 59
Up to 8 hexadecimal digits
DEFAULT, SYSTEM

DEV

Hardware features

One analog input channel, numbered 0Supports thermocouple types B, E, J, K, N, R, S, and TPossible gain ranges:o±146.25 mV (not calibrated)o±73.125 mV1024 bytes of nonvolatile FLASH program memory; used for storing configuration information,
calibration data, and user data.

This device does not support bulk transfers.

36

Hardware Reference – USB-2408 Series

DAQFlex Message-based Firmware Specification

USB-2408 Series
The USB-2408 Series includes the following devices:USB-2408

USB-2408-2AO

Use the components below to set or get device properties.
Refer to the DAQFlex Software User's Guide for a description of each component and property.

Component

AI

AI{ch}AICAL

AICAL{ch}Supported
Property/Command

Set/GetADCAL/STARTADCAL/STATUS

Set
Get

RES

Get

CHMODE

Set/GetCJC

Get

DATARATE

Set/GetOFFSET

Get

RANGE

Set/GetSENSOR

Set/Get

SLOPE
VALUE
LOCK
MODE

Get
Get
Set
Set/GetRANGE

Set/GetREF

Set/GetREFVAL/HEX

Get

RES

Get

UNLOCKSet

OFFSET/HEX

Set/GetSLOPE/HEX

Set/GetTCCAL

Set/Get

VALUE

Get

37

Supported Values/Notes

RUNNING, IDLE
A/D resolution
S24 (24-bit signed integer)
SE, DIFF, TC/OTD, TC/NOOTD
SE is always returned for channels 8 to
15.
DEGC, DEGF, KELVIN
3750, 2000, 1000, 500, 100, 60, 50, 25,
10, 5, 2.5 (S/s)
4-byte floating point numeric
BIP10V, BIP5V, BIP2.5V, BIP1.25V,
BIP625.0E-3V, BIP312.5E-3V,
BIP156.25E-3V, BIP78.125E-3V
TC/B, TC/E, TC/J, TC/K, TC/N, TC/R,
TC/S, TC/T
4-byte floating point numeric
Unsigned integer numeric
ENABLE, DISABLE
BIP10V, BIP5V, BIP2.5V, BIP1.25V,
BIP625.0E-3V, BIP312.5E-3V,
BIP156.25E-3V, BIP78.125E-3V+78.125E-3V, –78.125E-3V,+156.25E-3V, –156.25E-3V,+312.5E-3V, –312.5E-3,+625.0E-3V, –625.0E-3V,+1.25V, –1.25V, +2.5V, –2.5V,+5.0V, –5.0V, +10.0V, –10.0V
The measured calibration reference
voltage (hex bytes) stored in EEPROM
memory.
A/D resolution
S24 (24-bit signed value)
Double precision floating point numeric(hex bytes); The channel is ignored.
Double precision floating point numeric(hex bytes). The channel is ignored.
ENABLE, DISABLE
The value in counts of the AI channel
being calibrated.

Hardware Reference – USB-2408 Series

DAQFlex Message-based Firmware Specification

Component

AIQUEUEAIQUEUE{element}

AISCAN

1

AO

1

AO{ch}AOCAL

1AOCAL{ch}1Supported
Property/Command

Set/Get

CLEAR
COUNT

Set
Get

CHAN

Set/GetDATARATE

Set/GetCHMODE

Set/GetRANGE

Set/GetHIGHCHAN
LOWCHANQUEUE
RATE

Set/GetSet/GetSet/GetSet/GetRANGE, RANGE{ch}Set/Get

RESET

Set

SAMPLES

Set/Get

STALL
START
STATUSSTOPXFRMODE

Set/Get
Set
Get
Set
Set/GetRES

Get

UPDATEOFFSET
RANGE
REG
SLOPE
VALUE
AIRES
LOCK
RES
UNLOCK

Get
Get
Set/Get
Get
Set
Get
Set
Get
Set

AIOFFSET

Get

AIRANGEGet

AISLOPEGet

AIVALUEOFFSET
SLOPE
VALUE

Get
Set/GetSet/GetSet/Get38

Supported Values/Notes

0 to 64 elements
element: 0 to 63
value: 0 to 15
3750, 2000, 1000, 500, 100, 60, 50, 25,
10, 5, 2.5 (S/s)
element: 0 to 63
value: SE, DIFF, TC/OTD, TC/NOOTD
element: 0 to 63
value: BIP10V, BIP5V, BIP2.5V,
BIP1.25V, BIP625.0E-3V, BIP312.5E-3V,
BIP156.25E-3V, BIP78.125E-3V
0 to 15 single-ended, 0 to 7 differential
0-15 single-ended, 0 to 7 differential
ENABLE, DISABLE
2.5 Hz to 1102.94 Hz (1 channel)
BIP10V, BIP5V, BIP2.5V, BIP1.25V,
BIP625.0E-3V, BIP312.5E-3V,
BIP156.25E-3V, BIP78.125E-3V
0 to N(0 = continuous scan; N = 32-bit)
ENABLE, DISABLE
IDLE, RUNNING, OVERRUNBLOCKIO, SINGLEIO
D/A resolution
U16 (unsigned 16-bitinteger)
4-byte floating point numeric
BIP10V
0 to 4095
4-byte floating point numeric
0 to 4095
S24 (24-bit signed value)
U16 (16-bit unsigned value)
Double precision floating point numeric(hex bytes). The channel is ignored.
BIP10V
Double precision floating point numeric(hex bytes). The channel is ignored.
CountsDouble precision floating point numeric
Double precision floating point numeric
0 to 65,535 counts

Hardware Reference – USB-2408 Series

DAQFlex Message-based Firmware Specification

Component

Supported
Property/Command

Set/GetSupported Values/Notes

HIGHCHAN
LOWCHANRANGE, RANGE{ch}
RESET
RATE

Set/GetSet/GetGet
Set
Set/Get0 to 1
0 to 1
BIP10VSAMPLES

Set/Get

STALL
START
STATUS
STOP
START
STOP

DATATYPEFLASHLED/{n}FWVID
MFGCALMFGCAL{item}

Set/Get
Set
Get
Set
Set
Set
Get
Set
Set/GetSet
Get
Set/GetGet
Get

MFGSERRESET/{value}

Get
Set

STATUS/ISO

Get

LATCH

Get
Set/GetVALUE

Set/Get1

AOSCAN

CTR{ch}

VALUE

DEV

DIO{port}

LATCH

Set/GetVALUE

Set/GetDIO{port/bit}

1

Analog output is supported on the USB-2408-2AO only.

39

1 Hz to 1000 Hz (1 channel)
0 to N(0 = continuous scan; N = 32-bit)
ENABLE, DISABLE
IDLE, RUNNING, UNDERRUN

0 to 4,294,967,295
0
ENABLE, DISABLE
0 to 255
MM.mm (M = major; m = minor)
Up to 56 characters
yyyy-mm-dd HH:MM:SS
YEAR as yyyy; 20xx
MONTH as mm; 01 to 12
DAY as dd; 01 to 31
HOUR as HH; 01 to 23
MINUTE as MM; 01 to 59
SECOND as SS; 01 to 59
Up to 8 hexadecimal digits
DEFAULT
Isolated microcontroller status
READY, NOTREADY
8
0 to 255
0 to 255

port number: 0
bit number: 0 to 7
port value: 0 to 255
bit value: 0, 1
port number: 0
bit number: 0 to 7
port value: 0 to 255
bit value: 0, 1

Hardware Reference – USB-2408 Series

DAQFlex Message-based Firmware Specification

Hardware features

16 analog input channels, numbered 0 to 15.
oAnalog input mode is configurable for single-ended (16 channels) or differential (8 channels).

oThermocouple mode requires a differential configuration.

Analog voltage input ranges:
o

±10V

o

±5V

o

±2.5V

o

±1.25Vo±0.625Vo±0.3125Vo±0.15625Vo±0.078125V

Analog thermocouple input range is fixed at ±0.078125V.


2 analog output channels, numbered 0 to 1 (USB-2408-2AO only).

Analog output range is fixed at ±10V

1 digital input/output port (8 bits).

1024 bytes of nonvolatile EEPROM memory; used for storing configuration information, calibration
data, and user data.



RATE takes a float value. An error is generated if value set is less than the device's minimum
sampling rate or greater than the device's maximum sampling rate.

Calibration operationso

AICAL:LOCK locks the AICAL component from performing calibration operations on the analog
inputs. In order to calibrate the analog inputs, you must first unlock the component using the
AICAL:UNLOCK message.

o

AOCAL:LOCK locks the AOCAL component from performing calibration operations on the analog
outputs. In order to calibrate the analog outputs, you must first unlock the component using
the AOCAL:UNLOCK message.

Refer to Analog input calibration messages and Analog output calibration messages for thecalibration messages provided by the firmware.
Bulk transfers:oBulk transfers to endpoint 1 are used for analog input and output scans.

oAnalog input scan data is sent through the bulk In endpoint. Analog output scan data is sent
through the bulk Out endpoint.

oThe bulk in and bulk out max packet sizes are 64 bytes.

oThe bulk transfer size must be a multiple of the USB maximum bulk packet size.

40

Hardware Reference – USB-7202

DAQFlex Message-based Firmware Specification

USB-7202
Use the components below to set or get device properties.
Refer to the DAQFlex Software User's Guide for a description of each component and property.

Component

AI{ch}AISCANAITRIG

CTR

Supported
Property/Command

Set/GetSupported Values

OFFSET
RANGE
SLOPE
VALUE

Get
Set/Get
Get
Get

EXTPACER

Set/GetHIGHCHAN
LOWCHANRANGE
RANGE{ch}Set/GetSet/Get4-byte floating point numeric
BIP10V, BIP5V, BIP2V, BIP1V
4-byte floating point numeric
Unsigned integer numeric
ENABLE/MASTER, ENABLE/SLAVE,DISABLE
0 to 70 to 7

Set/Get

BIP10V, BIP5V, BIP2V, BIP1V

SAMPLES

Set/Get

RATE
STALL
START
STATUSSTOPTRIGXFRMODE

Set/GetSet/Get0 to N(0 = continuous scan; N = 32-bit)
0.596 to 50,000 Hz (1 channel)
ENABLE, DISABLE

Get

IDLE, RUNNING, OVERRUN, INTERRUPTED

Set/GetSet/GetENABLE, DISABLEBLOCKIO, SINGLEIO, BURSTIO

TYPE

Set/Get

EDGE/RISING, EDGE/FALLING

Set
Get
Set/GetSet
Get
Set/GetGet
Get

00 to 4,294,967,295
ENABLE, DISABLE
0 to 255
MM.mm (M = major; m = minor)
Up to 56 characters
yyyy-mm-dd HH:MM:SS
YEAR as yyyy; 20xx
MONTH as mm; 01 to 12
DAY as dd; 01 to 31
HOUR as HH; 01 to 23
MINUTE as MM; 01 to 59
SECOND as SS; 01 to 59
Up to 8 hexadecimal digits
DEFAULT, SYSTEMIN, OUT
0 to 255 (bit field: 0 = all output,
255 = all input)
0 to 255 (port)
0 to 1 (bit)

START
STOP
VALUE

DEV

DATATYPEFLASHLED/{n}FWVID
MFGCALMFGCAL{item}

MFGSERRESET/{value}

Get
Set

DIR

DIO
VALUE

Get
Get

41

Hardware Reference – USB-7202

DAQFlex Message-based Firmware Specification

Hardware features

8 analog input channels, numbered 0 to 7.
Gain ranges:



o

±10V

o

±5V

o

±2V

o

±1V

1 digital port
All bits are individually configurable as input or output.

External trigger inputExternal pacer input/output
This feature allows multiple devices on a single USB to acquire synchronized samples. One masterdevice is used to drive the signal. Additional devices must be configured as slave devices using the"AISCAN:EXTPACER=value" message. Value may be "ENABLE[/MASTER]", "ENABLE[/SLAVE]" or"DISABLE".



1024 bytes of nonvolatile EEPROM memory; used for storing configuration information, calibration
data, and user data.



RATE takes a float value.
If the input scan rate requested is less than the slowest rate supported by the device, the device is
set to the slowest rate supported by the device. If the input scan rate requested is greater than thefastest rate supported by the device, an error is generated.



Bulk transfersoBulk transfers from endpoint 1 IN are used for analog input scans. Data is in RAW format and"DEV:DATATYPE" has no impact on the data.

oThe bulk transfer size must be a multiple of the USB maximum bulk packet size.

42

Hardware Reference – USB-7204

DAQFlex Message-based Firmware Specification

USB-7204
Use the components below to set or get device properties.
Refer to the DAQFlex Software User's Guide for a description of each component and property.

Component

Supported
Property/Command

Set/GetSupported Values

AI

CHMODE

Set

SE, DIFF

OFFSET

Get

RANGE

Set/Get

SLOPE
VALUE

Get
Get

EXTPACER

Set/GetHIGHCHAN
LOWCHAN
QUEUE

Set/GetSet/GetSet/GetRATE

Set/GetAI{ch}RANGE{element/ch}

Set

SAMPLES

Set/Get

STALL
START
STATUSSTOPTRIGXFRMODE
REARM
TYPE
RANGE

Set/Get4-byte floating point numeric
BIP20V, BIP10V, BIP5V, BIP4V, BIP2PT5V,
BIP2V, BIP1PT25V, BIP1V
4-byte floating point numeric
Unsigned integer numeric
ENABLE/MASTER, ENABLE/SLAVE,ENABLE/GSLAVE
0 to 70 to 7ENABLE, DISABLE, RESET
0.596 to 50,000 Hz(1 channel)
0 - 15 (the number of elements in thequeue)
BIP20V, BIP10V, BIP5V, BIP4V, BIP2PT5V,
BIP2V, BIP1PT25V, BIP1V
Element: 0 to 15
Channel: 0 to 7 SE,
0 to 3 DIFF
Range: See the range values above.
0 to N(0 = continuous scan;
N = 32-bit)
ENABLE, DISABLE

Get

IDLE, RUNNING, OVERRUN

Set/GetSet/GetSet/GetSet/Get
Get

VALUE

Set

ENABLE, DISABLEBLOCKIO, SINGLEIOENABLE, DISABLE
EDGE/RISING, EDGE/FALLING
UNI4.096V
0 to 4095

HIGHCHAN
LOWCHANRANGE{ch}Set/GetSet/GetGet

RATE

Set/GetSAMPLES

Set/Get

STALL
START
STATUS

Set/Get0 to 1
0 to 1UNI4.096V
one channel: 1 to 10 kHz
two channels: 1 to 5 kHz
0 to N(0 = continuous scan; N = 32-bit)
ENABLE, DISABLE

Get

IDLE, RUNNING, UNDERRUN

RANGE
RANGE{ch}Get
Set

AISCANAITRIGAO

AOSCAN43

Hardware Reference – USB-7204

DAQFlex Message-based Firmware Specification

Component

Supported
Property/Command

Set/GetSupported Values

Set/GetENABLE, DISABLEDATATYPEFLASHLED/{n}Set
Get
Set/Get
Set

FWV

Get

ID
MFGCALMFGCAL{item}

Set/GetGet
Get

MFGSERRESET/{value}

Get

DIR

Set/Get

VALUE

Get

0
0 to 4,294,967,295
ENABLE, DISABLE
0 to 255
MM.mm (M = major;m = minor)
Up to 56 characters
yyyy-mm-dd HH:MM:SS
YEAR as yyyy; 20xx
MONTH as mm; 01 to 12
DAY as dd; 01 to 31
HOUR as HH; 01 to 23
MINUTE as MM; 01 to 59
SECOND as SS; 01 to 59
Up to 8 hexadecimal digits
DEFAULT, SYSTEMIN, OUT(port-configurable)
0 to 255 (port)
0 to 1 (bit)

STOP
TRIG
START
STOP

CTR

VALUE

DEV

DIO

Hardware features

8 analog input channels, numbered 0-7.

Analog input mode is configurable for single-ended (8 channels) or differential (4 channels).
Gain ranges:

o±20V (differential mode)o±10V (differential or single–ended mode)o±5V (differential mode)o±4V (differential mode)o±2.5V (differential mode)o±2V (differential mode)o±1.25V (differential mode)o±1V (differential mode)

2 analog output channels, numbered 0 to 1.
Analog output range is 0 to 4.096 V, 1 mV per LSB

2 digital ports. Each port is individually configurable as input or output.

External trigger inputExternal pacer input/output
This feature allows multiple devices to acquire synchronized samples. One master device is used todrive the signal. Additional devices must be configured as slave devices using the"AISCAN:EXTPACER=value" message. Value may be "ENABLE/MASTER," "ENABLE/SLAVE," or"ENABLE/GSLAVE."oWhen set to ENABLE/SLAVE, the first clock pulse after setting up the scan is ignored to ensure
adequate setup time for the first conversion. Use this mode when the device is paced from acontinuous clock source.

44

Hardware Reference – USB-7204

DAQFlex Message-based Firmware SpecificationoWhen set to ENABLE/GSLAVE, the first clock pulse after setting up the scan is held off to ensure
adequate setup time for the first conversion. No pulses are ignored. Use this mode when thedevice is paced from another USB-7204.

1024 bytes of nonvolatile EEPROM memory; used for storing configuration information, calibration
data, and user data.



RATE takes a float value.
If the input scan rate requested is less than the slowest rate supported by the device, the device is
set to the slowest rate supported by the device. If the input scan rate requested is greater than thefastest rate supported by the device, the device is set to the maximum rate supported by thedevice.



Bulk transfersoBulk transfers from endpoint 1 IN are used for analog input scans. Data is in RAW format and"DEV:DATATYPE" has no impact on the data.

oBulk transfers to endpoint 2 OUT are used for analog output scans. Data is transmitted in two
bytes per channel, with the 12-bit representation packed into the lower 16-bits and transmitted
in RAW format, resulting in an output of 0-4.096 V.
The device is preloaded with up to 1024 bytes. The device will ACK while it is filling. When thefour internal 256-byte buffers are filled, the device will NAK until an analog output scan isstarted.
If a data underrun occurs, the device stalls the BULK OUT endpoint (EP_2) when the AOSCAN
STALL property is set to ENABLE. To clear the stall, send AOSCAN:RESET or start a new scan.
The STALL property is disabled by default.

oThe bulk transfer size must be a multiple of the USB maximum bulk packet size.

Analog input data format
Note: This section applies to data acquired using firmware versions ≥2.03. For data acquired using
firmware versions ≤2.02, refer to the data format shown below in Table 3.
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.
When performing analog input operations with the "AISCAN" component, the differential return data is
12-bit MSB (Most Significant Bit) justified. Additional steps are required to convert single-ended data to
11- or 12-bit representation (LSB justified).
The bit tables below show the data for each operating mode, and lists the steps to convert the data to
LSB justified.
Differential mode
Table 1 applies to data acquired using firmware ≥2.03.

Table 1. A/D Converter Values (differential mode)
Bit

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

Data

x

x

x

x

x

x

x

x

x

x

x

x

0

0

0

OVR

where:
x

The actual conversion value.

OVR

0 = Valid conversion
1 = An analog over-range problem has occurred in the PGA; the conversion value may beinvalid. Note: this bit can be ignored.

45

Hardware Reference – USB-7204

DAQFlex Message-based Firmware Specification

Converting differential data to 12-bit LSB justified
To convert differential data to 12-bit LSB justified, shift the upper 12-bits of data to the right by 4.
The adjusted data format is shown in Analog input data format on page 45.
Single-ended mode

Table 2. A/D Converter Values (single-ended mode)
Bit

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

Data

c

x

x

x

x

x

x

x

x

x

x

x

0

0

0

OVR

where:
c

A checkbit for valid A/D transfer functions. When this bit is not set the value is 0.

x

The actual conversion value.

OVR

0 = Valid conversion
1 = An analog over-range problem has occurred in the PGA; the conversion value may beinvalid. Note: this bit can be ignored.

When bit 15 (c) is set or a value greater than 0x7FFF (32,767), you need to convert the data to LSB
justified to obtain an 11-bit representation of the 12-bit data.
Converting single-ended data to 12-bit LSB justified
Converting data to LSB justified is required to obtain a 12-bit representation of 11-bit data. Perform thefollowing steps to convert single-ended data to 12-bit LSB justified:
Check the value of bit 15 (c) to see if the value is greater than 0x7FFF.
If the value is greater than 0x7FFF continue with step 2.
If the value is not greater than 0x7FFF then the value is 0 and the conversion procedure is not
required.
10. Mask the bits with 0x7FF0.
11. Shift the bits to the right by 3 for 12-bit data, or shift the bits to the right by 4 for 11-bit data.
7.
8.
9.

Table 3 shows the 11-bit data represented as 12-bit data.

Table 3. 11-bit data represented as 12-bit LSB justified (bit 15 is set)
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

0

where x is the actual conversion value.

Known issues
Firmwareversion≤2.02

Description
Data overruns may occur or data integrity may be compromised when using
AINSCAN to acquire data at rates above 37 kS/s.
To resolve this issue, update the device firmware version to 2.03 or later. Refer tothe Updating device firmware topic for instructions.

46

Measurement Computing Corporation
10 Commerce Way
Suite 1008
Norton, Massachusetts 02766(508) 946-5100
Fax: (508) 946-9500
E-mail: info@mccdaq.com
www.mccdaq.com