rs485 full or half duplex

Hello.

rs485 full or half duplex: Which one is the most usual in industrial environment?

With full-duplex I will use a second twisted pair but with half-duplex I need a extra pin to control sending/receiving. Also full-duplex transceiver is more expensive.

I'm planning to use MODBUS as protocol and MANGO M2M as SCADA to control over 20 slave nodes separated 2 meters (40 m) with a Master node separated 50 m from first slave.

How much is a single pair and a double pair cable for rs485?

Is possible to use XBEE to link the nearest slave and the master? Is possible to do that with half-duplex rs485?

Thanks in advance.

RS-485 is a bus topology (similar to Ethernet if you like) so terms such as simplex/duplex doesn't really apply. In a single point-to-point setup one could implement two buses for full-duplex communication, but this doesn't appear to be what you need.

The choice of single or dual buses is more a matter of bandwidth.

With a master and 20 slaves, you still need to implement some type of collision avoidance/detection irrespective of having one or two buses. Interfacing at the hardware level is quite straight forward, but implementing a rugged protocol in software can be a challenge.

Standard CAT-5 or CAT-6 UTP (unshielded twisted pair) is a good choice of cable for RS-485. This is available from everywhere at low cost in any quantity. This will likely be with 4 pairs, but you will have a hard time finding alternatives at competitive prices.

Using a radio link for part of the network is certainly possible, but whether this is practical or not depends on your requirements.

RS-485 can be used either in half duplex mode using a single twisted pair or full duplex using two twisted pair. However, if you are using a protocol like mod-bus there is little to gain vs added cost running full duplex because of the master slave relationship of the protocol.

http://en.wikipedia.org/wiki/RS-485

Lefty

But with full-duplex, you need "an extra pin" for the other direction

If one is using the UART, then generally TXD and RXD are spoken for in either RS422 (full duplex) or RS485 (half). But with RS485 you need ANOTHER pin to control the transmitter/receiver direction.

If one is using the UART, then generally TXD and RXD are spoken for in either RS422 (full duplex) or RS485 (half). But with RS485 you need ANOTHER pin to control the transmitter/receiver direction.

The first post implies a bus topology (one master, 20 slaves) and as long as there is more than one transmitter on a single RS-485 segment (one twisted pair), each transmitter on that segment must control a driver (output) enable pin. This requirement stays irrespective of using one or two twisted pairs.

If we dedicate a segment to master output (slave receive), we could get away with keeping driver (output) enabled for this segment at all times. This would apply to master only. All slaves on the other hand would still need driver enable on their segment as it is shared.

A typical design however would still implement driver enable for master even in this configuration. The reason is that if we leave driver enabled, we would waste excessive power when the bus is otherwise idle.

Thank you.

Which one is the most common in PLC and other industrial stuff?

Which one is the most usual in industrial environment?

Both are. And most of slave devices have a switch, with which u tell them if they work in full or half-duplex. But personaly i would have to say half-duplex is used more, cause it keeps the price of the whole project lower. 1 twisted pair cable is still cheaper then a cable with 2 twisted pairs.

And as it was already mentioned the diffrence is bandwith.

Is possible to use XBEE to link the nearest slave and the master? Is possible to do that with half-duplex rs485?

Jose i think ur a bit confused here. XBEE and rs485 have nothing in common, xbee is wifi and RS485 uses wires.

If ur thinking to have XBEE instead of those 50m of cable to master i would say XBEE is gonna be more expensive, as u need 1 more arduino and 2 XBEE. Now u could use XBEE to connect to wifi network? I havent been working with XBEE yet, so dont hold me for my words.

With a master and 20 slaves, you still need to implement some type of collision avoidance/detection irrespective of having one or two buses

Doesnt CRC and also 1 master, other devices slave topology takes care of that prety much ?

While we are talking about RS485 any1 ever tried to use a twisted pair in ethernet cable for it? And what was the lenght at witch it worked then ...

With XBee you can simulate a serial connection without cables.

I will try to convert rs485 to tx/rx and then send it trough XBee.

Thank you.

Doesnt CRC and also 1 master, other devices slave topology takes care of that prety much ?

The “simple“ approach is having the master poll the slaves and so avoid collisions. For some applications however this may be too restrictive. Examples are alarms and other high priority events raised by slaves that require immediate attention from the master. If this is an issue, allowing the slaves to initiate communication may be preferred and quite often also required.

The receiver side of an RS-485 segment is electrically passive (high impedance). Transceivers will however have a receiver enable line, which is logically inverted in relation to driver (output) enable. If collision detection is needed, you need to listen to the bus at all times and so leave the receiver enable on also when transmitting. For a polled implementation it is common to connect the driver (output) enable to receiver enable. This will prevent your transmitted data from being fed back into the receiver.

For anything, except the simplest point-to-point RS-485 network, you will need some type of bus logging during implementation and quite often this is also an operational requirement. Given this requirement, a single segment is often preferred. The advantage of this is that all traffic can be logged from a single bus-tap (e.g. a laptop and one USB port). You will then see all traffic (master and slaves) on this single connection and for debugging/maintenance purposes you can assume the role of the master or any slave through this bus-tap.

Implementing a robust collision avoidance/detection scheme from scratch is quite a challenge even for experienced programmers/engineers with a solid theoretical background in data communications. As such there is not likely to be an abundance of free ready to use Arduino libraries to build on. Before taking on such a challenge, it may be worthwhile considering alternatives, such as CAN-Bus where most of this complexity can be left to commercially available transceivers.

While we are talking about RS485 any1 ever tried to use a twisted pair in ethernet cable for it?

Both CAT-5 and CAT-6 UTP works well with RS-485 and due to the huge market demand for such cables (4 pairs) they are typically less expensive than any alternative.