Introduction

My projects deals with very high speed physical inputs. The inputs need to come into Allen-Bradley controller within 20 mili-seconds. Here is the physical set up:

Allen-Bradley CompactLogix 1769-L35E -> Beckhoff CX1100 with real time Ethernet -> Beckhoff PLC Program -> Beckhoff ELxxxx I/Os

Round Trip Time Calculations

Here is how to calculate the Round Trip Time to and from Beckhoff I/Os

1. Check the Allen-Bradley RPI (Request Packet Interval – how often AB requests the info). As shown, the minimum RPI for CompactLogix is 1 ms.

Allen-Bradley RPI

2. Check the Real Time Settings in Beckhoff system manager. It is set at 1 ms. You can change it via the drop down box.

Beckhoff Real Time Settings3. Check Beckhoff PLC Task configuration settings. The task interval is 1 ms.

Beckhoff Task Configuration with Interval of 1ms

4. Physical hardware delay. You need to check individual hardware’s specification. I used 3 ms for ELxxxx digital inputs. However, for EL5151, high speed encoder module, the delay is almost 0.

Total round trip time from Beckhoff  input to Beckhoff output through Allen-Bradley (AB) PLC is the sum of all the parts:

Total time = (Hardware Delay)  + (System RealTime to Beckhoff PLC) + (Beckhoff PLC Task Time) + (AB RPI, to AB) + (AB PLC Task Time) + (AB RPI, from AB) + (Beckhoff PLC Task Time, back) + (System RealTime from Beckhoff PLC) + (Hardware Delay)

For my system with EL5151 high speed encoder module with 0 hardware delay,

Total Time = (Hardware Delay=0)  + (System RealTime to Beckhoff PLC =1) + (Beckhoff PLC Task Time =1) + (AB RPI, to AB=1) + (AB PLC Task Time=2) + (AB RPI, from AB=1) + (Beckhoff PLC Task Time, back=1) + (System RealTime from Beckhoff PLC=1) + (Hardware Delay=0)

Total Time = 0 + 1 + 1 + 1 + 2 (AB Task Time) + 1 + 1 + 1 + 0 = 6 +2 (AB Task Time) = 8 ms

However, when I use the EL5151’s latch feature, I need to unlatch the bit to enable another latch. If you can unlatch the high speed encoder latch bit before AB PLC sends the output to Beckhoff, you can save one round trip time. In that case, for worse case  scenario of 20 ms for next latch, you can set your PLC task time as high as 7 ms.

Ways to decrease the round trip time

  1. You can upgrade the CompactLogix to ControlLogix, which has bigger bandwidth on the backplane and allow for faster RPI with 0.2 ms as the minimum RPI.
  2. Change the Beckhoff Base Time in RealTime Setting.
  3. Change the Beckhoff PLC Task Time to smaller number.