0% found this document useful (0 votes)
115 views17 pages

Bloques Diagram

This document chapter provides an overview of function block diagrams (FBD) in the System 800xA training. It describes the FBD editor interface and components, execution rules for FBDs, common functions available in FBDs, and how to insert functions and function blocks into an FBD. The chapter also covers editing parameter properties, making connections between functions, inverting connections, adding comments, changing values online, search tools, and using multiple pages in FBDs.

Uploaded by

anon_509967621
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
115 views17 pages

Bloques Diagram

This document chapter provides an overview of function block diagrams (FBD) in the System 800xA training. It describes the FBD editor interface and components, execution rules for FBDs, common functions available in FBDs, and how to insert functions and function blocks into an FBD. The chapter also covers editing parameter properties, making connections between functions, inverting connections, adding comments, changing values online, search tools, and using multiple pages in FBDs.

Uploaded by

anon_509967621
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 17

System 800xA Training

Chapter 9 Diagrams-Function Block Diagram

TABLE OF CONTENTS

Chapter 9 Diagrams-Function Block Diagram..............................................................................1


9.1 General Information..................................................................................................................2
9.1.1 Objectives............................................................................................................................2
9.1.2 Legend..................................................................................................................................2
9.1.3 Reference Documentation.............................................................................................2
9.2 FBD Editor.....................................................................................................................................3
9.2.1 Execution Rules.................................................................................................................3
9.2.2 Functions in FBD...............................................................................................................3
9.2.3 FBD Pane..............................................................................................................................5
9.2.4 Inserting a Function / Function Block........................................................................6
9.2.5 EN Input Parameter..........................................................................................................7
9.2.6 Editing Parameter Properties.......................................................................................7
9.2.7 Making Connections........................................................................................................8
9.2.8 Inverting Connections...................................................................................................10
9.2.9 Adding Comments..........................................................................................................11
9.3 Changing Values Online.........................................................................................................12
9.4 Find and Search Tools.............................................................................................................13
9.4.1 Searching for Variables in Projects...........................................................................13
9.4.2 Navigating to References............................................................................................14
9.5 Use of Multiple Pages in FBD...............................................................................................15
9.5.1 Page Setup........................................................................................................................15
9.5.2 Insert Page Break............................................................................................................16
9.5.3 Page References..............................................................................................................16

Diagrams-Function Block Diagram- 1


447964401.doc

9.1 General Information

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

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

9.1.3 Reference Documentation

3BSE035980 System 800xA Control

AC 800M Configuration

3BSE043732 System 800xA Control

AC 800M Planning

3BSE035981 System 800xA Control

AC 800M Binary and Analog Handling

Diagrams-Function Block Diagram- 2


System 800xA Training

9.2 FBD Editor

Function Block Diagram (FBD) is a high-level graphical programming


language. It describes the POUs in terms of processing elements and
displays the signal flow between them, similar to electronic circuit
diagrams.

It represents the function block and functions by graphical symbols


(boxes), their input and output parameters by pins of the boxes and the
assignment of parameters by lines between the pins. A comprehensive
basic range of function blocks and functions are available.

The FBD editor consists of the following major parts:

Declaration Pane

Code Pane

9.2.1 Execution Rules

The execution order of function blocks and functions is defined at first


by the order of their creation. The execution order is represented by
the order of the graphic symbols (boxes) in FBD "from the left to the
right" and "from the top to the bottom".

You can change the execution order later by moving the selected
function blocks and functions "up" or "down" within the structure pane.
Just drag-and-drop the function block within the code pane.

9.2.2 Functions in FBD

The following basic functions corresponding to operators of textual


programming languages are available in the FBD language:

Diagrams-Function Block Diagram- 3


447964401.doc

Assignments
Function Description
Move, := Assigns the value (number, logical or string) of the input
parameter to the output parameter.

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

Diagrams-Function Block Diagram- 4


System 800xA Training

9.2.3 FBD Pane

The FBD panes are the right upper and lower sub panes within the
code pane if you are working with the FBD editor. They contain the
function block diagram of the POU you are programming.

The FBD panes contain:

 Graphic symbols of function and function block (boxes)


 Instance names of the function blocks
 Comments attached to the function blocks and functions
 Assignment of parameters in form of connection lines between
the graphic symbols
 Comment of the page and footer

Use the FBD panes to:

 Inspect the function block diagram of the POU you are


programming
 Select, copy and paste functions and function blocks
 Create, modify and delete function blocks and functions
 Edit instance name of function blocks and edit comments
 Assign values to the parameters of function blocks and functions

Diagrams-Function Block Diagram- 5


447964401.doc

9.2.4 Inserting a Function / Function Block

There are several ways to insert a function/ function block;

1. Right click in code Pane.


2. Choose “New > Object” from the POU menu

New Object

In the dialog window a list of available functions and function block


types is presented in the drop-down list.

NOTE! Just type the first letters of the


function name to jump to that entry.

Properties

If it is a function/function block that supports configurable input


parameters, these inputs can be specified in the dialog window.

The “EN” checkbox makes the optional Enable parameter available


(this is explained in the next section).

Diagrams-Function Block Diagram- 6


System 800xA Training

9.2.5 EN Input Parameter

The EN property for functions and function blocks in FBD makes it


possible to write code that corresponds to “IF statements” in the
Structured Text language.

The EN parameter should be connected to a bool variable just as any


other bool parameter.

When the EN input is true, the function or function block will be


executed, otherwise not. When the EN input becomes false, all outputs
will keep their values from the previous cycle of execution.

NOTE! If a function has an EN input, it must


be connected.

The EN parameter can be turned on/off when inserting a new function


