Pamux User’s Guide 75
WRITE DIGITAL BANK 10
PURPOSE:
Writes to a bank of eight digital I/O points.
COMMAND TYPE:
Digital
PARAMETERS:
COMMAND Contains the value 10.
ADDRESS Contains the address of the Pamux brain board.
POSITION Contains the bank number.
VALUE ARRAY The first element of this array contains a one-byte bitmask (0–255) specifying
how the bank will be written to. Each bit corresponds to one module position. If
a bit is set to 1, the corresponding module position will be activated (turned on).
If a bit is set to 0, its corresponding module position will be deactivated (turned
off).
REMARKS:
Only I/O points configured as outputs will be affected.
EXAMPLE:
This example turns on all eight points of bank 1 at address 3. The example assumes that these
points have been previously configured as outputs.
100 COMMAND% = 10 ‘ Write Digital Bank command
110 ADDRESS% = 3 ‘ Address of brain board
12 0 POSITION% = 1 ‘ Bank number
130 VALUE%(0) = 255 ‘ Turn all points on
140 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