Compact Control Builder Libraries Guide
Compact Control Builder Libraries Guide
Chapter 7 Libraries
TABLE OF CONTENTS
Chapter 7 Libraries................................................................................................................................................................. 1
7.1 General Information...................................................................................................................................................... 3
7.1.1 Objectives.............................................................................................................................................................. 3
7.1.2 Legend................................................................................................................................................................... 3
7.1.3 Reference Documentation ...................................................................................................................................... 3
7.2 The Library Concept ..................................................................................................................................................... 4
7.3 Types and Instances ...................................................................................................................................................... 5
7.3.1 Type Names and Instance Names ........................................................................................................................... 5
7.3.2 Data Types............................................................................................................................................................. 6
7.3.3 Function Block Types ............................................................................................................................................ 6
7.3.4 Control Module Types............................................................................................................................................ 6
7.3.5 Functions ............................................................................................................................................................... 7
7.3.6 Library Dependencies ............................................................................................................................................ 7
7.4 Libraries....................................................................................................................................................................... 8
7.4.1 Libraries Versions.................................................................................................................................................. 8
7.4.2 Standard ABB Libraries ......................................................................................................................................... 9
7.4.3 User defined Libraries .......................................................................................................................................... 10
7.5 Fundamental Libraries ................................................................................................................................................ 11
7.5.1 System................................................................................................................................................................. 11
7.5.2 BasicLib .............................................................................................................................................................. 13
7.5.3 IconLib ................................................................................................................................................................ 14
7.5.4 SupportLib........................................................................................................................................................... 15
7.5.5 AlarmEventLib .................................................................................................................................................... 15
7.6 Continuous Control Libraries ...................................................................................................................................... 16
7.6.1 ControlSimpleLib ................................................................................................................................................ 16
7.6.2 ControlBasicLib................................................................................................................................................... 18
7.6.3 ControlStandardLib.............................................................................................................................................. 19
7.6.4 ControlExtendedLib............................................................................................................................................. 21
7.6.5 ControlAdvancedLib............................................................................................................................................ 22
7.6.6 ControlFuzzyLib .................................................................................................................................................. 23
7.6.7 ControlSolutionLib .............................................................................................................................................. 24
7.7 Process Object Libraries ............................................................................................................................................. 25
7.7.1 ProcessObjBasicLib ............................................................................................................................................. 25
7.7.2 ProcessObjExtLib ................................................................................................................................................ 26
7.7.3 ProcessObjDriveLib............................................................................................................................................. 27
7.7.4 ProcessObjInsumLib ............................................................................................................................................ 27
7.7.5 GroupStartLib...................................................................................................................................................... 28
7.7.6 SignalLib ............................................................................................................................................................. 30
7.7.7 SupervisionLib..................................................................................................................................................... 31
7.8 Hardware Libraries ..................................................................................................................................................... 32
7.8.1 Overview ............................................................................................................................................................. 32
7.8.2 BasicHwLib......................................................................................................................................................... 33
7.9 AC800PEC Hardware Libraries .................................................................................................................................. 34
7.9.1 Overview ............................................................................................................................................................. 35
7.10 Help on Libraries and their Objects ........................................................................................................................... 36
7.10.1 Online Help........................................................................................................................................................ 36
7.10.2 AC 800PEC Specific Manuals............................................................................................................................ 37
7.11 Library Handling ...................................................................................................................................................... 38
7.11.1 How to Insert a Library into a Project ................................................................................................................. 38
7.11.2 How to Connect a Library to an Application ....................................................................................................... 39
7.11.3 How to Create a New (User Defined) Library ..................................................................................................... 40
7.11.4 Handling Libraries for Data Exchange with AC 800PEC applications ................................................................. 41
Chapter 7 - 1
J410-07 Libraries - [Link]
Chapter 7 - 2
Compact Control Builder Training
7.1.1 Objectives
On completion of this chapter you will be able to:
Explain the concept of libraries and types
Describes the standard libraries provided by ABB
Identify the libraries that are used in a project
Insert the required libraries into a project
7.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 7 - 3
J410-07 Libraries - [Link]
Libraries contain Type Definitions or Types which are used to give additional
functionality to the project.
There are three sorts of type definition which may be made in a library. These are:
Data types
Function Block types
Control Module types
Chapter 7 - 4
Compact Control Builder Training
Type
Instance 1
Instance 2
Instance 3
Note that in the Control Builder project tree, types have bright green icons and
instances have cyan icons.
The diagram above shows a small segment of an application. In Program 2 there are
two instances of a timer type function block. In the first the instance name is
MixingTimer and it is of type Tof.
The second instance is of the same type but has an instance name Tof_1.
Chapter 7 - 5
J410-07 Libraries - [Link]
Chapter 7 - 6
Compact Control Builder Training
7.3.5 Functions
In some libraries certain functions are defined. Functions are usually very basic
operations such as AND (logical operator) or ADD (addition).
You should distinguish between functions and functions blocks:
Functions return a single result immediately on execution of the function call.
Functions do not retain values from previous calls, unlike function blocks.
The majority of functions available in the system are defined in the library called
System, which is always loaded when any project is created. (It is not possible to have
a project which does not have the System library because otherwise it would not be
possible to write even the simplest statements in code!).
NOTE! It is not possible for the user to define his own functions.
ProcessObjExtLib
ProcessObjBasicLib
AlarmEventLib
BasicLib
IconLib
In the example above, the library BasicLib uses types from IconLib. For this to be
possible the library IconLib is connected to BasicLib. We say that BasicLib is
dependant on IconLib.
Chapter 7 - 7
J410-07 Libraries - [Link]
7.4 Libraries
A summary of what we have learned so far:
1. ABB provides many standard libraries
2. Libraries add functionality to a project
3. Libraries are used to store type definitions called Types.
4. A library may contain Functions, Data Types, Function Block Types and Control
Module Types.
5. A user may define his own ‘user’ libraries which may contain project specific,
user defined, data types, function block types or control module types (but not
Functions)
6. A library may be connected to another (higher) library. The higher library may
then use types from within the connected library to make more complex types.
Chapter 7 - 8
Compact Control Builder Training
Batch Applications
Fundamental
Continuous Control
Hardware
Communication
Process Objects
Libraries and their contents are organized by function. This makes it easy to choose
the library required. For example, if you want alarm handling in your code then you
should load AlarmEventLib into your project and then connect it to the applications
that need alarm handling code.
NOTE! The communication libraries for the different protocols
are covered in the chapter “Communication”
Chapter 7 - 9
J410-07 Libraries - [Link]
Chapter 7 - 10
Compact Control Builder Training
7.5.1 System
It contains only data types and functions. This is a special library which is loaded with
all projects. It connects automatically to all libraries and applications in the project.
The following basic data types are defined:
The diagram on the next page shows the functions defined in the System library. The
user may not define his own functions in control builder.
.
Chapter 7 - 11
J410-07 Libraries - [Link]
As can be seen the functions provide arithmetic, comparison, logical operations, data
type conversion, timers, date and time handling amongst others.
Chapter 7 - 12
Compact Control Builder Training
7.5.2 BasicLib
This library contains only data types and function block types. The library has
definitions for much useful functionality:
Counters
Timers
Automatic check of feedback (ACOF)
Edge detection
Multiplexers and Signal switches
Data type converters
Level trips with hysteresis
Shift registers
Latches
Stacks and Queues
Time and Date functions
Chapter 7 - 13
J410-07 Libraries - [Link]
7.5.3 IconLib
This library is made out of control module types and contains standard icons which are
used by many control modules in other libraries.
IconLib is a connected library for those other libraries which require graphical icons in
the control modules.
Chapter 7 - 14
Compact Control Builder Training
7.5.4 SupportLib
This library contains hidden objects which are used by some other libraries. This
library may be present in a project but there is nothing in it which can be used
independently by the user.
When another library requires it, then it will get loaded automatically
7.5.5 AlarmEventLib
This is an important library containing function blocks and control modules for
detection and management of alarms in a controller.
Alarms are detected and generated with the AlarmCond function block type or the
AlarmCondM control module type.
The AlarmCondBasic function block type and the AlarmCondBasicM control
module offer reduced functionality but use less code memory.
PrintAlarms and PrintEvents prints to a local serial line printer which may be
connected to the serial port of the controller.
Hardware and System alarms generated locally in the controller may be subscribed to
using the AttachSystemAlarm
Chapter 7 - 15
J410-07 Libraries - [Link]
7.6.1 ControlSimpleLib
This is the simplest and lowest level control library. It contains data types and function
block types for basic control loops. More complex loops may not be constructed with
objects only from this library.
FilterReal and Filter2PReal are single and two pole low-pass filters designed to
reduce noise on incoming analogue signals
DerivativeReal and IntegratorReal provide the derivative and integral of a signal
respectively.
AccelerationReal is a ramp function that limits the rate at which an output signal may
change (damper), it may also be used to limit the acceleration of an output signal.
LeadLagReal may be used to derive a lead or a lag from a signal.
Chapter 7 - 16
Compact Control Builder Training
The PiecewiseLinearReal function block type has a table with a number of selectable
input-output pairs, to define a non-linear function. Values between these pairs are
calculated by linear interpolation. The maximum number of data points is 21 - if there
is a need for more than several PiecewiseLinearReal can be used in parallel.
This function block type is typically used when a transmitter or actuator has a non-
linear response. (e.g. level transmitter in a spherical tank).
The PiecewiseLinear2DReal function block type holds a table matrix for two inputs
and one output to define a non-linear surface. It is an expansion of the function block
PiecewiseLinearReal (see above) to two dimensions.
The ThreePosReal function block type is a three-position converter from a real input
to two Boolean outputs with increase and decrease function respectively. It can be
used with or without feedback from the actual actuator. It is used for actuator which
requires a Boolean open or close signal rather than a proportional signal.
The VelocityLimiterReal function block type is a ramp function that is used to limit
the rate of change of a signal.
Chapter 7 - 17
J410-07 Libraries - [Link]
7.6.2 ControlBasicLib
This library contains function block types for complete control loops which may be
connected directly to the I/O signals.
The controllers can be configured either as P, PI, PD or PID controller with the
following functions:
Auto tuner of relay type
Feed forward
Tracking
Deviation alarm output
Limitation of output
Anti-integrator wind-up
Bumpless transfer
Dead Zone for the control deviation
Bumpless switchover to redundant I/O
ControlAdvancedLib
PidLoop and Pidloop3P function block types define simple complete control loops
with a controller and a first-order low-pass filter on the process value input. The
PidLoop provide an analogue output signal to the process actuator, whilst the
Pid3Ploop provides two digital output signals (Open and Close) together with the
option for an additional position feedback signal from the actuator.
Chapter 7 - 18
Compact Control Builder Training
7.6.3 ControlStandardLib
This library contains control module types use to create PID loops in the CMD editor.
All modules in this library may be connected using graphical connections.
AnalogInCC and AnalogOutCC are used to connect directly to analog inputs and
analogue outputs in the hardware.
PidSimpleCC and PidCC provide two PID controllers. The simple version offers a
subset of facilities for reduced code and complexity.
CCToInteger and CCToReal convert CC type signals to integer and real types.
RealToCC converts a raw real signal into a CC type.
BranchCC and Branch4CC provide signal branching within the loop diagram. The
input signal is split into two or four separate outputs.
Level2CC, Level4CC and Level6CC provide two, four and six alarm levels for a
signal with hysteresis.
Chapter 7 - 19
J410-07 Libraries - [Link]
CommonRangeCC may be used to separate an input signal into two output parts. The
two parts always add to the input signal but the first output may be adjusted over the
signal range.
SplitRangeCC is used to split an input signal into two parts with separate scaling for
each of the two outputs.
MidRangeCC provides two outputs from a single input, the first output is a fast
acting output whereas the second acts slowly.
SelectorCC and Selector4CC allow selection of an output signal from 2 or four input
signals. The Selector4CC can be cascaded to provide choices from more that four
signals.
SelectGoodCC and SelectGood4CC select good quality signals from two or four
inputs.
TapCC is used to tap (sample) a signal from the main data flow. TapRealCC taps off
the real part of the ControlConnection signal.
PulseWidthCC generates an output pulse train. The period may be set and the pulse
width (Logical high) is proportional to an incoming signal.
ThreePosCC converts an analog signal into two digital signals, Open and Close. It
has the facility for position feedback.
SignalSupervisionCC monitors the quality of a signal and generates events when the
quality is suspect.
Chapter 7 - 20
Compact Control Builder Training
7.6.4 ControlExtendedLib
This library contains control module types which extend the functionality of the
ControlStandardLib and which may be used to manipulate loop signals:
Chapter 7 - 21
J410-07 Libraries - [Link]
7.6.5 ControlAdvancedLib
This library contains an additional PID controller with advanced facilities and also a
Static Friction Compensating modules. The two modules may be used with others
from the other control libraries.
The PIDAdvancedCC control module type is an advanced PID controller with the
following functionality:
Configurable as PPI (Predictive PI controller)
Autotuner of relay and step response types
Gain scheduling
Adaptive control
Oscillation detection
Sluggish control detection
Chapter 7 - 22
Compact Control Builder Training
7.6.6 ControlFuzzyLib
This library contains control module types which allow the user to create multivariate
control functions using fuzzy logic. This type of logic may be used to create rule-
based control systems based on multiple input signals together with multiple output
actuators. In certain applications fuzzy control has an advantage compared to
traditional PID control methodologies.
It is intended that the types are copied as templates and modified in the user’s own
libraries to suit a particular control scenario.
Chapter 7 - 23
J410-07 Libraries - [Link]
7.6.7 ControlSolutionLib
This library contains ready-to-use control solutions for commonly occurring customer
processes. These templates are intended to be used directly in an application, as they
are, but may also be copied to a self-defined library and modified.
A control module solution provides a complete loop control solution with control,
signal monitoring, alarm handling, trending, operator graphics and also a possibility to
add asset optimization functionality
Chapter 7 - 24
Compact Control Builder Training
7.7.1 ProcessObjBasicLib
This library is a sub-library to ProcessObjExtLib (see below) and provides core
functions used by the devices there.
The main types are prefixed by the word ‘Bi’ or ‘Uni’. ‘Bi’ types are two directional
devices (e.g. a motor with forward and backward motion) whereas ‘Uni’ are one
direction devices (e.g. a block valve).
UniCore provides the core logic for controlling a uni-directional device – a motor or
two position valve. It contains hidden code that may not be modified by the user.
UniCoreDelayOfCmd is similar but allows for a delay to be configured before the
Start or Stop command is applied to the device, this is used when noisy command
signals might cause multiple start/stop cycles.
BiCore and BiCoreDelayOfCmd are similar to “Uni” versions, but controlling a two-
directional device – a motor with forward and reverse direction or a three position
valve.
DriveCommandSend and DriveStatusReceive are core modules for interfacing to
ABB drive systems. They contain hidden code which is not accessible by the user.
UniSimple and BiSimple (together with UniSimpleM and BiSimpleM) provide
interaction windows and hence user interfaces to the devices in which they are placed.
Their code is accessible and it is intended that a user may make new types and modify
either the code or graphics in these types.
PrioritySup is used to supervise priority commands for the device and generate error
texts for the alarm handling. This module used as a template and new types made from
it may be modified by the user.
The remaining types are faceplates or icons and might be modified by the user if
required.
Chapter 7 - 25
J410-07 Libraries - [Link]
7.7.2 ProcessObjExtLib
This library contains function block types and control module types which are used to
control process objects such as valves and motors.
Function block types and control module types are provided so that a user may choose
a program or control module solution. For example the function block type ValveUni
has a corresponding control module type ValveUniM.
The remaining objects provide support icons and faceplates. These may be modified
after conversion to a user type.
Chapter 7 - 26
Compact Control Builder Training
7.7.3 ProcessObjDriveLib
This library provides function block types and control module types for controlling
ABB drives.
The Standard drive is used with standard application firmware that is loaded into the
drive. The standard interface provides most of the control and status signals that the
user will require in most situations.
The Engineered drive gives a complete set of all signals for the drive and allows the
user to tailor a specific and specialized drive solution for those applications requiring
particular behavior. The Engineered drive is effectively an open interface to the drive
controller giving complete freedom to manipulate the behavior of the drive.
NOTE! The Standard drive may be considered as a sub-set of the
Engineered drive.
7.7.4 ProcessObjInsumLib
This library contains function block types and control module types to control and
supervise the INSUM (INtegrated System for User-optimized Motor management).
INSUM is a system for control and supervision of mainly motors. Each motor has a
motor control unit (MCU) located in the motor starter module. Up to 128 INSUM
devices (for example MCUs, or circuit breakers) can be supervised per gateway.
Chapter 7 - 27
J410-07 Libraries - [Link]
7.7.5 GroupStartLib
This library contains control modules types to control and supervise a sequential
startup of process objects, that is, to build procedures for starting and stopping
processes.
GroupStartHead is used to supervise the entire start group, it keeps track of the
alarms generated in the group and detects any connected objects that are not ready to
start when in the Group Start mode.
GroupStartStep is used to define a step in a Group Start sequence.
GroupStartAnd is used when two or more Group Start groups need to be
synchronized before a Group Start object or sub-group is to be started.
GroupStartOr is used when a Group Start object or sub-group is to be started from
two or more Group Start groups.
GroupStartTestObject is used to test the start up configuration and to simulate alarm
situations.
GroupStartObjectTemplate is used to connect a generic process object to the Group
Start.
InfoParGroupStartObjectTemplate is used as an interaction window for the
GroupStartObjectTemplate control module type.
Chapter 7 - 28
Compact Control Builder Training
[Link] SeqStartLib
This library contains functionality for control of an SFC (Sequential Function Chart)
from the Operator Workplace. It envisages a starting sequence and a stopping
sequence.
The SeqStartLib is more suitable for group starts of plants and processes. The
GroupStartLib (see above) is more suitable for creating start and stop procedures for
machines. The GroupStartLib and SeqStartLib may act together, for example,
SeqStartLib can be used to start underlying Group Start objects.
The SFCHeader contains the basic functionality to control and supervise the SFC.
The SFCStep is available to use in the SFC action code block (N action).
The SFC2DseqChainExample control module contains the SFC header functionality
with an SFC structure example and predefined alarms and events.
The SFC2Dheader control module contains the SFC header functionality and
predefined alarms and events.
Chapter 7 - 29
J410-07 Libraries - [Link]
7.7.6 SignalLib
This library contains function block types and control module types which add alarm
and event handling to signals (I/O signals and application variables).
The types have several supervision and filtering functions, such as alarm and event
levels, and a faceplate. In their faceplates, it is possible to force objects, view trim
curves, configure and enable/disable alarms and events, and view/modify parameters.
Chapter 7 - 30
Compact Control Builder Training
7.7.7 SupervisionLib
This library consists of modules for detector input, system control and monitoring,
overview presentation and output handling.
The modules are applicable for general detection systems as well as safety
applications. All modules can be used in SIL classified applications.
Chapter 7 - 31
J410-07 Libraries - [Link]
7.8.1 Overview
A number of standard libraries with hardware types are delivered with the system:
Chapter 7 - 32
Compact Control Builder Training
7.8.2 BasicHwLib
The basic hardware library (BasicHWLib) contains basic hardware types such as
controller hardware for example CPU units, Ethernet communication links, Com ports,
ModuleBus etc.
The basic hardware library is automatically inserted to all Control Projects and
automatically connected to the controller, via the Control Project template.
Chapter 7 - 33
J410-07 Libraries - [Link]
Chapter 7 - 34
Compact Control Builder Training
7.9.1 Overview
The following AC 800PEC hardware libraries, defined as hardware types (units) in
Control Builder, are delivered with the installation of the Control Builder extension:
Chapter 7 - 35
J410-07 Libraries - [Link]
OR
Click on the “Help” Icon in the toolbar.
If you need to read about a strange new function block, just mark it and press ‘F1’.
Chapter 7 - 36
Compact Control Builder Training
All the other manual which are specifics within the release of the AC 800PEC
Toolbox currently installed, are available on:
Start>Programs>ABB AC 800PEC Toolbox>Release XXXX
Chapter 7 - 37
J410-07 Libraries - [Link]
3. Select the library that is required in the “Insert library…” dialogue and click the
“Open” button.
Chapter 7 - 38
Compact Control Builder Training
2. Select the library to be connected from the drop down list and then click “OK”.
Chapter 7 - 39
J410-07 Libraries - [Link]
2. Type in a name for the new library, its location and click “OK”.
The new library will appear in the project tree. The new library may then be edited and
connected to those applications which need its functionality.
Chapter 7 - 40
Compact Control Builder Training
Chapter 7 - 41
J410-07 Libraries - [Link]
Chapter 7 - 42
Compact Control Builder Training
7.1.1 Description
Insert some of the required libraries for later use in the project and connect the
libraries to applications.
7.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
Exercise 7.1 - 1
T530-07 Exercise 7.1 - [Link]
Note that other libraries were added which we did not specifically add ourselves.
These were added because our libraries were dependent on them. Expand the
SignalLib 1.4 library and note which other libraries are connected to it.
Exercise 7.1 - 2
Compact Control Builder Training
Exercise 7.1 - 3
T530-07 Exercise 7.1 - [Link]
Exercise 7.1 - 4
Compact Control Builder Training
7.1.1 Description
Insert some of the required libraries for later use in the project and connect the
libraries to applications.
7.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
Solution 7.1 - 1
T530-07 Solution 7.1 - [Link]
Solution 7.1 - 2
Compact Control Builder Training
2. ProcessObjExtLib 2.2
3. SignalLib 1.4
Solution 7.1 - 3
T530-07 Solution 7.1 - [Link]
4. ControlExtendedLib 1.1
Note that other libraries were added which we did not specifically add ourselves.
These were added because our libraries were dependent on them. Expand the
SignalLib 1.4 library and note which other libraries are connected to it.
Solution 7.1 - 4
Compact Control Builder Training
2. Select the correct library and click “OK”. Continue until all libraries are connected
Solution 7.1 - 5
T530-07 Solution 7.1 - [Link]
Solution 7.1 - 6
Compact Control Builder Training
7.2.1 Description
Together with the installer package you will receive a *.hwd file for the ML/SL
interface. In this exercise we will add this file to the control builder M.
After adding you can use this virtual I/O of the ML/SL interface.
7.2.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
Exercise 7.2 - 1
J410-7 Exercise 7.2 - [Link]
In the Control Builder right-click Hardware in the Libraries. Then click Insert
Library to copy the Simulink Hardware Library (HWL) template into the project
The next step is to save a copy of this template. The name of the copy is for example
“MySimulink”
Exercise 7.2 - 2
Compact Control Builder Training
Important: With the current version of the Control Builder, do not use the
Browse option since it will not copy the file to the correct folder.
Instead, type the project location either by hand or copy the path from the
Windows Explorer
Always add a backslash (\) to the copied path. Name the copy MySimulink
1. Change
………………
Then insert this saved copy to your project. It must be under the current project
folder
Exercise 7.2 - 3
J410-7 Exercise 7.2 - [Link]
Update your Simulink library with your HWD –File (My Documents\DataJ410)
Exercise 7.2 - 4
Compact Control Builder Training
Exercise 7.2 - 5