82 Pamux User’s Guide
READ ANALOG POINT 17
PURPOSE:
Reads an analog point.
COMMAND TYPE:
Analog
PARAMETERS:
COMMAND Contains the value 17.
ADDRESS Contains the address of the Pamux brain board.
POSITION Contains the point number.
VALUE ARRAY The first element of this array contains returned data read from the point.
REMARKS:
The POSITION value is a point offset starting from the value in the ADDRESS parameter. The point
number in the POSITION parameter can range from 0 to 511 if the ADDRESS parameter is 0. An
error will be returned if the values in these parameters exceed the limits.
EXAMPLE:
This example reads the state of the module at position 8 and displays the status.
100 COMMAND% = 17 ‘ Read Analog Point command
110 ADDRESS% = 0 ‘ Address of brain board
120 POSITION% = 8 ‘ Position 8
130 GOSUB 1000 ‘ Call the driver
140 PRINT VALUE%(0) ‘ Display the analog value
.
.
1000 CALL
Pamux(ERRCOD%,ADDRESS%,COMMAND%,POSITION%,VALUE%(0))
1010 IF ERRCOD% < 0 THEN GOTO 2000
1020 RETURN
PROGRAMING WITH THE PAMUX DRIVER