You are on page 1of 26

System 800xA Training

Chapter 6 Application Structures

TABLE OF CONTENTS

Chapter 6 Application Structures............................................................................................................................................ 1


6.1 General Information ..................................................................................................................................................... 2
6.1.1 Objectives.............................................................................................................................................................. 2
6.1.2 Legend .................................................................................................................................................................. 2
6.1.3 Reference Documentation ...................................................................................................................................... 2
6.2 Automation Solution..................................................................................................................................................... 3
6.2.1 Control Network / Control Project .......................................................................................................................... 4
6.2.2 Working in the Engineering Workplace / Plant Explorer ......................................................................................... 4
6.2.3 Working in the Project Explorer of Control Builder M............................................................................................ 4
6.2.4 How to Start the Control Builder M........................................................................................................................ 5
6.3 Project Explorer – Overview......................................................................................................................................... 7
6.3.1 Online Help ........................................................................................................................................................... 8
6.3.2 Toolbar Buttons ..................................................................................................................................................... 9
6.3.3 Project Tree ........................................................................................................................................................... 9
6.3.4 Limits...................................................................................................................................................................13
6.3.5 Multi-User Engineering.........................................................................................................................................14
6.4 The POU Editor...........................................................................................................................................................16
6.4.1 Program Organization Units..................................................................................................................................16
6.4.2 Editor Overview ...................................................................................................................................................17
6.4.3 Declaration Pane...................................................................................................................................................19
6.4.4 Message Pane .......................................................................................................................................................20
6.4.5 Code Pane.............................................................................................................................................................21
6.5 Test (Simulation) Mode ...............................................................................................................................................23
6.6 Control Structure – Project Explorer ............................................................................................................................24
6.6.1 Tag Shown on Both Places....................................................................................................................................24
6.6.2 Different Places ....................................................................................................................................................25
6.6.3 Automatic Update.................................................................................................................................................26

Chapter 6 - 1
T314-06 Application Structures - RevC

6.1 General Information

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

6.1.3 Reference Documentation


3BSE041880 Industrial IT 800xA - Control and I/O
Getting Started
3BSE035980 Industrial IT 800xA - Control and I/O
Basic Control Software - Introduction and Configuration

Chapter 6 - 2
System 800xA Training

6.2 Automation Solution


An Automation Solution is the integrated automation system for administration,
maintenance and control. In System 800xA, you can create and handle many Control
Projects which can comprise libraries, applications, controllers, security, graphic,
history logs, etc.
The Project Explorer in Control Builder M and the Plant Explorer / Engineering
Workplace should be considered as two separate interfaces for building and
maintaining control projects.

800xA System

Control Builder M Plant Explorer /


Project Explorer Engineering Workplace

Handles one Handles many


Control Project Control Projects

Control Project Control Project


configuration Synchronization administration

Download and Faceplates and


testing Alarm Lists

AC 800M Controller Operator Workplace

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

6.2.1 Control Network / Control Project


Engineers, who are new with the Control Builder M programming tool, typically
equate a program to a Control Project. It is not the same thing.
It is important to learn the hierarchy used throughout Control Builder:
• An automation system might contain a number of Control Networks representing
different parts of a large plant. A Control Network is used to group connected
OPC Servers.
• Within each Control Network, you can create a number of Control Projects. A
Control Project contains the configuration data for libraries, applications,
connected hardware, etc.
• Each application contains programs and additional objects (data types, function
block types, control module types) that are used within the application.
• Each program is connected to a task, which decides how often the program is
executed.

6.2.2 Working in the Engineering Workplace / Plant Explorer


The following actions can/should only take place from the Engineering Workplace or
Plant Explorer:
• View aspects in Structures
• Editing graphics with Visual Basic
• Editing faceplates
• Working with the Import/Export tool to handle subsets of an Automation System
• Maintaining backup and restore for a complete System 800xA
• Configuring security
• Maintaining libraries and creating new library versions

6.2.3 Working in the Project Explorer of Control Builder M


The following actions can/should only take place from the Project Explorer:
• Build the control logic
• Creating hardware and downloading the firmware
• Setting an application in Test and Simulate mode
• Upgrading applications
• Downloading applications to controllers
• Setting task connections

Chapter 6 - 4
System 800xA Training

6.2.4 How to Start the Control Builder M


Right click on the Sxx_Project object in the Control Structure and select “Open
Project”.

This will open the Control Builder M application.

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

6.3 Project Explorer – Overview


The Project Explorer is a tool you can use to create, modify and navigate in a project.
You can select all objects such as data types; functions and function block types and
display them in an editor.
The Project Explorer is a separate window with a menu bar and a toolbar. The window
is split into two separate viewing areas (panes).

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

6.3.1 Online Help


There is a powerful online help feature in the Control Builder M.
Start the help with the help icon or select Help > Help Topics from the menu bar. You
can also press <F1>, which provides context sensitive help on the item currently
selected.

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

6.3.2 Toolbar Buttons


The Toolbar provides quick access to frequently used commands or options

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.

Online F5 Use this button to connect to the controller, e.g., if


you want to debug the program code in running
mode.

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).

6.3.3 Project Tree


