技術(shù)頻道

娓娓工業(yè)
您現(xiàn)在的位置: 中國傳動網(wǎng) > 技術(shù)頻道 > 應(yīng)用方案 > Eliminate Risk of Contention and Data Corruption in RS-485

Eliminate Risk of Contention and Data Corruption in RS-485

時間:2008-06-02 16:07:00來源:zhanglu

導(dǎo)語:?RS-485
[font=Arial]I. Background and Objective The RS-485 communications standard was introduced in 1983 by the Electronic Industries Alliance (EIA) as a two-wire, half-duplex, multi-drop alternative to the point-to-point RS-232 interface. (Note: RS-485 can also be wired using 4-wires to enable full-duplex communication). RS-485 uses differential signaling to allow up to 32 devices to communicate peer-to-peer at distances up to 4000 feet. In most RS-485 configurations two signals, a positive and a negative, re run as a twisted pair. Since these signals are compared to one another rather than a ground reference like RS-232, RS-485 communication is less susceptible to external noise injected on the wiring and performs more reliably in industrial environments. The following figure shows a typical RS-485 circuit.
Bi-directional, half-duplex communication on a single twisted pair wire requires management of the data flow. If more than one device attempts to transmit at the same time, collisions will occur that result in data corruption. RS-485 transceivers allow the transmitter to be disabled, or “tristated”, so they are not driving the transmission line unless sending data. Bias resistors in the circuit force the signals to the idle state when the lines are not driven. When an RS-485 device sends data the transmitter must be enabled during transmission and disabled when transmission is complete to relinquish control of the RS-485 network. The EIA RS-485 specification does not stipulate the method for controlling the driver, therefore a number of alternatives have evolved. The objective of this paper is to outline the most common approaches and compare their effectiveness in minimizing risks of communication errors. The risk of communication error is directly related to the time required for a device to relinquish control of the RS-485 network once communication is complete so that other devices may send data without contention and data corruption. II. Common Methods Used to Control RS-485 Device CommunicationsRS-485 Transmitter Enable Control Methods A. Application Program Control (Under Windows) The earliest method of RS-485 driver control was via the application program. In the DOS era this method was reasonably effective and commonly implemented. The application program would simply write to an I/O location (usually the RTS signal) when transmission from that device was required. After sending the data the application would again write to the same address to turn off the driver. However, with today’s protected mode operating systems (Windows), the application program can no longer directly access I/O locations. Instead, the application must call a device driver to handle the request through the operating system. The time required for the application to call the driver, the driver to execute the action, and then return control to the application is indeterminate but it can be relatively long. The longer this time is to relinquish, the higher the risk of bus contention from other devices. • User application program controls RS-485 enable • Windows requires driver level interface • Timing through Windows is indeterminate and could result in bus contention
B. One Shot Some RS-485 products use a technique called a “one-shot” to control the RS-485 enable signal. In a “one-shot”, a circuit is used to activate the enable signal upon transmission and then eactivate the signal using an RC circuit as a timer. The deactivation time for the enable depends on the “R” and “C” values used. Because the RC values are constant at all data rates these values must be set (sometimes using a jumper selection) to allow the enable to stay active for the slowest supported baud rate. This predetermined delay in deactivating the RS-485 enable could cause data error due to bus contention. • Enable activated when data is transmitted • RC values determine time before transmitter is disabled • Predetermined RC values can result in data errors due to transmitter turning off too quickly or remaining enabled too long。
C. Enable Driven when Data Present With this hardware approach the transmitter data line is connected to the transmitter enable pin. This method relies on the RS-485 bias resistors to provide the “high” (logic 1) data signal. Since the enable signal may be disabled during part of a message (whenever a logic “1” is present on the data line) this method does not properly adhere to the RS-485 specification requiring that the enable signal be active only for the duration of message transmission. (Some RS-232 to RS-485 converters utilize this approach so determine their communication methodology before purchasing these devices.) • Bias resistors provide “high” data signal • “Low” data signal enables transmitter • Doesn’t adhere to RS-485 specifications
D. Automatic Driver Control This advance in RS-485 transmission control uses asynchronous serial driver software that automatically recognizes commands to transmit data from an RS-485 port, enables the transmitter and immediately disables the transmitter at the end of the message. This method is more efficient than control from the application program and does not require the user to design the enable control into the application program. • Does not require control from the user program • Much faster timing through Windows • Bus contention is unlikely This new approach in RS-485 transmission control was developed by Sealevel Systems and uses the company’s SeaCOM asynchronous serial driver software. E. Automatic RS-485 Hardware Enable This latest approach is by far the easiest to use and eliminates any risk of bus contention and data corruption. This method uses hardware devices that are auto-enabled to control the RS-485 communications. Products with the auto-enable circuit do not require software control of the transceivers enable pin. Instead, hardware on the board enables the transmission line and then immediately disables the signal after the message is sent. Another method of hardware automatic driver enable is implemented through the use of certain advanced UARTs (e.g., 16C850) that have this function built right into the chip. These UARTs must be properly initialized to enable this feature. • Application software control not required • Software driver support is eliminated • Auto-enable circuit keeps RS-485 signal active for the minimum required time • Eliminates risk of bus contention
This latest advancement is another innovation from Sealevel Systems. III. Conclusion System Designers need to be aware of the risks created by the various methods of controlling RS-485 communications. There is a higher risk associated with products that use outdated communication controls. (Often these are the lower priced products because they employ less sophisticated technology.) The latest RS-485 communication control technology pioneered by Sealevel Systems uses autoenabled hardware that eliminates the risk of bus contention and data corruption。 [b]Earle Foster, Jeff Hunter Sealevel Systems[/b][/font] DOWNLOAD

標(biāo)簽:

點贊

分享到:

上一篇:GPS時鐘同步在ABB DCS系統(tǒng)的應(yīng)用

下一篇:微能WIN-V63矢量控制變頻器在...

中國傳動網(wǎng)版權(quán)與免責(zé)聲明:凡本網(wǎng)注明[來源:中國傳動網(wǎng)]的所有文字、圖片、音視和視頻文件,版權(quán)均為中國傳動網(wǎng)(m.u63ivq3.com)獨家所有。如需轉(zhuǎn)載請與0755-82949061聯(lián)系。任何媒體、網(wǎng)站或個人轉(zhuǎn)載使用時須注明來源“中國傳動網(wǎng)”,違反者本網(wǎng)將追究其法律責(zé)任。

本網(wǎng)轉(zhuǎn)載并注明其他來源的稿件,均來自互聯(lián)網(wǎng)或業(yè)內(nèi)投稿人士,版權(quán)屬于原版權(quán)人。轉(zhuǎn)載請保留稿件來源及作者,禁止擅自篡改,違者自負(fù)版權(quán)法律責(zé)任。

網(wǎng)站簡介|會員服務(wù)|聯(lián)系方式|幫助信息|版權(quán)信息|網(wǎng)站地圖|友情鏈接|法律支持|意見反饋|sitemap

傳動網(wǎng)-工業(yè)自動化與智能制造的全媒體“互聯(lián)網(wǎng)+”創(chuàng)新服務(wù)平臺

網(wǎng)站客服服務(wù)咨詢采購咨詢媒體合作

Chuandong.com Copyright ?2005 - 2024 ,All Rights Reserved 深圳市奧美大唐廣告有限公司 版權(quán)所有
粵ICP備 14004826號 | 營業(yè)執(zhí)照證書 | 不良信息舉報中心 | 粵公網(wǎng)安備 44030402000946號