Sei sulla pagina 1di 3

Scan-Data C

C
TELEMETRY EQUIPMENT
SIGNAL MULTIPLEXERS
P.O. Box 17028
Encino, CA 91416-7028
Phone: 818-785-6200
Telemetry & SCADA C FLOW COMPUTERS FAX: 818-785-4415
Email:scandata@aol.com
made easy... C SUPERVISORY SYSTEMS www. scan-data.com

APP-1238
01-05-00
Application Note APP-1238

The Serial Port & Bell-202 Modems Explained.

The PC serial port can be the cause of confusion. Ask


anyone who has spent hours of frustration trying to What kind of modems are
figure out the pin numbers, the difference between 25- there?
pin and 9-pin and male and female connectors and
trying to figure out which pin is transmit, #3 or #2? And There are basically two major categories
where are these pins? Listed below are the answers to of modems in use. One is the dialing (or
these and other questions. dial up) modems. The other is the
continuous communication modems that
How may pins does the serial port use? work over continuous connections such
as proprietary direct or leased cables or
Originally, all computer serial ports had 25 pins with over proprietary radios.
special functions designated for each pin. As the
computer science progressed, less and less of these The rapid expansion of the Internet has
functions were needed and today almost all serial caused an incredibly rapid development
ports on computers, PLCs and RTUs have only 9 in advanced dialing modems. The first
pins. And not even all of these are used, as we shall dialing modems, the old Bell-103 data
see. set, ran at 300 baud. This means 300
bits or 30 characters per second.
How many of these pins are really Requirements for faster Internet
needed? connections have driven the modem
speeds higher and higher. Today,
The minimum that's needed, in some cases, are four 56,000 baud modems can be bought
pins. Our LDR-S Spread Spectrum Data Radio and anywhere for less than $50.00.
our MDM-202D full duplex modem uses four pins in its
9 pin connector. A transmit data pin, a received data The speed of continuous communication
pin, a clear to send pin and a ground pin. modems for SCADA and Telemetry has
remained at 1,200 baud. There are
many reasons for this.
Where are these four pins and how can I
identify them? One is that the Bell-202 modulation
system used is virtually error free and
If you look at the serial port at the back of your works very well, even over questionable
computer, you will probably see a 9 pin male serial cable and radio circuits. Another is that
connector. It is called a 'male' because it has little pins the measurement and command data
sticking out. A 'female' connector has holes instead of strings normally sent over these
pins. modems are also short, normally only a
few seconds in duration.
Pin #3 is the 3rd pin from the left in the top (wide) row
on the male connector. This is the transmit data pin. In these systems, reliability is always
Pin #2 is the 2nd pin from the left in the top row. It is more important than speed.
the receive data pin. Pin #5 is the rightmost one in the
top row. It is the ground connection. Pin #8 is the In devices that do not accept (or need) RTS, such as
second pin from the right in the bottom row. It is the the LDR-S Data Radio and the MDM-202D full duplex
clear to send (CTS) pin. The five pin row, pins 1 - 5 modem, the CTS pin is always held high and RTS is
reading from left to right, is the widest part of the ignored.
connector. It is almost always at the top. The narrower
four pin row, pins 6 - 9 reading from left to right, is at Some SCADA programs, like Lookout, allow you to
the bottom. select or unselect the RTS/CTS option. Set this option
'ON' if you use MDM-202A or MDM-202B modems
operating over cable or radio. If you use the MDM-
202D full duplex cable only modem or the LDR-S
Spread Spectrum Data Radio, you can set it either
'ON' or 'OFF' as these two devices do not need the
RTS signal. All ScanData RS-232 RTUs always have
this option 'ON'

A few low cost PLCs, designed to talk short distances


over direct wiring, do not have this RTS/CTS option.
They can therefore not work over radio (except over
the LDR-S Spread Spectrum Radio) and need the
MDM-202D full duplex modem to work over cables.

There is an adjustable delay between the incoming


RTS and the outgoing CTS in all ScanData modems.
Normally it is set to zero delay as most programs do
not require a delay. But if your program needs it, it is
there. Adjust it to what your program needs with the
potentiometer on the MDM-202 -A and -B boards. Fully
counter clockwise gives you no delay and fully
clockwise gives you about 1 second delay. It is factory
set for 100 mS delay. An on board jumper extends this
to 10 seconds.

How about the remaining pins?

Below is a complete list of the pins in a DB-9


connector with their 2- or 3 letter designators. Some of
these have a corresponding indicating red LED built
into our MDM-202B modem , as noted below, making
it easy for you to check their operation.

