You are on page 1of 152

StruxureWare Building Operation

Creating and Configuring a Function Block Program


Tutorial Guide
04-15034-01-en
July 2014
StruxureWare Building Operation
Creating and Configuring a Function Block Program
Tutorial Guide
04-15034-01-en
July 2014
Copyright © 2014 Schneider Electric. All rights reserved.
The Schneider Electric brand and any registered trademarks of Schneider Electric Industries SAS referred to in this guide are the sole property of Schneider
Electric SA and its subsidiaries. They may not be used for any purpose without the owner's permission, given in writing. This guide and its content are
protected, within the meaning of the French intellectual property code (Code de la propriété intellectuelle français, referred to hereafter as "the Code"), under
the laws of copyright covering texts, drawings and models, as well as by trademark law. You agree not to reproduce, other than for your own personal, non-
commercial use as defined in the Code, all or part of this guide on any medium whatsoever without Schneider Electric's permission, given in writing. You also
agree not to establish any hypertext links to this guide or its content. Schneider Electric does not grant any right or license for the personal and non-
commercial use of the guide or its content, except for a non-exclusive license to consult it on an "as is" basis, at your own risk. All other rights are reserved.
Trademarks and registered trademarks are the property of their respective owners.
Contents

Introduction
1 About This Guide ......................................................... 11
1.1 Purpose of This Guide ................................................................. 13
1.2 How This Guide is Organized ...................................................... 14
1.3 Typographical Conventions ......................................................... 15

2 Additional Information .................................................. 17


2.1 Where to Find Additional Information ........................................... 19
2.2 Regulatory Notices ...................................................................... 20

Tutorial
3 Our Case Study ........................................................... 23
3.1 University X ................................................................................. 25
3.2 Requirements and Specifications ................................................ 28
3.2.1 Devices Used for This Case Study ............................................. 28
3.2.2 Software Used in This Tutorial ................................................... 28
3.2.3 Specifications ........................................................................... 28
3.3 Focus of This Tutorial .................................................................. 29
3.3.1 Pre-existing Project Database Folders and Programs ................ 30
3.3.2 Pre-existing Project Database Objects ...................................... 33
3.3.3 Pre-existing WorkStation for Projects User Accounts ................. 34

4 Creating and Configuring a Function Block Program .... 35


4.1 Logging on to WorkStation for Projects ....................................... 38
4.2 Opening a Project ....................................................................... 40
4.3 Creating a Function Block Program ............................................. 41
4.4 Editing a Function Block Program ............................................... 42
4.5 Adding a Simple Block ................................................................ 43
4.6 Naming a Function Block ............................................................ 47
4.7 Editing a Real Input Block ............................................................ 48
4.8 Editing a Real Output Block ......................................................... 49
4.9 Editing a Real Value Parameter Block .......................................... 51
4.10 Editing a PIDA Controller Block ................................................... 54
4.11 Adding an Operator .................................................................... 55

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


5
4.12 Editing a Real Constant Operator ................................................ 57
4.13 Connecting a Block Output to a Block Input ................................ 59
4.14 Creating a Node on a Connection Line ........................................ 62
4.15 Adding a Comment ..................................................................... 64
4.16 Saving a Function Block Program ................................................ 68

5 Using Simulation to Test a Program ............................. 69


5.1 Changing to Simulation Mode ..................................................... 72
5.2 Setting Digital Simulation Inputs .................................................. 73
5.3 Setting Analog Simulation Inputs ................................................. 74
5.4 Starting a Simulation ................................................................... 75
5.5 Changing to Edit Mode ............................................................... 77

6 Modifying a Program Before Commissioning ................ 79


6.1 Deleting a Connection ................................................................. 82
6.2 Adding a Simple Block ................................................................ 83
6.3 Editing a Real Value Parameter Block .......................................... 85
6.4 Connecting a Block Output to a Block Input ................................ 87
6.5 Adding a Comment ..................................................................... 89
6.6 Adding a Rectangle ..................................................................... 92
6.7 Saving a Function Block Program ................................................ 93

7 Using Simulation to Test a Program ............................. 95


7.1 Changing to Simulation Mode ..................................................... 98
7.2 Setting Digital Simulation Inputs .................................................. 99
7.3 Setting Analog Simulation Inputs ............................................... 100
7.4 Starting a Simulation ................................................................. 101
7.5 Changing to Edit Mode ............................................................. 102

8 Creating Bindings to I/O Points and Programs ............ 103


8.1 Binding Values Using a Binding Template .................................. 106

9 Modifying a Program After Commissioning ................. 111


9.1 Logging on to WorkStation as a Building Operation User ........... 114
9.2 Deleting a Function Block .......................................................... 117
9.3 Exporting Function Block Program Code ................................... 118
9.4 Adding a Simple Block .............................................................. 119
9.5 Editing a Real Input Block .......................................................... 121
9.6 Editing a Binary Hysteresis Block ............................................... 122
9.7 Adding an Expression Block ...................................................... 123
9.8 Connecting a Block Output to a Block Input .............................. 125
9.9 Creating a Node on a Connection Line ...................................... 127
9.10 Adding a Comment ................................................................... 129
9.11 Adding a Rectangle ................................................................... 132

10 Using Simulation to Test a Program ........................... 133


10.1 Changing to Simulation Mode ................................................... 136
10.2 Setting Digital Simulation Inputs ................................................ 137
10.3 Setting Analog Simulation Inputs ............................................... 138

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


6
10.4 Starting a Simulation ................................................................. 139
10.5 Changing to Edit Mode ............................................................. 140

11 Commissioning a Modified Program ........................... 141


11.1 Forcing a Value ......................................................................... 144
11.2 Saving a Function Block Program .............................................. 145
11.3 Binding Values Using a Binding Template .................................. 146
11.4 Releasing a Forced Value .......................................................... 149
11.5 Summary .................................................................................. 150

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


7
Introduction

The Introduction part contains information on the purpose


of this guide, how this guide is organized, where to find
more information, and information on regulatory notices.
1 About This Guide

Topics
Purpose of This Guide
How This Guide is Organized
Typographical Conventions
1 About This Guide
1.1 Purpose of This Guide

1.1 Purpose of This Guide


This tutorial provides step-by-step instructions for creating and configuring function
block programs, adding and editing function blocks, connecting function blocks
through connection lines, creating nodes on connection lines, deleting function
blocks and connections, adding comments and rectangles, modifying function
block programs, using simulation to test function block programs, creating
bindings, forcing and releasing values, saving function block programs, and
exporting program code.
This tutorial focuses on the following Building Operation Engineering Certification
objectives:
• Use WorkStation to create a function block program
• Use Edit mode in Function Block Editor to open and edit a function block
program
• Add function blocks, such as simple blocks, operators, and expression blocks
• Locate function blocks in a left-to-right logical sequence
• Edit a function block to configure its name, parameters, and other settings
• Connect function blocks by drawing connection lines
• Connect function blocks by creating a node on a connection line
• Add comments and rectangles in a function block diagram
• Delete functions blocks and connections
• Modify a function block program before commissioning
• Modify a function block program after commissioning
• Use Simulation mode in Function Block Editor to test a function block program
• Save a function block program to the Building Operation database
• Export function block program code to an .aut file

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


13
1 About This Guide
1.2 How This Guide is Organized

1.2 How This Guide is Organized


This Building Operation Guide is divided into the following parts:

Introduction
The Introduction part contains information on the purpose of this guide, how this
guide is organized, where to find more information, and information on regulatory
notices.

Tutorial
The Tutorial part contains a step-by-step description of how to carry out different
tasks. If you want more information, see WebHelp or the corresponding Building
Operation Guide.
The Tutorial part includes a case study for a fictional customer called University X.
You can decide if you want to follow the example or use the described procedures
as reference information. The case study in this tutorial is an example of a typical
way of configuring Building Operation for a customer. When reading through this
tutorial, you might not have access to the devices, programs, and other files that
are needed for the fictional customer University X. However, the purpose of having
a case study is to see the procedures put in context, so you see how the
procedures could be used when configuring Building Operation, devices, or
programs for your customer.

Note
The programs and files that are used for the fictional customer University X are
intended for training purposes only.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


14
1 About This Guide
1.3 Typographical Conventions

1.3 Typographical Conventions


Building Operation Guides use the following specially marked texts:

Tip
Helps you understand the benefits and capabilities of the product.

Note
Provides you with supplementary information.

Important
Alerts you to supplementary information that is essential to the completion of a
task.

Caution
Alerts you to a condition that can cause loss of data.

Warning
Alerts you to a condition that can cause product damage or physical harm.

Bold texts:
User interface items, such as property names and buttons, are written in bold, for
example "On the File menu, select New."
Example texts:
All the example related information is indicated by blue lines and bullets.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


15
2 Additional Information

Topics
Where to Find Additional Information
Regulatory Notices
2 Additional Information
2.1 Where to Find Additional Information

2.1 Where to Find Additional Information


All the technical Building Operation information is available online, on WebHelp.
You also find additional information in the Building Operation Guides:
• Hardware Reference Guide
• Plain English and Script Difference Guide
• Function Block Editor and Menta Editor Difference Guide
• WebReports Reference Guide
• WebReports Operating Guide
• System Reference Guide
• Technical Reference Guide
• WorkStation Operating Guide
• IT Reference Guide
• WebStation Operating Guide
• System Upgrade Reference Guide
• Architectural Guidelines
• IT Planning Guide
• Administering Reports Tutorial Guide
• Configuring an Automation Server as a Controller Tutorial Guide
• Creating and Configuring a LonWorks Network with Xenta LonWorks Devices
Tutorial Guide
• Creating and Configuring a Modbus Network Tutorial Guide
• Creating and Configuring Alarms Tutorial Guide
• Creating and Configuring Graphics Tutorial Guide
• Creating and Configuring Schedules Tutorial Guide
• Creating and Configuring Trend Logs Tutorial Guide
• Creating and Configuring Users Tutorial Guide
• Starting a Project Tutorial Guide
• Finishing a Project Tutorial Guide
• Creating and Configuring a BACnet Network with b3 BACnet Devices Tutorial
Guide
• Creating and Configuring a LonWorks Network with MNL LonWorks Devices
Tutorial Guide
• Creating and Configuring a Function Block Program Tutorial Guide
• Creating and Configuring a Script Program Tutorial Guide

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


19
2 Additional Information
2.2 Regulatory Notices

2.2 Regulatory Notices

UL 916 Listed products for the Unites States and Canada, Open
Class Energy Management Equipment.

WEEE - Directive of the European Union (EU)


This equipment and its packaging carry the waste of electrical and electronic
equipment (WEEE) label, in compliance with European Union (EU) Directive
2002/96/EC, governing the disposal and recycling of electrical and electronic
equipment in the European community.

CE - Compliance to European Union (EU)


2004/108/EC Electromagnetic Compatibility Directive
This equipment complies with the rules, of the Official Journal of the European
Union, for governing the Self Declaration of the CE Marking for the European Union
as specified in the above directive(s) per the provisions of the following standards:
IEC/EN 61326-1 Product Standard, IEC/EN 61010-1 Safety Standard.

Industry Canada
ICES-003
This is a Class B digital device that meets all requirements of the Canadian
Interference Causing Equipment Regulations.

C-Tick (Australian Communications Authority (ACA))


AS/NZS 3548
This equipment carries the C-Tick label and complies with EMC and radio
communications regulations of the Australian Communications Authority (ACA),
governing the Australian and New Zealand (AS/NZS) communities.

