AS Series Programming Manual 1.2.2 Program Organization Units and Tasks _1 The Program Organization Units (POUs) are the basic elements that constitute the PLC program. Unlike the traditional units. These small units are called POUs. The POUs can be classified into three types. PLC program, the program framework introduced by IEC 61131-3 allows you to divide a large program into several small 1. Program (PROG): The program POU is the main program in the PLC. You can define the execution of this POU t to be cyclic scan or interrupt driven, and arrange the scan order in the task list for program POUs. 2. Function block (FB): The function block (FB) POU is similar to a subroutine.
The instructions in the function block are executed after a program POU calls the function block with the related parameters. 3. Function (FC): The function (FC) POU in similar to a macro instruction. That is, you can write many operation instructions or functions into a function-type POU, and then use then in a program POU or a function block POU. Tasks are functions that control the order of program execution or according to certain interrupt conditions. The task provides each program POU with a specific execution task, and specifies the execution order for the program POUs or the way to enable them. Normally, only some of the program POUs in a project take part in the actual execution.
The task controls whether to program POU is saved as ordinary source code with the project instead of being compiled into the execution code for the execute the program POU or not, and how to execute it. If the POU of the program type is not assigned in the task, the PLC. In addition, only the program POU needs to be assigned to the task. Function block POUs or function POUs are automatically called by the program POU. There are three types of tasks. 1. Cyclic task: The program POUs assigned to cyclic tasks are scanned cyclically, and executed in order. 2. Timed interrupt task: If the interrupt time is reached, all program POUs assigned to the timed interrupt task are executed in order. 3.
Conditional interrupt task: Conditional Interrupts can be divided into several types, such as external interrupts, and I/O interrupts. You must make sure that the PLC supports the interrupts before you use conditional interrupts in a project. If you assign a program POU to a conditional interrupt task, the program POU is similar to an interrupt subroutine. When the interrupt condition is satisfied (for example, the contact of the external interrupt is triggered) then all program POUs assigned to the conditional interrupt task are executed in order. 1-10