Professional Documents
Culture Documents
TABLE OF CONTENTS
Chapter 10 - 1
T314-10 Function Block Diagram - RevC
10.1.1 Objectives
On completion of this chapter you will be able to:
• Configure simple application code in FBD
• Use I/O's in application code by connecting variables
• Modify application parameters online
• Organize code in different code blocks and pages
10.1.2 Legend
> Indicates when you go from one menu to a sub-menu
Italic Indicates object and file names
“ “ Indicates dialog box buttons, tabs, menus etc.
Bold Indicates important topics
Indicates start/explanation of student activity
Chapter 10 - 2
System 800xA Training
Chapter 10 - 3
T314-10 Function Block Diagram - RevC
Boolean Operators
Function Description
NOT Negates the Boolean value (1/0, on/off or True/False)
AND, & Boolean AND
XOR, =2k+1 Boolean XOR
OR, >=1 Boolean OR
Arithmetic Operators
Function Description
EXPT, ** Exponential, i.e. raising to the power
MUL, * Multiplication
DIV, / Division
ADD, + Addition
SUB, - Subtraction
MOD Modulus
ABS Absolute value
Relational Operators
Function Description
LT, < Less than
GT, > Greater than
LE, <= Less than or equal to
GE, >= Greater than or equal to
EQ, = Equal to
NE, <> Not equal to
Chapter 10 - 4
System 800xA Training
Chapter 10 - 5
T314-10 Function Block Diagram - RevC
Chapter 10 - 6
System 800xA Training
It is also possible to use the Browse button to get an explorer-like overview of all
libraries and applications and their functions / function blocks. If you want to choose
from a list of previously used function block types, use the “Local FB Declarations”
button.
Connect Parameters
If it is a function/function block that supports configurable input parameters, these
inputs can be specified in the dialog window.
To go straight to the Connection dialog window, check “Connect Parameters”.
The “EN” checkbox makes the optional Enable parameter available (this is explained
in the next section).
Chapter 10 - 7
T314-10 Function Block Diagram - RevC
The EN parameter can be turned on/off when inserting a new function or function
block (see Insert Function/Function Block dialog section), or when editing the
parameter properties (see below).
Chapter 10 - 8
System 800xA Training
Fill in the “To” field with a constant value or a variable name. To display a list of all
available variables, press Ctrl+J.
NOTE! If you want to connect an OUT parameter to several
variables, separate the names with ‘,’ (comma).
For example: Start1, Start2
Press “OK” to close the dialog window or “Apply/Next” to apply the connection and
go the next parameter.
The “Direction” setting together with the value in the “Next:” drop-down list
determine what will happen when the “Next” button is pressed. In the example in the
figure pressing “Apply/Next” will move the selection forward to the next unconnected
parameter.
If the user enters a name that is not recognized by the system (i.e. not declared) and
presses “OK” or “Apply/Next”, the system will ask the user if the unknown name
should be declared by the system.
Chapter 10 - 9
T314-10 Function Block Diagram - RevC
Fill in the name of the variable in the actual “Parameter” field. Use the button to
get a tree-like overview of the POU and its variables.
Chapter 10 - 10
System 800xA Training
Signal Inverted
Chapter 10 - 11
T314-10 Function Block Diagram - RevC
The structure pane consists of the following sizable and movable columns:
• Item shows the type name of the function block or function with their properties
in parentheses
• Comment shows the comment attached to the function block or function
• Page Comment shows the comment on the top of the corresponding Function
Block Diagram page
• Page No is given at the first function block or function of every page of the
Function Block Diagram
• Instance shows the name of function blocks
Chapter 10 - 12
System 800xA Training
By using the online editors the code currently running in the controller(s) can be
inspected. Variable values and parameters can be changed.
Chapter 10 - 13
T314-10 Function Block Diagram - RevC
Chapter 10 - 14
System 800xA Training
Search For:
Enter the text to search for. Search options (see below) can be selected for the entered
text. An empty text or an asterisk (*) character in the text field search for all texts. All
texts are case-insensitive, that is, a search for the texts "my", "My", "mY" and "MY"
gives the same search results.
Search In:
The selection in the drop-down list specifies the scope of the search. By default it
searches in the POU where you started the search.
Chapter 10 - 15
T314-10 Function Block Diagram - RevC
If you want to change the default layout when inserting new FBD code blocks, go to
“Tools > Setup” and select the “FBD/LD” tab.
Chapter 10 - 16
System 800xA Training
Chapter 10 - 17
T314-10 Function Block Diagram - RevC
If you have right clicked near to an output pin, use the “Go To Sink” command to
navigate to the parameter(s) to which the selected parameter is assigned.
In case of multiple sinks browse with the "<-" and "->" buttons in the Go To Sink
dialog box.
Chapter 10 - 18