or function block (see Insert Function/Function Block dialog section).

9.2.6 Editing Parameter Properties

Some functions or function blocks supports configurable parameters.


For instance the number of inputs on an AND function can be modified.

By clicking with the right mouse button on a function (box) you will see
a menu.

Diagrams-Function Block Diagram- 7


447964401.doc

Selection the Enable “EN” parameter, if required.

Delete

Right click Select “Delete” to delete the function block.

Set Number of Extender Parameters

Right click Select “Set Number of Extender Parameters” For instance


the number of inputs on an AND.

9.2.7 Making Connections

If a parameter is to be connected to another parameter, one of them


must be an output parameter and the other one an input parameter.

NOTE! An output parameter can be


assigned to any number of input parameters
but never to another output parameter.

There are basically two ways of connecting the parameters (pins) of a


function or function block: Either you connect the parameters one-by-
one or you connect them all at once.

Connect each Parameter Separately

Right click on the parameter (pin) of the function block or function


(box) to which you want to assign a variable or a constant and select
“Connect…” from the context menu.

Diagrams-Function Block Diagram- 8


System 800xA Training

Fill in the “To” field with a constant value or a variable name.

Press “OK” to close the dialog window and apply the connection of the
parameter.

If the user enters a name that is not recognized by the system (i.e. not
declared) and presses “OK”, the system will ask the user if the
unknown name should be declared by the system.

Access to Variables with Structured Data Types

For instance: “gV1_Closed” is a AISData variable.

Connect All Parameters

To connect several of the parameters in one action, it is best to bring


up the Parameter Connections editor. Right click and select
“Connections”.

Diagrams-Function Block Diagram- 9


447964401.doc

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.

Connect from one Function Block to Another

To connect two parameters to each other, select one parameter (pin)


by clicking on it with the left mouse button. Press the Ctrl key while
clicking with the left mouse button on the other parameter (pin) that
you want to connect to.

NOTE! Be sure that you select one input


parameter and one output parameter.

Connect to a Previous Selection

To connect a parameter to another parameter, select the first


parameter by clicking on it with the left mouse button. Click on another
parameter (pin) that you want to connect to with the right mouse
button.

By this, you select the second parameter, though the selection of the
first one remains, and you open the context menu. Select “Connect to
Previous Selection” from the context menu to accomplish the
connection.

9.2.8 Inverting Connections

To invert inputs to a function or function block right click on the input


parameter, and select “Invert” from the menu.

Diagrams-Function Block Diagram- 10


System 800xA Training

A small circle (bubble) will appear on the inverted signals.

9.2.9 Adding Comments

It is possible to write comments to functions/function blocks and pages.

Edit Comments of Function Blocks and Functions

Select the function block or function to which you want to assign or


edit a comment. Select “Description” from the context menu and type
in your comment.

Edit Page Comments

If you want to add a comment for a page in FBD, just right click and
select “Pages” and selection “Page Description” from the context
menu.

Diagrams-Function Block Diagram- 11


447964401.doc

Diagrams-Function Block Diagram- 12


System 800xA Training

9.3 Changing Values Online

When a controller project is in online mode and test mode, it is possible


to inspect the code while running it, and interact with the code. From
the Project Explorer in online mode, you have access to editors similar
to those in offline mode.

You can open one or several new online editor windows from the
Project Explorer by double-clicking on the Diagram Organization Unit
you want to view.

By using the online editors the code currently running in the


controller(s) can be inspected. Variable values and parameters can be
changed.

 Exercise 9.1

Diagrams-Function Block Diagram- 13


447964401.doc

9.4 Find and Search Tools

The Find and Search tools provide fast access to text/variables in


Declaration pane, Code pane, Message pane or Project by clicking on
the following icons:

Toolbar Menu Key Description


button Command
Edit > Find… Ctrl + F Find text in the using Pane in the
POU editor and jump to the first
occurrence
Edit > Find Next F3 Jump to the next occurrence in
the using Pane
Edit > Find in Find all text in the using POU
Editor… editor and list results in Message
Pane. You can jump to the
occurrence by double clicking on
the result
Edit > Search… Alt + Powerful search tool. See next
F12 section

9.4.1 Searching for Variables in Projects

The Search and Navigation dialog can be accessed by clicking icon,


selecting it from the “Edit” menu, or by right-clicking on a Project
Explorer object (not Tasks) and select “Search…”

Diagrams-Function Block Diagram- 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.

9.4.2 Navigating to References

In the references pane you can double click on the blue texts. A POU
editor opens on the right code pane. If the code is written in for
instance FBD you will also be shown the right page of this code tab. On
the page you will have to look for the exact location. If necessary you
can do a “Find” to find it on the page.

Diagrams-Function Block Diagram- 15


447964401.doc

9.5 Use of Multiple Pages in FBD

9.5.1 Page Setup

It is possible to change the layout of the FBD pane by just right click
and selecting “Page” and selecting “Setting…”. The settings in this
page determine the page layout of the currently displayed code block.

The “Paper” setting determines the page size.

The “Orientation” setting determines the page orientation.

Diagrams-Function Block Diagram- 16


System 800xA Training

9.5.2 Insert Page Break

Select the function block or function to which you want to attach a


page break. Right click on it and select “Split Page” from the context
menu.

The FBD editor inserts the page break above this function block or
function and repaginates the Function Block Diagram code block.

9.5.3 Page References

Select a line that connects the pins of function blocks and functions.
Right click or double click to the variable that is assigned “Go To
Related Page Connector” command to navigate to the source of the
variable that is assigned to the selected parameter.

 Exercise 9.2

Diagrams-Function Block Diagram- 17

You might also like