Federal Communications Commission


FCC Rules and Regulations CFR 47, Part 15, Class B
This device complies with part 15 of the FCC Rules. Operation is subject to the
following two conditions: (1) This device may not cause harmful interference. (2) This
device must accept any interference received, including interference that may cause
undesired operation.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


20
Tutorial

The Tutorial part contains a step-by-step description of


how to carry out different tasks. If you want more
information, see WebHelp or the corresponding Building
Operation Guide.
The Tutorial part includes a case study for a fictional
customer called University X. You can decide if you want to
follow the example or use the described procedures as
reference information. The case study in this tutorial is an
example of a typical way of configuring Building Operation
for a customer. When reading through this tutorial, you
might not have access to the devices, programs, and other
files that are needed for the fictional customer University X.
However, the purpose of having a case study is to see the
procedures put in context, so you see how the procedures
could be used when configuring Building Operation, devices,
or programs for your customer.
3 Our Case Study

Topics
University X
Requirements and Specifications
Focus of This Tutorial
3 Our Case Study
3.1 University X

3.1 University X
We are going to install Building Operation as the building management system for
University X. The university is a campus of buildings for which heating and cooling
are supplied from a Central Plant with an underground distribution system. The
case study focuses on the renovation of the Central Plant and the expansion of the
School of Business.

Figure: The School of Business and the Central Plant


The Cooling Plant consists of a single chiller with a primary-secondary pumping
system. The secondary water loop serves four VAV air handling units with chilled
water coils located in the School of Business. The secondary loop has two water
pumps. Only one pump is required for 100 % of the load. The second pump
provides 100 % backup. The secondary pumps are variable speed. The primary
chilled water loop has a single constant volume chilled water pump. The condenser
loop rejects heat by means of a cooling tower. The condenser loop has a single
constant volume condenser water pump. The tower has two constant speed, draw-
through fans to increase the capacity of the tower above the natural draft capacity.
A diverting valve can be used to protect the chiller from condenser water thermal
shock. The water leaving the condenser can be diverted back to the inlet of the
condenser without any cooling effect.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


25
3 Our Case Study
3.1 University X

Figure: Cooling Plant diagram


The heating plant consists of two boilers in parallel, each with their own inline
pumps. Much of the time only one boiler is required to meet the load but under
greater load, both boilers will operate at the same time. The flow from the two
boilers comes together in a common supply header. There is a line from the supply
header to the mechanical systems that require a source of hot water. This line has
two constant volume distribution pumps in parallel. Only one is required to meet
the load. The second is back-up and lead-lag is used to alternate which pump
runs. The water returning from the mechanical systems flows into the return header
where it can be pumped by the inline pumps through the boilers. There is a
common line between the supply header and the return header. When the inline
pumps are flowing at a rate that exceeds the distribution pump flow rate, the water
flow in the common line is from the supply header to the return header. When the
distribution pump is flowing at a rate that exceeds the combined inline pump flow
rates, flow in the common line is from the return header to the supply header. Each
boiler has its own self contained control system that interfaces with Building
Operation through a combination of binary electrical control and network variables.
The inline pumps are locally controlled by the self contained control system.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


26
3 Our Case Study
3.1 University X

Figure: Heating Plant diagram

Note
The programs and files that are used for the fictional customer University X are
intended for training purposes only.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


27
3 Our Case Study
3.2 Requirements and Specifications

3.2 Requirements and Specifications


To be able to configure Building Operation for University X, the following devices
and software are used in this tutorial.

3.2.1 Devices Used for This Case Study


The following devices are used for this case study:
• Power Supply, PS-24V
• Automation Server
• I/O Modules:
– 1 x DI-16
– 1 x DO-FA-12
– 2 x UI-8/AO-4

3.2.2 Software Used in This Tutorial


The following software is used in this tutorial:
• License Administrator, and a valid license
• Enterprise Server
• WorkStation
• Project Configuration Server

3.2.3 Specifications
You find specifications in the Building Operation datasheets for Enterprise Server,
WorkStation, Project Configuration Server, PS-24V Power Supply, Automation
Server, and I/O Module Family.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


28
3 Our Case Study
3.3 Focus of This Tutorial

3.3 Focus of This Tutorial


University X wants to take advantage of cool outdoor air temperatures, during
certain times of the year, for free cooling of the School of Business. During these
times, the Cooling Plant should not be running. Cooling should instead be provided
by controlling the position of the outdoor air dampers, in conjunction with the return
air dampers, based on a mixed air temperature setpoint. Mixed air (MA) is the
mixture of return air (RA) and outdoor air (OA). The mixed air should be supplied to
the indoor space for cooling, until the outdoor air is too warm to use for cooling. As
the outdoor air becomes inadequate for cooling, the valve controlling the Chilled
Water (CW) coil in the Air Handling Unit (AHU) should begin to open. When the valve
reaches a predetermined position, the Cooling Plant should start running.

Figure: Air Handling Unit


In this tutorial, you create and configure a function block program for the AHU 01
Application in order to meet the university's requirements. The program is called
Mixed Air Control. You create a first version of the program to meet the initial
requirements. You create the program off site using WorkStation for Projects. As
additional requirements are added, you need to modify the program two times. You

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


29
3 Our Case Study
3.3 Focus of This Tutorial

perform the first modification before deployment and commissioning, whereas the
second modification is performed after commissioning. Because you can deploy a
project to a server only once, you need to modify the program on site the second
time.
In our example, the development of each program version can be divided into two
phases: design phase and test phase. You first use WorkStation for Projects to
create an empty function block program in the Automation Server. During the
design phase, you use Edit mode in Function Block Editor to build your function
block program. You build the program in a diagram window by putting together a
set of functions blocks, such as simple blocks, operators, and expression blocks.
For some function blocks, you need to specify a unique name and configure
parameters and settings. You connect the function blocks by drawing connection
lines from the output of one block to the input of another block. You create nodes
on connection lines when you need to connect an output signal to an additional
input. You add comments and rectangles to make the function block diagram easy
to understand. Finally, you save the program to the project database. During the
test phase, you use Simulation mode in Function Block Editor to test and
troubleshoot your function block program.
You repeat the above procedures when you develop the second, modified version
of the Mixed Air Control program. You develop the program off site. When you have
completed the development of the second version of the program, you bind the
inputs and outputs of the program to I/O points and to other programs for the AHU
01 Application.
When you develop the third version of the Mixed Air Control program, you have to
take into consideration that the second version of the program has been
commissioned. As you develop the program on site, you do not want a preliminary
third version of the program to impact on the AHU. You must therefore avoid saving
the program during the design phase. To save a copy of your latest (unsaved)
changes, you continuously export the program code to an .aut file instead. Before
commissioning the new version of the program, you force an I/O point to ensure
that the air dampers will keep their current position. You then save the program and
create the required bindings. Finally you release the forced I/O point.

3.3.1 Pre-existing Project Database Folders and


Programs
For University X, a project called University X Project has been created in the Project
Configuration Server on the off-site computer. The University X Project includes an
Enterprise Server and an Automation Server.
The Enterprise Server called University X ES1 has the following folder structure:

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


30
3 Our Case Study
3.3 Focus of This Tutorial

Figure: University X ES1 and its folder structure


The Automation Server called CPlant AS has the following folder structure:

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


31
3 Our Case Study
3.3 Focus of This Tutorial

Figure: CPlant AS and its folder structure


CPlant AS has the following programs for the AHU 01 Application:

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


32
3 Our Case Study
3.3 Focus of This Tutorial

Figure: CPlant AS and its programs for the AHU 01 Application

3.3.2 Pre-existing Project Database Objects


For University X the following objects are available in the project database on the
off-site computer prior to the creation and configuration of function block programs:
• ...University X ES1/Servers/CPlant AS/IO Bus/Position05:UI8AO4/MaTmp
(Temperature Input on input channel 3 of the UI-8/AO-4 I/O-module)
• ...University X ES1/Servers/CPlant AS/IO Bus/Position05:UI8AO4/DmprCmd
(Voltage Output on output channel 3 of the UI-8/AO-4 I/O module, for which
Engineering scale bottom=0 % and Engineering scale top=100 %)
• ...University X ES1/System/Binding Templates/IO Points (custom binding
template)

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


33
3 Our Case Study
3.3 Focus of This Tutorial

3.3.3 Pre-existing WorkStation for Projects User


Accounts
For University X, the following WorkStation for Projects user account is available on
the off-site computer:
• Pete

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


34
4 Creating and Configuring a
Function Block Program

Topics
Logging on to WorkStation for Projects
Opening a Project
Creating a Function Block Program
Editing a Function Block Program
Adding a Simple Block
Naming a Function Block
Editing a Real Input Block
Editing a Real Output Block
Editing a Real Value Parameter Block
Editing a PIDA Controller Block
Adding an Operator
Editing a Real Constant Operator
Connecting a Block Output to a Block Input
Creating a Node on a Connection Line
Adding a Comment
Saving a Function Block Program
4 Creating and Configuring a Function Block Program

Our Example
In this chapter, you create a new function block program to meet the following
requirements:
• A mixed air temperature shall modulate the outdoor air and return air dampers
to maintain a mixed air setpoint of 12.5 °C (55 °F).
• When mixed air temperature is 10 °C (50 °F), the outdoor air dampers shall be
closed. When the mixed air temperature is 15 °C (60 °F), the outdoor air
dampers shall be completely open.
• If there is no static pressure sensed (the supply air fan status is low), or if there
is a temperature low limit alarm, the outdoor air dampers shall be closed.
You log on to WorkStation for Projects on the off-site computer and open the
University X Project. You create the new function block program in the Automation
Server. The program is called Mixed Air Control. You then use Function Block Editor
to open the empty program and to add the logic, which consists of a set of
functions blocks. Function Block Editor is a graphical programming tool, which
means you build the program by adding function blocks in a diagram window and
by drawing connection lines between the blocks.
In our example, you add simple blocks, such as BI (Binary Input), RI (Real Input),
PVR (Real Value Parameter), RO (Real Output), PIDA (PID controller with Analog
output), and AND (AND gate). You also add operators, such as Real Constant and
Negate. For some functions blocks, you need to specify a unique name and
configure parameters and settings.
To connect the functions blocks, you draw a connection line from the output of one
function block to the input of another function block. You create a node on a
connection line when you need to connect a signal to an additional function block
input.
Additionally, you add comments in the diagram window to explain certain functions
and to add the title and the edition of the program.
Finally, you save the Mixed Air Control program to the project database.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


37
4 Creating and Configuring a Function Block Program
4.1 Logging on to WorkStation for Projects

4.1 Logging on to WorkStation for Projects


You use WorkStation for Projects to access the Project Configuration Server.
For more information, see the Log on to WorkStation for Projects topic on
WebHelp.
In this example, you log on to the Project Configuration Server on the off-site
computer, using the project user account “Pete”.

To log on to WorkStation for Projects


1. In the Building Operation WorkStation for Projects window, in the User
name box, type the user name. In this example, type “Pete.”

Note
The first time you log on to WorkStation for Projects you need to use
the administrator user account to create a project user account. For
more information, see the Creating a Project Configuration Server
User Account topic on WebHelp.

2. In the Password box, type the password. In this example, type “Pete.”
Continued on next page

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


38
4 Creating and Configuring a Function Block Program
4.1 Logging on to WorkStation for Projects

