Professional Documents
Culture Documents
T314-06 Application Structures - RevC
T314-06 Application Structures - RevC
TABLE OF CONTENTS
Chapter 6 - 1
T314-06 Application Structures - RevC
6.1.1 Objectives
On completion of this chapter you will be able to:
• Navigate in the Project Explorer
• Describe application structures
• Describe the POU editor
6.1.2 Legend
> Indicates when you go from one menu to a sub-menu
Italic Indicates object and file names
“ “ Indicates dialog box buttons, tabs, menus etc.
Bold Indicates important topics
Indicates start/explanation of student activity
Chapter 6 - 2
System 800xA Training
800xA System
As an engineer you will continuously shift between the Project Explorer (Control
Builder M) and the Plant Explorer (800xA workplace) while building Control
Projects.
Control Builder M is also the certified tool to configure SIL certified applications. SIL
stands for Safety Integrity Level, as specified in the standard IEC-61508. To run SIL
certified AC 800M applications, you need the SIL certified AC 800M High Integrity
controller.
Chapter 6 - 3
T314-06 Application Structures - RevC
Chapter 6 - 4
System 800xA Training
You can also start Control Builder M Professional from the start menu of Windows.
Start >Programs >ABB Industrial IT 800xA >Engineering >Control Builder M
Chapter 6 - 5
T314-06 Application Structures - RevC
It is also possible to use the shortcut on the desktop if this was installed.
Then the Control Project can be opened using the “Open Project..” command.
Chapter 6 - 6
System 800xA Training
In the upper pane, the project is displayed in a tree view control with folders and in the
lower pane there are three tabs for Description, Check and Message.
Description Tab
Displays a description, written in the editor (e.g. the program editor), of the selected
object in the tree view control.
Check Tab
A check of a selected object, e.g., an application and its contents is performed when
you select “Check” in the pop-up menu (click with the right mouse button). If any
errors are found, they are displayed in the “Check” tab. Double click on an error to
locate the exact position of the error in an editor.
Message Tab
Displays system activity messages, e.g., going from offline to online mode and
opening files.
Chapter 6 - 7
T314-06 Application Structures - RevC
The Help Topics dialog box enables you to locate topics in the help files by using the
table of contents (Contents tab), by selecting keywords that are assigned to topics
(Index tab), or by searching for words within the file (Find tab).
Chapter 6 - 8
System 800xA Training
Test Mode Use this button for offline testing of the user
programs, with no controller required. It compiles and
simulates the project. All tasks are executed locally in
the PC.
Download Project CTRL-D The program code in the application is compiled and
and Go Online downloaded for execution in the controller. The
application automatically enters Online mode (see
above).
Chapter 6 - 9
T314-06 Application Structures - RevC
6.3.3.1 Libraries
The Libraries folder contains all libraries used in a project. By inserting a library in to
a project, its type will become available to connect to an application.
When a project is created, the libraries folder contains the System folder (containing
firmware functions that can be used throughout your applications) and two libraries
that are always connected to a project, the Basic and the Icon libraries. There are a
number of additional libraries available that can be inserted.
The libraries contain type definitions such as data types, functions and function block
types and control module types that can be used in the project.
Chapter 6 - 10
System 800xA Training
6.3.3.2 Applications
A Control Project may contain one or more applications. The application is the largest
organizational unit in any controller. However a controller may execute several
applications. Each application may be considered as an independent object in the
controller.
In the application create the program(s) or control modules containing the program
code to be compiled and downloaded for execution in the controller(s). Each
application to be used must be connected to a controller.
An application may contain up to 64 programs. This means that you can split the
control strategy into different parts, depending on required interval times and
priorities.
NOTE! In this document the word “Code” refers to any
instructions that the controller can execute.
You may choose to write code in any one of 5 language editors in Control Builder:
ST C
Transition 1
A B C Transition 2
AND
A C -| |--|/|----------------( )
Step 3
B
All languages are available for both Programs and Control Modules. Choose the
language that most suites your needs or preference.
Chapter 6 - 11
T314-06 Application Structures - RevC
There are two types of container that can be used to hold code in a Control Builder
application:
• Control Modules
• Programs
Application
Programs have a traditional look and feel and represent a traditional approach to
application design and build. Within each program a selection of language editors may
be used. Each program may be divided into ‘Code Blocks’ or ‘Tabs’, which may be
thought of as sub-programs. In some editors you may divide the tab into several pages.
Control Modules are another way of compiling code which has many advantages
over the traditional programs – applications written with control modules will use less
memory and usually execute faster than those written with programs.
Chapter 6 - 12
System 800xA Training
6.3.3.3 Controllers
The hardware definition and the I/O connection are done in the Controllers folder. In
the root of the Controllers folder of each project, several controllers can be created.
The access variables are used for communication between applications, which may
exist in the same controller or in different controllers. Hardware units are added to the
tree structure representing physical hardware units.
The applications containing the code are not executed unless a “work scheduler” - a
task - is connected and serves as an “engine” running the code in the controller. In the
root of the Tasks folder of each Controller, several tasks can be created. Each
controller has three default tasks labeled Fast, Normal and Slow with their interval
times set to 50ms, 250ms and 1000ms respectively.
6.3.4 Limits
• Max 64 programs per application
• Max 256 applications per Control Project
• Max 8 applications per controller
• Max 32 tasks per controller
• Max 32 controller per Control Project
Application programming can be done from any Engineering Station in the system at
the same time. But be careful that only one engineer works on a library / application at
the same time.
Chapter 6 - 13
T314-06 Application Structures - RevC
6.3.5.1 Entities
Only some objects, so-called entities, can be reserved. Unless you have reserved an
entity, parts of the Project Explorer will be read-only, for example, some context menu
items will be disabled, and dialog boxes may be read-only.
The following objects are entities:
• Projects, applications, controllers
• Libraries
• Control modules types
• Function block types
• Function diagrams (created by Function Designer)
NOTE! An entity can be part of another entity. For example,
applications and controllers are part of a project.
When you reserve an entity, you also reserve all its objects that are no entities. For
example, when you reserve:
• a controller, you also reserve all objects part of the controller, such as hardware
units and tasks.
• an application, you also reserve its programs and data types, but not necessarily its
function block types or control module types.
Chapter 6 - 14
System 800xA Training
User “800xAadmin”
reserved this project
When you are finished modifying an entity, you can release it in a similar way: Right
click on the entity and select “Release Reservation”. Use the Release Reservation
dialog box to select what reservations to release.
Chapter 6 - 15
T314-06 Application Structures - RevC
Application
Program Program
Code Code
Code Code
The application contains the program code that is to be compiled and downloaded for
execution in the controller. An application should be seen as a container more than as
a programming object, since it does not contain any code of its own.
Chapter 6 - 16
System 800xA Training
The POU editors of programs, function block types and control module types have
basically the same look and functionality. This section describes the POU editor of a
program (control modules and function blocks are covered later in this course).
Chapter 6 - 17
T314-06 Application Structures - RevC
Toolbar Icons
The tables below describe menu commands, toolbar icons and keyboard short cuts
common to all editors. Editor-specific functions are described in the chapter of
respective editors.
Ctrl + W Save the changes but does not close the editor.
Ctrl + B Checks the editor contents for errors. The result is displayed
in the "Check" tab in the output pane. Double-click on the
lines with error messages to jump directly to the place where
an error occurred.
Ctrl + P Prints the current pane on a printer.
Ctrl + Z Undoes the most recent action. You can undo several steps,
except in the ST code editor, which only supports undoing
the most recent action. Not available in the SFC editor.
Ctrl + Y Recalls the last undo action. Not available in the ST code
and the SFC editor.
Ctrl + X Cut.
Ctrl + C Copy.
Ctrl + V Paste.
Ctrl + F Standard find function. Note: the function only searches the
current pane and present code block.
F3 Finds the next occurrence of a specified text string. Note:
the function only searches the current pane and present
code block.
Standard find function, but searches all panes and all code
blocks (find in the Editor).
Toggles the display of the lower pane - the message pane.
Ctrl + Space Fills in the rest of the name, for example, a variable name in
the code pane (complete word).
Ctrl + J Inserts a variable, data type or attribute in the declaration
pane or in the code pane.
INS Inserts a function or function block.
Chapter 6 - 18
System 800xA Training
Variables
The variables in the program are the holders of values. They are declared by giving
each a name and by assigning a data type. A single program may contain many
variables and they must be declared when they are used. Variables can be written in
Microsoft Excel and then copied and pasted to the declaration pane of the POU editor.
Function Blocks
Function blocks must be declared in the “Function Blocks” tab before they are used in
the ST or IL languages (not necessary in the FBD or LD editors).
Chapter 6 - 19
T314-06 Application Structures - RevC
Description
In the description tab, you can write notes in plain ASCII text. The notes are common
to all code blocks and grids. The description is displayed in the lower pane of the
Project Explorer tree view by marking the edited object (for which a description has
been written), e.g. a program.
Check
When you are validating code, error messages are displayed in this pane. Double click
an error message to quickly go to the place where the error occurred.
Find in Editor
You can use the “Find in Editor” command to search for a word in the entire current
editor and the result is presented as a list. You can double click the row in the message
pane to go quickly to the occurrence of the word.
Chapter 6 - 20
System 800xA Training
Chapter 6 - 21
T314-06 Application Structures - RevC
Select the new language for the code block and click “OK”.
Chapter 6 - 22
System 800xA Training
Error Messages
If there is an error in the project when you request a Check or when you try to go to
Test Mode, an error message is written in the Message tab of the Project Explorer.
Chapter 6 - 23
T314-06 Application Structures - RevC
Chapter 6 - 24
System 800xA Training
Libraries
Connected Libraries
Data Types
Function Block Types
Control Module Type
s
Chapter 6 - 25
T314-06 Application Structures - RevC
Synchronization
Chapter 6 - 26