13
The following is an example of requests and re-
sponses:
Transmit from terminal
Receive from unit
(s)=Space
D5(s) [Unit #5 Activated]
DEVICE# 5:
PA(s)12345(s)PA
PA 12345 PA
KA(s)1576(s)KA
KA 1576 KA
KB(s)6751(s)KB
KB 6751 KB
RR(s)RN [RETURN]
RR RN
(UNIT PRESETS AND A & B K-FACTORS
ARE SET AND BOTH THE RELAYS AND
THE NORMALIZATION ARE RESET)
12345
1576
6751
SERIAL INTERFACE OPERATION:
Data is received and transmitted over standard
EIA RS232 or RS422 levels. Each ten bit char-
acter is made up of a start bit, seven bit ASCII
code, a parity bit and a stop bit. Device number,
baud rate, parity and strobe list are entered in the
program setup mode and will remain in memory
even if power is lost.
The input impedance of RS232 is 3K
Ω
to 7K
Ω
worst case. The terminal addressing the unit
must be capable of driving all loads in the loop.
The input impedance of RS422 is much higher
and there should be no problem driving as many
as 99 units. The transmit line remains in a high
impedance "off" state until addressed. Only one
unit is to be on line at a time!!! More than one
unit on line could damage the unit or destroy the
transmitted data.
When the unit is active (on line) it will operate in
a full duplex, echo back mode, so that data sent
from the terminal will be transmitted back for
verification. When the unit is "on line", use the
proper serial transmit commands to request data
or set a new value. Up to 80 characters of data
can be linked together and transmitted to the unit
in a string as long as there is a space between the
commands. If an error is made, a correction can
be made by back spacing and retyping correct
data before the return (enter) is sent. Once a
return (enter) is sent, the unit begins processing
the data and will transmit the requested data on a
non-priority basis over the data transmit line. A
keypad entry or incoming data will halt the data
communication cycle. Therefore, there should
be a pause after data is requested to insure that
all data has been transmitted before making an-
other request or addressing another unit. If the
unit is not busy, it should not take longer than
300 msec to process each request. To find the
cycle time to process and transmit a request, cal-
culate the bit transmit time by using this for-
mula: [(1
÷
baud rate) x (80) + .005] x number of
requests made. This time will be extended if the
unit must service the front keypad. If transmis-
sion has not started within two seconds after data
is requested, it can be assumed that there is a
problem. The unit transmits a carriage return
and line feed after each data value. Any new
communication must be started with DXX(S)
(device number and space).
RS232/RS422 -PC INTERFACE:
The following BASIC program is for setting up
RS232/RS422 on serial port (#1) at 300 baud.
Run this program after connecting the serial
interface connections.
10 SCREEN 0,0:WIDTH 80
20 CLS:CLOSE
30 OPEN "COM1:300,n,7,1,CS,DS,CD" AS #1
40 ON ERROR GOTO 110
50 B$=INKEY$
60 IF B$< >"" THEN PRINT #1,B$;
70 IF EOF (1) THEN 50
80 A$=INPUT$ (LOC(1),#1)
90 PRINT A$;
100 GOTO 50
110 RESUME
See the following page for RS232/RS422 serial
communication wiring.