PROGRAMING WITH THE PAMUX DRIVER
Pamux User’s Guide
3-21
CONFIGURE ANALOG BANK, EXPANDED
14
P
URPOSE
:
Configures a bank of eight analog I/O points.
C
OMMAND
T
YPE
:
Analog
P
ARAMETERS
:
COMMAND
Contains the value 14.
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 0, the corresponding module position will be
configured as an input. If an element is set to 1, the corresponding module
position will be configured as an output.
R
EMARKS
:
All output module positions must first be configured as outputs before values can be written to
them. 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% = 14 ‘ Configure Analog Bank, Expanded
110
ADDRESS% = 5
‘ Address of brain board
120
POSITION% = 0 ‘ Bank number
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
Содержание 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...