Cycle and reaction times   
5.6 Sample calculations 
  CPU 31xC and CPU 31x, Technical Data 
5-24  Manual, 01/2006 Edition, A5E00105475-06 
User Program 
According to the instruction list, the user program runtime is 10.0 ms. 
Calculating the cycle time 
The cycle time for the example results from the following times: 
•  User program execution time: 
approx. 10 ms x CPU-specific factor 1.10 = approx. 11 ms 
•  Process image transfer time 
Process image of inputs: 100 μs + 16 bytes x 37 μs = approx. 0.7 ms 
Process image of outputs: 100 μs + 6 bytes x 37 μs = approx. 0.3 ms 
•  Operating system runtime at scan cycle checkpoint: 
Approx. 0.5 ms 
The sum of the listed times is equivalent to the cycle time: 
Cycle time = 11.0 ms + 0.7 ms + 0.3 ms + 0.5 ms = 12.5 ms. 
Calculation of the actual cycle time 
Under consideration of communication load: 
12.5 ms x 100 / (100-40) = 20.8 ms. 
Thus, under consideration of time-sharing factors, the actual cycle time is 21 ms. 
Calculation of the longest response time 
•  Longest response time = 21 ms x 2 = 42 ms. 
•  I/O delay 
–  The maximum delay of the input digital module SM 321; DI 32 x 24 VDC is 4.8 ms per 
channel. 
–  The output delay of the digital output module SM 322; DO 16 x 24 VDC/0.5 A can be 
neglected. 
–  The analog input module SM 331; AI 8 x 12 bit was configured for an interference 
suppression at 50 Hz. The result is a conversion time of 22 ms per channel. With the 
eight active channels, the result is a cycle time of 176 ms for the analog input module. 
–  The analog output module SM 332; AO 4 x 12-bit was programmed for the measuring 
range of 0 ...10 Hz. This gives a conversion time of 0.8 ms per channel. Since 4 
channels are active, the result is a cycle time of 3.2 ms. A settling time of 0.1 ms for a 
resistive load must be added to this value. The result is a response time of 3.3 ms for 
an analog output. 
•  Neither PROFIBUS DP, nor PROFINET IO are being used, so you do not have to make 
allowances for any DP cycle times on PROFIBUS DP or for PROFINET IO update times.