3. In the Server box, select the hypertext transfer protocol you want to use and
then enter a server name or an IP address. In this example, click HTTPS
and then enter localhost.
4. Select Remember me to have WorkStation for Projects remember your
settings.
5. Click Log on.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


39
4 Creating and Configuring a Function Block Program
4.2 Opening a Project

4.2 Opening a Project


You open a project to configure a project or to deploy a project to a server.
For more information, see the Projects topic on WebHelp.
In this example, you open the University X Project on the off-site computer.

To open a project
1. In WorkStation for Projects, in the WorkStation for Projects - Projects
view, select the project that you want to open. In this example, select
University X Project.

2. On the toolbar, click the Open Project button .


The project opens in WorkStation for Projects.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


40
4 Creating and Configuring a Function Block Program
4.3 Creating a Function Block Program

4.3 Creating a Function Block Program


You create a Function Block program to import existing program code or to
program new logic for the Automation Server using Function Block Editor.
For more information, see the Graphical Programming topic on WebHelp.
In this example, you create the Mixed Air Control function block program in the
CPlant AS.

To create a function block program


1. In WorkStation, in the System Tree pane, select the server or folder where
you want to create the function block program. In this example,
select ...University X ES1/Servers/CPlant AS/AHU 01
Application/Programs.
2. On the File menu, point to New and then click Program.
3. In the object type list, select Function Block Program.

4. In the Name box, type a name for the function block program. In this
example, type “Mixed Air Control.”
5. Click Create.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


41
4 Creating and Configuring a Function Block Program
4.4 Editing a Function Block Program

4.4 Editing a Function Block Program


You edit a function block program in Function Block Editor to modify the function
block program logic.
For more information, see the Function Block Editor Overview topic on WebHelp.

Important
Ensure that you have a working and available Function Block Editor license. A
working license is required to start the Function Block Editor software. For more
information, see the Licenses topic on WebHelp.

In this example, you edit the Mixed Air Control program to open Function Block
Editor where you can add function blocks, connect blocks, and use simulation to
test the program.

To edit a function block program


1. In WorkStation, in the System Tree pane, select the function block program.
In this example, select ...University X ES1/Servers/CPlant AS/AHU
01 Application/Programs/Mixed Air Control.
2. On the Actions menu, click Edit.
The function block program opens in Function Block Editor where you can edit it.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


42
4 Creating and Configuring a Function Block Program
4.5 Adding a Simple Block

4.5 Adding a Simple Block


You create a program by adding simple blocks, operators, and expression blocks.
For more information, see the Simple Blocks topic on WebHelp.
In this example, you add a BI (Binary Input) block in the diagram window for the
Mixed Air Control function block program.

To add a simple block


1. In Function Block Editor, right-click in the diagram window at the position
where you want to add the simple block. In this example, right-click in the
diagram window at position 8, 41, according to the position indicator in the
lower right corner of the window.
2. On the NEW menu, click Simple Block.
3. In the block type list, select the type of simple block you want to add. In this
example, select BI (Binary Input).

4. Click OK.
5. Click outside the green rectangle that encloses the block to clear the
selection.

For this example, repeat the procedure to add nine more simple blocks in the
function block diagram window. Use the following settings:

Table: Simple Block – BI

Component Setting

Position 8, 54

Simple Block BI (Binary Input)

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


43
4 Creating and Configuring a Function Block Program
4.5 Adding a Simple Block

Component Setting

Table: Simple Block – RI

Component Setting

Position 8, 80

Simple Block RI (Real Input)

Table: Simple Block – PVR

Component Setting

Position 16, 99

Simple Block PVR (Real Value Parameter)

Table: Simple Block – RO

Component Setting

Position 186, 68

Simple Block RO (Real Output)

Table: Simple Block – PIDA

Component Setting

Position 121, 57

Simple Block PIDA (PID controller with Analog output)

Table: Simple Block – AND

Component Setting

Position 44, 48

Simple Block AND (AND gate)

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


44
4 Creating and Configuring a Function Block Program
4.5 Adding a Simple Block

Component Setting

Table: Simple Block – PVR

Component Setting

Position 81, 67

Simple Block PVR (Real Value Parameter)

Table: Simple Block – PVR

Component Setting

Position 82, 84

Simple Block PVR (Real Value Parameter)

Table: Simple Block – PVR

Component Setting

Position 101, 88

Simple Block PVR (Real Value Parameter)

The Mixed Air Control function block program should now look like the following
figure.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


45
4 Creating and Configuring a Function Block Program
4.5 Adding a Simple Block

Figure: Mixed Air Control function block program

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


46
4 Creating and Configuring a Function Block Program
4.6 Naming a Function Block

4.6 Naming a Function Block


You name a function block to make it unique, which is required to avoid conflicts in
the function block program. You can also add a description for the block.
For more information, see the Graphical Programming topic on WebHelp.
In this example, you name the BI (Binary Input) block at position 8, 41 in the diagram
window for the Mixed Air Control function block program.

To name a function block


1. In Function Block Editor, in the diagram window, right-click the block you want
to name. In this example, right-click the BI (Binary Input) block at position 8,
41 in the diagram window.
2. On the BLOCK menu, click Edit.
3. In the Identifier box, type a name for the block. In this example, type
“SaFanSts.”

4. In the Description box, type a description for the block. In this example,
type “Status.”
5. Click OK.
The block name is displayed at the top of the block in the diagram window.

For this example, repeat the procedure to name the other BI (Binary Input) block in
the function block diagram window. Use the following settings:

Component Settings

Position 8, 54

Block BI (Binary Input)

Identifier TmpLImtAlm

Description Status

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


47
4 Creating and Configuring a Function Block Program
4.7 Editing a Real Input Block

4.7 Editing a Real Input Block


You edit a Real Input (RI) block to change the name, description, engineering unit,
and filter time constant for the block.
For more information, see the Simple Blocks topic on WebHelp.
In this example, you edit the RI block at position 8, 80 in the diagram window for the
Mixed Air Control function block program.

To edit a Real Input block


1. In Function Block Editor, in the diagram window, right-click the Real Input (RI)
block you want to edit. In this example, right-click the RI block at position 8,
80 in the diagram window.
2. On the BLOCK menu, click Edit.
3. In the Identifier box, type a name for the block. In this example, type
“MaTmp.”

4. In the Unit box, enter the required engineering unit for the output. In this
example, enter °C (°F).
5. In the Description box, type a description for the block. In this example,
type “Mixed Air Temp.”
6. Click OK.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


48
4 Creating and Configuring a Function Block Program
4.8 Editing a Real Output Block

4.8 Editing a Real Output Block


You edit a Real Output (RO) block to change the name, description, engineering
unit, and backup setting for the block.
For more information, see the Simple Blocks topic on WebHelp.
In this example, you edit the RO block at position 186, 68 in the diagram window for
the Mixed Air Control function block program.

To edit a Real Output block


1. In Function Block Editor, in the diagram window, right-click the Real Output
(RO) block you want to edit. In this example, right-click the RO block at
position 186, 68 in the diagram window.
2. On the BLOCK menu, click Edit.
3. In the Identifier box, type a name for the block. In this example, type
“DmprCmd.”

4. In the Unit box, enter the required engineering unit for the output. In this
example, enter %.
5. In the Description box, type a description for the block. In this example,
type “Command to Mixed Air Dampers.”
Continued on next page

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


49
4 Creating and Configuring a Function Block Program
4.8 Editing a Real Output Block

6. Select Backup to have the current value of the output backed up. In this
example, select Backup.

7. Click OK.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


50
4 Creating and Configuring a Function Block Program
4.9 Editing a Real Value Parameter Block

4.9 Editing a Real Value Parameter Block


You edit a Real Value Parameter (PVR) block to change the name, description,
engineering unit, initial value, and other settings for the block.
For more information, see the Simple Blocks topic on WebHelp.
In this example, you edit the PVR block at position 16, 99 in the diagram window for
the Mixed Air Control function block program.

To edit a Real Value Parameter block


1. In Function Block Editor, in the diagram window, right-click the Real Value
Parameter (PVR) block you want to edit. In this example, right-click the PVR
block at position 16, 99 in the diagram window.
2. On the BLOCK menu, click Edit.
3. In the Identifier box, type a name for the block. In this example, type
“MaTmpSpt.”

4. In the Unit box, enter the required engineering unit for the output. In this
example, enter °C (°F).
5. In the Description box, type a description for the block. In this example,
type “Mixed Air Temp Setpoint.”
6. Select Public to make the output signal into a public signal. In this
example, select Public.
7. Select Backup to have the current value of the output backed up. In this
example, select Backup.
Continued on next page

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


51
4 Creating and Configuring a Function Block Program
4.9 Editing a Real Value Parameter Block

8. In the InitValue box, type the initial value of the output. In this example,
type “12.5” °C (“55” °F).

9. Click OK.

For this example, repeat the procedure to edit the other PVR blocks in the function
block diagram window. Use the following settings:

Table: PVR Block – MaTmpGain

Component Setting

Position 81, 67

Identifier MaTmpGain

Unit NoUnit

Description Mixed Air Temp – Gain

Public Yes

Backup Yes

InitValue 20 (10 if Fahrenheit is used)

Table: PVR Block – MaTmpIntegral

Component Setting

Position 82, 84

Identifier MaTmpIntegral

Unit s

Description Mixed Air Temp – Integral Time

Public Yes

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


52
4 Creating and Configuring a Function Block Program
4.9 Editing a Real Value Parameter Block

Continued
Component Setting

Backup Yes

InitValue 0 (seconds)

Table: PVR Block – Deadzone

Component Setting

Position 101, 88

Identifier Deadzone

Unit °C (°F)

Description Mixed Air Temp – Dead Zone

Public Yes

Backup Yes

InitValue 0

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


53
4 Creating and Configuring a Function Block Program
4.10 Editing a PIDA Controller Block

4.10 Editing a PIDA Controller Block


You edit a PID Controller Analog Output (PIDA) block to change the name,
description, engineering unit, and other parameters and settings for the block.
For more information, see the Simple Blocks topic on WebHelp.
In this example, you edit the PIDA block at position 121, 57 in the diagram window
for the Mixed Air Control function block program.

To edit a PIDA Controller block


1. In Function Block Editor, in the diagram window, right-click the PID Controller
Analog Output (PIDA) block you want to edit. In this example, right-click the
PIDA block at position 121, 57 in the diagram window.
2. On the BLOCK menu, click Edit.
3. In the Unit box, enter the required engineering unit for the output. In this
example, enter %.
4. In the ControlInt box, type the control interval (in seconds). In this
example, type “30.”
5. In the StrokeTime box, type the actuator full stroke travel time (in seconds).
In this example, type “90.”

6. Click OK.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


54
4 Creating and Configuring a Function Block Program
4.11 Adding an Operator

4.11 Adding an Operator


You create a program by adding simple blocks, operators, and expression blocks.
For more information, see the Operators topic on WebHelp.
In this example, you add an Analog Multiplexer (mux) in the diagram window for the
Mixed Air Control function block program.

To add an operator
1. In Function Block Editor, right-click in the diagram window at the position
where you want to add the operator. In this example, right-click in the
diagram window at position 172, 67, according to the position indicator in the
lower right corner of the window.
2. On the NEW menu, click Operator.
3. In the Operators list, select the operator you want to add. In this example,
select Analog mux.

4. Click OK.
5. Click outside the green rectangle that encloses the operator to clear the
selection.

For this example, repeat the procedure to add four more operators in the function
block diagram window. Use the following settings:

Table: Operator – Real Constant

Component Setting

