Delta Electronics AH — 7.1.1 Program Organization Units and Tasks

AH Motion Controller – Operation Manual 7.1 Introduction Program organization units (POUs) and tasks are important programming concepts related to IEC 61131-3. They upgrade programming from traditional program writing to project management. For details about the software operation and programming, please refer to ISPSoft User Manual. 7.1.1 Program Organization Units and Tasks  Program Organization Units (POUs) Program organization units are basic elements of a program in a PLC. They are different from a traditional program in a PLC. The characteristic of the program architecture introduced by IEC 61131-3 is that a program is divided into several units.

These units are called program organization units. There are three types of POUs: programs (PROGs), function blocks (FBs), and function POUs.  Program (PROG): A POU of the program type is the main program unit in a project. A program POU executes according to the task to which it is assigned, either a cyclic program or an interrupt subroutine. The scan order of Program POUs can be arranged in the task list.  Function block (FB): A POU of the function block type is similar to a subroutine program. The process defined in the function block will be executed only when proper parameters are specified to the FB and the FB is called by a program.

 Function POU A Function POU represents close to a macro instruction that allows you to write multiple operation commands in the function POU. Function POU is available to be called by PROG or FB in the main program. which refers to an API(applied instruction) in the software. Function POU is currently not supported by ISPSoft. Note: ISPSoft only supports single function (noted as FC in AH Motion Controller – Standard Instructions Manual ),  Tasks or enabled. Every program POU is assigned to a specific task.

The tasks determine the order in which the program POU are executed The characteristic of the IEC 61131-3 architecture is that a program is divided into several POUs which can be developed independently. When all POUs are compiled, they are rearranged and combined into an execution code which can be _7 scanned step by step. The POUs are rearranged and combined according to the tasks to which the POUs are assigned. There are three types of tasks. They are cyclic tasks, timed interrupt tasks, and conditional interrupt tasks.  Cyclic task A program POU assigned to a cyclic task is scanned back and forth.

 Timed interrupt task should occur is reached, the POUs assigned to the timed interrupt task will be executed in order. A program POU assigned to a timed interrupt task is like a timed interrupt subroutine. If the time when timed interrupts  Conditional interrupt task There are several types of conditional interrupt tasks. For example, external interrupts, I/O interrupts, counting interrupts, and etc. Different PLCs provide different conditional interrupt tasks. You have to make sure of the conditional interrupt 7-2