USB-7202

The USB-7202 supports the following features.

Analog input

Functions

UL: cbAIn(), cbAInScan(), cbALoadQueue()*, cbFileAInScan(), cbATrig()

UL for .NET: AIn(), AInScan(), ALoadQueue()*, FileAInScan(), ATrig()

Python for Windows: a_in(), a_in_scan(), a_load_queue()*, a_trig()

*The channel-gain queue is limited to eight elements. The channels specified in the queue must be contiguous and in increasing order, except when wrapping around from channel 7 to channel 0. The gains may be any valid value.

Options

BACKGROUND, BLOCKIO*, SINGLEIO*, BURSTIO**, CONTINUOUS, EXTTRIGGER, NOCALIBRATEDATA, EXTCLOCK, HIGHRESRATE

* The packet size is based on the Options setting: When set to BLOCKIO, the packet size is 31 samples. When set to SINGLEIO, the packet size equals the number of channels being sampled.

** BURSTIO can only be used with the number of samples (Count) set equal to the size of the FIFO or less. The USB-7202 FIFO holds 32,768 samples. BURSTIO cannot be used with the CONTINUOUS option.

Mode

Single-ended

HighChan

0 to 7 in single-ended mode

Count

In BURSTIO mode, Count must be an integer multiple of the number of channels in the scan:

Rate

200 kilohertz (kHz) maximum for BURSTIO mode (50 kHz for any one channel).

The maximum rate is 100 kHz for all other modes (50 kHz for any one channel).

When using cbAInScan() or AInScan(), the minimum sample rate is 1 Hz. In BURSTIO mode, the minimum sample rate is 20 Hz/channel.

Range

BIP10VOLTS (±10 volts)BIP2VOLTS (±2 volts)
BIP5VOLTS (±5 volts)BIP1VOLTS (±1 volts)

Pacing

Hardware pacing, internal clock supported. External clock supported via the SYNC pin.

Triggering

Functions

UL: cbSetTrigger()

UL for .NET: SetTrigger()

Python for Windows: set_trigger()

TrigType

Digital triggering: TRIGPOSEDGE, TRIGNEGEDGE

External digital (TTL) hardware triggering supported. Set the hardware trigger source with the Trig_In input.

Digital I/O

Configuration

Functions

UL: cbDConfigBit(), cbDConfigPort()

UL for .NET: DConfigBit(), DConfigPort()

Python for Windows: d_config_bit(), d_config_port()

PortNum

AUXPORT

PortType

AUXPORT

Port I/O

Functions

UL: cbDOut(), cbDIn()

UL for .NET: DOut(), DIn()

Python for Windows: d_in(), d_out()

PortNum

AUXPORT (eight bits, bit-configurable)

DataValue

0 to 255 for AUXPORT

Bit I/O

Functions

UL: cbDBitIn(), cbDBitOut()

UL for .NET: DBitIn(), DBitOut()

Python for Windows: d_bit_in(), d_bit_out()

PortType

AUXPORT

BitNum

0 to 7 on AUXPORT

Counter I/O

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() and CIn()/c_in_32() can handle.

cbCLoad()/cbCLoad32(), CLoad()/CLoad32(), and c_load()/c_load32() only accept Count=0. These functions are used to reset the counter.

The counter on this device is zero-based.

CounterNum

1

Count

232–1 when reading the counter.

LoadValue

0 when loading the counter.

cbCLoad() and cbCLoad32() / CLoad() and CLoad32() are only used to reset the counter to 0. No other values are valid.

The Basic signed integers guidelines in the Digital Input/Output Hardware topic 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.

RegNum

LOADREG0

Event Notification

Functions

UL: cbEnableEvent(), cbDisableEvent()

UL for .NET: EnableEvent(), DisableEvent()

Python for Windows: enable_event(), disable_event()

Event types

ON_SCAN_ERROR, ON_DATA_AVAILABLE, ON_END_OF_INPUT_SCAN

Miscellaneous

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 devices connected, use this function to identify a particular device.

Configuration

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.

InstaCal

Factory serial number

Listed as Factory Serial No. (read only)

Identifier

Identifier text box

Enable SYNC output

Enable SYNC output checkbox

Hardware version

Listed as Firmware Version (read only)

Programmable API Functions

Factory serial number

UL: cbGetConfigString()

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

Enable SYNC output

UL: cbGetConfig(), cbSetConfig()

InfoType = BOARDINFO

ConfigItem = BIINPUTPACEROUT

UL for .NET: GetInputPacerOut(), SetInputPacerOut()

Python for Windows: get_config(), set_config()

info_type = BOARDINFO

config_item = INPUTPACEROUT

config_val = State enum. When enabled, the input clock is set for output.

Python for Windows: get_config(), set_config()

config_item = INPUTPACEROUT

config_val = State enum

Hardware version

UL: cbGetConfigString()

ConfigItem = BIDEVVERSION

DevNum = VER_FW_MAIN

UL for .NET: GetDeviceVersion()

Type = VersionType.FW_MAIN

Python for Windows: get_config_string()

config_item = DEVVERSION

dev_num = MAIN

Hardware Considerations

Acquisition rate

Since the maximum data acquisition rate depends on the system connected to the device, it is possible to "lose" data points when scanning at higher rates. If the requested speed cannot be sustained, an OVERRUN error will occur.

Continuous scans

When running an analog input scan with the CONTINUOUS option, consider the packet size and the number of channels being scanned. In order to keep the data aligned properly in the array, make the total number of samples an integer multiple of the packet size and the number of channels.

EXTCLOCK

You can set the SYNC pin as a pacer input or output. By default, this pin is set for pacer input. If set for output when using the cbAInScan()AInScan()/a_in_scan() EXTCLOCK scan option, a BADOPTION error occurs.

BURSTIO

BURSTIO mode allows higher sampling rates for sample counts up to the size of the FIFO. The USB-7202 device's FIFO holds 32,768 samples. Data is collected into the device's local FIFO. Data transfers to the PC don't occur until the scan completes. For BACKGROUND scans, the Count and Index returned by cbGetStatus()/GetStatus()/get_status() remain 0, and Status = RUNNING until the scan finishes. The Count and Index are not updated until the scan is completed. When the scan is complete and the data is retrieved, cbGetStatus() and GetStatus() are updated to the current Count and Index, and Status = IDLE.

BURSTIO is required for aggregate Rate settings above 100 kHz, but Count is limited to sample counts up to the size of the FIFO (32,768 samples). Count settings must be an integer multiple of the number of channels in the scan.