ISPSoft User Manual

ISPSoft User Manual ISPSoft User Manual

02.09.2014 Views

Chapter 5 Program Organization Units and Tasks Table of Contents 5.1 Program Organization Units and Tasks.....................................................5-2 5.2 Program Organization Units ......................................................................5-2 5.2.1 Program Architecture and Types........................................................5-2 5.2.2 POUs in ISPSoft.................................................................................5-3 5.3 Tasks.........................................................................................................5-4 5.3.1 Managing the Tasks in ISPSoft ..........................................................5-4 5.3.2 Tasks in the Project Management Area .............................................5-5 5.3.3 Executing the POUs Assigned to a Task............................................5-6 5.4 Managing a POU.......................................................................................5-8 5.4.1 Creating and Setting a POU...............................................................5-8 5.4.2 Enabling a POU................................................................................5-11 5.4.3 Deleting and Copying a POU ...........................................................5-12 5.4.4 Setting and Unlocking a POU Password ..........................................5-13 5.4.5 Exporting a POU of the Program Type.............................................5-14 5.4.6 Importing a POU of the Program Type .............................................5-15 5.4.7 Exporting a POU of the Function Block Type ...................................5-16 5.4.8 Importing a POU of the Function Block Type ...................................5-17 5.5 Managing Tasks ......................................................................................5-18 5.5.1 Setting the Property of a Task and the Condition of an Interrupt......5-20 5.5.2 Assigning a POU to a Task ..............................................................5-22 5.5.3 Arranging the POUs .........................................................................5-23 5.6 Example ..................................................................................................5-24 5.6.1 Writing a Program by Means of IEC 61131-3...................................5-24 5.6.2 Example of an Interrupt Subroutine in a DVP Series PLC................5-28 5.6.3 Example of an Interrupt Subroutine in an AH500 Series CPU Module .........................................................................................................5-34 5-1

ISPSoft User Manual 5.1 Program Organization Units and Tasks 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. The difference between traditional ladder diagrams and IEC 61131-3 is described below. Traditional ladder diagram IEC 61131-3 1. A single program is divided into several independent program organization units. Main program 2. A program organization unit which has been created is assigned to a cyclic task. 1. A subroutine is a function block. General Subroutine 2. A function block which has been created can be called by a program organization unit. 1. Different interrupt subroutines are independent program organization units. Interrupt subroutine 2. A program organization unit which has been created is assigned to an interrupt task. Traditional ladder diagrams and IEC 61131-3 are represented by the following architectures. In the classic architecture, users write a source code. In the IEC 61131-3 architecture, a program is divided into several program organization units. Every program organization unit can be developed independently, and can be assigned a task. If a control system reaches a certain scale, the internal control procedures will be quite complex, and the relation between the procedures will be closer. If the classic architecture is adopted, a lot of time and manpower must be invaded in developing and maintaining a program. However, in the IEC 61131-3 architecture, the program organization units are reusable and modular. Besides, the program organization units can be integrated easily by means of the management of the tasks. The concepts related to program organization units and tasks will be introduced in the following section. 5.2 Program Organization Units 5.2.1 Program Architecture and Types 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 5-2

Chapter 5<br />

Program Organization Units<br />

and Tasks<br />

Table of Contents<br />

5.1 Program Organization Units and Tasks.....................................................5-2<br />

5.2 Program Organization Units ......................................................................5-2<br />

5.2.1 Program Architecture and Types........................................................5-2<br />

5.2.2 POUs in <strong>ISPSoft</strong>.................................................................................5-3<br />

5.3 Tasks.........................................................................................................5-4<br />

5.3.1 Managing the Tasks in <strong>ISPSoft</strong> ..........................................................5-4<br />

5.3.2 Tasks in the Project Management Area .............................................5-5<br />

5.3.3 Executing the POUs Assigned to a Task............................................5-6<br />

5.4 Managing a POU.......................................................................................5-8<br />

5.4.1 Creating and Setting a POU...............................................................5-8<br />

5.4.2 Enabling a POU................................................................................5-11<br />

5.4.3 Deleting and Copying a POU ...........................................................5-12<br />

5.4.4 Setting and Unlocking a POU Password ..........................................5-13<br />

5.4.5 Exporting a POU of the Program Type.............................................5-14<br />

5.4.6 Importing a POU of the Program Type .............................................5-15<br />

5.4.7 Exporting a POU of the Function Block Type ...................................5-16<br />

5.4.8 Importing a POU of the Function Block Type ...................................5-17<br />

5.5 Managing Tasks ......................................................................................5-18<br />

5.5.1 Setting the Property of a Task and the Condition of an Interrupt......5-20<br />

5.5.2 Assigning a POU to a Task ..............................................................5-22<br />

5.5.3 Arranging the POUs .........................................................................5-23<br />

5.6 Example ..................................................................................................5-24<br />

5.6.1 Writing a Program by Means of IEC 61131-3...................................5-24<br />

5.6.2 Example of an Interrupt Subroutine in a DVP Series PLC................5-28<br />

5.6.3 Example of an Interrupt Subroutine in an AH500 Series CPU Module<br />

.........................................................................................................5-34<br />

5-1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!