Data offsets, Al_setdataoffsetlist – Measurement Computing ADLIB WIN User Manual
Page 111

Chapter 34 Data Offsets
25-1
25. DATA OFFSETS
Data Offsets allows the random ordering of Bipolar and Unipolar channel input types to be programmed
into the board channel RAM list.
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 individual channels, with different Data Offset settings.
25.1 AL_SetDataOffsetList
Prototype
C\C++
ERRNUM
AL_SetDataOffsetList(LHLD
lhld, LPDATAOFFSETLIST
lpDataOffsetlist);
Visual Basic for Windows
Function
AL_SetDataOffsetList(ByVal
lhld
As Long, lpDataOffsetlist As
DATAOFFSETLIST)
As
Long
LHLD lhld
handle of the LDSD
LPCHANLIST lpchanlist
address of the user DATAOFFSET list structure
The AL_SetDataOffsetList function sets the DataOffset list settings in the LDSD. The DataOffset listing
is comprised of a channel number and DataOffset type. The DataOffset list may contain
Channel/DataOffset settings that are not currently set in the channel listing itself, only those channels
selected within the channel list will be set to the appropriate DataOffset type when running. The
DataOffset ID setting in the array can be obtained from the capabilities file.
Parameter
Description
lhld
Identifies the instance of the logical device subsystem.
lpDataOffsetlist
Specifies a 32 bit far pointer to a DATAOFFSET information structure. The
structure has been pre-defined in the ADLIB include file and is defined as
follows:
typedef struct tagDATAOFFSETLIST
{
long
lType; /* 0 = Not Defined */
/* 1 = Use string list */
/* 2 = Use array of ints */
char
achDataOffsetList[MAX_DATAOFFSET_STRLEN];
long
lNumElements;
long
alDataOffsetList[MAX_DATAOFFSET_LIST_ARRAYLEN];
}DATAOFFSET;
typedef DATAOFFSET FAR * LPDATAOFFSETLIST;
Returns:
On success ERRNUM is set to 1 and the information contained in the lpDataOffsetlist structure is
transferred to the LDSD, otherwise ERRNUM contains the last error code that occurred during the call.