Position 105, 65

Operator Real const

Table: Operator – Real Constant

Component Setting

Position 105, 74

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


55
4 Creating and Configuring a Function Block Program
4.11 Adding an Operator

Continued
Component Setting

Operator Real const

Table: Operator – Real Constant

Component Setting

Position 159, 72

Operator Real const

Table: Operator – Negate

Component Setting

Position 98, 68

Operator Negate

The Mixed Air Control function block program should now look like the following
figure.

Figure: Mixed Air Control function block program

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


56
4 Creating and Configuring a Function Block Program
4.12 Editing a Real Constant Operator

4.12 Editing a Real Constant Operator


You edit a Real Constant operator to change the name, description, engineering
unit, value, and other settings for the operator.
For more information, see the Operators topic on WebHelp.
In this example, you edit the Real Constant operator at position 105, 65 in the
diagram window for the Mixed Air Control function block program.

To edit a Real Constant operator


1. In Function Block Editor, in the diagram window, right-click the Real Constant
operator you want to edit. In this example, right-click the Real Constant
operator at position 105, 65 (to the left of the Mod input on the PIDA block) in
the diagram window.
2. On the BLOCK menu, click Edit.
3. Select Mode 2 to display the output coming out from the right of the operator.
In this example, select Mode 2.
4. In the Value box, type the value of the real constant. In this example, type
“1”.

5. Click OK.

For this example, repeat the procedure to edit the other two Real Constant
operators in the function block diagram window. Use the following settings:

Table: Operator – Real Constant

Component Setting

Position 105, 74 (to the left of the Td input on the


PIDA block)

Mode 2 Yes

Value 0

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


57
4 Creating and Configuring a Function Block Program
4.12 Editing a Real Constant Operator

Component Setting

Table: Operator – Real Constant

Component Setting

Position 159, 72 (to the left of the “0” input on the


Analog Multiplexer operator)

Mode 2 Yes

Value 0

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


58
4 Creating and Configuring a Function Block Program
4.13 Connecting a Block Output to a Block Input

4.13 Connecting a Block Output to a Block


Input
You draw a connection line to connect the output of one function block to the input
of another function block in the diagram window.
For more information, see the Connections topic on WebHelp.
In this example, you connect the output of the BI block “SaFanSts” to the AND
operator in the diagram window for the Mixed Air Control function block program.

To connect a block output to a block input


1. In Function Block Editor, in the diagram window, click the output of the block.
In this example, click the output of the BI block “SaFanSts.”

2. Drag the pointer to the input of the block you want to connect to. In this
example, drag the pointer to upper input of the AND operator.

Tip
When it is necessary to change position or direction of the
connection line, you can fixate the current segment by clicking once.
You can repeat this fixation as many times as needed.

3. Click the input to finish the connection.

For this example, repeat the procedure to connect 13 other block outputs to block
inputs in the function block diagram window. Use the following settings:

Block Output Block Input Comment

BI block “TmpLImtAlm” AND operator, lower input

RI block “MaTmp” PIDA block, MV input Fixate the connection line at


the following positions: 75,
86 and 75, 61

PVR block “MaTmpSpt” PIDA block, SP input Fixate the connection line at
the following positions: 79,
105 and 79, 64

AND operator Analog Multiplexer, binary Fixate the connection line at


input the following position: 175,
52

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


59
4 Creating and Configuring a Function Block Program
4.13 Connecting a Block Output to a Block Input

Continued
Block Output Block Input Comment

Real Constant operator (to PIDA block, Mod input


the left of the Mod input on
the PIDA block)

PVR block “MaTmpGain” Negate operator Fixate the connection line at


the following positions: 95,
73 and 95, 70

Negate operator PIDA block, G input

PVR block “MaTmpIntegral” PIDA block, Ti input Fixate the connection line at
the following positions: 100,
90 and 100, 73

Real Constant operator (to PIDA block, Td input


the left of the Td input on the
PIDA block)

PVR block “Deadzone” PIDA block, DZ input Fixate the connection line at
the following positions: 115,
94 and 115, 79

PIDA block Analog Multiplexer, analog


input “1”

Real Constant operator (to Analog Multiplexer, analog


the left of the “0” input on the input “0”
Analog Multiplexer)

Analog Multiplexer RO block “DmprCmd”

The Mixed Air Control function block program should now look like the following
figure.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


60
4 Creating and Configuring a Function Block Program
4.13 Connecting a Block Output to a Block Input

Figure: Mixed Air Control function block program

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


61
4 Creating and Configuring a Function Block Program
4.14 Creating a Node on a Connection Line

4.14 Creating a Node on a Connection Line


You create a node on a connection line to connect the signal to an additional
function block in the diagram window.
For more information, see the Connections topic on WebHelp.
In this example, you create a node on the connection line between the Analog
Multiplexer and the BO block “DmprCmd” to connect the signal to the TSg input on
the PIDA block.

To create a node on a connection line


1. In Function Block Editor, in the diagram window, right-click the connection line
at a point where you want to create a node. In this example, right-click the
connection line between the Analog multiplexer and the RO block “DmprCmd”
at position 182, 72.

2. On the CONNECTION menu, click Create Node.


3. Click where you want to finish the connection. In this example, click once at
position 182, 105, then click once at position 119, 105, and finally click the
TSg input on the PIDA block to finish the connection.

Tip
When it is necessary to change position or direction of the
connection line, you can fixate the current segment by clicking once.
You can repeat this fixation as many times as needed.

A node shaped as a filled, black circle is created on the connection line at the point
where you right-clicked.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


62
4 Creating and Configuring a Function Block Program
4.14 Creating a Node on a Connection Line

The Mixed Air Control function block program should now look like the following
figure.

Figure: Mixed Air Control function block program

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


63
4 Creating and Configuring a Function Block Program
4.15 Adding a Comment

4.15 Adding a Comment


You add a comment to add a title to a function block program, explain the reason
for adding a certain function, or add information on the changes in a revised
function block program.
For more information, see the Function Block Editor Comments topic on WebHelp.
In this example, you add a comment to explain how the digital input signals that
represent static pressure (SaFanSts) and low limit (TmpLImtAlm) control the output
signal from the Analog Multiplexer.

To add a comment
1. In Function Block Editor, right-click in the diagram window at the position
where you want to add the comment. In this example, right-click in the
diagram window at position 165, 37 (close to the connection line to the binary
input of the Analog Multiplexer).
2. On the NEW menu, click Comment.
3. Type the text you want to display in the comment. In this example, type “If
static pressure is sensed and <press ENTER>low limit is normal, allow PIDA
<press ENTER>output or minimum position to <press ENTER>flow through. If
not, send a 0 <press ENTER>signal to the damper.”

4. Click Font.
Continued on next page

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


64
4 Creating and Configuring a Function Block Program
4.15 Adding a Comment

5. Configure the font settings. In this example, keep the default font settings.
Font: Arial, Font style: Regular, Size: 8, Color: Black.

6. Click OK.
7. In the Edit comment dialog box, click OK.
8. Click outside the green rectangle that encloses the comment to clear the
selection.

For this example, repeat the procedure to add three more comments. Use the
following settings:

Table: Comment to “TmpLImtAlm”

Component Setting

Position 10, 63 (below the BI block “TmpLImtAlm”)

Comment “Closed (ON) = Normal <press


ENTER>Open (OFF) = Alarm”

Font Arial

Font style Bold

Size 8

Color Black

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


65
4 Creating and Configuring a Function Block Program
4.15 Adding a Comment

Component Setting

Table: Comment – Title of the Function Block Program

Component Setting

Position 1, 1 (in the upper left corner of the diagram


window)

Comment “Mixed Air Control”

Font Arial

Font style Bold

Size 14

Color Black

Table: Comment – Edition of the Function Block Program

Component Setting

Position 1, 8 (below the title of the program)

Comment “Edition: <Date>”

Font Arial

Font style Regular

Size 10

Color Black

The Mixed Air Control function block program should now look like the following
figure.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


66
4 Creating and Configuring a Function Block Program
4.15 Adding a Comment

Figure: Mixed Air Control function block program

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


67
4 Creating and Configuring a Function Block Program
4.16 Saving a Function Block Program

4.16 Saving a Function Block Program


You save a function block program to make it available for reuse. The Save process
automatically processes the function block program data and creates a number of
subfolders in the System Tree pane.
In this example, you save the Mixed Air Control function block program.

To save a function block program


1. In Function Block Editor, on the File menu, click Save.
You can now use the function block program, with the blocks and the folders
automatically created in the database.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


68
5 Using Simulation to Test a
Program

Topics
Changing to Simulation Mode
Setting Digital Simulation Inputs
Setting Analog Simulation Inputs
Starting a Simulation
Changing to Edit Mode
5 Using Simulation to Test a Program

Our Example
In this chapter, you use simulation to test that the Mixed Air Control program meets
the requirements.
You first change Function Block Editor to run in Simulation mode. You then use the
buttons in the left part of the diagram window to simulate different values on the
digital and analog inputs. Finally, you start the simulation and observe how output
signals change, depending on the input signals.
In our example, you observe how the output signals from the PIDA and RO blocks
change when you simulate different values on the mixed air temperature. You also
simulate different values on the supply air fan status (static pressure) and the
temperature low limit alarm.
When you have verified that the program behaves as expected, you change back to
Edit mode.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


71
5 Using Simulation to Test a Program
5.1 Changing to Simulation Mode

5.1 Changing to Simulation Mode


You change from Edit mode to Simulation mode to test your function block
program.
For more information, see the Operation Modes topic on WebHelp.
In this example, you change to Simulation mode to test the first version of the Mixed
Air Control function block program.

To change to simulation mode


1. In Function Block Editor, on the Options menu, click Simulate.

2. Adjust the size of the diagram window and the trend area by moving the
separation bar between the two panes. In this example, adjust the size of
the diagram window to display the full function block program.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


72
5 Using Simulation to Test a Program
5.2 Setting Digital Simulation Inputs

5.2 Setting Digital Simulation Inputs


You simulate the digital inputs of a function block program to ensure that the
function block program behaves as expected.
For more information, see the Simulation Mode topic on WebHelp.
In this example, you simulate the SaFanSts (Supply Air Fan Status) digital input.

To set digital simulation inputs


1. In Function Block Editor, in Simulation mode, in the left part of the diagram
window, click the button of the digital input block. In this example, click the
SaFanSts button to put the switch in the Closed (On) position.

The symbols on digital input buttons toggle between open and closed switches
when you click the buttons.

For this example, repeat the procedure to simulate the TmpLImtAlm digital input.
Click the TmpLImtAlm button to put the switch in Closed (On) position.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


73
5 Using Simulation to Test a Program
5.3 Setting Analog Simulation Inputs

5.3 Setting Analog Simulation Inputs


You simulate the analog inputs of a function block program to ensure that the
function block program behaves as expected.
For more information, see the Simulation Mode topic on WebHelp.
In this example, you simulate the MaTmp (Mixed Air Temperature) analog input.

To set analog simulation inputs


1. In Function Block Editor, in Simulation mode, in the left part of the diagram
window, click the button of the analog input block. In this example, click the
MaTmp button.

2. In the Value box, type the required value. In this example, type “12.5” °C
(“55” °F).

Note
• You have to enter values in the engineering unit defined for the
analog input block.

3. Press ENTER.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


74
5 Using Simulation to Test a Program
5.4 Starting a Simulation

5.4 Starting a Simulation


