
DIGITAL AND OPTO PORTS CHAPTER 6
Page 16
Figure 6-1 Digital I/O
INTRODUCTION
Digital I/O lines ar e used to inter face with opto-module
racks, switches, low current LED's, and other TTL
devices. The RP C-52 ha s 24 of these lines a vailable
through J4. 8 of these lines are high current outputs,
capable of sinking 75 to 200 ma. Additionally, there are
4 opto-module sockets on the card itself.
On-car d opto-mo dule slots accept G4 and G 5 series op to
modules. G4 series opto modules are used to sense the
presence of AC or DC voltages or switch them.
Maximum switching cur rent is 3 amper es.
G5 series are optically isolated analog input or output
modules. The modules connect to thermocouples,
RTD' s, load cells, 4-20 ma current loops, and general
purpose voltage inputs. They can also output voltages
and currents. These modules are supported by the
G5MOD command. Input modules return a number
from 0 to 255 in a manner similar to an A-D.
Conversion time is 7 milli-seconds.
In addition to the 24 I/O lines from J4, the display port
can be used as digital I/O. Refer to chapter 8 for more
information.
Two on card opto rack slots may be jumpered for PWM
output.
WARNING:
Apply power to the RPC -52 before applying a
voltage to the digital I/O lines to prevent current
from flowing in and damaging devices. If you
cannot apply power to the RPC-52 first, contact
technical support for suggestions appropriate to your
application.
This chapter is divided into two sections. T he first
section is about the on-card opto rack. The second
section refers to the digital I/O port J4.
ON-CARD OPTO RACK
Description
The on-card opto r ack accepts the G4 ser ies opto
modules (manufactured by Opto-22, Grayhill, and
others). These modules can switch AC or DC voltages
from 5 to 240 volts at 3 amperes. They can also sense
input voltages of the same type and range.
Opto channels 0 and 1 can be jumpered for PWM
outputs. PWM output is also used to generate analog
output.
The RPC-52 also accepts the G rayhill G5 series. These
modules m easure voltage, current, therm ocouple output,
or RTD resistance and return it as a frequency.
Additionally, modules c an output a voltage or a current.
RPBASIC-52 supports the G5 series through the
G5MOD comm and.
Installation
G4 and G5 modules are installed in the same manner as
an opto rack. A screw at the top is used to secure the
module to the board. M odules may be installed in any
order and types can be intermixed.
A hole for a standoff nea r the modules is provided to
keep the board from bending during installation or
removal.
Input and output lines are fastened by the two position
terminal in front of the opto mo dule. The module
number is in each module position and behind the
module. This module position is used in conjunction
with the LINE statement.
Refer to the appropriate module data sheet for additional
hookup information, if required.
G4 operation
G4 modules are accessed using the LINE command and
function. Line numbers are from 0 to 3. To turn on a
module, execute the fo llowing statem ent:
100 LINE 2,ON
To return the status of a line, execute the following:
200 A = LINE(3)
PWM O utput
Opto module positions 0 and 1 may be jumpered for
PWM output. Power up frequency and duty cycle are
set using the CONF IG PW M statem ent. The duty c ycle
is changed during run time using the PW M statem ent.
See the RPBASIC-52 Software Supplement for
information on these co mma nds. The frequency is
adjustable from approximately 170 Hz to 40 Khz. The
frequency is the sam e for both channels. Duty cycle is
adjustable with a 1/255 resolution. Each channel is set
Kommentare zu diesen Handbüchern