Instruction manual

AMPDIO DRIVERS
Page 175
6.4.11.5 Send Digital Output Data DIOsetData
Writes a data value to a DIO channel. It is assumed that the channel has already been set as
an output by a call to function DIOsetMode.
i = DIOsetData (h, chip, chan, data)
where h short: board handle as issued by the
registerBoardEx function.
chip short: address offset of the DIO chip. One of
the following pre-defined constants may be
used:
PPIX = 0
PPIY = 8
PPIZ = 16
chan short: DIO channel. Note the channel
numbering depends on the channel width as
set by DIOsetChanWidth (default is three 8-bit
channels).
data long: digital data word.
Returns short: OK
or ERRHANDLE
ERRCHAN
Prior Calls registerBoardEx
DIOsetMode
DIOsetChanWidth
See Also DIOgetData
6.4.11.6 Read Digital Input Data DIOgetData
Reads a data value from a DIO channel. It is assumed that the channel has already been set
as an input by a call to function DIOsetMode.
i = DIOgetData (h, chip, chan, pdata)
where h short: board handle as issued by the
registerBoardEx function.
chip short: address offset of the DIO chip. One of
the following pre-defined constants may be
used:
PPIX = 0
PPIY = 8
PPIZ = 16
chan short: DIO channel. Note the channel
numbering depends on the channel width as
set by DIOsetChanWidth (default is three 8-bit
channels).