Auto 485 User Guide

0 0
User guide for Auto 485 RS-232 to RS-485 converter.

Share on Social Networks

Share Link

Use permanent link to share in social media

Share with a friend

Please login to send this presentation by email!

Embed in your website

Select page to start with

1. b) Auto - Turnaround The Auto485 adapter also supports automatic turnaround of the RS485 transceiver. When in this configuration the adapter immediately turns the transceiver to “transmit” mode upon sensing a “start bit” (a high to low transition) from it s RS232 data transmit line (TxD). The transceiver will continue in “transmit” mode as long as there is logic ‘0’ on the TxD line. When the data transmission is completed the TxD line will be returned to logic ‘1’ due to the action of the “stop bit” (a low to high transition). If the RS232 transmit line is at logic ‘1’ for longer than a certain “turnaround delay” time, the transceiver will be turned around automatically and the RS485 will then re - enter the “receive” mode. There is a small preset potentiome ter on the Auto485, which allows you to adjust the turnaround time from 0.5ms to 1.5ms. The factory default is set at 0.5ms (maximum clockwise turn) which works well with the M - series PLCs at 38400 bps. You may want to increase the turnaround delay when us ing it with slower serial devices. Note that unlike the turnaround control by /RTS scheme where the transceiver direction is controlled precisely by the /RTS signal, the turnaround time in this configuration is only an approximation. Therefore, if two dev ices are to communicate using the auto - turnaround RS485 drivers, they should always give some allowance time for the RS485 driver to turnaround by inserting a delay of at least 1 ms before switching direction, i.e. a device should wait for a short while be fore responding to an incoming command to avoid driving the RS485 line too soon (before the last driver relinquishes the RS485 line). 3. Adding a Second or Third RS232 Port to a M - series PLC. The auto - turnaround capability of the Auto485 makes it possib le to transparently convert the PLC’s COMM3 port into an additional RS232 port. There is no need for any special command to use this “ converted ” RS232 port . You just use it as if it is a real RS232 port. For example, t o send serial data out via the Auto485 , simply use the PRINT #3 or OUTCOMM 3 command. To receive data from the Auto485, use the INPUT$(3) or INCOMM(3) command. The only difference between this “converted RS232” port and a real RS232 port is that this is only a half duplex port and the transf er direction is really in the hand of the external RS232 device. You will not be able to transmit any serial data out through the serial port while the external RS232 device is sending out data to the PLC. However, for most applications where only one part y will talk at a time, the Auto485 works great in bringing an additional RS232 port to the PLC. 4 Auto485 – The RS232 - to - RS485 Converter User’s Guide + R S 4 8 5 - V + G N D RS485 RS485 Jumper-select RTS control or Auto-turnaround Power LED Tx from 232 (Green) Rx to 232 (Red) Turnaround time Adjustment Knob (0.5 - 1.5ms) RS232C (DB9) 9 to 24VDC Battery or PLC Power Supply + + - - Auto RTS Figure 1 1. Introduction The Auto485 adapter is a general purpose, auto - turn around RS232 - to - RS485 converter that can be used to convert any standard RS232C port into a two - wire RS485 port and vice versa . When used with TRi’s programmable controllers, it greatly expands the PLC’s serial I/O capabilities by allowing multiple PLCs to be linked to a single PC for programming, file services or internet connectivity. It can also be used to convert the PLC’s RS485 into an additional RS232 port for connections to third party RS232 devices such as HMI, frequency inverters, barcode scanne rs, smart card readers, external modems etc. The Auto485 requires a power supply input of between 9V and 24V DC to operate properly. You can use a 9V alkaline battery for quick test or you can use the same 12V or 24V power supply that powers the PLC for p ermanent installation. The power supply as well as the RS485’s ‘+’ and ‘ - ‘ terminals are connected via a 4 - way detachable screw terminal as shown Figure 1. The RS232 port is a female DB9 connector and is of a DCE configuration. This means that it can be connected directly to a PC’s serial port using a straight - through DB9 cable . The RS232 pin - outs are shown in Figure 2a. Note that there are some external so called “line - powered” RS232 devices on the market which actually “steal” power from the DSR pin of the RS232 port. To cater to such devices, the Auto485 adapter also makes available a +9V output on its DSR pin (pin #6). 1

