CNC 8055
CNC 8055i
SOFT: V02.2X
10
·453·
PLC PROGRAMMING
The PLC program is structured by modules and it may consist of:
• Main module (PRG).
• Periodic module (PE).
• First Cycle module (CY1).
Every time the PLC program starts running, the CNC will execute first, if it has been defined, the
First Cycle module (CY1). Then it will execute the Main Program module (PRG) continuously until
the PLC program is stopped.
The periodic execution modules (PE) will be executed every so often with the frequency established
for each of them. This time period starts counting from the time the CY1 cycle is ended. The
execution of a periodic module temporarily interrupts the execution of the main module.
When defining the PLC program, both the processing of the main module (PRG) and the periodic
modules (PE) must be taken into consideration.
The main module (PRG) will be processed cyclically. See "8.2 PLC program execution" on page
425.
The periodic module is optional and it is executed every so often as indicated by the directing
instruction defining the module.
It is used to process certain critical inputs and outputs which cannot be properly evaluated within
the main module because the cycle scan time for the main module would be too long for these
resources to be checked and reacted upon.
It does not modify the status of the PLC resources. Therefore, the main module will resume execution
as if the periodic module had not been executed at all.
The periodic module is processed as follows:
1. The PLC takes into account the current values, as just before executing the PE module, of the
local physical inputs (connectors of the central unit).
2. Executes the periodic module.
3. It assigns the current values of the PLC’s "O" resources to the local physical outputs (connectors
of the central unit).
4. It ends the execution of the Periodic Module and resumes the execution of the main module.
To work with remote physical inputs and outputs, use the IREMRD and OREMWR instructions.