You start a simulation of a function block program to observe the changes in the
program.
For more information, see the Simulation Mode topic on WebHelp.
In this example, you start the simulation of the first version of the Mixed Air Control
function block program.

To start a simulation
1. In Function Block Editor, in Simulation mode, on the Commands menu,
click Execute.
The simulation toggles between start and stop when you click Execute.

For this example, observe the output from the PIDA block and the RO block
“DmprCmd” when MaTmp=12.5 °C (55 °F), SaFanSts=1 (Closed/On), and
TmpLImtAlm=1 (Closed/On).
Repeat the simulation for different values on MaTmp, by setting the analog input
according to the following table, and observe the PIDA output and the DmprCmd
output.

Table: Simulating Different Values on MaTmp when SaFanSts=1 and


TmpLImtAlm=1

MaTmp Input PIDA Output DmprCmd Output

10 °C (50 °F)

10.5 °C (51 °F)

11 °C (52 °F)

11.5 °C (53 °F)

12 °C (54 °F)

12.5 °C (55 °F)

13 °C (56 °F)

13.5 °C (57 °F)

14 °C (58 °F)

14.5 °C (59 °F)

15 °C (60 °F)

Repeat the simulation for MaTmp=12.5 °C (55 °F) with different values on
SaFanSts and TmpLImtAlm, by setting the digital inputs according to the following
table, and observe the PIDA output and the DmprCmd output.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


75
5 Using Simulation to Test a Program
5.4 Starting a Simulation

Table: Simulating Different Values on SaFanSts and TmpLImtAlm when


MaTmp=12.5 °C (55 °F)

SaFanSts Input TmpLImtAlm PIDA Output DmprCmd Output


Input

0 (Open/Off) 1 (Closed/On)

1 (Closed/On) 0 (Open/Off)

0 (Open/Off) 0 (Open/Off)

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


76
5 Using Simulation to Test a Program
5.5 Changing to Edit Mode

5.5 Changing to Edit Mode


You change from Simulation mode to Edit mode to edit your function block
program.
For more information, see the Operation Modes topic on WebHelp.
In this example, you change to Edit mode to edit the Mixed Air Control function
block program.

To change to Edit mode


1. In Function Block Editor, on the Options menu, click Edit.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


77
6 Modifying a Program Before
Commissioning

Topics
Deleting a Connection
Adding a Simple Block
Editing a Real Value Parameter Block
Connecting a Block Output to a Block Input
Adding a Comment
Adding a Rectangle
Saving a Function Block Program
6 Modifying a Program Before Commissioning

Our Example
In this chapter, you modify the Mixed Air Control program to meet the following
additional requirement:
• When the mixed air temperature is 10 °C (50 °F), the outdoor air dampers shall
be at minimum position (25%).
Reason: When the building is occupied (determined in this example by the
existence of static pressure from the fan), and other conditions are normal, the
outdoor air dampers need to be open to a certain level to allow fresh air to
enter the building.
You modify the function block program before commissioning.
You use Function Block Editor to modify the program to allow for a minimum
position (fresh air) setting for the dampers. You first delete the connection between
the PIDA output and the Analog Multiplexer input. You then replace the deleted
connection with the new logic, consisting of a PVR (Real Parameter Value) block
and a MAX (Maximum Signal Selector) block. You edit the PVR block to use it for
keeping the minimum position setting for the dampers. You draw connection lines
that connect the new function blocks to each other, to the PIDA output, and to the
Analog Multiplexer input.
Additionally, you add a comment to explain the new logic. You also add a rectangle
around the new function blocks to mark that these blocks belong together.
Finally, you save the modified version of the Mixed Air Control program to the
project database.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


81
6 Modifying a Program Before Commissioning
6.1 Deleting a Connection

6.1 Deleting a Connection


You delete a connection or parts of it when you want to disconnect a block or
change the direction of the connection:
• When you right-click the connection close to the output of a block, the whole
connection, including all branches, is deleted.
• When you right-click the connection after a branch, only the part between the
point where you click and the connected input is deleted.
For more information, see the Connections topic on WebHelp.
In this example, you delete the connection between the PIDA output and the Analog
Multiplexer input “1”.

To delete a connection
1. In Function Block Editor, in the diagram window, right-click the connection line
you want to delete. In this example, right-click the connection line between
the PIDA output and the Analog Multiplexer input “1.”

2. On the CONNECTIONS menu, click Delete Node.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


82
6 Modifying a Program Before Commissioning
6.2 Adding a Simple Block

6.2 Adding a Simple Block


You create a program by adding simple blocks, operators, and expression blocks.
For more information, see the Simple Blocks topic on WebHelp.
In this example, you add a PVR (Real Value Parameter) block in the diagram window
for the Mixed Air Control function block program.

To add a simple block


1. In Function Block Editor, right-click in the diagram window at the position
where you want to add the simple block. In this example, right-click in the
diagram window at position 141, 78, according to the position indicator in the
lower right corner of the window.
2. On the NEW menu, click Simple Block.
3. In the block type list, select the type of simple block you want to add. In this
example, select PVR (Real Value Parameter).

4. Click OK.
5. Click outside the green rectangle that encloses the block to clear the
selection.

For this example, repeat the procedure to add an additional simple block in the
function block diagram window. Use the following settings:

Table: Simple Block – MAX

Component Setting

Position 155, 58

Simple Block MAX (Maximum Signal Selector)

The Mixed Air Control function block program should now look like the following
figure.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


83
6 Modifying a Program Before Commissioning
6.2 Adding a Simple Block

Figure: Mixed Air Control function block program

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


84
6 Modifying a Program Before Commissioning
6.3 Editing a Real Value Parameter Block

6.3 Editing a Real Value Parameter Block


You edit a Real Value Parameter (PVR) block to change the name, description,
engineering unit, initial value, and other settings for the block.
For more information, see the Simple Blocks topic on WebHelp.
In this example, you edit the PVR block at position 141, 78 in the diagram window
for the Mixed Air Control function block program.

To edit a Real Value Parameter block


1. In Function Block Editor, in the diagram window, right-click the Real Value
Parameter (PVR) block you want to edit. In this example, right-click the PVR
block at position 141, 78 in the diagram window.
2. On the BLOCK menu, click Edit.
3. In the Identifier box, type a name for the block. In this example, type
“MoaDprCmd.”

4. In the Unit box, enter the required engineering unit for the output. In this
example, enter %.
5. In the Description box, type a description for the block. In this example,
type “Minimum Position for Outside Air Dampers.”
6. Select Public to make the output signal into a public signal. In this
example, select Public.
7. Select Backup to have the current value of the output backed up. In this
example, select Backup.
Continued on next page

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


85
6 Modifying a Program Before Commissioning
6.3 Editing a Real Value Parameter Block

8. In the InitValue box, type the initial value of the output. In this example,
type “25.”

9. Click OK.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


86
6 Modifying a Program Before Commissioning
6.4 Connecting a Block Output to a Block Input

6.4 Connecting a Block Output to a Block


Input
You draw a connection line to connect the output of one function block to the input
of another function block in the diagram window.
For more information, see the Connections topic on WebHelp.
In this example, you connect the output of the PIDA block to the upper input of the
MAX block in the diagram window for the Mixed Air Control function block program.

To connect a block output to a block input


1. In Function Block Editor, in the diagram window, click the output of the block.
In this example, click the output of the PIDA block.

2. Drag the pointer to the input of the block you want to connect to. In this
example, drag the pointer to upper input of the MAX block.

Tip
When it is necessary to change position or direction of the
connection line, you can fixate the current segment by clicking once.
You can repeat this fixation as many times as needed.

3. Click the input to finish the connection.

For this example, repeat the procedure to connect two other block outputs to
block inputs in the function block diagram window. Use the following settings:

Block Output Block Input

PVR block “MoaDprCmd” MAX block, lower input

MAX block Analog Multiplexer, analog input “1”

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


87
6 Modifying a Program Before Commissioning
6.4 Connecting a Block Output to a Block Input

Block Output Block Input

The Mixed Air Control function block program should now look like the following
figure.

Figure: Mixed Air Control function block program

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


88
6 Modifying a Program Before Commissioning
6.5 Adding a Comment

6.5 Adding a Comment


You add a comment to add a title to a function block program, explain the reason
for adding a certain function, or add information on the changes in a revised
function block program.
For more information, see the Function Block Editor Comments topic on WebHelp.
In this example, you add a comment to explain that the PVR block “MoaDprCmd”
together with the MAX block allow for a minimum position setting for the outdoor air
dampers.

To add a comment
1. In Function Block Editor, right-click in the diagram window at the position
where you want to add the comment. In this example, right-click in the
diagram window at position 142, 91 (below the PVR block “MoaDprCmd”).
2. On the NEW menu, click Comment.
3. Type the text you want to display in the comment. In this example, type
“Allows for minimum <press ENTER>damper position.”

4. Click Font.
Continued on next page

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


89
6 Modifying a Program Before Commissioning
6.5 Adding a Comment

5. Configure the font settings. In this example, keep the default font settings.
Font: Arial, Font style: Regular, Size: 8, Color: Black.

6. Click OK.
7. In the Edit comment dialog box, click OK.
8. Click outside the green rectangle that encloses the comment to clear the
selection.

The Mixed Air Control function block program should now look like the following
figure.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


90
6 Modifying a Program Before Commissioning
6.5 Adding a Comment

Figure: Mixed Air Control function block program

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


91
6 Modifying a Program Before Commissioning
6.6 Adding a Rectangle

6.6 Adding a Rectangle


You add a rectangle to make the function block diagram easy to understand, for
example, add a rectangle that encloses function blocks that perform a function
together.
In this example, you add a rectangle that encloses the MAX block and the PVR
block “MoaDprCmd” to clarify that these two blocks together provide the logic for a
minimum position setting for the outdoor air dampers.

To add a rectangle
1. In Function Block Editor, right-click in the diagram window at the position
where you want the rectangle to begin. In this example, right-click in the
diagram window at position 141, 57, according to the position indicator in the
lower right corner of the window.
2. On the NEW menu, click Rectangle.
3. Drag the pointer to where you want the rectangle to end. In this example,
drag the pointer to position 167, 98, so that the rectangle encloses the MAX
block, the PVR block “MoaDprCmd”, and the comment beneath the PVR
block.

4. Click where you want the rectangle to end. In this example, click at position
167, 98.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


92
6 Modifying a Program Before Commissioning
6.7 Saving a Function Block Program

6.7 Saving a Function Block Program


You save a function block program to make it available for reuse. The Save process
automatically processes the function block program data and creates a number of
subfolders in the System Tree pane.
In this example, you save the Mixed Air Control function block program.

To save a function block program


1. In Function Block Editor, on the File menu, click Save.
You can now use the function block program, with the blocks and the folders
automatically created in the database.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


93
7 Using Simulation to Test a
Program

Topics
Changing to Simulation Mode
Setting Digital Simulation Inputs
Setting Analog Simulation Inputs
Starting a Simulation
Changing to Edit Mode
7 Using Simulation to Test a Program

Our Example
In this chapter, you use simulation to test that the modified version of Mixed Air
Control program meets the requirements. The simulation focuses on testing the
new logic for minimum position (fresh air) setting for the dampers.
You change the Function Block Editor to run in Simulation mode, set the digital and
analog simulation inputs required, and start the simulation.
In our example, you observe how the new logic affects the output signals from the
PIDA and RO blocks when you simulate different values on the mixed air
temperature.
When you have verified that the modified program behaves as expected, you
change back to Edit mode.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


