72 Pamux User’s Guide
READ DIGITAL BANK 7
PURPOSE:
Reads a bank of eight digital I/O points.
COMMAND TYPE:
Digital
PARAMETERS:
COMMAND Contains the value 7.
ADDRESS Contains the address of the Pamux brain board.
POSITION Contains the bank number.
VALUE ARRAY The first element of this array contains returned data in the form of a one-byte
bitmask (0–255). This bitmask specifies the status of the bank. Each bit
corresponds to one module position. If a bit is set to 1, the corresponding module
position is active (on). If a bit is set to 0, the corresponding module position is
inactive (off).
EXAMPLE:
This example reads back eight points at address 4 of bank 1 and then displays the resultant value
bitmask.
100 COMMAND% = 7 ‘ Read Digital Bank command
110 ADDRESS% = 4 ‘ Address of brain board
12 0 POSITION% = 1 ‘ Bank number
130 GOSUB 1000 ‘ Call the driver
.
.
1000 CALL
Pamux(ERRCOD%,ADDRESS%,COMMAND%,POSITION%,VALUE%(0))
1010 IF ERRCOD% < 0 THEN GOTO 2000
1020 RETURN
PROGRAMING WITH THE PAMUX DRIVER