2. 1 2 3 4 5 6 7 8 9 9 Auto485 Female DB9 Tx Rx (a) GND DSR (+9V) RTS Auto485 Female DB9 Other DCE Device with Female DB9 Connector Tx Rx GND DSR RTS 1 2 3 4 5 6 7 8 9 9 1 (b) 2 3 4 5 6 7 8 9 9 Figure 2 Figure 2 (b) shows the wiring method for connecting the Auto485 to another RS232 DCE device that also has a female DB9 connector (e.g. a barcode reader which is designed for straight - through connection to a PC). 2. What is RS485 Transmit/Receive Turnaround? A two - wire RS485 is a half duplex serial interface that utilizes a differential pair of wires to carry signal to long distance. It is the relative potential difference between the RS485 “+” and the “ - “ that determines whether a signal bit is a ‘0’ or a ‘1’. As such, common mode noise that is imposed onto the two - wires simultaneously has no effect on the signal quality, giving it ability to travel a much longer distance (1200 m or 4000 ft) compared to RS232 interface. In an RS485 network, all devices are attached to a single pair of RS485 wire as shown in the following diagram: Host Computer with RS - 485 or T100M D+ Twisted - pair RS485 network cable 1 20 Ω Terminating resistor 560 560 +5V 0V + _ + + + + _ _ _ _ RS485 T100MX + RS485 T28H - Relay RS485 M - series PLC RS485 2 Since there is only a single pair of wires that are connected to all the RS485s, the same two wires will thus have to carry the serial data input to the each device as well as the serial data output fr om the device. Each RS485 device has a "transmit" and "receive" driver called the “transceiver”. The transceiver is either in “transmit” or “receive” mode. To avoid having more than one device sending data on the RS485 wires at the same time (which will most certainly result in garbled data), a device should always be in “receive” mode so that its transmit driver is turned OFF, except when it intends to send out data. When a device is ready to send data on the RS485, it will then enter “transmit” mode and drive the data out onto the two RS485 wires. After the device completes sending out data it should then return to “receive” mode. This process is called “ turnaround ”. 3. Turnaround Selection So how does the Auto485 converter know when to turnaround it s RS485 transceiver? Since the primary purpose of the Auto485 is to convert the RS232 signals into RS485, the data and the control pins from the RS232 device can thus be used to control the RS485 transceiver direction. Auto485 supports two turnaround meth ods that can be selected by placing the Jumper cap at one of the two positions: RTS RTS Auto Auto Turnaround by /RTS signal Auto-Turnaround a) Turnaround controlled by the RS232 ‘s RTS signal : The RS485 transmit/receive state is directly controlled by the logic state of the /RTS signal on its RS232 interface. Hence, the external RS232 device must turn ON its /RTS signal to put the RS485 transceiver into “transmit” mode before sending out its data. Once the last data bit has been sent out, the external RS232 device should immedia tely turn OFF the /RTS signal to return the RS485 interface into “receive” mode. This turnaround control method is only possible if the external RS232 device can control its /RTS (Request to Send) signal and is able to synchronize this action with its dat a transmission need. Some PC software, such as the TRiLOGI versions 3 and 4 as well as the TLServer versions 1 & 2, automatically control the PC’s /RTS signal whenever it sends data. Hence it is possible to use these software program with the Auto485 adap ter configured using this /RTS turnaround method. 3


  • 5168 Total Views
  • 3956 Website Views
  • 1212 Embedded Views


  • 0 Social Shares
  • 0 Dislikes

Share count

  • 0 Facebook
  • 0 Twitter
  • 0 LinkedIn
  • 0 Google+

Embeds 5

  • 184
  • 53
  • 2
  • 217
  • 36