USB-7204

The USB-7204 supports the following features.

Analog input

Functions

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

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

Options

BACKGROUND, BLOCKIO*, CONTINUOUS, EXTCLOCK, EXTTRIGGER, HIGHRESRATE, NOCALIBRATEDATA, RETRIGMODE**, SCALEDATA, SINGLEIO

*The packet size is based on the Options setting:

BLOCKIO: 31

SINGLEIO: 1

**RETRIGMODE can only be used with cbAInScan()/AInScan().

HighChan

0 to 7 in single-ended mode

0 to 3 in differential mode

Count

In CONTINUOUS mode, Count must be an integer multiple of the packet size.

Rate

50 kHz maximum for BLOCKIO mode.

The throughput depends on the system being used. Most systems can achieve 40 kHz aggregate.

When using cbAInScan()/AInScan(), the minimum sample rate is 1 Hz.

Range

Single-ended:

BIP10VOLTS (±10 volts)

Differential:

BIP20VOLTS (±20 volts)BIP2PT5VOLTS (±2.5 volts)
BIP10VOLTS (±10 volts)BIP2VOLTS (±2 volts)
BIP5VOLTS (±5 volts)BIP1PT25VOLTS (±1.25 volts)
BIP4VOLTS (±4 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

TRIGPOSEDGE

TRIGNEGEDGE

External digital (TTL) hardware triggering is supported. Use the TRIG_IN input (pin # 18 on the screw terminal) for the external trigger signal.

Analog Output

Functions

UL: cbAOut(), cbAOutScan() cbVOut()

UL for .NET: AOut(), AOutScan(), VOut()

Python for Windows: a_out(), a_out_scan(), v_out()

Options

BACKGROUND, CONTINUOUS, NOCALIBRATEDATA, SCALEDATA

The number of samples (Count) in a CONTINUOUS scan must be an integer multiple of the packet size (32).

HighChan

0 to 1

Count

Count must be an integer multiple of the number of channels in the scan.

In a CONTINUOUS scan, Count must be an integer multiple of the packet size (32).

Rate

Up to 10 kHz maximum for a single channel

Up to 5 kHz maximum for two channels

Range

Ignored - not programmable; fixed at UNI4VOLTS (0 to 4 V, nominal. Actual range is 0 to 4.096 V.)

DataValue

0 to 4,095

Digital I/O

Click here to display a table of the port numbers and corresponding bit numbers that are set by the digital I/O functions for hardware designed with the 82C55 chip or 82C55 emulation.

cbDConfigPort() port reference cbDIn(), cbDOut() port reference Values cbDBitIn(), cbDBitOut() port reference Bit Number
FIRSTPORTAFIRSTPORTA0-255FIRSTPORTA0 to 7
FIRSTPORTBFIRSTPORTB0-255FIRSTPORTA8 to 15

Configuration Functions

UL: cbDConfigPort()

UL for .NET:DConfigPort()

Python for Windows: d_config_port()

PortNum

FIRSTPORTA, FIRSTPORTB

Port I/O Functions

UL: cbDIn(), cbDOut()

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

Python for Windows: d_in(), d_out()

PortNum

FIRSTPORTA, FIRSTPORTB

DataValue

0 to 255 for FIRSTPORTA or FIRSTPORTB

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 15 for on FIRSTPORTA

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() 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.

0 when loading the counter.

cbCLoad()/CLoad() and cbCLoad32()/CLoad32() are only used to reset the counter for this device 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 (analog input and analog output), ON_DATA_AVAILABLE, ON_END_OF_INPUT_SCAN, ON_END_OF_OUTPUT_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

Input mode

Input Mode drop-down combo box for single-ended or differential.

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

Input mode

UL: cbAInputMode()

UL for .NET: AInputMode()

Python for Windows: a_input_mode

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. The Universal Library cannot always detect this data loss.

Most systems can sustain rates of 40 kS/s aggregate in BLOCKIO mode, and 1 kS/s aggregate in SINGLEIO mode.

EXTCLOCK

By default, the SYNC pin is configured for pacer output and provides the internal pacer A/D clock signal. To configure the pin for pacer input, use the EXTCLOCK option.

If you use the EXTCLOCK option, make sure that you disconnect from the external clock source when you test or calibrate the device with InstaCal, as the SYNC pin drives the output.

Repetitive trigger events

Use RETRIGMODE with cbAInScan() to set up repetitive trigger events. Use the ConfigItem option BIADTRIGCOUNT with cbSetConfig() to set the A/D trigger count, and the ConfigItem option BIDACTRIGCOUNT to set the D/A trigger count.

Use the RETRIGMODE scan option to set up repetitive trigger events. Use the BIADTRIGCOUNT ConfigItem with cbSetConfig() to set the A/D trigger count, and the BIDACTRIGCOUNT ConfigItem to set the D/A trigger count. For Python users, use the ADTRIGCOUNT and DATRIGCOUNT config_items.

Resolution

When configured for single-ended mode, the resolution of the data is 11 bits (data values between 0 and 2,047). However, the Universal Library maps this data to 12-bit values, so the range of data is no different from the differential configuration. Consequently, the data returned contains only even numbers between 0 and 4,094 when the NOCALIBRATEDATA option is used.

Continuous scans

When running cbAInScan()/ AInScan() 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, set the total number of samples to be an integer multiple of the packet size and the number of channels in the scan.

Concurrent operations

The USB-7204 supports these concurrent operations:

UL function/methodCan be run with:
cbAOutScan() / AOutScan() (BACKGROUND mode)
cbAInScan() / AInScan() (BACKGROUND mode)
Channel-gain queue

When using cbALoadQueue()/ALoadQueue(), the channel gain queue is limited to 16 elements.

The queue accepts any combination of valid channels and gains in each element.

Analog output

When you include both analog output channels in cbAOutScan()/AOutScan(), the two channels are updated simultaneously.