Creating and Configuring A Function Block Program Tutorial Guide
Creating and Configuring A Function Block Program Tutorial Guide
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
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
Topics
Purpose of This Guide
How This Guide is Organized
Typographical Conventions
1 About This Guide
1.1 Purpose of This Guide
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.
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.
Topics
Where to Find Additional Information
Regulatory Notices
2 Additional Information
2.1 Where to Find Additional Information
UL 916 Listed products for the Unites States and Canada, Open
Class Energy Management Equipment.
Industry Canada
ICES-003
This is a Class B digital device that meets all requirements of the Canadian
Interference Causing Equipment Regulations.
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.
Note
The programs and files that are used for the fictional customer University X are
intended for training purposes only.
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.
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.
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.
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
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.
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.
4. In the Name box, type a name for the function block program. In this
example, type “Mixed Air Control.”
5. Click Create.
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.
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:
Component Setting
Position 8, 54
Component Setting
Component Setting
Position 8, 80
Component Setting
Position 16, 99
Component Setting
Position 186, 68
Component Setting
Position 121, 57
Component Setting
Position 44, 48
Component Setting
Component Setting
Position 81, 67
Component Setting
Position 82, 84
Component Setting
Position 101, 88
The Mixed Air Control function block program should now look like the following
figure.
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
Identifier TmpLImtAlm
Description Status
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.
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
6. Select Backup to have the current value of the output backed up. In this
example, select Backup.
7. Click OK.
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
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:
Component Setting
Position 81, 67
Identifier MaTmpGain
Unit NoUnit
Public Yes
Backup Yes
Component Setting
Position 82, 84
Identifier MaTmpIntegral
Unit s
Public Yes
Continued
Component Setting
Backup Yes
InitValue 0 (seconds)
Component Setting
Position 101, 88
Identifier Deadzone
Unit °C (°F)
Public Yes
Backup Yes
InitValue 0
6. Click OK.
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:
Component Setting
Position 105, 65
Component Setting
Position 105, 74
Continued
Component Setting
Component Setting
Position 159, 72
Component Setting
Position 98, 68
Operator Negate
The Mixed Air Control function block program should now look like the following
figure.
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:
Component Setting
Mode 2 Yes
Value 0
Component Setting
Component Setting
Mode 2 Yes
Value 0
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.
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:
PVR block “MaTmpSpt” PIDA block, SP input Fixate the connection line at
the following positions: 79,
105 and 79, 64
Continued
Block Output Block Input Comment
PVR block “MaTmpIntegral” PIDA block, Ti input Fixate the connection line at
the following positions: 100,
90 and 100, 73
PVR block “Deadzone” PIDA block, DZ input Fixate the connection line at
the following positions: 115,
94 and 115, 79
The Mixed Air Control function block program should now look like the following
figure.
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.
The Mixed Air Control function block program should now look like the following
figure.
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
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:
Component Setting
Font Arial
Size 8
Color Black
Component Setting
Component Setting
Font Arial
Size 14
Color Black
Component Setting
Font Arial
Size 10
Color Black
The Mixed Air Control function block program should now look like the following
figure.
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.
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.
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.
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.
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.
10 °C (50 °F)
11 °C (52 °F)
12 °C (54 °F)
13 °C (56 °F)
14 °C (58 °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.
0 (Open/Off) 1 (Closed/On)
1 (Closed/On) 0 (Open/Off)
0 (Open/Off) 0 (Open/Off)
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.
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.”
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:
Component Setting
Position 155, 58
The Mixed Air Control function block program should now look like the following
figure.
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
8. In the InitValue box, type the initial value of the output. In this example,
type “25.”
9. Click OK.
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.
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:
The Mixed Air Control function block program should now look like the following
figure.
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
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.
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.
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.
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.
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.
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.
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.
10 °C (50 °F)
11 °C (52 °F)
12 °C (54 °F)
13 °C (56 °F)
14 °C (58 °F)
15 °C (60 °F)
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.
Tip
• When creating bindings, follow the recommended general guidelines: create
bindings between Inputs and Outputs only and do not create bindings to
Public Signals.
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
6. Verify that all bindings are correctly bound. In this example, verify the
bindings against the table below.
Tip
• To ensure data flow is occurring as intended, use the Watch pane to view
values and monitor changes.
Table: Results Verification – Mixed Air Control Program Bindings to I/O Points
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:
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.
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.
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.
3. In the Password box, type the password. In this example, type “admin.”
Continued on next page
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.
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:
Component Setting
Position 41, 21
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.
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.
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.
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.
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.
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:
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.
The Mixed Air Control function block program should now look like the following
figure.
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.
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.
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
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.
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.
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.
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.
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.
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
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
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.
0 (Open/Off) 1 (Closed/On)
1 (Closed/On) 0 (Open/Off)
0 (Open/Off) 0 (Open/Off)
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.
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.
Tip
• When creating bindings, follow the recommended general guidelines: create
bindings between Inputs and Outputs only and do not create bindings to
Public Signals.
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
6. Verify that all bindings are correctly bound. In this example, verify the
bindings against the table below.
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
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.
04-15034-01-en
July 2014