EasyManua.ls Logo

Strasbaugh nTellect 7AF - Page 2029

Default Icon
2493 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Pamux User’s Guide 69
CONFIGURE DIGITAL BANK 4
PURPOSE:
Configures a bank of eight digital I/O points.
COMMAND TYPE:
Digital
PARAMETERS:
COMMAND Contains the value 4.
ADDRESS Contains the address of the Pamux brain board.
POSITION Contains the bank number.
VALUE ARRAY The first element of this array contains a one-byte bitmask (0–255) specifying
the configuration of the bank. Each bit corresponds to one module position. If a
bit is set to 1, the corresponding module position is configured as an output. If a
bit is set to 0, the corresponding module position is configured as an input.
REMARKS:
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.
EXAMPLE:
This example configures bank 1 at address 4 with the first four positions as inputs and the second
four positions as outputs. Remember, bank 1 represents modules at positions 8 through 15, so in
this example bit 0 of the bitmask corresponds to module position 8 and bit 7 of the bitmask
corresponds to module position 15.
BIT POSITION 7 6 5 4 3 2 1 0
VALUE%(0) 1 1 1 1 0 0 0 0 = F0 hex or 240 decimal
100 COMMAND% = 4
‘ Configure Digital Bank command
110 ADDRESS% = 4
‘ Address of brain board
12 0 POSITION% = 1
‘ Bank number
130 VALUE%(0) = &HF0
‘ High nibble = outputs,
low nibble = inputs
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

Table of Contents

Related product manuals