PROGRAMING WITH THE PAMUX DRIVER
3-12
Pamux User’s Guide
CONFIGURE DIGITAL BANK, EXPANDED
5
P
URPOSE
:
Configures a bank of eight digital I/O points.
C
OMMAND
T
YPE
:
Digital
P
ARAMETERS
:
COMMAND
Contains the value 5.
ADDRESS
Contains the address of the Pamux brain board.
POSITION
Contains the bank number.
VALUE ARRAY
Each element of this array corresponds to a module position within the bank.
Element 0 corresponds to the first module position, element 7 corresponds to
the last. If an element is set to 1, the corresponding module position is
configured as an output. If an element is set to 0, the corresponding module
position is configured as an input.
R
EMARKS
:
All output module positions must first be configured as outputs before they can be activated. The
driver will ignore any write commands to positions configured as inputs and no errors will be
returned.
E
XAMPLE
:
This example configures bank 0 at address 5 with module positions 0, 2, 4, and 6 configured as
inputs and positions 1, 3, 5, and 7 configured as outputs.
100
COMMAND% = 5
‘ Configure Digital Bank, Expanded
110
ADDRESS% = 5
‘ Address of brain board
120
POSITION% = 0
‘ Bank number 0
130
VALUE%(0) = 0
‘ Input module 0
140
VALUE%(1) = 1
‘ Output module 1
150
VALUE%(2) = 0
‘ Input module 2
160
VALUE%(3) = 1
‘ Output module 3
170
VALUE%(4) = 0
‘ Input module 4
180
VALUE%(5) = 1
‘ Output module 5
190
VALUE%(6) = 0
‘ Input module 6
200
VALUE%(7) = 1
‘ Output 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
Summary of Contents for PAMUX
Page 10: ...TABLE OF CONTENTS x Pamux User s Guide...
Page 14: ...TABLE OF CONTENTS xiv Pamux User s Guide...
Page 103: ...PROGRAMING WITH THE PAMUX DRIVER 3 42 Pamux User s Guide...
Page 121: ...PROGRAMING WITHOUT THE PAMUX DRIVER 4 18 Pamux User s Guide...
Page 125: ...TROUBLESHOOTING AND TIPS A 4 A 4 A 4 A 4 A 4 Pamux User s Guide...
Page 135: ...SPECIFICATIONS B 10 Pamux User s Guide...
Page 141: ...TEMPERATURE CONVERSIONS ROUTINES C 6 Pamux User s Guide...
Page 143: ...PRODUCT SUPPORT D 2 Pamux User s Guide...
Page 149: ...GLOSSARY E 6 Pamux User s Guide...