2-6 Series 90-30/20/Micro Programmable Controllers Reference Manual September 1998 GFK-0467K
2
Sweep Time Calculation
Table 2-1 lists the seven items that contribute to the sweep time of the PLC. The sweep time
consists of fixed times (housekeeping and diagnostics) and variable times. Variable times vary
according to the I/O configuration, size of the user program, and the type of programming device
connected to the PLC.

Example of Sweep Time Calculation

An example of the calculations for determining the sweep time for a Series 90-30 model 331 PLC
are shown in the table shown below.
The modules and instructions used for these calculations are listed below:
Input modules: five 16-point model 30 input modules.
Output modules: four 16-point model 30 output modules.
Programming instructions: A 1200-step program consisting of 700 boolean instruction s (LD,
AND, OR, etc.), 300 output coils (OUT, OUTM, etc.), and 200 math functions (ADD, SUB,
etc.).
Time Contribution
Sweep
Component Calculation wo/
Programmer w/
HHP w/
LM90
Housekeeping 0.705 ms 0.705 ms 0.705 ms 0.705 ms
Data Input 0.055 x 5 = .275 ms 0.275 ms 0.275 ms 0.275 ms
Program
Execution 1000 x 0.4 µs* + 200 x 89 µs** = 18.2 ms 18.2 ms 18.2 ms 18.2 ms
Data Output 0.061 x 4 = .244 ms 0.244 ms 0.244 ms 0.244 ms
Programmer
Service 0.4 ms + programmer time + 0.6 ms 0 ms 4.524 ms 2.454 ms
Non-
Programmer
Service
None in this example 0 ms 0 ms 0 ms
Reconfiguration 0.639 ms 0.639 ms 0.639 ms 0.638 ms
Diagnostics 0.048 ms 0.048 ms 0.048 ms 0.048 ms
PLC Sweep Time Housekeeping + Data Input + Program
Execution + Data Output + Programmer
Service + Non-Programmer Service +
Diagnostics
12.611 ms 17.135 ms 15.065 ms
* Refer to Table A-3, “Boolean Execution Speed,” in Appendix A for cont act and coil execution speeds, which vary by
CPU.
** Refer to Table A-1, “Instruction Timing,” for specific timing information. The figure used in this calculation, 89
microseconds, represents the average of the add, subtract, shi ft, used in the example.
Housekeeping
The housekeeping portion of the sweep performs all of the tasks necessary to prepare for the sta rt
of the sweep. If the PLC is in CONSTANT SWEEP mode, the sweep is delayed until the required
sweep time elapses. If the required time has already elapsed, the OV_SWP %SA0002 contact is
set, and the sweep continues without delay. Next, timer values (hundredths, tenths, and seconds)
are updated by calculating the difference from the start of the previous sweep and the new sweep