97
7 Using Simulation to Test a Program
7.1 Changing to Simulation Mode

7.1 Changing to Simulation Mode


You change from Edit mode to Simulation mode to test your function block
program.
For more information, see the Operation Modes topic on WebHelp.
In this example, you change to Simulation mode to test the modified version of the
Mixed Air Control function block program.

To change to simulation mode


1. In Function Block Editor, on the Options menu, click Simulate.

2. Adjust the size of the diagram window and the trend area by moving the
separation bar between the two panes. In this example, adjust the size of
the diagram window to display the full function block program.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


98
7 Using Simulation to Test a Program
7.2 Setting Digital Simulation Inputs

7.2 Setting Digital Simulation Inputs


You simulate the digital inputs of a function block program to ensure that the
function block program behaves as expected.
For more information, see the Simulation Mode topic on WebHelp.
In this example, you simulate the SaFanSts (Supply Air Fan Status) digital input.

To set digital simulation inputs


1. In Function Block Editor, in Simulation mode, in the left part of the diagram
window, click the button of the digital input block. In this example, click the
SaFanSts button to put the switch in the Closed (On) position.

The symbols on digital input buttons toggle between open and closed switches
when you click the buttons.

For this example, repeat the procedure to simulate the TmpLImtAlm digital input.
Click the TmpLImtAlm button to put the switch in Closed (On) position.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


99
7 Using Simulation to Test a Program
7.3 Setting Analog Simulation Inputs

7.3 Setting Analog Simulation Inputs


You simulate the analog inputs of a function block program to ensure that the
function block program behaves as expected.
For more information, see the Simulation Mode topic on WebHelp.
In this example, you simulate the MaTmp (Mixed Air Temperature) analog input.

To set analog simulation inputs


1. In Function Block Editor, in Simulation mode, in the left part of the diagram
window, click the button of the analog input block. In this example, click the
MaTmp button.

2. In the Value box, type the required value. In this example, type “12.5” °C
(“55” °F).

Note
• You have to enter values in the engineering unit defined for the
analog input block.

3. Press ENTER.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


100
7 Using Simulation to Test a Program
7.4 Starting a Simulation

7.4 Starting a Simulation


You start a simulation of a function block program to observe the changes in the
program.
For more information, see the Simulation Mode topic on WebHelp.
In this example, you start the simulation of the modified version of the Mixed Air
Control function block program.

To start a simulation
1. In Function Block Editor, in Simulation mode, on the Commands menu,
click Execute.
The simulation toggles between start and stop when you click Execute.

For this example, observe the output from the PIDA block and the output from the
RO block “DmprCmd” when MaTmp=12.5 °C (55 °F), SaFanSts=1 (Closed/On),
and TmpLImtAlm=1 (Closed/On). Repeat the simulation for different values on
MaTmp, by setting the analog input according to the following table, and observe
the PIDA output and the DmprCmd output.

Table: Simulating Different Values on MaTmp when SaFanSts=1 and


TmpLImtAlm=1

MaTmp Input PIDA Output DmprCmd Output

10 °C (50 °F)

10.5 °C (51 °F)

11 °C (52 °F)

11.5 °C (53 °F)

12 °C (54 °F)

12.5 °C (55 °F)

13 °C (56 °F)

13.5 °C (57 °F)

14 °C (58 °F)

14.5 °C (59 °F)

15 °C (60 °F)

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


101
7 Using Simulation to Test a Program
7.5 Changing to Edit Mode

7.5 Changing to Edit Mode


You change from Simulation mode to Edit mode to edit your function block
program.
For more information, see the Operation Modes topic on WebHelp.
In this example, you change to Edit mode to edit the Mixed Air Control function
block program.

To change to Edit mode


1. In Function Block Editor, on the Options menu, click Edit.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


102
8 Creating Bindings to I/O Points
and Programs

Topics
Binding Values Using a Binding Template
8 Creating Bindings to I/O Points and Programs

Our Example
In this chapter, you bind the inputs and outputs of the Mixed Air Control program to
I/O points and to other programs for the AHU 01 Application. You create the
bindings to establish data flow between the programs and I/O points. You use the
Bindings view in WorkStation for Projects to create the bindings.
In our example, you bind the analog input for mixed air temperature (MaTmp) to a
Temperature Input on the UI-8/AO-4 I/O module named “Position05:UI8AO4”. You
bind the analog output for damper commands (DmprCmd) to a Voltage Output on
the same I/O module.
Finally, you bind the two digital inputs (SaFanSts and TmpLImtAlm) to digital
outputs of two other programs, which provide the signals for supply air fan status
(static pressure) and temperature low limit alarm respectively.
To save engineering time, you use binding templates to create the required
bindings. You use a custom binding template named “IO Points” to create the
bindings to the I/O points, and you use the default name matching template to
create the bindings to the other programs.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


105
8 Creating Bindings to I/O Points and Programs
8.1 Binding Values Using a Binding Template

8.1 Binding Values Using a Binding


Template
You use binding templates to reduce engineering time when creating bindings.
Binding templates are defined and created for binding patterns that are frequently
reused.

Tip
• When creating bindings, follow the recommended general guidelines: create
bindings between Inputs and Outputs only and do not create bindings to
Public Signals.

For more information, see the Binding Templates topic on WebHelp.


In this example, you create bindings between the Mixed Air Control function block
program and I/O points in the I/O module “Position05:UI8AO4”. You use the
custom binding template “IO Points” to create the required bindings.

To bind values using a binding template


1. In WorkStation, in the System Tree pane, select the object that you want to
bind values to. In this example, select ...University X
ES1/Servers/CPlant AS/AHU 01 Application/Programs/Mixed Air
Control.
2. On the Actions menu, click Edit bindings.
Continued on next page

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


106
8 Creating Bindings to I/O Points and Programs
8.1 Binding Values Using a Binding Template

3. In the binding point browser, drag the object or folder to the binding template
that you want to apply. In this example, drag ...University X
ES1/Servers/CPlant AS/IO Bus to the IO Points custom binding
template.

4. Select the bindings that you want to create. In this example, keep all
bindings selected.

5. Click OK.
Continued on next page

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


107
8 Creating Bindings to I/O Points and Programs
8.1 Binding Values Using a Binding Template

6. Verify that all bindings are correctly bound. In this example, verify the
bindings against the table below.

7. On the File menu, click Save.

Tip
• To ensure data flow is occurring as intended, use the Watch pane to view
values and monitor changes.

Mixed Air Control Program Bindings to I/O Points

Table: Results Verification – Mixed Air Control Program Bindings to I/O Points

Binding Point Binding

Input - MaTmp .../CPlant AS/IO


Bus/Position05:UI8AO4/MaTmp/Value

Output - DmprCmd .../CPlant AS/IO


Bus/Position05:UI8AO4/DmprCmd/Request
edValue

For this example, repeat the procedure to create the required bindings between the
Mixed Air Control program and other programs for the AHU 01 Application. Use the
following settings:

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


108
8 Creating Bindings to I/O Points and Programs
8.1 Binding Values Using a Binding Template

Mixed Air Control Program Bindings to Other Programs for the AHU 01
Application
Create the bindings for the ...University X ES1/Servers/CPlant AS/AHU 01
Application/Programs/Mixed Air Control program:
• Drag ...University X ES1/Servers/CPlant AS/AHU 01
Application/Programs to the Default name matching binding template.

Table: Results Verification – Mixed Air Control Program Bindings to Other


Programs for the AHU 01 Application

Binding Point Binding

Input - SaFanSts .../CPlant AS/AHU 01


Application/Programs/Fan/SaFanSts

Input - TmpLImtAlm .../CPlant AS/AHU 01


Application/Programs/Outdoor
Air/TmpLImtAlm

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


109
9 Modifying a Program After
Commissioning

Topics
Logging on to WorkStation as a Building Operation User
Deleting a Function Block
Exporting Function Block Program Code
Adding a Simple Block
Editing a Real Input Block
Editing a Binary Hysteresis Block
Adding an Expression Block
Connecting a Block Output to a Block Input
Creating a Node on a Connection Line
Adding a Comment
Adding a Rectangle
9 Modifying a Program After Commissioning

Our Example
In this chapter, you modify the Mixed Air Control program to meet the following
additional requirement:
• If the outdoor air temperature rises to 15 °C (60 °F), the outdoor air dampers
shall be set to minimum position (25%). Outdoor air shall not be used again for
cooling until the outdoor air temperature drops to 13.5 °C (57 °F).
You log on to WorkStation to modify the program on site. As the program has been
commissioned, you do not want the new version of the program to impact on the
AHU, until the program has been successfully tested and the required bindings are
in place. Otherwise, there is a risk that preliminary changes affect the air dampers in
an uncontrolled way. You must therefore avoid saving the program during the
design phase. To save a copy of your latest (unsaved) changes, you continuously
export the program code to an .aut file instead.
You use Function Block Editor to modify the program to allow for the outdoor air
temperature to affect the PIDA controller's mode of operation. You first delete the
Real Constant operator to the left of the Mod input on PIDA block. You then replace
the deleted operator with new logic, consisting of an RI (Real Input) block, a HYST
(Binary Hysteresis) block, and an XPI (Integer Expression) block. You edit the RI
block to specify a unique name. You edit the HYST block to configure the threshold
values for activation (15 °C (60 °F)) and deactivation (13.5 °C (57 °F)). When you
add the XPI block, you enter a logical expression, which is used to calculate the
required output signal based on the value of the input signals.
You draw connection lines that connect the new function blocks to each other and
to the Mod input on PIDA block. Additionally, you create a node on the connection
line at the output of the AND block, in order to connect the output signal also to the
“b” input on the XPI block.
Finally, you add a comment to explain the new logic. You also add a rectangle
around the new function blocks to mark that the blocks belong together.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


113
9 Modifying a Program After Commissioning
9.1 Logging on to WorkStation as a Building Operation User

9.1 Logging on to WorkStation as a Building


Operation User
You log on to WorkStation to securely access the functions in Building Operation.

Important
Ensure that you have a working and available WorkStation license. A working
license is required to log on to WorkStation. For more information, see the
Licenses topic on WebHelp.

For more information, see the Log on to WorkStation or WebStation topic on


WebHelp.
In this example, you log on to WorkStation using the default administrator account.

To log on to WorkStation as a Building Operation user


1. In the Building Operation WorkStation window, click Other user.
2. In the User name box, type the user name. In this example, type “admin.”

3. In the Password box, type the password. In this example, type “admin.”
Continued on next page

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


114
9 Modifying a Program After Commissioning
9.1 Logging on to WorkStation as a Building Operation User

4. In the Server box, select the hypertext transfer protocol you want to use and
then enter a server name or an IP address. In this example, click HTTPS
and then enter localhost.
5. Select Remember me to have WorkStation remember your settings.
6. Click Log on.
7. You can register the system now or later:
• Click Register now to register your system. For more information, see
the System Registration Overview topic on WebHelp.
• Click Register later to skip registration and register at a later time.
In this example, click Register later.

Continued on next page

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


115
9 Modifying a Program After Commissioning
9.1 Logging on to WorkStation as a Building Operation User

8. If the Select Default Workspace window is displayed, click the workspace


you want to have as the default. In this example, click Engineering.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


116
9 Modifying a Program After Commissioning
9.2 Deleting a Function Block

9.2 Deleting a Function Block


You can delete a function block that you no longer want in the function block
program.
In this example, you delete the Real Constant operator to the left of the Mod input
on the PIDA block.

