Omron SYSMAC CP Series Instruction & Reference Manual page 299

Cpu unit
Hide thumbs Also See for SYSMAC CP Series:
Table of Contents

Advertisement

Sampling Period and Cycle Time
The sampling period can be designated in units of 10 ms (0.01 to 99.99 s), but the actual PID action is
determined by a combination of the sampling period and the time of PID instruction execution (with
each cycle). The relationship between the sampling period and the cycle time is as follows:
• If the sampling period is less than the cycle time, PID control is executed with each cycle and not with
each sampling period.
• If the sampling period is greater than or equal to the cycle time, PID control is not executed with each
cycle, but PID(190) is executed when the cumulative value of the cycle time (the time between PID
instructions) is greater than or equal to the sampling period. The surplus portion of the cumulative
value (i.e., the cycle time's cumulative value minus the sampling period) is carried forward to the next
cumulative value.
For example, suppose that the sampling period is 100 ms and that the cycle time is consistently 60
ms. For the first cycle after the initial execution, PID(190) will not be executed because 60 ms is less
than 100 ms. For the second cycle, 60 ms + 60 ms is greater than 100 ms, so PID(190) will be
executed. The surplus of 20 ms (i.e., 120 ms – 100 ms = 20 ms) will be carried forward.
For the third cycle, the surplus 20 ms is added to 60 ms. Because the sum of 80 ms is less than 100
ms, PID(190) will not be executed. For the fourth cycle, the 80 ms is added to 60 ms. Because the
sum of 140 ms is greater than 100 ms, PID(190) will be executed and the surplus of 40 ms (i.e.,
120 ms – 100 ms = 20 ms) will be carried forward. This procedure is repeated for subsequent cycles.
1 cycle
PID
60ms
Processing
Initial processing
(PID processing
with initial values)
Reading of
Less than 100 ms, so
measurement
PID is not executed.
time
CP1E CPU Unit Instructions Reference Manual(W483)
1 cycle
1 cycle
PID
PID
60ms
(60 ms)
(60 ms + 60 ms = 120 ms)
Not executed.
Executed
Greater than 100 ms,
so PID is executed
and 20 ms is carried
forward.
1 cycle
PID
60ms
60ms
(20 ms + 60 ms = 80 ms)
Not executed.
Less than 100 ms, so
PID is not executed.
2 Instructions
1 cycle
PID
(80 ms + 60 ms = 140 ms)
Executed
Greater than 100 ms,
so PID is executed and
40 ms is carried forward.
2-263
2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents