# USB-1608HS Series

The USB-1608HS Series includes the following devices:

- USB-1608HS
- USB-1608HS-2AO

The USB-1608HS Series supports the following features.

## Analog Input

Functions

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

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

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, CONTINUOUS, EXTCLOCK, EXTTRIGGER, HIGHRESRATE, NOCALIBRATEDATA, RETRIGMODE, SCALEDATA, SINGLEIO

Packet size

Rate dependent. The default packet size is 256 samples. At higher rates, the packet size increases by a multiple of 256.

Mode

Single-ended and differential

HighChan

0 to 7 in single-ended and differential mode

Rate

250 kHz per channel

Count

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

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_IN pin.

## Analog Output (USB-1608HS-2AO only)

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

HighChan

0 to 1

Rate

70 kHz for one channel

47 kHz for two channels

Count

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

Range

BIP10VOLTS (±10 volts)

Packet size

512 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.

## Triggering

Functions

UL: cbSetTrigger()

UL for .NET: SetTrigger()

Python for Windows: set_trigger()

TrigType

Analog triggering: TRIGABOVE, TRIGBELOW

Digital triggering: TRIGPOSEDGE, TRIGNEGEDGE, TRIGHIGH, TRIGLOW

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

Threshold

0 to 65,535 (BIP10VOLTS)

Hardware actually has a 12-bit resolution, but the library uses a 16-bit value so that cbFromEngUnits() can be used to obtain the trigger value.

For information about how to set up repetitive trigger events, refer to Retriggering in the Hardware Considerations section below.

## Digital I/O

Port I/O

Functions

UL: cbDOut(), cbDIn()

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

Python for Windows: d_in(), d_out()

PortNum

AUXPORT

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

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

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

LOADREG1

## Event Notification

Functions

UL: cbEnableEvent(), cbDisableEvent()

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

Python for Windows: enable_event(), disable_event()

Event types

UL: ON_SCAN_ERROR, ON_DATA_AVAILABLE, ON_END_OF_INPUT_SCAN

UL for .NET: OnScanError, OnDataAvailable, OnEndOfInputScan

The USB-1208HS-2AO also supports ON_END_OF_OUTPUT_SCAN/OnEndOfOutputScan

## 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 USB devices connected to the computer, 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

Independent SE and DIFF buttons for Ch 0 through Ch 7

Set All Single-Ended button

Set All Differential button

Output channel configuration

Ch 0 Force Sense Enable checkbox

Ch 1 Force Sense Enable 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

Input mode

UL: cbAChanInputMode(), cbAInputMode()

UL for .NET: AChanInputMode(), AInputMode()

Python for Windows: a_chan_input_mode(), a_input_mode

Output channel remote sensing

UL: cbGetConfigString(), cbSetConfigString()

ConfigItem = BIDACFORCESENSE

ConfigVal = ENABLED, DISABLED

DevNum = Channel number

UL for .NET: GetDACForceSense(), SetDACForceSense()

Python for Windows: get_config(), set_config()

config_item = DACFORCESENSE

config_val = State

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, make the count an integer multiple of the number of channels in the scan in order to keep the data aligned properly in the array.

##### Output scan restriction

You cannot access cbSetTrigger()/ SetTrigger()/set_trigger() or call BIUSERDEVID/USERDEVID while an analog output scan is in progress.

##### Scaling data

Results using SCALEDATA may be slightly different from results using cbToEngUnits() near range limits, due to the nature of the calibration being applied and the internal calculation using floating count values. If this is undesirable use cbToEngUnits().

##### Analog triggering

When using cbAInScan()/AInScan() with EXTTRIGGER, the value entered to cbSetTrigger() threshold arguments for analog trigger modes should be a 16 bit value. The resolution of the circuitry is actually 12 bits, but the library uses a 16 bit value so that cbFromEngUnits() can be used to obtain the trigger value.

##### Retriggering

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

When using RETRIGMODE, set the Count (cbAInScan()/AInScan()a_in_scan()) and the BIADTRIGCOUNT argument (cbSetConfig()/set_config()/SetAdRetrigCount()) to an integer multiple of the packet size (and the number of channels if using CONTINUOUS). This ensures that the entire buffer, or the portion of the buffer defined by BIADTRIGCOUNT, will contain updated data.

##### Remote sensing (USB-1608HS-2AO)

You can enable remote sensing for each of the two analog outputs on the USB-1608HS-2AO with InstaCal.

The remote sensing feature compensates for the voltage drop error that occurs in applications where the USB-1608HS-2AO's analog outputs are connected to its load through a long wire or cable type interconnect.

The remote sensing feature can compensate for I*R induced voltage losses up to 750 mV, and for any series resistance up to 75 Ω between its remote sensing terminal pins and its output load.

- To configure the remote sensing connection, connect two separate output wires – one from the VDACn_F (force) output terminal, and one from the VDACn_S (sense) output terminal – to the high side or positive input terminal of the field device (load).
- If you are not using the remote sensing feature, simply connect a single output wire or cable from the VDACn_F (force) output terminal to the load, and leave the VDACn_S (sense) terminal unconnected.

Refer to the hardware user's guide for more information about remote sensing.