EM1500 User’s Manual
29
The Modbus RTU timing value is increased to 4, which is the next higher integer above 3.5. There are two
instances where this number is used, both in the Protocol tab:
1. The Rx idle time is used to time the end of an incoming packet. After four character times, the packet is
considered complete, and may be sent to the network.
2. The Tx idle time is the minimum amount of time which the transmitter must be idle before sending a
new packet. As it happens, this value is somewhat superfluous for RS485, since the value mentioned
immediately below will be used instead. (This value is more useful for the RS232 ports, which do not
have transmitter enables, however we specify it here for clarity).
A third timing value, which is longer (and somewhat arbitrary) is set in the Serial tab. This timer is used to
specify the minimum amount of idle time that is required before the master is allowed to enable its trans-
mitter. This is the minimum time; the master will usually not enable its transmitter this quickly because it
will be listening for a response. A value of 20 character times is selected, based on this being sufficient
time for a slave device to formulate and transmit its response. After 20 character times, the master is
allowed to transmit a new packet.
Since the RS485 port can only transmit when its transmitter is enabled, the Protocol:Tx Idle time and
Serial:Rx idle time amount to the same thing (and the maximum of both is used).
From the point of view of one half of the complete connection, i.e. a single EM1500 with an RS485 port
on one side and the network on the other, the following situation obtains:
On the network side, packets are received for later transmission out the RS485 port. On the RS485
side, packets are received for transmission to the network peer. Since packets must be delimited by
strict idle times on the RS485 side, but may arrive from the network in piecemeal fashion, it is neces-
sary for the EM1500 to buffer at least one full packet before it starts getting transmitted out the RS485
port.
When the RS485 port is currently receiving (transmitter disabled), then packets from the network must
be queued. When the RS485 port has been idle (nobody speaking) for 20 character times, the next
packet may be transmitted. Because it is completely buffered, the packet is sent in one continuous
stream without any inter-character gaps. At the end of the packet, the transmitter is disabled and
remains disabled for at least 20 character times. This gives the addressed slave the opportunity to
respond.
If no slave responds within 20 character times, the master is free to send a new packet. If a packet is
already queued, then it will be sent immediately. Otherwise, if only a partial (or no) packet is queued,
then the transmitter will remain disabled until a full packet is available. In the meantime, a slave which
was slow to respond may start transmitting. If the master still has its transmitter disabled, it will start
receiving that packet and be inhibited from enabling its transmitter until the line has been idle for
another 20 character times after the last character received.
It is also possible (and undesirable) for a slow slave to start responding at the same instant that the master
enables its transmitter for a new packet. This causes a "collision" which will usually garble the data. Colli-
sions are not detected by the EM1500 since it does not listen to its own transmissions. The higher level
protocol should include some form of error detection if this is a possibility. For example, Modbus RTU
uses a 16-bit CRC which provides a good probability for the application detecting a garbled packet.
Содержание EM1500
Страница 14: ...10 www rabbit com Introduction...
Страница 22: ...18 www rabbit com Getting Started...
Страница 76: ...72 www rabbit com EM1500 Configuration...
Страница 90: ...86 www rabbit com EM1500 Specifications...
Страница 104: ...100 www rabbit com Serial and TCP Protocols...
Страница 118: ...114 www rabbit com EM1500 FAQ...