PROGRAMING WITH THE PAMUX DRIVER
3-18
Pamux User’s Guide
WRITE DIGITAL BANK, EXPANDED
11
P
URPOSE
:
Writes to a bank of eight digital I/O points.
C
OMMAND
T
YPE
:
Digital
P
ARAMETERS
:
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).
R
EMARKS
:
Only I/O points configured as outputs will be affected.
E
XAMPLE
:
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
120
POSITION% = 0
‘ Bank number
130
VALUE%(0) = 1
‘ Turn on module 0
140
VALUE%(1) = 0
‘ Turn off module 1
150
VALUE%(2) = 1
‘ Turn on module 2
160
VALUE%(3) = 0
‘ Turn off module 3
170
VALUE%(4) = 1
‘ Turn on module 4
180
VALUE%(5) = 0
‘ Turn off module 5
190
VALUE%(6) = 1
‘ Turn on module 6
200
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
Содержание PAMUX
Страница 10: ...TABLE OF CONTENTS x Pamux User s Guide...
Страница 14: ...TABLE OF CONTENTS xiv Pamux User s Guide...
Страница 103: ...PROGRAMING WITH THE PAMUX DRIVER 3 42 Pamux User s Guide...
Страница 121: ...PROGRAMING WITHOUT THE PAMUX DRIVER 4 18 Pamux User s Guide...
Страница 125: ...TROUBLESHOOTING AND TIPS A 4 A 4 A 4 A 4 A 4 Pamux User s Guide...
Страница 135: ...SPECIFICATIONS B 10 Pamux User s Guide...
Страница 141: ...TEMPERATURE CONVERSIONS ROUTINES C 6 Pamux User s Guide...
Страница 143: ...PRODUCT SUPPORT D 2 Pamux User s Guide...
Страница 149: ...GLOSSARY E 6 Pamux User s Guide...