Remote-processing RPC-330 Manuel d'utilisateur Page 14

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 48
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 13
SERIAL PORTS SECTION 4
Page 4-1 RPC-330
Figure 4-1 Serial port and jumper locations
DESCRIPTION
The RPC -330 has two serial ports that interface to a
printer, terminal, RS-485 network, or other serial
devices. This section describes their characteristics and
how to use them. Frequent references are m ade to
commands listed in the BASIC-52 Programm ing Manual
or RPBASIC-52 Software Supplement in this manua l.
Please refer to these manuals for more information about
these commands.
Serial por ts are num bered C OM 0 and CO M1. COM 0 is
RS232 only and is used for progr am development.
During r un time, it can be used for other functions.
COM 1 is a general purpose port and is jumperable for
RS-232 or RS-422/485.
Each port has a 256 character interrupt driven input and
output buffer. This allows characters to be sent out
(using PRINT) without slowing down program
execution. However, if the PRINT buffer fills, program
execution is suspended until all PRINT charac ters ar e in
the buffer. Both ports have a 256 character input buffer.
When more than 256 char acters are r eceived, excess
ones are ignored.
CONFIG BAUD controls baud rate and RS-232/485
mode (COM1 only).
ON C OM$ is useful whe n data is sent in pac kets. This
multitasking command branches to a BASIC subroutine
when a specific character or number of chara cters is
received.
Another useful function is STR. Strings can be
formatted, analyzed for length and content. When used
in conjunction with ON COM$, networ king over RS-485
is much easier than with the original BASIC-52.
COM0 SERIAL PORT
This port uses a VTC-9F serial cable to connect external
serial devices to the port. The cable con sists of a 10 pin
IDC connector wired one-to-one to a DB-9 connector.
Line 10 is sim ply cut off. The pin out is designed so it
plugs directly into the 9 pin serial port connector on a
PC.
CTS is a output and is set to high on power up.
Normally, this tells the other device to send data. The
CTS line may be set high or low to hold off
communication. The sending device must have a RTS
input. Line 400 sets CTS high and 500 sets it low, or to
hold off.
400 LINEB 5,0,(LINEB(5,0) .AND. 247)
500 LINEB 5,0,(LINEB(5,0) .OR. 8)
The RTS line is read using the following example:
100 B = LINEB(5,1) .AND. 8
COM 0 is normally used for program ming. D uring run
time it may be used as a general purpose serial por t.
When used for programming or with the INPUT
statement, it will accept ASCII character values from 0
to 127. When used with the GET function, it will return
ASCII values from 0 to 255.
COM1 SERIAL PORT
COM 1 is either an RS-232 or RS-422/ 485 port. A
VTC-9F serial cable, described above, is used for RS-
232 level communications. RS-485 is from screw
terminals. COM 1 has 2 hardw are handshaking lines,
CTS and RTS.
RTS is an input to the card. W hen RT S to the car d is
low, it usually indicates the sender does not want any
data sent to it. The status of this port is read by the
LINEB statement. The example below returns a status
of the RTS line:
100 B = LINEB(5,1) .AND. 32
If B = 32, transmission is held off.
The CTS line may be set high or low to hold off
communication from a sending device. The sender must
recognize the CTS line. Line 400 sets CTS high and 500
sets it low, or to hold off.
Vue de la page 13
1 2 ... 9 10 11 12 13 14 15 16 17 18 19 ... 47 48

Commentaires sur ces manuels

Pas de commentaire