PROGRAMING WITH THE PAMUX DRIVER
Pamux User’s Guide
3-25
WRITE ANALOG BANK
18
P
URPOSE
:
Writes to a bank of eight analog I/O points.
C
OMMAND
T
YPE
:
Analog
P
ARAMETERS
:
COMMAND
Contains the value 18.
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 bank. Each element of
the array corresponds to a module position within the bank. Element 0
corresponds to the first module position, element 7 corresponds to the last.
R
EMARKS
:
Only I/O points configured as outputs will be affected.
E
XAMPLE
:
This example writes the value 3,048 to module positions 4, 5, and 6 and writes the value 0 to all
other module positions at address 6 of bank 1. The example assumes that these positions have
been previously configured as outputs.
100
COMMAND% = 18
‘ Write Analog Bank command
110
ADDRESS% = 6
‘ Address of brain board
120
POSITION% = 1
‘ Bank number
130
VALUE%(0) = 0
‘ Module 0
140
VALUE%(1) = 0
‘ Module 1
150
VALUE%(2) = 0
‘ Module 2
160
VALUE%(3) = 0
‘ Module 3
170
VALUE%(4) = 3048
‘ Module 4
180
VALUE%(5) = 3048
‘ Module 5
190
VALUE%(6) = 3048
‘ Module 6
200
VALUE%(7) = 0
‘ 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...