Rpbasic-52 programming guide, Warning – Remote Processing BASIC 52 User Manual
Page 144

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
Line s 0, 1, and 5 will g o high while the oth ers wi ll go low . In this ex amp le, port would equal 35 or 23H
(either one will w ork).
Wh en J3 is conne cted to an opt o rack , a '0' at a bi t positio n turns O N a m odule while a '1' turns i t off.
(NOTE: The LIN E com mand rev erses the me aning of '0' and '1' while LIN E # does no t).
The value for an output at port C is compute d in the sam e manne r even if one half is an input.
The follow ing exam ple configures lines at J3 so port A an d B are all outp uts and port C is a ll inputs. With
the high current ou tput installed at U1 2, lines 7 and 8 are 'O N' or low w hile the other high c urrent 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 ou tputs using CO NFIG L INE, lines w ill go low m omentarily
(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 manu al under DIGIT AL I/O for mo re inform ation.
RELATED
LINE (both statement and function)
E R R O R
B A D A R G U M E N T configuration > 15 or negative
port > 255 or negative