The USB-2416 Series includes the following devices:
The USB-2416 Series support the following features.
Functions
UL: cbAIn32(), cbAInScan(), cbALoadQueue(), cbVIn(), cbVIn32()
UL for .NET: AIn32(), AInScan(), ALoadQueue(), VIn(), VIn32()
Python for Windows: a_in_32(), a_in_scan(), a_load_queue(), v_in(), v_in_32()
Options
BACKGROUND, BLOCKIO, CONTINUOUS, HIGHRESRATE, NOCALIBRATEDATA, SCALEDATA, SINGLEIO
HighChan
0 to 31*
0 to 63* when the AI-EXP32 expansion board is installed.
* While the entire range of channels listed above is always available, one channel is effectively lost for each channel configured for differential mode. Refer to Analog input mode in the Hardware Considerations section below for more information.
Rate
0 to 1,102.9411 S/s with the data rate set at maximum (3,750 Hz).
The maximum scan rate depends upon the data rate set for the channel(s) in the scan. Refer to Maximum scan rate in the Hardware considerations section below for more information.
When the Rate argument is set to 0, the scan will run at the maximum permissible rate according to the data rate set for each channel.
Range
Voltage mode | |
BIP20VOLTS (±20 volts) | BIPPT625VOLTS (±0.625 volts) |
BIP10VOLTS (±10 volts) | BIPPT312VOLTS (±0.3125 volts) |
BIP5VOLTS (±5 volts) | BIPPT156VOLTS (±0.15625 volts) |
BIP2PT5VOLTS (±2.5 volts) | BIPPT078VOLTS (±0.078125 volts) |
BIP1PT25VOLTS (±1.25 volts) | |
Thermocouple mode | |
BIPPT078VOLTS (±0.078125 volts) |
Analog voltage input functions used on any analog input channel configured for thermocouple inputs will either return a voltage using the BIPPT078VOLTS (±0.078125 volts) scale or, in the case of cbAIn32()/AIn32(), will return an error. cbALoadQueue()/ALoadQueue() will also return an error if a range other than BIPPT078VOLTS is applied to a thermocouple channel.
Functions
UL: cbTIn(), cbTInScan()*
UL for .NET: TIn(), TInScan()*
Python for Windows: t_in(), t_in_scan()*
* Only channels that are configured as thermocouples will be converted to temperature. Other channels will be converted to voltage using the BIPPT078VOLTS (±0.078125 volts) range.
Scale
CELSIUS, FAHRENHEIT, KELVIN, NOSCALE*
* Refer to NOSCALE in the Hardware considerations section below for more information on this option. This parameter has no effect on channels configured for voltage input.
HighChan
0 to 15
0 to 31 when the AI-EXP32 expansion board is installed.
Functions
UL: cbAOut(), cbAOutScan(), cbVOut()
UL for .NET: AOut(), AOutScan(), VOut()
Python for Windows: a_out(), a_out_scan(), v_out()
Options
BACKGROUND, CONTINUOUS
HighChan
0 to 3
Rate
1 kHz, aggregate
Range
Ignored; fixed at BIP10VOLTS (±10 volts)
Packet size
32 samples
Data value
0 to 65,535 (Refer to 16-bit values using a signed integer data type for information on 16-bit values using unsigned integers.)
Pacing
Hardware pacing, internal clock supported.
Port I/O
Functions
Python for Windows: d_in(), d_out()
PortNum
FIRSTPORTA
FIRSTPORTA, FIRSTPORTB and FIRSTPORTC when the AI-EXP32 expansion board is installed.
DataValue
0 to 255
Bit I/O
Functions
UL: cbDBitIn(), cbDBitOut()
UL for .NET: DBitIn(), DBitOut()
Python for Windows: d_bit_in(), d_bit_out()
PortType
FIRSTPORTA
BitNum
0 to 7
0-23 when the AI-EXP32 expansion board is installed.
Functions
UL: cbCClear(), cbCIn()*, cbCIn32(), cbCLoad()**, cbCLoad32()**
UL for .NET: CClear(), CIn()*, CIn32(), CLoad()**, CLoad32()**
Python for Windows: c_clear(), c_in()*, c_in_32(), c_load()**, c_load_32()**
*Although cbCIn()/CIn()/c_in() are valid for use with this counter, cbCIn32()/CIn32()/c_in_32() may be more appropriate, since the values returned may be greater than the data types used by cbCIn(), CIn(), and c_in() can handle.
**cbCLoad()/cbCLoad32(), CLoad()/CLoad32(), and c_load()/c_load32() only accept Count=0. These functions are used to reset the counter.
CounterNum
0 to 1
Count
232-1 when reading the counter.
0 when loading the counter.
cbCLoad() and cbCLoad32() / CLoad() and CLoad32() are only used to reset the counter for this board to 0. No other values are valid.
The Basic signed integers guidelines apply when using cbCIn() or CIn() for values greater than 32,767 and when using cbCIn32() or CIn32() for values greater than 2,147,483,647.
Functions
UL: cbEnableEvent(), cbDisableEvent()
UL for .NET: EnableEvent(), DisableEvent()
Python for Windows: enable_event(), disable_event()
Event Types
UL: ON_DATA_AVAILABLE, ON_END_OF_INPUT_SCAN, ON_SCAN_ERROR
UL for .NET: OnDataAvailable, OnEndOfInputScan, OnScanError
Functions
UL: cbFlashLED()
UL for .NET: FlashLED()
Python for Windows: flash_led()
Causes the LED on a USB device to blink. When you have several USB devices connected, use this function to identify a particular device.
This hardware supports device detection with the API. Refer to the InstaCal, API Detection, or Both? section for information about whether to use InstaCal or the API to detect and configure hardware.
Factory serial number
Listed as Factory Serial No. (read only).
Identifier
Identifier text box.
Temperature units
Temperature units drop-down combo box.
Hardware version
Listed as Main Firmware (read only).
Listed as Measurement Firmware (read only).
Channel type
Channel Type drop-down combo box.
Input mode
Input Mode drop-down combo box.
Data rate
Data Rate drop-down combo box.
Thermocouple type
Thermocouple drop-down combo box.
Detect open TC
Detect Open Connections checkbox.
Factory serial number
ConfigItem = BIDEVSERIALNUM
UL for .NET: GetDeviceSerialNum()
Python for Windows: get_config_string()
config_item = DEVSERIALNUM
Identifier
UL: cbGetConfigString(), cbSetConfigString()
ConfigItem = BIUSERDEVID
maxConfigLen = up to 64 characters
UL for .Net: GetUserDeviceId(), SetUserDeviceId()
Python for Windows: get_config_string(), set_config_string()
config_item = USERDEVID
max_config_len = up to 64 characters
Temperature units
UL: cbGetConfig(), cbSetConfig()
ConfigItem = BITEMPSCALE
ConfigVal = CELSIUS, FAHRENHEIT, KELVIN
UL for .NET: GetTempScale(), SetTempScale()
Python for Windows: get_config(), set_config()
config_item = TEMPSCALE
config_val = TempScale enum
Hardware version
ConfigItem = BIDEVVERSION
DevNum = VER_FW_MAIN, VER_FW_MEASUREMENT
UL for .NET: GetDeviceVersion()
Type = VersionType.FW_MAIN, VersionType.FW_MEASUREMENT
Python for Windows: get_config_string()
config_item = DEVVERSION
dev_num = MAIN
dev_num = MEASUREMENT
Channel type
UL: cbGetConfig(), cbSetConfig()
ConfigItem = BIADCHANTYPE
ConfigVal = AI_CHAN_TYPE_VOLTAGE, AI_CHAN_TYPE_TC
DevNum = the channel number
UL for .NET: GetAIChanType(), SetAIChanType()
Python for Windows: get_config(), set_config()
config_item = ADCHANTYPE
config_val = AiChanType enum
Input mode
UL: cbAChanInputMode(), cbAInputMode()
UL for .NET: AChanInputMode(), AInputMode()
Python for Windows: a_chan_input_mode(), a_input_mode
Data rate
UL: cbGetConfig(), cbSetConfig()
ConfigItem = BIADDATARATE
ConfigVal = 2 (2.5), 5, 10, 25, 50, 60, 100, 500, 1000, 2000, 3750. The data rate is specified as S/s.
DevNum = the channel number
UL for .NET: GetAdDataRate(), SetAdDataRate()
Python for Windows: get_config(), set_config()
config_item = ADDATARATE
config_val = 2 (2.5), 5, 10, 25, 50, 60, 100, 500, 1000, 2000, 3750. The data rate is specified as S/s.
dev_num = the channel number.
Thermocouple type
UL: cbGetConfig(), cbSetConfig()
ConfigItem = BICHANTCTYPE
ConfigVal = TC_TYPE_J, TC_TYPE_K, TC_TYPE_R, TC_TYPE_S, TC_TYPE_B, TC_TYPE_E, TC_TYPE_T, TC_TYPE_N
DevNum = the channel number
UL for .NET: GetChanTcType(), SetChanTcType()
Python for Windows: get_config(), set_config()
config_item = CHANTCTYPE
config_val = TcType enum
Detect open TC
UL: cbGetConfig(), cbSetConfig()
ConfigItem = BIDETECTOPENTC
ConfigVal = 0 (disable), 1 (enable)
DevNum = the channel number
UL for .NET: GetDetectOpenTc(), SetDetectOpenTc()
Python for Windows: get_config(), set_config()
config_item = DETECTOPENTC
config_val = 0 (disable), 1 (enable); set with the State enum
The USB-2416 Series has 32 analog inputs that are individually software configurable as single-ended or differential. Although all 32 channels are always available to the Universal Library, for each channel configured as differential you essentially lose one single-ended channel. Reading channels 16 through 31 will return a single-ended result for those channels, but if the associated channel is configured as differential, doing so would not be practical in most applications. For example, if channel 0 is configured as differential, reading channel 16 is valid, but of limited practical usefulness, since the connection would be one-half of a differential signal. Additional channels can be added through connection to the AI-EXP32 expansion board.
TC inputs are supported by differential configuration only.
Voltage and TC inputs can be mixed in the scan operation. Voltage inputs can be either single-ended or differential; TC inputs must be differential. The AInScan() operation creates an array of raw data in 24-bit counts. When scanning both voltage and TC inputs, allocate the buffer with ScaledWinBufAllocEx(), and allocate the array as type Double. Call the AInScan() ScaleData option to convert the raw scan data to either voltage or temperature. Call ScaledWinBufToArray() to copy the double-precision values from the buffer to the array.
To return raw data, don't use the AInScan() ScaleData option, and allocate the buffer with WinBufAlloc32Ex().
Specify the NOSCALE option to retrieve raw data from the device. When NOSCALE is specified, calibrated data is returned, although a cold junction compensation (CJC) correction factor is not applied to the returned values.
The actual maximum scan rate depends upon the data rate set for the channel(s) in the scan. Refer to the Specifications chapter in the hardware User's Guide for the maximum scan rate calculated for each selectable A/D data rate per number of input channels. For n channels whose data rates are f1, f2 ... fn, the maximum scan rate fmax can be calculated from the following equation:
1/fmax = (640 μsec + 1/f1) + (640 μsec + 1/f2) + (640 μsec + 1/fn)
Refer to the Specifications chapter in the hardware User's Guide for the maximum scan rate calculated for each selectable A/D data rate per number of input channels.
When scanning multiple channels at low data rates, a BADRATE error may be returned if the Rate parameter is set too high for the number of channels in the scan. For example, when scanning multiple channels with the data rate set to 2.5 Hz, the maximum number of input channels using an integer scan rate is two, since the Universal Library doesn't accept non-integer rates.
To resolve this limitation, set the Rate parameter to 0. The Library will calculate the fastest allowable rate using the maximum scan rate equation, and run the scan at the calculated rate. The value returned to the Rate parameter will be the calculated value rounded to the nearest integer. Note that the Rate parameter may return 0, even though the fastest allowable rate was used for the conversion.
Refer to the Specifications chapter in the hardware User's Guide for the maximum scan rate calculated for each selectable A/D data rate per number of input channels.
Specify the HIGHRESRATE scan option with cbAInScan()/AInScan to acquire data at a high resolution rate. When specified, the rate at which samples are acquired is in "samples per 1000 seconds per channel".
The channel-gain queue is limited to 64 elements.
For output scans, the count must be set to an integer multiple of the number of channels or a BADCOUNT error is returned.
The state of each digital line can be read whether it is being used for output or for input. Each digital channel is an open-drain, and can either be driven low or allowed to float. If the digital line is intended to be used as an input, make sure that line is not driven low. A digital line is driven low by writing a logical "1" to the bit associated with the line. Implied in this is that the output function "inverts", so if all lines are driven low by writing a value of 255 to the port, the value read back will be 0.
You can enter up to 64 characters for the value of the device text identifier using the ConfigItem option BIUSERDEVID with cbSetConfigString().