Installation manual
CNC 8055
CNC 8055i
INTRODUCTION TO THE PLC
8.
SOFT: V02.2X
·425·
PLC program execution
8.2 PLC program execution
The PLC executes the user program cyclically. In other words, once it executes the complete
program, it restarts running this program from the first instruction.
This cyclic processing of the program is done as follows:
1. At the beginning of the cycle, PLC’s "I" resources are assigned the current values of the physical
inputs (connectors).
For example, if the physical input I10 is at 24V, the PLC sets the I10 resource to "1".
2. It allocates the current values of the logic CNC outputs (CNCREADY, START, FHOUT, etc.) to
PLC resources M5500 thru M5957 and R550 thru R562 .
3. It runs the program cycle.
The following sections indicate how the PLC program is structured and which are its execution
modules. See "8.4 Modular structure of the program" on page 429.
4. After executing the cycle, it updates the Logic CNC inputs (/EMERGEN, /STOP, /FEEDHOL, etc.)
with the current values of PLC resources M5000 thru M5465 and R500 thru R505.
5. It assigns the current values of the PLC’s "O" resources to the physical outputs (connectors).
For example, if the "O5" resource is at "1", the PLC sets physical output O5 (connector) to 24V.
6. The cycle ends and is ready for the next scan.
Bear in mind that all the actions of the program executed by the PLC alter the status of its resources.
Example: I10 AND I20 = O5
When this condition is met [resource I10 is "1" and I20 is also "1"], the PLC sets resource "O5"
to "1". If this condition is not met, the PLC sets resource "O5" to "0".
Therefore, the status of a resource may change during the execution of the PLC program.
Example, assuming that the initial status of resource M100 is "0":
M100 AND I7 = O3
Resource M100 = "0"
I10 = M100
M100 takes the value of resource I10
M100 AND I8 = M101
The value of M100 depends on the previous instruction.
This type of problems may be prevented by careful programming or by using "Image" resource
values (instead of "Real" values).
The PLC has 2 memories to store the status of the registers, the real memory and the image memory.
All the steps described so far work with the real memory. Saying "value of a particular resource"
is the same as saying "real value of a particular resource"
The image memory contains a copy of the values (status) that the resources had at the end of the
previous cycle. The PLC makes this copy at the end of the cycle. The resources having an image
value are: I1 thru I512, O1 thru O512 and M1 thru M2047