The project is displayed in a tree view with the contents indented in an outline based
on their logical hierarchical relationship. The objects in the Project Explorer are each
represented by a name and an icon. By clicking on the button with a plus or minus
sign beside the folder, you can expand or collapse an icon and the corresponding
container.

The project tree contains 3 directories:

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.

There is also a Hardware folder available, containing several hardware libraries.


These libraries are available to connect to a controller and thus we can mix different
hardware versions in one Control 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:

Instruction List Structured Text Sequential Function Chart


LD A
ANDN B C:= A AND NOT B; Step 1 N FILL

ST C
Transition 1

Function Block Diagram Ladder Diagram Step 2 S Empty

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

Control Control Control


Module 1 Module 2 Module N

Program 1 Program 2 Program N

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 Multi-User Engineering


Entities and reservation provide support for multi-user engineering (working within a
project development group that involves several people).
Before you can modify the properties of an object, you have to reserve it. This ensures
that only one user can modify an object at a time. When ready, you release the
reservation. Now, it is possible for another user to reserve and modify the object.
NOTE! It’s also possible to Take Over an Reservation,
depending on the user rights.

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

6.3.5.2 Reserve / Release


Before you can modify an entity, you have to reserve it: Right click on the entity, for
example an application, and select “Reserve”. Use the Reserve dialog box to select
what entities to reserve.

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

6.4 The POU Editor

6.4.1 Program Organization Units


The IEC 61131 standard describes programs, function blocks and functions as
Program Organization Units or POUs. These units help you organize your automation
project into code blocks to minimize code writing and optimize the code structure and
code maintenance.
The function blocks and functions POUs are not limited to “one-time-use”. You can
use them repeatedly and in a recursive structure. In addition to these two POUs, there
is the program. Although the program is the only POU that cannot be reused in any of
the other POUs it is defined as a POU. As can be seen, one can use both the function
block and the function recursively to an unlimited “depth” whereas the program is a
“top-level” POU.

Application

Program Program

Code Code

Function Block Function Block Function

Code Code Code

Function Block Function

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

6.4.2 Editor Overview


Open the POU editor by double clicking on a program, or right mouse click and
choose “Editor”.

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.

Toolbar Keyboard Description


icon hot key
Ctrl + U Saves the changes and closes the editor.

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 + J Displays a screen preview of printer output.

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 + I Inserts statements like if-then-else, for-loop, etc.

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.

Ctrl + L Inserts a function.


Ctrl + E Edits a type. The type can be write protected, for example if
it is a system-protected type or an user-protected type.
Ctrl + M Edit Parameter List. Opens the connection editor for
parameter input assistance.

Chapter 6 - 18
System 800xA Training

6.4.3 Declaration Pane


Use the declaration pane to declare variables and function blocks. Depending on
which editor you use, different declaration grids can be displayed by selecting the tabs
at the bottom of the declaration pane.

NOTE! Copy/paste from MS programs like Excel is possible.

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

6.4.4 Message Pane


The message pane consists of three tabs: Description, Check and Find in Editor.

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

6.4.5 Code Pane


The code pane is divided into code blocks. It is advisable to arrange the code in blocks
to improve the overall code structure and readability.
The order of execution is determined by the order of the tabs for function blocks used
in programs. The execution order for control modules is set up by the system for the
most effective order possible.

NOTE! Code blocks may be rearranged, deleted and renamed by


clicking right on the “Code” tab.

Chapter 6 - 21
T314-06 Application Structures - RevC

Change the language


To change language on a newly created code block, right click on the “Code” tab and
select “Change Language”.

Select the new language for the code block and click “OK”.

NOTE! The language can only be changed if there is no


programming code in the block.

Chapter 6 - 22
System 800xA Training

6.5 Test (Simulation) Mode


It is possible to simulate a project without using any physical hardware.
Save the project and then either click the “Test” button or select Tools > Test Mode
from the menu in the Project Explorer to simulate the project.

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

6.6 Control Structure – Project Explorer


This section gives you an overview about the link between the Project Explorer in
Control Builder M and the Control Structure in the Engineering Workplace.

6.6.1 Tag Shown on Both Places


The same tag is shown in Project Explorer and Control Builder. Any changes to this
object will reflect on both places immediately.

Sxx_LT1 shown in Sxx_LT1 shown in


Control Builder M Engineering Workplace

Chapter 6 - 24
System 800xA Training

6.6.2 Different Places


There are some objects which do not have corresponding objects on the other working
side. But some objects are just located on different structures in the Engineering
Workplace.

Libraries

Connected Libraries

Data Types
Function Block Types
Control Module Type
s

• Libraries are handled in Library Structure and Object Structure.


• Connected libraries are in the Application aspect of a specific application (such
as Sxx_ReactorApp) in the Control Structure.
• Data types, function block types and control module types are handled in the
Object Structure.

Chapter 6 - 25
T314-06 Application Structures - RevC

6.6.3 Automatic Update


Control Builder M is continuously synchronized with the Aspect Directory on System
800xA.
This synchronization mechanism works in both ways i.e. if you do something in
Control Builder it is “mirrored” to the Aspect Directory and vice versa.

Synchronization

Chapter 6 - 26

You might also like