Lantronix XPort APS: Modbus Protocol User Guide - Page 29

Troubleshooting and Technical Support - pinout

Page 29 highlights

10: Troubleshooting and Technical Support Using the IAP Device Server firmware is normally easy. However, if a problem occurs, it is difficult to troubleshoot without an in-depth knowledge of Modbus and the system dynamics of polling. Some general guidelines for troubleshooting:  Start polling slowly and increase speed gradually.  Cabling is the most common problem with device networking. If you have created a custom cable, make sure your pinout is correct.  Ideally, you should have the ability to watch the serial line communications. Most host applications do a poor job of explaining errors. In many situations, the host application declares "No response" when in fact, the device did respond, and the application did not understand the response. How fast can I poll? First, remember that you still have the serial link in there and therefore cannot expect to poll any faster than you could by a direct serial link. In fact, since you are adding a number of queuing systems between your application and device, you may even lose a bit of performance. For example, some download tests showed remote download by Modbus/TCP bridged to Modbus/RTU ran about 20 percent slower than direct download by Modbus/RTU. Above all, remember that the serial speed (or baud rate) consumes the largest amount of time (see the table below). Suppose you issue a Modbus poll for 125 registers. This requires a 255byte response, which at 19.2kbps requires over 133 msec just to physically shift across the wire, while at 300 baud it takes nearly 10 seconds! Baud Rate 300 600 1200 2400 4800 9600 19200 38400 57600 115200 Byte/Sec 30 60 120 240 480 960 1920 3840 5760 11520 Table 9-1. Baud Rate Bit Time (msec) 3.333333 1.666667 0.833333 0.416667 0.208333 0.104167 0.052083 0.026042 0.017361 0.008681 Byte Time (msec) 33.333333 16.666667 8.333333 4.166667 2.083333 1.041667 0.520833 0.260417 0.173611 0.086806 256 Byte Time (msec) 8533.333333 4266.666667 2133.333333 1066.666667 533.333333 266.666667 133.333333 66.666667 44.444444 22.222222 (in sec) 8.53 4.27 2.13 1.07 0.53 0.27 0.13 0.07 0.04 0.02 The overall time it takes to poll is the combined sum of these delays: a. Delay for master/client to recognize need for poll. Modbus Protocol User Guide 29

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33

Modbus Protocol User Guide
29
10: Troubleshooting and Technical Support
Using the IAP Device Server firmware is normally easy. However, if a problem occurs, it is difficult
to troubleshoot without an in-depth knowledge of Modbus and the system dynamics of polling.
Some general guidelines for troubleshooting:
Start polling slowly and increase speed gradually.
Cabling is the most common problem with device networking. If you have created a custom
cable, make sure your pinout is correct.
Ideally, you should have the ability to watch the serial line communications. Most host
applications do a poor job of explaining errors. In many situations, the host application
declares “No response” when in fact, the device did respond, and the application did not
understand the response.
How fast can I poll?
First, remember that you still have the serial link in there and therefore cannot expect to poll any
faster than you could by a direct serial link. In fact, since you are adding a number of queuing
systems between your application and device, you may even lose a bit of performance. For
example, some download tests showed remote download by Modbus/TCP bridged to
Modbus/RTU ran about 20 percent slower than direct download by Modbus/RTU.
Above all, remember that the serial speed (or baud rate) consumes the largest amount of time
(see the table below). Suppose you issue a Modbus poll for 125 registers. This requires a 255-
byte response, which at 19.2kbps requires over 133 msec just to physically shift across the wire,
while at 300 baud it takes nearly 10 seconds!
Table 9-1. Baud Rate
Baud Rate
Byte/Sec
Bit Time
(msec)
Byte Time
(msec)
256 Byte
Time (msec)
(in sec)
300
30
3.333333
33.333333
8533.333333
8.53
600
60
1.666667
16.666667
4266.666667
4.27
1200
120
0.833333
8.333333
2133.333333
2.13
2400
240
0.416667
4.166667
1066.666667
1.07
4800
480
0.208333
2.083333
533.333333
0.53
9600
960
0.104167
1.041667
266.666667
0.27
19200
1920
0.052083
0.520833
133.333333
0.13
38400
3840
0.026042
0.260417
66.666667
0.07
57600
5760
0.017361
0.173611
44.444444
0.04
115200
11520
0.008681
0.086806
22.222222
0.02
The overall time it takes to poll is the combined sum of these delays:
a.
Delay for master/client to recognize need for poll.