RS-485
Serial Interface
General
Description of RS-485
Cabling
Converters
Activating
an RS-485 Loop
Troubleshooting
GENERAL DESCRIPTION OF RS-485
RS-232 serial communications uses fixed voltage
values and generally
allow you to connect to only one device (such as one temperature
controller).
The fixed voltage signals are subject to noise and distance problems.
EIA
adopted a new serial interface in 1978 called the RS-422.
RS-422 uses two signal lines. These lines provide
communications that
is not based on fixed voltage but rather on a "differential" voltage.
Using
a differential voltage greatly improved the noise immunity of
communications
and increased the reliability of longer runs of cable. RS-485 is an
enhanced
version of RS-422.
RS-485 specifications include the ability to
connect to 32 devices.
Modern RS-485 device drivers can often exceed this standard and connect
to 60 or more devices.
The RS-485 connection is a parallel connection:
(+) to (+), and (-)
to (-), all the way down the RS-485 chain of devices (temperature
controllers).
Although a third line called the "Common Ground" (C or GND) or "Shield"
is sometimes used with RS-485, it is not always used with our
temperature
controllers. (The Model 5C7-461 does not have a connection for the
shield.
while the 5C7-36x series of controllers do have a shield connection.
Refer
to the customer drawing for your controller.)
RS-485 also includes a protocol capability so that
information can be
sent to, and received from, the attached devices. A protocol defines
the
way you encode commands and data for transmission and reception.
At this time, there is no one protocol for RS-485.
Some of the existing
protocols have names such as MODBUS®
ASCII
and RTU.
The protocol we use for our standard temperature
controllers is unique
to our controllers, and our custom built temperature controllers will
sometimes
be assigned new, custom protocols based on the requirements of the
application.
Our communications protocols apply to all our computer compatible
temperature
controllers regardless of the method of communications (RS-485, RS-232,
GPIB, etc.)
For programming information for the protocol of
our standard controllers
see our Communications Protocol
page.
CABLING
Cable
Specifications: Cables for RS-485 connections are based on EIA
RS-422
specifications:
- Cable Configuration: Twisted Pair
- Gauge: 24AWG (24 Gauge)
- Shunt Capacitance per Foot: 16 pF
(Picofarrads)
- Characteristic Impedance: 100 Ohm (see
paragraph below)
- Last controller in loop should have
termination resistor
- Maximum Cable Length: 4000 feet
- Recommended: Approved by Underwriters
Laboratories (UL)
Characteristic Impedance: The Characteristic
Impedance is the resistance
of the wire at infinite length. The termination resistors allow the
less
than infinite length cables you use to look as though they are
infinitely
long, and this virtually eliminates reflected signal interference. Our
controller documentation specifies 120 Ohm termination resistors. Use
120
Ohm characteristic impedance wire. (If you do use 100 Ohm charateristic
impedance wire, use 100 Ohm resistors.)
Shielded Wire: Troubleshooting an
operational problem that is
due to cabling can be difficult. Since shielded wire is not much more
expensive
than unshielded wire, and since it offers improved noise immunity along
the length of the cable, it is best to use shielded twisted pair (STP)
wire for the cable. Connect the shield to the "Shield" connection of
the
controller, but if your controller does not have a shield connection
then
at least make sure the shield of the loop is connected from one section
of cable to the next. Your computer's RS-485 serial port, or your
converter, should also have a shield connection marked "Common Ground"
(C or GND) or "Shield".
On the Bench: For testing/setup with very
short runs (a few feet)
on a bench just about any wire can probably be used. However, with our
standard temperature controllers, you will find it is easier to work
with
solid copper wire (similar to Radio Shack® 24 Gauge, 2-conductor
Rainbow
Wire, P/N 278-857) simply because it is easier to use with the euro
style
screw down connectors on the controllers. You can ignore the shield
connection
unless you are using shielded wire in a noisy environment. As long as
the
run of cable on the bench is short, you can place the termination
resistor
at the head of the cable instead of at the end so that you can more
easily
switch controllers in the loop without having to deal with the
resistor.
If you start testing for noise immunity, make sure the cable is up to
spec.
CONVERTERS
RS232/RS485
CONVERTERS
RS232/RS485 converters allow you to connect an
RS-485 loop to an RS-232
port, such as an RS-232 serial port on the back of most PC computers.
Not
all converters are equal, however. Extensive use of our converters by
our
customer base has shown our converters to be reliable even when other
converters
are not.
Converters should meet or exceed the RS-422
signal specifications used
with RS-485 communications:
- Differential transmitted signals:
- +2 to +6 (for "Contorl A" or "+")
- -2 to -6 vdc (for "Control B" or "-").
- Receiver sensitivity: +/-0.2 vdc.
- Input impedence: 4 KOhm.
- Maximum input voltage: +/- 10 vdc.
We sell the
IHV24AT-B9FSPS.
GPIB/RS485 CONVERTERS
We use the ICS
Electronics converters
along with a Kajei temperature
controller
device drivers. The Kajei device drivers uses the National
Instruments VISA to communicate with the GPIB/RS485
converter.
The following GPIB/RS485 converters have been
used:
4804A
GPIB to Serial Interface Board.
4894A GPIB to Serial Interface
ACTIVATING AN RS-485 LOOP
A "Loop" is a number of devices on the
same RS-485 cable.
When using the following instructions, if the
"Software" (Setup Application)
locks up for some reason (such as not having a controller powered)
simply
click the Software's "Closer" (the "X" button, upper right on title
bar).
Begin
with none of the controllers
powered, but all controllers connected to the loop.
(1) Power up only one controller.
Leave the other controller(s) without
power even though they are
connected together via RS-485.
Leave the RS-485 termination resistor
on the controller that is
physically
the last controller in the Loop.
(2) Launch the Software if it is not already running.
(3) In the PC COMMUNICATIONS group:
Select the COMM port.
Enter 0 (zero) as the ADDRESS OF
CONTROLLER TO ACCESS.
Check "Enable New Controller Address"
(So that a checkmark is
displayed.
I ALWAYS do this when entering a different value for the above, address
of controller to access.)
Click the INITIALIZE button.
You
should now be connected to the one controller that is powered.
(4) In the CONFIGURE group look at the value of
CONTROLLER COMM ADDRESS.
(5) Enter the CONTROLLER COMM ADDRESS value into the PC COMMUNICATIONS
group's
ADDRESS OF CONTROLLER TO ACCESS.
Check "Enable New Controller Address"
(So that a checkmark is displayed.
I ALWAYS do this when entering a different value for the above, address
of controller to access.)
Click the INITIALIZE button.
You
should now be connected
to the one controller powered up using it's own controller
address.
Follow the same steps above for a second
controller and make sure the
two have different addresses.
If the two have separate addresses...
(6) Power up only those two controllers.
Leave any other controllers without
power even though they are connected
together via RS-485.
Leave the termination resistor where it
is.
(7) Launch the Software if it is not already running.
(8) In the PC COMMUNICATIONS group:
Select the COMM port.
Enter one of the two valid address
numbers determined above as
the
ADDRESS OF CONTROLLER TO ACCESS. Do not enter 0 (zero) because 0 is the
universal address and both controllers will respond simultaneously,
talking
on top of one another.
Check "Enable New Controller Address"
(So that a checkmark is
displayed.
I
ALWAYS do this when entering a different
value for the above field, the
address of controller to access.)
Click the INITIALIZE button.
You
should be in communication
with one of the two controllers.
Follow the above steps, 6 thru 8, and access the
other controller.
If the above works and you are able to access
each of the two controllers...
Use steps 1 thru 5 to double-check that
each of the remaining controllers
has a unique address.
Use steps 5 thru 8 to access each of
the 6 controllers.
TROUBLESHOOTING
If communications is not working properly check
all the connections.
If you can limit the problem to one or two controllers it will help you
limit the number of possible causes. Then check the following (note
that
a Comm port is a serial communications port on your
computer):
For a Comm Port Timeout:
- No power to controller, or converter (if any).
- Device address is wrong.
- Wrong Comm port is selected to access from
your computer.
- Comm port is not really connected to the
device, or to the converter
(if
any), or the converter is not connected to the device.
- Wiring to Comm port of computer, or converter
(if any), or device, is
incorrect.
For a Comm Port Open Error: No Comm port is
actually available on
your computer at the Comm port setting you selected.
Power Supply Voltage: Most
controllers need 12 or more
volts (check the specification for your controller). If the power
supply
is not "stiff" enough to support the controller(s) at 12 vdc
communications
will not function properly. A switching power supply rated at 12 vdc
will
compensate for the draw of the controller in order to maintain 12 vdc.
A linear power supply rated at 12 vdc may dip under 12 vdc when
powering
the circuit board, or when the demand from any load (TEC or heater,
etc)
it is powering is to high. (Note that the common "battery eliminator"
is
generally a linear power supply.)
Ground Loop: The existence of a
ground loop depends on
how you have these controllers connected to power. It depends less on
the
communications cable if the run from one controller to another is not
far.
A ground loop occurs when the devices on an RS-485 loop do not share
the
same Ground (GND). This will not happen if one power supply powers all
the devices. It can, however, occur if several power supplies are used
for the devices on the loop. One way to compensate is to connect the
device
input power ground wires together to form a common input power ground.
If
tracking down the problem is difficult...
Contact
McShane