Pamux User’s Guide 77
WRITE DIGITAL POINT 12
PURPOSE:
Writes to a digital point.
COMMAND TYPE:
Digital
PARAMETERS:
COMMAND Contains the value 12.
ADDRESS Contains the address of the Pamux brain board.
POSITION Contains the point number.
VALUE ARRAY The first element of this array contains any value other than 0 if the point will be
activated (turned on), or a 0 if the point will be deactivated (turned off).
REMARKS:
The position to be written to must have been previously configured as an output, otherwise this
command will have no effect.
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 deactivates position 2 at address 32. The example assumes that this position has
been previously configured as an output.
100 COMMAND% = 12 ‘ Write Digital Point command
110 ADDRESS% = 32 ‘ Address of brain board
120 POSITION% = 2 ‘ Position 2
130 VALUE%(0) = 0 ‘ Turn module off
140 GOSUB 1000 ‘ Call the driver
.
.
1000 CALL
Pamux(ERRCOD%,ADDRESS%,COMMAND%,POSITION%,VALUE%(0))
1010 IF ERRCOD% < 0 THEN GOTO 2000
1020 RETURN
PROGRAMING WITH THE PAMUX DRIVER