To delete a function block


1. In Function Block Editor, in the diagram window, select the function block you
want to delete. In this example, select the Real Constant operator to the left
of the Mod input on the PIDA block.

2. On the Edit menu, click Delete.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


117
9 Modifying a Program After Commissioning
9.3 Exporting Function Block Program Code

9.3 Exporting Function Block Program Code


You export function block program code to an .aut file when you want to save a
copy of the program code, which can be imported into Function Block Editor and
reused for other function block programs.
For more information, see the Graphical Programming topic on WebHelp.
In this example, you export the Mixed Air Control function block program to save a
copy of the latest (unsaved) changes of the program code.

To export function block program code


1. In Function Block Editor, on the File menu, click Export.
2. In the File name box, type a path and file name for the export file. In this
example, type C:\Mixed Air Control.aut.
3. Click Save.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


118
9 Modifying a Program After Commissioning
9.4 Adding a Simple Block

9.4 Adding a Simple Block


You create a program by adding simple blocks, operators, and expression blocks.
For more information, see the Simple Blocks topic on WebHelp.
In this example, you add an RI (Real Input) block in the diagram window for the
Mixed Air Control function block program.

To add a simple block


1. In Function Block Editor, right-click in the diagram window at the position
where you want to add the simple block. In this example, right-click in the
diagram window at position 8, 23, according to the position indicator in the
lower right corner of the window.
2. On the NEW menu, click Simple Block.
3. In the block type list, select the type of simple block you want to add. In this
example, select RI (Real Input).

4. Click OK.
5. Click outside the green rectangle that encloses the block to clear the
selection.

For this example, repeat the procedure to add an additional simple block in the
function block diagram window. Use the following settings:

Table: Simple Block – HYST

Component Setting

Position 41, 21

Simple Block HYST (Binary Hysteresis)

Export the Mixed Air Control function block program to save a copy of the latest
(unsaved) changes. For more information, see section 9.3 “Exporting Function
Block Program Code” on page 118.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


119
9 Modifying a Program After Commissioning
9.4 Adding a Simple Block

The Mixed Air Control function block program should now look like the following
figure.

Figure: Mixed Air Control function block program

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


120
9 Modifying a Program After Commissioning
9.5 Editing a Real Input Block

9.5 Editing a Real Input Block


You edit a Real Input (RI) block to change the name, description, engineering unit,
and filter time constant for the block.
For more information, see the Simple Blocks topic on WebHelp.
In this example, you edit the RI block that you previously added in the diagram
window for the Mixed Air Control function block program.

To edit a Real Input block


1. In Function Block Editor, in the diagram window, right-click the Real Input (RI)
block you want to edit. In this example, right-click the RI block at position 8,
23 in the diagram window.
2. On the BLOCK menu, click Edit.
3. In the Identifier box, type a name for the block. In this example, type
“OATmp.”

4. In the Unit box, enter the required engineering unit for the output. In this
example, enter °C (°F).
5. In the Description box, type a description for the block. In this example,
type “Outdoor Air Temperature”
6. Click OK.

For this example, export the Mixed Air Control function block program to save a
copy of the latest (unsaved) changes. For more information, see section 9.3
“Exporting Function Block Program Code” on page 118.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


121
9 Modifying a Program After Commissioning
9.6 Editing a Binary Hysteresis Block

9.6 Editing a Binary Hysteresis Block


You edit a Binary Hysteresis (HYST) block to change the name, description,
engineering unit, activation and deactivation values, and other settings for the block.
For more information, see the Simple Blocks topic on WebHelp.
In this example, you edit the HYST block that you previously added in the diagram
window for the Mixed Air Control function block program.

To edit a Binary Hysteresis block


1. In Function Block Editor, in the diagram window, right-click the Binary
Hysteresis (HYST) block you want to edit. In this example, right-click the
HYST block at position 41, 21 in the diagram window.
2. On the BLOCK menu, click Edit.
3. In the Unit box, enter the required engineering unit for the output. In this
example, enter °C (°F).
4. In the Activate box, type a threshold value of the input signal for activation of
the output. In this example, type “15” °C (“60” °F).
5. In the Deactivate box, type a threshold value of the input signal for
deactivation of the output. In this example, type “13.5” °C (“57” °F).

6. Click OK.

For this example, export the Mixed Air Control function block program to save a
copy of the latest (unsaved) changes. For more information, see section 9.3
“Exporting Function Block Program Code” on page 118.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


122
9 Modifying a Program After Commissioning
9.7 Adding an Expression Block

9.7 Adding an Expression Block


You create a program by adding simple blocks, operators, and expression blocks.
For more information, see the Expression Blocks topic on WebHelp.
In this example, you add an XPI (Integer Expression) block in the diagram window
for the Mixed Air Control function block program.

To add an expression block


1. In Function Block Editor, right-click in the diagram window at the position
where you want to add the expression block. In this example, right-click in
the diagram window at position 77, 26, according to the position indicator in
the lower right corner of the window.
2. On the NEW menu, click Expression.
3. Click the type of expression you want for the output: Real, Integer, or
Binary. In this example, click Integer.
4. In the Expression box, type the expression you want to use to calculate the
output. In this example, type “a|!b?3:1”.

5. Click OK.
6. Click outside the green rectangle that encloses the block to clear the
selection.

For this example, export the Mixed Air Control function block program to save a
copy of the latest (unsaved) changes. For more information, see section 9.3
“Exporting Function Block Program Code” on page 118.
The Mixed Air Control function block program should now look like the following
figure.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


123
9 Modifying a Program After Commissioning
9.7 Adding an Expression Block

Figure: Mixed Air Control function block program

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


124
9 Modifying a Program After Commissioning
9.8 Connecting a Block Output to a Block Input

9.8 Connecting a Block Output to a Block


Input
You draw a connection line to connect the output of one function block to the input
of another function block in the diagram window.
For more information, see the Connections topic on WebHelp.
In this example, you connect the output of the RI block “OATmp” to the input of the
HYST block in the diagram window for the Mixed Air Control function block
program.

To connect a block output to a block input


1. In Function Block Editor, in the diagram window, click the output of the block.
In this example, click the output of the RI block “OATmp”.

2. Drag the pointer to the input of the block you want to connect to. In this
example, drag the pointer to the input of the HYST block.

Tip
When it is necessary to change position or direction of the
connection line, you can fixate the current segment by clicking once.
You can repeat this fixation as many times as needed.

3. Click the input to finish the connection.

For this example, repeat the procedure to connect two other block outputs to
block inputs in the function block diagram window. Use the following settings:

Block Output Block Input Comment

HYST block XPI block, “a” input

XPI block PIDA block, Mod input Fixate the connection line at
the following positions: 119,
32 and 119, 67

Export the Mixed Air Control function block program to save a copy of the latest
(unsaved) changes. For more information, see section 9.3 “Exporting Function
Block Program Code” on page 118.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


125
9 Modifying a Program After Commissioning
9.8 Connecting a Block Output to a Block Input

The Mixed Air Control function block program should now look like the following
figure.

Figure: Mixed Air Control function block program

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


126
9 Modifying a Program After Commissioning
9.9 Creating a Node on a Connection Line

9.9 Creating a Node on a Connection Line


You create a node on a connection line to connect the signal to an additional
function block in the diagram window.
For more information, see the Connections topic on WebHelp.
In this example, you create a node on the connection line between the AND block
and the Analog Multiplexer binary input to connect the signal to the “b” input on the
XPI block.

To create a node on a connection line


1. In Function Block Editor, in the diagram window, right-click the connection line
at a point where you want to create a node. In this example, right-click the
connection line between the AND block and the Analog Multiplexer binary
input at position 59, 52.

2. On the CONNECTION menu, click Create Node.


3. Click where you want to finish the connection. In this example, click once at
position 59, 35 and then click the “b” input on the XPI block to finish the
connection.

Tip
When it is necessary to change position or direction of the
connection line, you can fixate the current segment by clicking once.
You can repeat this fixation as many times as needed.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


127
9 Modifying a Program After Commissioning
9.9 Creating a Node on a Connection Line

A node shaped as a filled, black circle is created on the connection line at the point
where you right-clicked.

For this example, export the Mixed Air Control function block program to save a
copy of the latest (unsaved) changes. For more information, see section 9.3
“Exporting Function Block Program Code” on page 118.
The Mixed Air Control function block program should now look like the following
figure.

Figure: Mixed Air Control function block program

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


128
9 Modifying a Program After Commissioning
9.10 Adding a Comment

9.10 Adding a Comment


You add a comment to add a title to a function block program, explain the reason
for adding a certain function, or add information on the changes in a revised
function block program.
For more information, see the Function Block Editor Comments topic on WebHelp.
In this example, you add a comment to explain the function of the HYST block and
the XPI block.

To add a comment
1. In Function Block Editor, right-click in the diagram window at the position
where you want to add the comment. In this example, right-click in the
diagram window at position 95, 13 (diagonally to the right above the XPI
block).
2. On the NEW menu, click Comment.
3. Type the text you want to display in the comment. In this example, type
“When OATmp rises to the activate value OR <press ENTER>no static
pressure is sensed OR there is a low limit alarm, <press ENTER>set the PIDA
output to UMin. <press ENTER>When OATmp drops to the deactivate value
AND <press ENTER>static pressure is sensed AND low limit is normal, <press
ENTER>allow normal PIDA output.”

4. Click Font.
Continued on next page

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


129
9 Modifying a Program After Commissioning
9.10 Adding a Comment

5. Configure the font settings. In this example, keep the default font settings.
Font: Arial, Font style: Regular, Size: 8, Color: Black.

6. Click OK.
7. In the Edit comment dialog box, click OK.
8. Click outside the green rectangle that encloses the comment to clear the
selection.

For this example, export the Mixed Air Control function block program to save a
copy of the latest (unsaved) changes. For more information, see section 9.3
“Exporting Function Block Program Code” on page 118.
The Mixed Air Control function block program should now look like the following
figure.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


130
9 Modifying a Program After Commissioning
9.10 Adding a Comment

Figure: Mixed Air Control function block program

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


131
9 Modifying a Program After Commissioning
9.11 Adding a Rectangle

9.11 Adding a Rectangle


You add a rectangle to make the function block diagram easy to understand, for
example, add a rectangle that encloses function blocks that perform a function
together.
In this example, you add a rectangle that encloses the HYST block and the XPI
block to clarify that these blocks together provide the logic for selection of the PIDA
controller operating mode.

To add a rectangle
1. In Function Block Editor, right-click in the diagram window at the position
where you want the rectangle to begin. In this example, right-click in the
diagram window at position 32, 12, according to the position indicator in the
lower right corner of the window.
2. On the NEW menu, click Rectangle.
3. Drag the pointer to where you want the rectangle to end. In this example,
drag the pointer to position 153, 40, so that the rectangle encloses the HYST
block, the XPI block, and the comment above the XPI block.

4. Click where you want the rectangle to end. In this example, click at position
153, 40.

For this example, export the Mixed Air Control function block program to save a
copy of the latest (unsaved) changes. For more information, see section 9.3
“Exporting Function Block Program Code” on page 118.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


132
10 Using Simulation to Test a
Program

Topics
Changing to Simulation Mode
Setting Digital Simulation Inputs
Setting Analog Simulation Inputs
Starting a Simulation
Changing to Edit Mode
10 Using Simulation to Test a Program

