Channel selections, Al_setchannellist – Measurement Computing ADLIB WIN User Manual
Page 95

Chapter 24 Channel Selections
23-1
23. CHANNEL SELECTIONS
Channel selection allows the random ordering of channels to be programmed into the board channel RAM
list.
The Pci5500MF has 8 channels of single-ended analog inputs multiplexed to a 12-bit A/D converter and
supported by 176 elements of channel list RAM. This allows the board to access channels 0 to 7 in any
order.
The Pci55xx Series has 16 channels of analog inputs with programmable gain that’s multiplexed to the 12
or 16-bit A/D converter and supported by 176 elements of channel list RAM. This allows the board to
access channels and gains from 0 to 7 Differential and 0-15 Single Ended or Pseudo Differential in any
order.
23.1 AL_SetChannelList
Prototype
C\C++
ERRNUM
AL_SetChannelList(LHLD
lhld, LPCHANLIST lpchanlist);
Visual Basic for Windows
Function
AL_SetChannelList(ByVal
lhld As
Long,
lpchanlist As CHANLIST) As Long
LHLD lhld
handle of the LDSD
LPCHANLIST lpchanlist address of the user channel list structure
The AL_SetChannelList function sets the active channel and gain settings in the LDSD. If a device
supports gain settings, the list is considered a channel and gain list, and must be set appropriately. See
examples below.
Parameter
Description
lhld
Identifies the instance of the logical device subsystem.
lpchanlist Specifies a 32 bit far pointer to a channel information structure. This
structure has been predefined in the ADLIB include file and is defined
as
follows:
typedef struct tagCHANLIST
{
long
lType; /* 0 = Not Defined */
/* 1 = Use string list */
/* 2 = Use array of numbers */
char
achChannelList[MAX_CHANLIST_STRLEN];
long
lNumElements;
long
alChannelList[MAX_CHANLIST_ARRAYLEN];
}CHANLIST;
typedef CHANLIST FAR * LPCHANLIST;