Applies To: |
|
Summary: |
Question: Why is my communications so slow when I am running over 10Mb Ethernet. If Ethernet can run at 10Mb why cannot I get close to this level of performance. I have configured a project with 120,000 tags and it is taking over 20 seconds for the data to update. I configured another project using a different PLC manufacture with 64,000 tags and the update took 4 seconds. What is going on? |
Solution: |
The performance problem you are seeing is
not related to a bottleneck in Citect. The performance limitation
you are seeing is due to the nature of the communication modules on
the PLC.
The primary role of a PLC is to perform the control logic and communication with its I/O modules. Communicating with Citect or any other application is of secondary importance. Because of this the communication is normally given a lower priority. Also it is quite common that the PLC will only service the communication module at the end of its PLC scan. However this is not true for all PLC's. Other PLCs also limit the amount of data transfer to the communication module to a few words per scan, so it can take several PLC scans to complete a single request. All these limitations will degrade the communication performance of your system. For example lets assume that your PLC has a scan time of 50ms and it can service all of the communication module requests at the end of the scan. The following timing will occur when Citect communicates to the PLC. Citect will send the request to the PLC communication module over 10Mb Ethernet, this communication time will be very small due to the high data rate of transfer (so lets assume 0ms). The PLC communication module will receive the request and then wait for the PLC to finish the Ladder logic scan. It may wait between 0 to 50ms, on average it will wait 25ms. Once the PLC has completed its scan it will service the communication module request, this will normally be very fast as only a matter of sending data over the PLC backplane to the communication module (so lets again assume 0ms delay). Once the communication module has the data it will send it back to Citect over Ethernet (again assume 0ms). So the entire time will be around 25ms. If Citect is asking for 512 bytes of data you will there for get 1000/25 = 40 packets per second, eg 20k per second transfer (which is 10,000 registers per second). As you can see the major overhead in this type of system is the PLC scan time. If your scan time is longer your system performance will greatly degrade. In the past with slower serial communication, there was a limitation on how fast you can communicate data to and form the PLC so this tended to be a major factor. However even with serial communication the PLC scan time can have a significant effect on performance. From our experience with developing over 100 PLC drivers we have fount that around 50% of the communication overhead is due to this time. So with a 19,200 baud RS232 link you could get the equivalent of around 9,600 baud of real data (say 1000 bytes per second). As Ethernet is much faster you now see that the PLC scan time is about 99% of the communication overhead. Another problem you should be aware of is that some PLC have a major restriction communicating over Ethernet or their own propriety network. With a high performance network Citect can send out may requests on the network at the same time. For example in the above example while Citect is waiting for the first PLC to respond it may send many more requests to other PLCs (or the same PLC if it allows this). This allows greatly improved performance as all the delays occur in parallel. However the network and the PLC software must support this type of operation. Some propriety network don't allow this, so while you are waiting for one PLC to respond you cannot send a request to another PLC. So in this case the high performance network bandwidth sits idle. In this case, plain old RS232 can give higher performance than a high speed network. This is the case because if you have RS232 you can setup individual serial channels to each PLC. So Citect can communication to all PLCs at the same time and so get very good performance. Several customer have been shocked in the past after changing their communication method from 19,200 baud RS232 to 1Mb propriety network to find that the performance is slower. What is the answer:
So don't be fooled, just because it's Ethernet does not mean it will be fast (it can be fast). The only way to be certain is to test the system with all PLC's attached and running at their required scan times. |
Keywords: |
Related Links
Attachments