beautypg.com

Remote Processing RPC-330 User Manual

Page 24

background image

DIGITAL I/O

SECTION 6

Page 6-3 RPC -330

LINE function and statement at J3 is used with MPS-XX
opto rack. It accesses a module according to the position
number printed on the MPS board. Lines are numbered
from 100 to 123. The opto m odule num ber used in this
command is computed by adding 100 to the board
position number. L INE also accesses L0-L8 on P 2 and
P 6.

The LIN E B function and statement is used to acc ess
digital I/O lines 8 bits at a time . T he addr ess for po rt A
is 0, B is 1, and C is 2. The segment number is 3.

LINE # function and statement accesses lines according
to the pin number at J3. J3 lines are number ed from 101
to 125. The line nu mber used in this com mand is
computed by adding 100 to the connector pin number.
Line 102 is not allowed as it is the + 5V supply. See
Table 6-1 to corr espond a pin n umber to a port and opto
rack position.

P6 lines are numbered 0 to 7, and correspond to the
terminal number on the boar d. L8 at P 2 is a high
current output and is accessed using LINE 8. The status
of ISOA/B is returned using LIN E 8 function.

LIN E, LINE B and LIN E # re turn a ' true' logic level.
A ' 1' indicates + 5 volts or high and a '0' is low or
ground. LINE B and LINE # output true logic levels.
LINE, however, outputs inverted logic. In order to turn
on an opto module, a line must go low. However,
turning on a module using LINE, you must specify a ' 1' .

100 LINE 118,1

:REM Turn opto 118 ON

110 LINE 118,ON

:REM Turns opto 118 ON

120 LINE#104,0

:REM also turns 118 ON

ON LIN E is a multitasking command. W hen active, the
RPBASIC oper ating system checks the specified line
every 5 ms. If the line changed state from the previous
scan, a software interr upt is set. Upon completion of the
current BASIC command (and assuming no other
interrupts are active), pr ogram execution branches to a
specified subroutine. This command is useful for
monitoring lines, such as limit or door switches, that
may not change often or when the program structure
make it unwieldy to check lines frequently.

Another multitasking command, ON C OUN T, causes the
operating system to ch eck the specified line every 5 m s.
U p to 8 li ne s ar e m on it or e d . If th e li ne c ha n ge d fr o m a
high-to-low state, a counter is incremented. M aximum
counting rate is effectively 95 Hz. This command has
two variations. One causes a software interr upt when a

specified num ber of co unts is reac hed. Another simply
counts pulses at a line. The C OUN T function returns
the number of pulses since ON CO UNT was initiated.
See Appendix A for command infor mation.

ON C OUN T and O N LIN E do not ne cessarily h ave to
be input lines. They can be outputs controlled by
a n ot he r p ar t of th e pr o g ra m .

High Current Output

Eight lines at J3 can be used as high cur rent driver s.
These outputs switch loads to ground. Outputs are
controlled by Port B on the 82C55.

Logic outputs are inverted. That is, when a 1 is written
(using the LINE# comm and) to the high current port, the
output is switched on and goes low.

The output driver chip, U 12, can be replaced w ith a DIP
shunt jumper so it is like the other lines at J3. To do
this, r emove U12. Install a DIP shunt so pin 1 goe s to
pin 18. Pins 9 & 10 ar e open.

NOTE: Outputs at the high current lines are not

compatible with TTL logic levels and should not
be used to drive other logic devices.

Each of the high current outputs can sink 500 ma at 50V.
How ever, package diss ipation will be ex ceeded if all
outputs are used at the maximum rating. The following
conserv ative guidelines a ssume the number of outputs
are on simultaneously:

# of outputs

Maximum current

on

per output

1

5 0 0 m a

2

4 0 0 m a

3

2 7 5 m a

4

2 0 0 m a

5

1 6 0 m a

6

1 3 5 m a

7

1 2 0 m a

8

1 0 0 m a

The ther mal time constant of the p ackage is ve ry shor t,
s o th e nu m b er o f o u tp u ts th a t a r e on a t a n y o n e t im e
should include those that overlap even for a few
milliseconds.

Incandesc ent lamps h ave a " cold" c urre nt of 11 times its
o p er a ti ng c ur r e nt . L a m ps r eq u ir i ng m o re th a n 5 0 m a