EasyManua.ls Logo

LOYTEC L-INX - 12.4.5 CPU Overload

Default Icon
305 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
L-INX User Manual 263 LOYTEC
Version 4.0 LOYTEC electronics GmbH
12.4.5 CPU Overload
Several conditions affect the CPU utilization of the IEC61131 program. As a result it is not
possible to predict the system load caused by the IEC61131 program. E.g. the following
parameters are of particular importance when designing IEC61131 programs:
Number of inputs and outputs handled by the I/O driver
Complexity of the running IEC61131 program
Number of simultaneously running program instances on one LINX-110 device
Cycle time of IEC61131 programs
logiCAD breakpoint support and force-able code enabled or disabled
The developer of the IEC61131 program is able to check the current system load within the
Web UI, see section 4.2.16. To get a rough estimate of the CPU load investigate the PLC-
LED. Every time, the system load increases 80% for a certain period of time, the PLC-LED
switches to red until the system load goes below 80%.
In case of CPU overload, the IEC61131 program may not be able to finish its work within
the defined cycle time. Adapt the program in order to reduce the total system load below
80%. Here are a few tips to keep the CPU load down:
Increase the cycle time, so that the task may finish in time before the next cycle
start is scheduled. The PLC kernel will always schedule the next run at an absolute
time, no matter how long the previous run took, in order to compensate for
irregular execution times and keep a steady cycle time if possible.
Reduce the number of I/O variables, to reduce the load caused by exchanging data
between the PLC program and the data point system.
Reduce the number of independent tasks and try to place as much functionality as
possible into one task. Every running task will call the I/O driver for new inputs
and outputs independently, therefore two tasks running at a 1s cycle time each will
cause twice the I/O load of one task running at 2s cycle time.
Take special care about the complexity of function blocks which are used a lot.
Bad performance of one such block may dramatically increase CPU load if it needs
to be calculated several hundred times in one cycle.
Try to disable breakpoint support and force-able code when generating code for
the target, to get the most efficient PLC code out of your logic.
For complex designs, it may be possible to add a state machine using SFC
elements and enable/disable large parts of the logic based on the current state of
operation.
Whenever a function does not need to calculate new output values under certain
conditions, use the built-in EN input of the block to disable execution and thus
reduce the required CPU time, instead of adding your own ‗Enable‘ input which
causes the logic to ‗behave‘ as if it would be disabled, while it is actually
calculated every cycle. This is similar to power saving methods used in modern
electronic devices. Parts which are not required are put into a low power mode
instead of keeping them running in an unproductive state.

Table of Contents