Instruction manual
AMPDIO DRIVERS
Page 36
Function DIOsetSwitchMatrix allows you to set up the matrix, specifying the matrix order. For the
PC214E, this can be 12 X 12 or 24 X 24 switches. The function also registers the PPIs used as
being 'in use' and unavailable for use by other programs. Function DIOgetSwitchStatus returns the
status of a given switch in the matrix, and function DIOfreeSwitchMatrix frees the PPIs so they can
be used by other programs when the switch matrix is no longer required.
3.3 Basic Analogue I/O Functions
The library supports a range of basic analogue I/O functions. Basic analogue I/O functions do not
require the use of interrupts.
3.3.1 Determining Analogue Resources
The library includes functions to determine what analogue resources are on the card.
AIOcountADCchans and AIOcountDACchans allow the user to determine the precise number of
analogue to digital converters (ADCs) and digital to analogue converters (DACs) available on a
card (see section 6.4.17).
3.3.2 Channel Masks
A number of cards support multiple digital to analogue or analogue to digital converters. These are
either implemented as individual devices mapped into different areas of the I/O space or as single
devices with a multiplexed input stage. The channel mask is used to allow these individual
channels to be configured independently.
The analogue configuration functions accept a Channel Mask parameter. This parameter allows
individual channels to be configured differently. In order to configure a channel the associated bit
must be set to one, e.g. for channel 0 set bit 0, for channel 2 set bit 2:
ChanMask: 5 = 0000000000000101
2
selects channels 0 and 2.
3.3.3 Channel Groups
If a card supported multiple sets of multiplexed analogue I/O or a mixture of multiplexed and non-
multiplexed analogue I/O of the same type, then the analogue resources would be considered to
be in different groups. No currently supported card has more than one ADC channel group or DAC
channel group. Therefore, in functions that require an ADC or DAC channel group to be specified,
the group parameter should be set to 0 for all currently supported cards.
3.3.4 Configuring Channels as Bipolar or Unipolar
The analogue channels can be bipolar or unipolar. In bipolar mode, the signal voltage can be
negative or positive with respect to a reference. In unipolar mode, the signal voltage must be
positive with respect to the reference.
The driver software treats channels differently depending on whether they are unipolar or bipolar.
Channels can be marked as being configured for unipolar or bipolar operation using the
AIOsetADCchanMode and AIOsetDACchanMode functions (see sections 6.4.18.3 and 6.4.18.12).
These functions only affect how the driver software cooks ADC data read from the channel or
uncooks DAC data written to a channel. The cooked data representation allows the interpretation
of data values to be consistent across different cards. This setting is known as the software
unipolar/bipolar setting for the card.