# cbALoadQueue()

Loads the A/D board's channel/gain queue. This function only works with A/D boards that have channel/gain queue hardware.

Some products do not support channel/gain queue, and some that do support it are limited on the order of elements, number of elements, and gain values that can be included, etc. Refer to the device-specific information in the Universal Library User's Guide to find details for your particular product.

## Function Prototype

C/C++

int cbALoadQueue(int BoardNum, short ChanArray[], short GainArray[], int Count)

Visual Basic

Function cbALoadQueue(ByVal BoardNum&, ChanArray%, GainArray%, ByVal Count&) As Long

## Arguments

BoardNum

The number associated with the board when it was installed with InstaCal or created with cbCreateDaqDevice(). BoardNum may be 0 to 99. The specified board must have an A/D and a channel/gain queue.

ChanArray

Array containing channel values. This array should contain all of the channels that will be loaded into the channel gain queue.

GainArray

Array containing A/D range values. This array should contain each of the A/D ranges that will be loaded into the channel gain queue.

Count

Number of elements in ChanArray and GainArray or 0 to disable channel/gain queue. Specifies the total number of channel/gain pairs that will be loaded into the queue. ChanArray and GainArray should contain at least Count elements. Set Count = 0 to disable the board's channel/gain queue. The maximum value is specific to the queue size of the A/D boards channel gain queue.

## Returns

- Error code or 0 if no errors.

## Notes

- Normally the cbAInScan() function scans a fixed range of channels (from LowChan to HighChan) at a fixed A/D range. If you load the channel gain queue with this function then all subsequent calls to cbAInScan() will cycle through the channel/range pairs that you have loaded into the queue.