Transcript
RS-232 Serial Communication Tutorial
Multiport Serial Board Solutions
RS-232 Serial Communication Tutorial The most common and easy-to-use serial communication interface RS-232 is a straightforward, universal, and commonly implemented
measured with respect to a system common ground (power/logic
serial interface. Despite its limited 15 m transmission distance, its
ground). The “idle” state (MARK) is negative with respect to the
low cost and easy wiring features make RS-232 the first choice for many applications. RS-232 establishes two-way (full-duplex) communications, with signals represented by voltage levels
common ground, and the “active” state (SPACE) is positive with respect to common ground.
RS-232 Data Format Start bit: Always 1 Data bits: 5, 6, 7, or 8 bits Parity: None, Odd, Even, Space, Mark Stop bit: 1, 1.5 (Data bits = 5), or 2 bits
RS-232 Specs Standard
Feature
Mode of Operation
Drivers per Line
Receivers per Line
Max. Cable Length
Max. Data Rate
EIA RS-232
Point to point
Single Ended
1
1
50 feet
20 Kbps
RS-232 Signal Definition The standard output signal level of RS-232 usually varies between +12V and -12V, with a “dead area” between +3V and -3V designed to absorb line noise. The TTL signal from the UART is between 0 and 5 volts, but after being transformed by the RS-232 transceiver, the signal voltage is changed to +12V to -12V.
TxD
Transmit Data
RxD
Receive Data
RTS
Request to Send
CTS
Clear to Send
DTR
Data Terminal Ready
DSR
Data Set Ready
DCD
Data Carrier Detect
GND
Ground
Captec Ltd Sirius House, Peel Street, Southampton SO14 5QT, UK Tel: 44 (0)23 80571177
[email protected] www.captec.ws Captec GmbH Karlsruher Strasse 11/1, D-70771, Leinf.-Echterdingen, Germany Tel: 49 (0)711 22063000
[email protected] www.captec-gmbh.de
Total Solution for Industrial Device Networking
H/W Flow Control RTS and CTS signals are often used for H/W flow control. When a station is ready to receive, it raises the RTS signal to request transmit signals from the remote side.
S/W Flow Control Sending an XON/XOFF pattern is a typical way to control data flow. When a station is ready to receive, the S/W sends an XON pattern. If the Rx buffer is almost full, the S/W sends an XOFF pattern to ask the remote side not to transmit.
An Easy Programming Tool—MOXA PComm Library Software developers are often confused by Microsoft’s complex Win32 COMM API, used to develop serial comm applications under Windows XP, Windows 2000, Windows NT, and Windows 95/98/ME. The confusion stems from the
fact that Win32 COMM API is a general purpose utility, with very complex syntax. MOXA PComm Pro offers you a better solution.
RS-232 Serial Communication Tutorial
Flow Control
Main Features • 50 easy-to-use API Functions • Supports VB, C/C++, Delphi Interface • Compatible with Win32 Comm API • Superior Troubleshooting Utilities • Supports Z/Y/XModem, Kermit, and ASCII protocols
Performance Analyzer
Data Scope
Captec Ltd Sirius House, Peel Street, Southampton SO14 5QT, UK Tel: 44 (0)23 80571177
[email protected] www.captec.ws Captec GmbH Karlsruher Strasse 11/1, D-70771, Leinf.-Echterdingen, Germany Tel: 49 (0)711 22063000
[email protected] www.captec-gmbh.de
RS-422/485 Serial Commuication Tutorial
Multiport Serial Board Solutions
RS-422/485 Serial Communication Tutorial What’s Needed for Industrial Applications Most devices used in today’s industrial environments are designed for use with the RS-422/485 interface. This means that many users employ RS-422/485 serial communication boards in their PCs, allowing the PCs to connect to an industrial RS-422 or RS-485 network and transmit data over distances up to 1.2 km. The RS-422/485 standards overcome the
transmission distance limitation by using a differential signal for transmitting data and control signals. In addition to distance and multi-drop issues for industrial applications, isolation, housing, wiring, power supply, and over-surge protection are also important issues.
RS-422 Differential Transmission The RS-422 protocol greatly expands the practical possibilities of the serial bus. It provides a mechanism by which data can be transmitted over long distances (up to 4,000 feet) and at very high speeds (up to 10 Mbps). This is accomplished by using differential technology that splits each signal into two separate wires in opposite voltage states, making this type of wiring configuration well suited
Standard
EIA RS-422A
Feature
Full-duplex, Point to point
Mode of Operation
Differential
Drivers per Line
1
Receivers per Line 10 Maximum Cable Length
4000 feet
Maximum Data Rate
10 Mbps
Standard
EIA RS-485
Feature
Half-duplex, multi-drop
Mode of Operation
Differential
Drivers per Line
32
for noisy environments.
RS-485 Multidrop Network RS-485 is an updated version of RS-422 that is specifically designed to address the problem of communication between multiple devices on a single data line. It is a balanced transmission system with the ability to allow up to 32 devices to communicate using the same data line. This is achieved with tri-statable drivers that are usually controlled by a programmable handshake line to ensure that only one device acts as a driver at any given time.
Receivers per Line 32 Maximum Cable Length
4000 feet
Maximum Data Rate
10 Mbps
Captec Ltd Sirius House, Peel Street, Southampton SO14 5QT, UK Tel: 44 (0)23 80571177
[email protected] www.captec.ws Captec GmbH Karlsruher Strasse 11/1, D-70771, Leinf.-Echterdingen, Germany Tel: 49 (0)711 22063000
[email protected] www.captec-gmbh.de
Total Solution for Industrial Device Networking
RS-422/485 Serial Commuication Tutorial
Termination Termination is used to match impedance of both receive and transmission nodes. When impedance is mismatched, the transmitted signal is not completely absorbed by the load and a portion is reflected back into the transmission line. If the transmission line and load impedance are equal, these signal reflections are eliminated. The value of resistor needed to match the characteristic impedance is specified by the cable manufacturer, with a commonly used value of 120 ohms.
ADDC™(Automatic Data Direction Control) Limitations: *System must determine when to switch the transmitter on and off. *Only one node can switch on/off at any given time.
Traditional Solution: Use the RTS signal to control the transmitter by software.
Advanced Method: ADDC™(Automatic Data Direction Control).
Benefit: ADDC™switches the transmitter on and off very precisely by hardware, effectively simplifying the complexity of timing control by software.
Result: The Industrial Multiport Communication Board uses embedded ADDC™ technology to automatically sense and control data direction instead of using RTS/CTS control, making the handshaking signal method obsolete.
Isolation: Eliminate Ground Loops! A common problem in many industrial applications is ground loop currents that flow through the ground line when ground voltage levels differ between connected devices. To eliminate this problem, Moxa’s Industrial boards and full function converters are available with Optical Isolation up to 2000V.
Industrial Wiring Peripheral * Terminal Block * DIN-Rail Mounting
Five questions you need to ask about RS-422/485 selection:
TB-F9
TB-M9
1. What is the system configuration? (2/4-wire RS-422/485) 2. Are Isolation or Surge Protection available? 3. What value of termination resistors are used? 4. Is the resistor setup easily modified? 5. What baud rate, or range of baud rates, are supported?
Captec Ltd Sirius House, Peel Street, Southampton SO14 5QT, UK Tel: 44 (0)23 80571177
[email protected] www.captec.ws Captec GmbH Karlsruher Strasse 11/1, D-70771, Leinf.-Echterdingen, Germany Tel: 49 (0)711 22063000
[email protected] www.captec-gmbh.de
RS-422/485 Serial Commuication Tutorial
Multiport Serial Board Solutions
Moxa RS-422/485 Solutions Industrial Board Selection Guide
Supported OS Drivers MOXA’s industrial COM port driver not only supports all major operating systems, but also the following dedicated operating systems for customers’ special needs. DOS (all Industrial Boards) OS/2 (ISA) SCO XENIX (ISA) QNX4 (ISA) QNX 6.x (PCI) Linux
Industrial Board Comparison Chart Model Bus
CI-132
CI-132I
CI-132IS
CP-132
CP-132I
ISA
CP-132S
CP-132IS
PCI
No. of Ports
CP-114I
CP-114S
CP-114IS
PCI
DB37 Female (with Optional accessories to 4 DB9/DB25 Male Con-
PC/104
Interface
nectors)
RS-422/485
RS-232/422/485
Speed
50-921.6 Kbps
RS-485
ADDC™
Intelligence Parity
None, Even, Odd, Space, Mark
Surge
¥
Protection ¥
¥
¥ ¥
¥
¥
¥
¥
Data Bits
5, 6, 7, 8
Stop Bits
1, 1.5, 2 2(9), 3, 4, 5, 7, 10 (Default), 11, 12, 15 0X0000-0xFFFF, Default: 0x 180
Temp
CP-114
4
DB9 Male x 2
Type
Operating
CI-134I ISA
16C550C
Connector
I/O Address
CI-134
2
ler
IRQ
CA-132I
PC/104
I/O Control-
Isolation
CA-132
Assigned by BIOS
3, 4, 5, 6, 7, 9, 10, 11, 12, or 15
¥
¥
2(9), 3, 4, 5, 7, 10 (Default), 11,
Assigned by BIOS
12, 15 0X0000-0xFFFF,
Assigned by BIOS
¥
¥
Default: 0x 180
Assigned by BIOS
0-55ºC
Captec Ltd Sirius House, Peel Street, Southampton SO14 5QT, UK Tel: 44 (0)23 80571177
[email protected] www.captec.ws Captec GmbH Karlsruher Strasse 11/1, D-70771, Leinf.-Echterdingen, Germany Tel: 49 (0)711 22063000
[email protected] www.captec-gmbh.de
RS-422/485 Wiring Topology 4-Wire Full Duplex (Point-to-Point)
RS-422
2-Wire Half Duplex (Point-to-Point)
RS-485
2-Wire Half Duplex (Multi-Drop)
RS-485
4-Wire Full Duplex (Multi-Drop)
RS-485
RS-422/485 Serial Commuication Tutorial
Total Solution for Industrial Device Networking
Captec Ltd Sirius House, Peel Street, Southampton SO14 5QT, UK Tel: 44 (0)23 80571177
[email protected] www.captec.ws Captec GmbH Karlsruher Strasse 11/1, D-70771, Leinf.-Echterdingen, Germany Tel: 49 (0)711 22063000
[email protected] www.captec-gmbh.de