Instruction manual

Table Of Contents
Page
105
PC215E
6.6.11.2 Query Status of a Switch within the Scan Matrix - DIOgetSwitchStatus
Queries the status of a particular switch in the switch matrix setup by the DIOsetSwitchMatrix
function. The grid reference of the switch is given, and the function performs a test on that
switch and returns 1 for switch on (closed) or 0 for switch off (open).
i = DIOgetSwitchStatus (h, xcoord, ycoord)
where
h Integer. Board handle as issued by function
registerBoard.
xcoord Integer. X-co-ordinate of the position of the
switch in the matrix (origin is at port A0/B0 of
PPIX). Valid values should be in the range 0 -
order (as specified in DIOsetSwitchMatrix).
ycoord Integer. Y-co-ordinate of the position of the
switch in the matrix (origin is at port A0/B0 of
PPIX). Valid values should be in the range 0 -
order
(as specified in DIOsetSwitchMatrix).
Returns Integer:
Zero, if switch was OFF (open). Non-zero if switch was ON
(closed).
or ERRHANDLE
ERRCHAN
Prior Calls registerBoard
DIOsetSwitchMatrix
See Also DIOfreeSwitchMatrix
6.6.11.3 Free-up the Digital I/O Chip(s) from a Switch Matrix - DIOfreeSwitchMatrix
Frees the DIO resources used by the switch matrix as setup in function DIOsetSwitchMatrix.
i = DIOfreeSwitchMatrix (h)
where
h Integer. Board handle as issued by function
registerBoard.
Returns Integer:
OK
or ERRHANDLE
ERRCHAN
Prior Calls registerBoard
DIOsetSwitchMatrix
See Also