
RPBASIC-52 PROGRAMMING GUIDE
2-125
configuration 1 Port A Port B Upper C Lower C
0 Output Output Output Output
1 Output Output Output Input
2 Output Input Output Output
3 Output Input Output Input
4 Output Output Input Output
5 Output Output Input Input
6 Output Input Input Output
7 Output Input Input Input
8 Input Output Output Output
9 Input Output Output Input
10 Input Input Output Output
11 Input Input Output Input
12 Input Output Input Output
13 Input Output Input Input
14 Input Input Input Output
15 Input Input Input Input
port A, B, and C parameters set the output status. When a port is configured as an input, any value can be
used. When a port is configured as an output, the value may be determined by corresponding a bit output
with a value.
Bit 7 6 5 4 3 2 1 0
Status 0 0 1 0 0 0 1 1 = 23H = 35 decimal
Lines 0, 1, and 5 will g o high while the others will go low . In this ex ample, port would equal 35 or 23H
(either one will work).
When J3 is conne cted to an opto rack, a '0' at a bit position turns O N a m odule while a '1' turns it off.
(NOTE: The LINE com mand rev erses the meaning of '0' and '1' while LIN E # does no t).
The value for an output at port C is computed in the same manner even if one half is an input.
The following example configures lines at J3 so port A and B are all outputs and port C is all inputs. With
the high current output installed at U12, lines 7 and 8 are 'ON' or low while the other high current outputs are
'OFF'. Line 19 will also be low. Lines at port C are pulled high or low according to jumper W7.
CONFIG LINE 100,5,254,130,0
WARNING: When configuring lines for outputs using CO NFIG L INE, lines will go low momentarily
(less than 10 micro-seconds) until they are set high again as per the data in the command
line.
Some other lines are affected when CONFIG LINE 0 is executed. These lines are card dependent. Refer
to the cards hardw are manual under DIGIT AL I/O for mo re inform ation.
RELATED
LINE (both statement and function)
ERROR
BAD ARGUMENT configuration > 15 or negative
port > 255 or negative
Comentários a estes Manuais