Our Example
In this chapter, you use simulation to test that your latest changes of the Mixed Air
Control program meet the requirements. The simulation focuses on testing the new
logic, which allows for the outdoor air temperature to affect the PIDA controller's
mode of operation.
You change the Function Block Editor to run in Simulation mode, set the digital and
analog simulation inputs required, and start the simulation.
In our example, you observe how the new logic affects the output signals from the
XPI, PIDA, and RO blocks when you simulate different values on the mixed air
temperature and the outdoor air temperature. You also simulate different values on
the supply air fan status (static pressure) and the temperature low limit alarm.
When you have verified that the modified program behaves as expected, you
change back to Edit mode.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


135
10 Using Simulation to Test a Program
10.1 Changing to Simulation Mode

10.1 Changing to Simulation Mode


You change from Edit mode to Simulation mode to test your function block
program.
For more information, see the Operation Modes topic on WebHelp.
In this example, you change to Simulation mode to test the latest changes of the
Mixed Air Control function block program.

To change to simulation mode


1. In Function Block Editor, on the Options menu, click Simulate.

2. Adjust the size of the diagram window and the trend area by moving the
separation bar between the two panes. In this example, adjust the size of
the diagram window to display the full function block program.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


136
10 Using Simulation to Test a Program
10.2 Setting Digital Simulation Inputs

10.2 Setting Digital Simulation Inputs


You simulate the digital inputs of a function block program to ensure that the
function block program behaves as expected.
For more information, see the Simulation Mode topic on WebHelp.
In this example, you simulate the SaFanSts (Supply Air Fan Status) digital input.

To set digital simulation inputs


1. In Function Block Editor, in Simulation mode, in the left part of the diagram
window, click the button of the digital input block. In this example, click the
SaFanSts button to put the switch in the Closed (On) position.

The symbols on digital input buttons toggle between open and closed switches
when you click the buttons.

For this example, repeat the procedure to simulate the TmpLImtAlm digital input.
Click the TmpLImtAlm button to put the switch in Closed (On) position.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


137
10 Using Simulation to Test a Program
10.3 Setting Analog Simulation Inputs

10.3 Setting Analog Simulation Inputs


You simulate the analog inputs of a function block program to ensure that the
function block program behaves as expected.
For more information, see the Simulation Mode topic on WebHelp.
In this example, you simulate the MaTmp (Mixed Air Temperature) analog input.

To set analog simulation inputs


1. In Function Block Editor, in Simulation mode, in the left part of the diagram
window, click the button of the analog input block. In this example, click the
MaTmp button.

2. In the Value box, type the required value. In this example, type “12.5” °C
(“55” °F).

Note
• You have to enter values in the engineering unit defined for the
analog input block.

3. Press ENTER.

For this example, repeat the procedure to simulate the OATmp (Outdoor Air
Temperature) analog input. Use the following settings:

Component Setting

Button OATmp

Value 2 °C (35 °F)

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


138
10 Using Simulation to Test a Program
10.4 Starting a Simulation

10.4 Starting a Simulation


You start a simulation of a function block program to observe the changes in the
program.
For more information, see the Simulation Mode topic on WebHelp.
In this example, you start the simulation of the latest version of the Mixed Air Control
function block program.

To start a simulation
1. In Function Block Editor, in Simulation mode, on the Commands menu,
click Execute.
The simulation toggles between start and stop when you click Execute.

For this example, observe the output from the XPI block, PIDA block, and RO block
“DmprCmd” when MaTmp=12.5 °C (55 °F), OATmp=2 °C (35 °F), SaFanSts=1
(Closed/On), and TmpLImtAlm=1 (Closed/On).
Repeat the simulation for different values on MaTmp and OATmp, by setting the
analog inputs according to the following table, and observe the XPI output, PIDA
output, and DmprCmd output.

Table: Simulating Different Values on MaTmp and OATmp when SaFanSts=1 and
TmpLImtAlm=1

MaTmp Input OATmp Input XPI Output PIDA Output DmprCmd


Output

12.5 °C (55 °F) 7 °C (45 °F)

13 °C (56 °F) 7 °C (45 °F)

13 °C (56 °F) 16 °C (66 °F)

Repeat the simulation for MaTmp=13 °C (56 °F) and OATmp=16 °C (66 °F) with
different values on SaFanSts and TmpLImtAlm, by setting the digital inputs
according to the following table, and observe the XPI Output, PIDA output, and
DmprCmd output.

Table: Simulating Different Values on SaFanSts and TmpLImtAlm when MaTmp=13


°C (56 °F) and OATmp=16 °C (66 °F)

SaFanSts TmpLImtAlm XPI Output PIDA Output DmprCmd


Input Input Output

0 (Open/Off) 1 (Closed/On)

1 (Closed/On) 0 (Open/Off)

0 (Open/Off) 0 (Open/Off)

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


139
10 Using Simulation to Test a Program
10.5 Changing to Edit Mode

10.5 Changing to Edit Mode


You change from Simulation mode to Edit mode to edit your function block
program.
For more information, see the Operation Modes topic on WebHelp.
In this example, you change to Edit mode to save the latest version of the Mixed Air
Control function block program.

To change to Edit mode


1. In Function Block Editor, on the Options menu, click Edit.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


140
11 Commissioning a Modified
Program

Topics
Forcing a Value
Saving a Function Block Program
Binding Values Using a Binding Template
Releasing a Forced Value
Summary
11 Commissioning a Modified Program

Our Example
In this chapter, you commission your third version of the Mixed Air Control function
block program.
You first force the value for the I/O point, which provides the damper command
signal to the outdoor air and return air dampers. This measure prevents the air
dampers from ending up in an uncontrolled state. You use WorkStation for forcing
and releasing forced values.
When you have ensured that the dampers will keep their current position, you use
Function Block Editor to save the program. When the program is saved to the
Building Operation database, the program starts running in the Automation Server.
Another program for the AHU 01 Application provides the outdoor air temperature.
So you bind the analog input for outdoor air temperature (OATmp) to the output of
the other program. To save engineering time, you use the default name matching
template to create the binding.
Finally, you release the forced value on the I/O point. The program will then resume
control of the outdoor air and return air dampers.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


143
11 Commissioning a Modified Program
11.1 Forcing a Value

11.1 Forcing a Value


You force a value when you want to override a value, such as a value from a device.
For more information, see the Forced Values topic on WebHelp.
In this example, you force the requested value of the I/O point “DmprCmd” to make
the output point keep its current value. The I/O point is located on the I/O module
“Position05:UI8AO4”.

To force a value
1. In WorkStation, in the System Tree pane, select the value you want to force.
In this example, select ...University X ES1/Servers/CPlant AS/IO
Bus/Position05:UI8AO4/DmprCmd.
2. On the File menu, click Properties.
3. Click Force.
4. Click OK.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


144
11 Commissioning a Modified Program
11.2 Saving a Function Block Program

11.2 Saving a Function Block Program


You save a function block program to make it available for reuse. The Save process
automatically processes the function block program data and creates a number of
subfolders in the System Tree pane.
In this example, you save the Mixed Air Control function block program.

To save a function block program


1. In Function Block Editor, on the File menu, click Save.
You can now use the function block program, with the blocks and the folders
automatically created in the database.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


145
11 Commissioning a Modified Program
11.3 Binding Values Using a Binding Template

11.3 Binding Values Using a Binding


Template
You use binding templates to reduce engineering time when creating bindings.
Binding templates are defined and created for binding patterns that are frequently
reused.

Tip
• When creating bindings, follow the recommended general guidelines: create
bindings between Inputs and Outputs only and do not create bindings to
Public Signals.

For more information, see the Binding Templates topic on WebHelp.


In this example, you create bindings between the latest version of the Mixed Air
Control function block program and other programs for the AHU 01 Application.
You use the binding template “Default name matching” to create the required
bindings.

To bind values using a binding template


1. In WorkStation, in the System Tree pane, select the object that you want to
bind values to. In this example, select ...University X
ES1/Servers/CPlant AS/AHU 01 Application/Programs/Mixed Air
Control.
2. On the Actions menu, click Edit bindings.
Continued on next page

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


146
11 Commissioning a Modified Program
11.3 Binding Values Using a Binding Template

3. In the binding point browser, drag the object or folder to the binding template
that you want to apply. In this example, drag ...University X
ES1/Servers/CPlant AS/AHU 01 Application/Programs to the
Default name matching binding template.

4. Select the bindings that you want to create. In this example, select OATmp
and clear the other check boxes.

5. Click OK.
Continued on next page

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


147
11 Commissioning a Modified Program
11.3 Binding Values Using a Binding Template

6. Verify that all bindings are correctly bound. In this example, verify the
bindings against the table below.

7. On the File menu, click Save.

Tip
• To ensure data flow is occurring as intended, use the Watch pane to view
values and monitor changes.

Mixed Air Control Program Bindings to Other Programs for the AHU 01
Application

Table: Results Verification – Mixed Air Control Program Bindings to Other


Programs for the AHU 01 Application

Binding Point Binding

Input - OATmp .../CPlant AS/AHU 01


Application/Programs/Outdoor Air/OATmp

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


148
11 Commissioning a Modified Program
11.4 Releasing a Forced Value

11.4 Releasing a Forced Value


You release a forced value to return to its normal status.
For more information, see the Forced Values topic on WebHelp.
In this example, you release the forced value of the I/O point “DmprCmd”, which is
located on the I/O module “Position05:UI8AO4”.

To release a forced value


1. In WorkStation, in the System Tree pane, select the forced value you want to
release. In this example, select ...University X ES1/Servers/CPlant
AS/IO Bus/Position05:UI8AO4/DmprCmd.
2. On the File menu, click Properties.
3. Click Unforce.
4. Click OK.

04-15034-01-en, July 2014 Creating and Configuring a Function Block Program


149
11 Commissioning a Modified Program
11.5 Summary

11.5 Summary
You have now created and configured a function block program called Mixed Air
Control, which is used to control the AHU. The new program enables the university
to use cool outdoor air, under certain conditions, for free cooling of indoor spaces in
the School of Business. You created a first version of the program to meet some
initial requirements. You created the program off site using WorkStation for
Projects. You then modified the program two times, before and after deployment
and commissioning, in order to meet additional requirements. You modified the
program on site the second time.
You used WorkStation for Projects to create an empty function block program in
the Automation Server. You then used Function Block Editor to build the program
by putting together a set of functions blocks, such as simple blocks, operators, and
expression blocks. You also edited some function blocks. You connected the
function blocks by drawing connection lines from the output of one block to the
input of another block. You created nodes on connection lines when you needed to
connect an output signal to an additional input. Additionally, you added comments
and rectangles to make the function block diagram easy to understand. Finally, you
saved the program to the project database.
You used Simulation mode in Function Block Editor to test and troubleshoot the
function block program. After you completed the simulation of the second version
of the program, you bound the inputs and outputs of the program to I/O points and
to other programs. You created the bindings to establish data flow to and from the
program.
You developed the first two versions of the function block program off site, using
the same workflow. When you developed the third version on site, you had to take
into consideration that the second version had been commissioned. To save (a
copy of) the program, you therefore regularly exported the program code to an .aut
file instead. To commission the third version of the program, you first forced an I/O
point, saved the program, created the required bindings, and finally you released
the forced I/O point.

Creating and Configuring a Function Block Program 04-15034-01-en, July 2014


150
Schneider Electric | Buildings Division
www.schneider-electric.com/buildings

© 2014 Schneider Electric. All rights reserved.

04-15034-01-en
July 2014

You might also like