76 Pamux User’s Guide
WRITE DIGITAL BANK, EXPANDED 11
PURPOSE:
Writes to a bank of eight digital I/O points.
COMMAND TYPE:
Digital
PARAMETERS:
COMMAND Contains the value 11.
ADDRESS Contains the address of the Pamux brain board.
POSITION Contains the bank number.
VALUE ARRAY Contains the values to be written to each position in the specified bank. Each
element of the array corresponds to one module position. Element 0 corresponds
to the first module position, element 7 corresponds to the last. If an element is
set to any number other than 0, the corresponding module position will be
activated (turned on). If an element is set to 0, the corresponding module
position will be deactivated (turned off).
REMARKS:
Only I/O points configured as outputs will be affected.
EXAMPLE:
This example activates modules on bank 0 at address 5, positions 0, 2, 4, and 6, and deactivates
positions 1, 3, 5, and 7 at the same address. The example assumes that these positions have been
previously configured as outputs.
100 COMMAND% = 11 ‘ Write Digital Bank, Expanded
110 ADDRESS% = 5 ‘ Address of brain board
12 0 POSITION% = 0 ‘ Bank number
13 0 VALUE%(0) = 1 ‘ Turn on module 0
14 0 VALUE%(1) = 0 ‘ Turn off module 1
15 0 VALUE%(2) = 1 ‘ Turn on module 2
16 0 VALUE%(3) = 0 ‘ Turn off module 3
17 0 VALUE%(4) = 1 ‘ Turn on module 4
18 0 VALUE%(5) = 0 ‘ Turn off module 5
19 0 VALUE%(6) = 1 ‘ Turn on module 6
20 0 VALUE%(7) = 0 ‘ Turn off module 7
210 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