Pin #1, CDT, is the far end modem carrier detect.


With an indicating LED. It tells you that the carrier from
the far end modem is turned on.
What are the other pins used for?
Pin #2, TD, is the transmit data from the modem. With
an indicating LED. It tells you that the modem is
If you want your program to communicate over radio or transmitting data to the PC.
over simplex modems, it is going to have to tell the
modem to turn the modem and radio carriers on and Pin #3, RD, is the received data into the modem. With
off. That's the main thing pin #7, Request To Send, an indicating LED. It tells you that the modem is
(RTS) is there for. When the program wishes to receiving data from the PC.
transmit a message, it activates this pin (sets it high).
Pin #4, DTR, is data terminal ready (left open on most
The modem then answers by setting pin #8 (Clear To devices).
Send, CTS) high, telling the program that it can go
ahead and transmit.

APP-1238, Page 2
Pin #5, SG, is signal ground. multiple frequency repeaters (not store and forward
repeaters), you need to add the delay needed for each
Pin #6, DSR, is data set ready (normally held high). transmitter in the chain.

Pin #7, RTS, is request to send. With an indicating Adjust the RTS/CTS delay on the MDM-202 modem
LED. It tells you that the modem has turned its carrier accordingly. This assumes that the PC or PLC
on and that it has activated the 'transmit on' terminals program checks CTS before transmitting, which most
that connect to the radio. do. Check the Scan-Data Application Note APP-1288
for a detailed explanation on how to adjust this delay
Pin #8, CTS, is clear to send (see above). when working with the LOOKOUT software.

Pin #9, RI, is ring indicator (normally held high).


How about converter plugs?
What do these LEDs tell me? All serial port and modem connectors are called DB-
something. Either DB-25 ( seldom used nowadays) or
Watching these LEDs blink on and off will give you a DB-9, depending on how many pins they have. These
good indication of the operation of your system, as can be male or female as described above. You can
follows. buy converter plugs to go from DB-25 to DB-9, from
male to female, in nearly every combination possible.
At the central PC, RTU or PLC you will see the RTS
LED go on when the program starts transmitting. The
Which pin is transmit, #2 or #3?
transmit data TD LED then goes on as the outgoing
message is sent. When the central is through
transmitting, the RTS and the TD LEDs go off. When That depends. On the PC, RTU and PLC serial
the far end device answers, the CD LED will go on, connector, pin #3 is generally the data transmit pin and
followed by the RD LED. pin #2 is the receive data pin. On the modem pin #2 is
the data transmit pin and #3 is the receive data pin. In
At the far end modem, the LEDs turn on in a reverse this way you match transmitter to receiver when you
sequence: First the CDT LED and the RD LED go on plug them together.
as the message is received. After the message is
received they go off and the RTS and TD LEDs go on What's a null modem?
as the unit answers.
The above pin arrangement works fine between the
Why is there a delay between RTS and PC and the modem. But not when you wish connect
CTS? two PCs (or two PLCs or two RTUs) together, to have
them talk to each other. You then have to cross the
wires connecting pins #2 and #3. You want the
The delay between RTS and CTS serves to give the
transmit pin (#3) from one end to go to the receiver
transmission circuit time to stabilize after the carrier is
pin ( #2) at the other end and vice versa. Simply
turned on. In some PLCs this is called the 'Warmup
crossing these two wires in your connector cable will
delay' and it is software adjustable. There is also a
do the job. You do this and then you will have a null
small software adjustable 'Warmdown' delay between
modem cable. You can, of course, buy a null modem
the end of the transmit data and the dropping of the
cable or a connector already made up.
RTS. This delay creates a pause between the end of
the message and the inevitable noise character(s) that
occur when the carrier drops. When you talk over a Do I really have to worry about all this?
press to talk radio you hear this noise when the far
end transmitter goes off as a 'squelch tail' noise. The Maybe not. All ScanData RTUs with built in modems
pause between the message and the noise gives the and robust software packages such as ScadaGraph
software a better chance to separate the two. and Lookout handle all this automatically. Other RTUs,
PLCs and other software packages have caused
On cable circuits you need only a short delay for the problems in these areas, resulting in numerous phone
modem carrier to stabilize; 5 - 20 mA. On radio circuits calls for help. The questions have always been the
you need a longer delay for the radio carrier and AGC same and they are the reason why the answers have
to stabilize, 100 mS and up. If the radio circuit has been written in this application note.

APP-1238, Page 3

Potrebbero piacerti anche