Bodas Design
Bodas Design
Bodas Design
PLC Programming
with BODAS
A product of
Bosch Rexroth AG
Mobile Hydraulics
Mobile Elektronics
2002 / 03
Copyright ã 2001, 2002 by Bosch Rexroth AG Mobile Hydraulics Mobile
Electronics
All rights reserved.
We have gone to great lengths to ensure this documentation is correct and complete.
However, since it is not possible to produce an absolutely error-free text, please feel
free to send us your hints and suggestions for improving it.
Trademark
Intel is a registered trademark and 80286, 80386, 80486, Pentium are trademarks of
Intel Corporation.
Microsoft, MS and MS-DOS are registered trademarks, Windows is a trademark of
Microsoft Corporation.
Publisher
Bosch Rexroth AG
Mobile Hydraulics
Produktbereich Mobilelektronik
Glockeraustr. 2
D-89275 Elchingen
Tel. +49/ 7308/ 82 – 2284 or
Tel. +49/ 7308/ 82 – 2347
If you call not during office hours:
Tel. +49/ 172/7413877
E-Mail [email protected]
Version: 1.02
Stand: 27.03.2002
Content
Contents
1 A Brief Introduction to BODAS ______________________________________________________ 1-1
BODAS / 10 i
Content
ii BODAS / 10
Content
Warnings 10-69
Compiler Errors 10-71
11 Index ______________________________________________________________________________ I
BODAS / 10 iii
Chapter 1 - A Brief Introduction to BODAS
BODAS / 10 1-1
Overview of BODAS Functions
value sequence of the local variables in the POUs. In the Watch and Receipt
Manager you can configure the data records whose values you wish to set and/or
observe.
Debugging
In case of a programming error you can set breakpoints. If the process stops at such a
breakpoint, you can examine the values of all project variables at this point in time.
By working through sequentially (single step) you can check the logical correctness
of your program.
Additional Online Functions
Further debugging functions:
You can set program variables and inputs and outputs at certain values.
You can use the flow control to check which program lines have been run.
A Log records operations, user actions and internal processes during an online
session in a chronological order.
The Sampling Trace allows you to trace and display the actual course of variables
over an extended period of time.
Once the project has been set up and tested, it can be loaded down to the hardware
and tested as well However, in this case, only the value setting and display features
will be available.
Additional BODAS Features
The entire project can be documented or exported to a text file at any time. Also it
can be translated into another language.
BODAS has a symbolic and a DDE interface. A gateway server together with an
OPC server and DDE server are parts of the BODAS standard installation.
Network variables and an Object Dictionary can be used for data exchange with
other PLCs within a network.
Summary
BODAS is a complete development tool used to program your PLC which will save
you a measurable amount of time setting up your applications.
1-2 BODAS / 10
Chapter 2 - What is What in BODAS
Project
A project contains all of the objects in a PLC program. A project is saved in a file
named after the project. The following objects are included in a project:
POUs (Program Organization Units), data types, visualizations, resources, and
libraries.
POU (Program Organization
Unit)
Functions, function blocks, and programs are POUs which can be supplemented by
actions.
Each POU consists of a declaration part and a body. The body is written in one of the
IEC programming languages which include IL, ST, SFC, FBD, LD or CFC.
BODAS supports all IEC standard POUs. If you want to use these POUs in your
project, you must include the library standard.lib in your project.
POUs can call up other POUs. However, recursions are not allowed.
Function
A function is a POU, which yields exactly one data element (which can consist of
several elements, such as fields or structures) when it is processed, and whose call in
textual languages can occur as an operator in expressions.
When declaring a function do not forget that the function must receive a type. This
means, after the function name, you must enter a colon followed by a type.
A correct function declaration can look like this example:
FUNCTION Fct: INT
In addition, a result must be assigned to the function. That means that function name
is used as an output variable.
A function declaration begins with the keyword FUNCTION.
Example in IL of a function that takes three input variables and returns the product
of the first two divided by the third:
BODAS / 10 2-1
Project Components
In SFC a function call can only take place within a step or a transition.
Note:
If you define a function in your project with the name CheckBounds, you can use it
to check range overflows in your project! The name of the function is defined and
may have only this identifier (see Appendix B, Data types) .
If you define functions in your project with the names CheckDivByte,
CheckDivWord and CheckDivDWord, you can use them to check the value of the
divisor if you use the operator DIV, for example to avoid a division by 0 (see
Appendix C, IEC operators).
If you define functions with the names CheckRangeSigned and
CheckRangeUnsigned, then range exceeding of variables declared wit subrange
types (see Appendix B, Data types) can be intercepted.
2-2 BODAS / 10
Chapter 2 - What is What in BODAS
Recommendation: Only use the above functions when simulating and testing
on the PC, because the monitoring functions in the PLC make considerable demands
on computer power.
All these check function names are reserved for the described usage.
Function Block
A function block is a POU which provides one or more values during the procedure.
As opposed to a function, a function block provides no return value.
A function block declaration begins with the keyword FUNCTION_BLOCK.
Example in IL of a function block with two input variables and two output variables.
One output is the product of the two inputs, the other a comparison for equality:
BODAS / 10 2-3
Project Components
PROGRAM prog
VAR
inst1:fb;
END_VAR
LD 17
ST inst1.in1
CAL inst1
END_PROGRAM
The declaration parts of function blocks and programs can contain instance
declarations. Instance declarations are not permitted in functions.
Access to a function block instance is limited to the POU in which it was declared
unless it was declared globally.
The instance name of a function block instance can be used as the input for a
function or a function block.
Note: All values are retained after processing a function block until the next it is
processed. Therefore, function block calls with the same arguments do not always
return the same output values!
Note: If there at least one of the function block variables is a retain variable, the
total instance is stored in the retain area.
Calling a function block
The input and output variables of a function block can be accessed from another
POU by setting up an instance of the function block and specifying the desired
variable using the following syntax:
<Instance name>.<Variable name>
If you would like to set the input parameters when you open the function block, you
can do this in the text languages IL and ST by assigning values to the parameters
after the instance name of the function block in parentheses (this assignment takes
place using ":=" just as with the initialization of variables at the declaration position).
Please regard, that the InOutVariables (VAR_IN_OUT) of a function block are
handed over as pointers. For this reason in a call of a function block no constants can
be assigned to VAR_IN_OUTs and there is no read or write access from outside to
them.
VAR
inst:fubo;
var:int;
END_VAR
var1:=2;
inst(instout1:=var1^);
2-4 BODAS / 10
Chapter 2 - What is What in BODAS
In the example below the call is shown in ST. The declaration part is the same as
with IL:
In FBD the instance of a function block is called as shown in the following image
(declaration part the same as with IL):
BODAS / 10 2-5
Project Components
Programs can be called. A program call in a function is not allowed. There are also
no instances of programs.
If a POU calls a program, and if thereby values of the program are changed, then
these changes are retained the next time the program is called, even if the program
has been called from within another POU.
This is different from calling a function block. There only the values in the given
instance of a function block are changed.
These changes therefore play a role only when the same instance is called.
A program declaration begins with the keyword PROGRAM and ends with
END_PROGRAM.
Examples of calls of the program described above:
In IL:
CAL PRGExample
LD PRGexample.PAR
STERG
in ST:
PRGExample;
Erg := PRGexample.PAR;
In FBD:
2-6 BODAS / 10
Chapter 2 - What is What in BODAS
In the example given, calling up the function block Counter increases or decreases
the output variable ”out”, depending on the value of the input variable ”in”. Calling
up the action Reset of the function block sets the output variable to zero. The same
variable ”out” is written in both cases.
BODAS / 10 2-7
Project Components
Note: Actions play an important role in blocks in sequential function charts, see
chapter 2.2.3 Sequential Function Chart.
The IEC standard does not recognise actions other than actions of the sequential
function chart.
Resources
You need the resources for configuring and organizing your project and for tracing
variable values:
• Global Variables which can be used throughout the project or network
• PLC Configuration for creating and editing information for BODEM or BB-3
• Task Configuration for guiding your program through tasks
• Sampling Trace for graphic display of variable values
• Watch and Receipt Manager for displaying variable values and setting default
variable values
See chapter 6, 'The Resources'.
Libraries
You can include in your project a series of libraries whose POUs, data types, and
global variables you can use just like user-defined variables. The libraries
standard.lib and util.lib are standard parts of the program and are always at your
disposal.
2-8 BODAS / 10
Chapter 2 - What is What in BODAS
2.2 Languages
BODAS / 10 2-9
Languages
2-10 BODAS / 10
Chapter 2 - What is What in BODAS
BODAS / 10 2-11
Languages
There are the following instructions in ST, arranged in a table together with example:
Instruction type Example
Assignment A:=B; CV := CV + 1; C:=SIN(X);
RETURN RETURN;
IF D:=B*B;
IF D<0.0 THEN
C:=A;
ELSIF D=0.0 THEN
C:=B;
ELSE
C:=D;
END_IF;
2-12 BODAS / 10
Chapter 2 - What is What in BODAS
FOR J:=101;
FOR I:=1 TO 100 BY 2 DO
IF ARR[I] = 70 THEN
J:=I;
EXIT;
END_IF;
END_FOR;
WHILE J:=1;
WHILE J<= 100 AND ARR[J] <> 70 DO
J:=J+2;
END_WHILE;
REPEAT J:=-1;
REPEAT
J:=J+2;
UNTIL J= 101 OR ARR[J] = 70
END_REPEAT;
EXIT EXIT;
Empty instruction ;
BODAS / 10 2-13
Languages
2-14 BODAS / 10
Chapter 2 - What is What in BODAS
BODAS / 10 2-15
Languages
BOOL3 := TRUE;
10..20: BOOL1 := TRUE;
BOOL3:= TRUE;
ELSE
BOOL1 := NOT BOOL1;
BOOL2 := BOOL1 OR BOOL2;
END_CASE;
FOR loop
With the FOR loop one can program repeated processes.
Syntax:
INT_Var :INT;
Note: <END_VALUE> must not be equal to the limit value of the counter
<INT_VAR>. For example: If the variable Counter is of type SINT and if
<END_VALUE> is 127, you will get an endless loop.
WHILE loop
The WHILE loop can be used like the FOR loop with the difference that the break-
off condition can be any Boolean expression. This means you indicate a condition
which, when it is fulfilled, the loop will be executed.
Syntax:
WHILE <Boolean expression>
<Instructions>
END_WHILE;
2-16 BODAS / 10
Chapter 2 - What is What in BODAS
Note: The programmer must make sure that no endless loop is caused. He does
this by changing the condition in the instruction part of the loop, for example, by
counting up or down one counter.
Example:
WHILE counter<>0 DO
Var1 := Var1*2;
Counter := Counter-1;
END_WHILE
The WHILE and REPEAT loops are, in a certain sense, more powerful than the FOR
loop since one doesn't need to know the number of cycles before executing the loop.
In some cases one will, therefore, only be able to work with these two loop types. If,
however, the number of the loop cycles is clear, then a FOR loop is preferable since
it allows no endless loops.
REPEAT loop
The REPEAT loop is different from the WHILE loop because the break-off
condition is checked only after the loop has been executed. This means that the loop
will run through at least once, regardless of the wording of the break-off condition.
Syntax:
REPEAT
<Instructions>
UNTIL <Boolean expression>
END_REPEAT;
The <Instructions> are carried out until the <Boolean expression> returns TRUE.
If <Boolean expression> is produced already at the first TRUE evaluation, then
<Instructions> are executed only once. If <Boolean_expression> never assumes the
value TRUE, then the <Instructions> are repeated endlessly which causes a relative
time delay.
Note: The programmer must make sure that no endless loop is caused. He does
this by changing the condition in the instruction part of the loop, for example by
counting up or down one counter.
Example:
REPEAT
Var1 := Var1*2;
Counter := Counter-1;
UNTIL
Counter=0
END_REPEAT;
BODAS / 10 2-17
Languages
EXIT instruction
If the EXIT instruction appears in a FOR, WHILE, or REPEAT loop, then the
innermost loop is ended, regardless of the break-off condition.
Step
A POU written in a Sequential Function Chart consists of a series of steps which are
connected with each other through directed connections (transitions).
There are two types of steps.
• The simplified type consists of an action and a flag which shows if the step is
active. If the action of a step is implemented, then a small triangle appears in
upper right corner of the step.
• An IEC step consists of a flag and one or more assigned actions or boolean
variables. The associated actions appear to the right of the step. (see below:
IEC Step).
Action
An action can contain a series of instructions in IL or in ST, a lot of networks in
FBD or in LD, or again in Sequential Function Chart (SFC).
2-18 BODAS / 10
Chapter 2 - What is What in BODAS
With the simplified steps an action is always connected to a step. In order to edit an
action, click twice with the mouse on the step to which the action belongs. Or select
the step and select the menu command 'Extras' 'Zoom Action/Transition'. In
addition, one input or output action per step is possible.
Actions of IEC steps hang in the Object Organizer directly under their SFC-POU and
are loaded with a doubleclick or by pressing <Enter> in their editor. New actions can
be created with 'Project' 'Add Action'.
Entry or exit action
Additional to a step action you can add an entry action and an exit action to a step.
An entry action is executed only once, right after the step has become active. An exit
action is executed only once before the step is deactivated.
A step with entry action is indicated by an "E" in the lower left corner, the exit action
by an "X" in the lower right corner.
The entry and exit action can be implemented in any language. In order to edit an
entry or exit action, doubleclick in the corresponding corner in the step with the
mouse.
Example of a step with entry and exit action:
Transition / Transition
condition
Between the steps there are so-called transitions.
A transition condition must have the value TRUE or FALSE. . Thus it can either
consist of a boolean variable or a boolean constant. It can also contain a series of
instructions having a boolean result, either in ST syntax (e.g. (i<= 100) AND b) or in
any language desired (see 'Extras' 'Zoom Action/Transition'). But a transition may
not contain programs, function blocks or assignments!
Note: Besides transitions, inching mode can also be used to skip to the next step; see
SFCtip and SFCtipmode.
Active step
After calling the SFC POU, the action (surrounded by a double border) belonging to
the initial stepis executed first. A step, whose action is being executed, is called
active. In Online mode active steps are shown in blue.
In a control cycle all actions are executed which belong to active steps. Thereafter
the respective following steps of the active steps become active if the transition
conditions of the following steps are TRUE. The currently active steps will be
executed in the next cycle.
Note: If the active step contains an output action, this will only be executed
during the next cycle, provided that the transition following is TRUE.
BODAS / 10 2-19
Languages
IEC step
Along with the simplified steps the standard IEC steps in SFC are available.
In order to be able to use IEC steps, you must link the special SFC library lecsfc.lib
into your project.
Any number of actions can be assigned to an IEC step. IEC actions are not fixed as
input, step or output actions to a certain step as in the simplified steps, but are stored
separately from the steps and can be reused many times within a POU. For this they
must be associated to the single steps with the command 'Extras''Associate action'.
Along with actions, Boolean variables can be assigned to steps.
The activation and deactivation of actions and boolean variables can be controlled
using so-called qualifiers. Time delays are possible. Since an action can still be
active, if the next step has been processed, for example through the qualifier S (Set),
one can achieve concurrent processes.
An associated boolean variable is set or reset with each call of the SFC block. That
means, that with each call the value changes from TRUE or FALSE or back again.
The actions associated with an IEC step are shown at the right of the step in a two-
part box. The left field contains the qualifier, possibly with time constant, and the
right field contains the action name respectively boolean variable name.
An example for an IEC step with two actions:
In order to make it easier to follow the processes, all active actions in online mode
are shown in blue like the active steps. After each cycle a check is made to see which
actions are active.
Pay attention here also to the restrictions on the use of time-qualifiers in actions that
are repeatedly re-used within the same cycle (see “Qualifier”) !
Note: If an action has been inactivated, it will be executed once more. That
means, that each action is executed at least twice (also an action with qualifier P).
In case of a call first the deactivated actions, then the active actions are executed, in
alphabetical order each time.
Whether a newly inserted step is an IEC step depends upon whether the menu
command 'Extras' 'Use IEC-Steps' has been chosen.
In the Object Organizer the actions hang directly underneath their respective SFC
POUs. New actions can be created with 'Project' 'Add Action'.
In order to use IEC steps you must include in your project the special SFC library
Iecsfc.lib .
2-20 BODAS / 10
Chapter 2 - What is What in BODAS
Qualifier
In order to associate the actions with IEC steps the following qualifiers are available:
N Non-stored The action is active as long as the step
R overriding Reset The action is deactivated
S Set (Stored) The action is activated and remains active
until a Reset
L time Limited The action is activated for a certain time,
maximum as long as the step is active
D time Delayed The action becomes active after a certain
time if the step is still active and then it
remains active as long as the step is
active.
P Pulse The action is executed just one time if the
step is active
SD Stored and time Delayed The action is activated after a certain time
and remains active until a Reset
DS Delayed and Stored The action is activated after a certain time
as long as the step is still active and
remains active up to a Reset
SL Stored and time limited The action is activated for a certain time
The qualifiers L, D, SD, DS and SL need a time value in the TIME constant format.
Hinweis: Wird eine Aktion deaktiviert, so wird sie noch einmal ausgeführt.
Das heißt, daß jede Aktion mindestens zweimal ausgeführt wird (auch eine Aktion
mit Qualifier P).
Implicit variables in SFC
There are implicitly declared variables in the SFC which can be used.
A flag belongs to each step which stores the state of the step. The step flag (active or
inactive state of the step) is called <StepName>.x for IEC steps or <StepName> for
the simplified steps. This Boolean variable has the value TRUE when the associated
step is active and FALSE when it is inactive. It can be used in every action and
transition of the SFC block.
BODAS / 10 2-21
Languages
One can make an enquiry with the variable <ActionName>.x. as to whether an IEC
action is active or not.
For IEC steps the implicit variables <StepName>.t can be used to enquire about the
active time of the steps.
Implicit variables can also be accessed by other programs. Example:
boolvar1:=sfc1.step1.x; Here, step1.x is the implicit boolean variable representing
the state of IEC step step1 in POU sfc1.
SFC Flags
If a step is active in SFC for longer than its attributes state, some special flags are
set. There are also variables which can be set in order to control the program flow in
the sequential function chart. To use the flags it is necessary, globally or locally, to
declare them as output or input variables.
SFCEnableLimit: This variable is of the type BOOL. When it has the value TRUE,
the timeouts of the steps will be registered in SFCError. Other timeouts will be
ignored.
SFCInit: When this boolean variable has the value TRUE the sequential function
chart is set back to the Init step. The other SFC flags are reset too (initialization). The
Init step remains active, but is not executed, for as long as the variable has the value
TRUE. It is only when SFCInit is again set to FALSE that the block can be
processed normally.
SFCReset: This variable, of type BOOL, behaves similarly to SFCInit. Unlike the
latter, however, further processing takes place after the initialization of the Init step.
Thus for example the SFCReset flag could be re-set to FALSE in the Init step.
SFCQuitError: Execution of the SFC diagram is stopped for as long as this boolean
variable has the value TRUE whereby a possible timeout in the variable SFCError is
reset. All previous times in the active steps are reset when the variable again assumes
the value FALSE.
SFCPause: Execution of the SFC diagram is stopped for as long as this boolean
variable has the value TRUE.
SFCError: This Boolean variable is TRUE when a timeout has occurred in a SFC
diagram. If another timeout occurs in a program after the first one, it will not be
registered unless the variable SFCError is reset first.
SFCTrans: This boolean variable takes on the value TRUE when a transition is
actuated.
SFCErrorStep: This variable is of the type STRING. If SFCError registers a
timeout, in this variable is stored the name of the step which has caused the timeout.
SFCErrorPOU: This variable of the type STRING contains the name of the block
in which a timeout has occurred.
SFCCurrentStep: This variable is of the type STRING. The name of the step is
stored in this variable which is active, independently of the time monitoring. In the
case of simultaneous sequences the step is stored in the branch on the outer right. No
further timeout will be registered if a timeout occurs and the variable SFCError is not
reset again.
2-22 BODAS / 10
Chapter 2 - What is What in BODAS
BODAS / 10 2-23
Languages
See also chapter 5 for more information and see also the Continuous Function Chart
Editor.
The continuous function chart editor does not operate like the function block
diagram FBD with networks, but rather with freely placeable elements. This allows
feedback, for example.
An example of a network in the continuous function chart editor, as it would
typically appear in BODAS:
2-24 BODAS / 10
Chapter 2 - What is What in BODAS
Contact
Each network in LD consists on the left side of a network of contacts (contacts are
represented by two parallel lines: | |) which from left to right show the condition
"On" or "Off".
These conditions correspond to the Boolean values TRUE and FALSE. A Boolean
variable belongs to each contact. If this variable is TRUE, then the condition is
passed on by the connecting line from left to right, otherwise the right connection
receives the value "Out".
Contacts can be connected in parallel, then one of the parallel branches must transmit
the value "On" so that the parallel branch transmits the value "On"; or the contacts
are connected in series, then contacts must transmit the condition "On" so that the
last contact transmits the "On" condition. This therefore corresponds to an electric
parallel or series circuit.
A contact can also be negated, recognizable by the slash in the contact symbol: |/|.
Then the value of the line is transmitted if the variable is FALSE.
Coil
On the right side of a network in LD there can be any number of so-called coils
which are represented by parentheses:( ). They can only be in parallel. A coil
transmits the value of the connections from left to right and copies it in an
appropriate Boolean variable. At the entry line the value ON (corresponds to the
Boolean variable TRUE) or the value OFF (corresponding to FALSE) can be
present.
Contacts and coils can also be negated (in the example the contact SWITCH1 and
the coil X3.0 is negated). If a coil is negated (recognizable by the slash in the coil
symbol: (/)), then it copies the negated value in the appropriate Boolean variable. If a
contact is negated, then it connects through only if the appropriate Boolean value is
FALSE.
BODAS / 10 2-25
Debugging, Online Functions
Sampling Trace
The Sampling Trace allows you to trace the value sequence of variables, depending
upon the so-called trigger event. This is the rising edge or falling edge of a
2-26 BODAS / 10
Chapter 2 - What is What in BODAS
previously defined Boolean variable (trigger variable). BODAS permits the tracing
of up to 20 variables. 500 values can be traced for each variable.
Debugging
The debugging functions of BODAS make it easier for you to find errors.
Breakpoint
BODAS / 10 2-27
Debugging, Online Functions
2-28 BODAS / 10
Chapter 2 - What is What in BODAS
available. That allows you to test the logical correctness of your program without
PLC hardware.
Log
The log chronologically records user actions, internal processes, state changes and
exceptions during Online mode processing. It is used for monitoring and for error
tracing (see chapter 4., Online Functions).
BODAS / 10 2-29
Chapter 3 - We Write a Little Program
Let us now start to write a small example program. It is for a simple traffic signal
unit which is supposed to control two traffic signals at an intersection. The red/green
phases of both traffic signals alternate and, in order to avoid accidents, we will insert
yellow or yellow/red transitional phases. The latter will be longer than the former.
In this example you will see how time dependent programs can be shown with the
language resources of the IEC1131-3 standard, how one can edit the different
languages of the standard with the help of BODAS, and how one can easily connect
them while becoming familiar with the simulation of BODAS.
Create POU
Starting always is easy: Start BODAS and choose 'File' 'New'.
In the dialog box which appears, the first POU has already been given the default
name PLC_PRG. Keep this name, and the type of POU should definitely be a
program. Each project needs a program with this name. In this case we choose as the
language of this POU the Continuous Function Chart Editor (CFC)
Now create three more objects with the command 'Project' 'Object Add' with the
menu bar or with the context menu (press right mouse button in the Object
Organizer). A program in the language Sequential Function Chart (SFC named
SEQUENCE, a function block in the language Function Block Diagram (FBD)
named TRAFFICSIGNAL, along with a POU WAIT, also of the type function
block, which we want to program as an Instruction List (IL.
BODAS / 10 3-1
Controlling a Traffic Signal Unit
"TRAFFICSIGNAL"
declaration
Let us now turn to the POU TRAFFICSIGNAL. In the declaration editor you declare
as input variable (between the keywords VAR_INPUT and END_VAR) a variable
named STATUS of the type INT. STATUS will have four possible conditions, that is
one for the TRAFFICSIGNAL phases green, yellow, yellow/red andred.
Correspondingly our TRAFFICSIGNAL has three outputs, that is RED, YELLOW
and GREEN. You should declare these three variables. Then the declaration part of
our function block TRAFFICSIGNAL will look like this:
"TRAFFICSIGNAL" body
Now we determine the values of the output variables depending on the input
STATUS of the POU. To do this go into the body of the POU. Click on the field to
the left beside the first network (the gray field with the number 1). You have now
selected the first network. Choose the menu item 'Insert' 'Box'.
In the first network a box is inserted with the operator AND and two inputs:
Click on the text AND with the mouse pointer and change the text into EQ. Select
the three question marks from the upper of the two inputs and enter the variable
STATUS. Then select the lower of the three question marks and put a 1 underneath
it. You get the following network:
Click now on a place behind the EQ Box. Now the output of the EQ operation is
selected. Choose 'Insert' 'Assign'. Change the three question marks ??? to GREEN.
You now have created a network with the following structure:
3-2 BODAS / 10
Chapter 3 - We Write a Little Program
STATUS is compared with 1, the result is assigned to GREEN. This network thus
switches to GREEN if the preset state value is 1.
For the other TRAFFICSIGNAL colors we need two more networks. You create
them with the command 'Insert' 'Network (after)'. These networks should be set up
as in the example. The finished POU now looks like follows:
In order to insert an operator in front of another operator, you must select the place
where the input to which you want to attach the operator feeds into the box.
Then use the command 'Insert' 'Box'. Otherwise you can set up these networks in
the same way as the first network.
Now our first POU has been finished. TRAFFICSIGNAL, according to the input of
the value STATUS, controls whichever light color we wish.
BODAS / 10 3-3
Controlling a Traffic Signal Unit
"WAIT" body
In order to create the desired timer, the body of the POU must be programmed as
follows:
3-4 BODAS / 10
Chapter 3 - We Write a Little Program
At first it is checked whether Q has already been set at TRUE (as though the
counting had already been executed), in this case we change nothing with the
occupation of ZAB, but we call the function block ZAB without input (in order to
check whether the time period is already over).
Otherwise we set the variable IN in ZAB at FALSE, and therefore at the same time
ET at 0 and Q at FALSE. In this way all variables are set at the desired initial
condition. Now we assign the necessary time from the variable TIME into the
variable PT, and call ZAB with IN:=TRUE. In the function block ZAB the variable
ET is now calculated until it reaches the value TIME, then Q is set at FALSE.
The negated value of Q is saved in OK after each execution of WAIT. As soon as Q
is FALSE, then OK produces TRUE.
The timer is finished at this point. Now it is time to combine our two function blocks
WAIT and TRAFFICSIGNAL in the main program PLC_PRG.
BODAS / 10 3-5
Controlling a Traffic Signal Unit
3-6 BODAS / 10
Chapter 3 - We Write a Little Program
Now we have to finish the programming of the individual steps. If you doubleclick
on the field of a step, then you get a dialog for opening a new action. In our case we
will use IL (Instruction List).
Actions and transition
conditions
In the action of the step Init the variables are initialized, the STATUS of
TRAFFICSIGNAL1 should be 1 (green). The state of TRAFFICSIGNAL2 should be
3 (red). The action Init then looks like in the following image:
BODAS / 10 3-7
Controlling a Traffic Signal Unit
3-8 BODAS / 10
Chapter 3 - We Write a Little Program
The first expansion phase of our program is completed. You can now run a first test
of the SEQUENCE POU in simulation mode: For this purpose, compile the project
with 'Project' 'Build'. The message "0 errors, 0 warnings" should appear in the
message window below the working window. Now execute the command 'Online'
'Login', in order to log into simulation mode (the 'Online' 'Simulation' option should
already be activated). Start the program with 'Online' 'Start'. Open the SEQUENCE
POU by double-clicking on "SEQUENCE" in the Object Organizer. Although the
program itself is now started, the traffic signal sequence will not start until the
START variable receives the value TRUE. Later, it will receive this value from
PLC_PRG, but at the moment we still have to set it directly in the POU. To do so,
double-click on the line where START is defined (START=FALSE) in the
declaration part of SEQUENCE. The option "<:=TRUE>" will then be displayed
after the variable in turquoise. Now select the command 'Online' 'Write values', in
order to set the variable to this value. START will then be displayed in blue in the
sequence chart, and you will be able to see the execution of the individual steps by
the blue marking of the currently active step.
So much for our little intermediate test. Now enter the command 'Online' 'Logout' in
order to quit simulation mode and continue programming.
"SEQUENCE" second
expansion level
In order to ensure that our diagram has at least one alternative branch, and so that we
can turn off our traffic light unit at night, we now include in our program a counter
which, after a certain number of TRAFFICSIGNAL cycles, turns the unit off.
At first we need a new variable COUNTER of the type INT. Declare this as usual in
the declaration part of PLC_PRG, and initialize it in Init with 0.
Now select the transition after Switch1 and insert a step and then a transition. Select
the resulting transition and insert an alternative branch to its left. After the left
BODAS / 10 3-9
Controlling a Traffic Signal Unit
transition insert a step and a transition. After the resulting new transition insert a
jump after Switch1.
Name the new parts as follows: the upper of the two new steps should be called
"Count" and the lower "Off". The transitions are called (from top to bottom and from
left to right) EXIT, TRUE and DELAY.OK. The new part should look like the part
marked with the black border in the following image:
Now two new actions and a new transition condition are to be implemented. At the
step Count the variable COUNTER is increased by one:
The EXIT transition checks whether the counter is greater than a certain value, for
example 7:
3-10 BODAS / 10
Chapter 3 - We Write a Little Program
At Off the state of both lights is set at 5(OFF), (or each other number not equal 1,2,3
or 4) the COUNTER is reset to 0, and a time delay of 10 seconds is set:
The result
In our hypothetical situation, night falls after seven TRAFFICSIGNAL cycles, for
ten seconds the TRAFFICSIGNAL turns itself off, then we have daylight again, the
traffic light unit turns itself on again, and the whole process starts again from the
beginning.
PLC_PRG
We have defined and correlated the time sequencing of the phases for both sets of
traffic lights in the block SEQUENCE. Since, however, we see the traffic lights
system as a module of a bus system, e.g. CAN bus, we have to make input and
output variables available in the block PLC_PRG. We want to start-up the traffic
lights system over an ON switch and we want to send each of the six lamps (each
traffic light red, green, yellow) the corresponding ”signal command” for each step of
the SEQUENCE. We are now declaring appropriate Boolean variables for these six
outputs and one input, before we create the programme in the editor, and are
allocating them, at the same time, to the corresponding IEC addresses.
The next step is declare the variables Light1 and Light2 of the type Phases in the
declaration editor.
These deliver the Boolean value of each of the six lights to the above mentioned six
outputs for each step of the block SEQUENCE. We are not, however, declaring the
BODAS / 10 3-11
Controlling a Traffic Signal Unit
output variables which are foreseen within the PLC_PRG block but under Resources
for Global Variables instead. The Boolean input variable IN, which is used to set the
variable START in the block SEQUENCE to TRUE, can be set in the same way. In
the example, you are using global variables to set the inputs and display the outputs.
In order to read input and output at a program that you are loading on to the ECU,
use the functions listed in the library of the Runtime System.
Select the tab Resources and open the list Global Variables.
Make the declaration as follows:
The name of the variable (e.g. ON) is followed by a colon and then by the type of
variable, which is followed by a semi-colon to mark the end of the declaration.
We now want to finish off the block PLC_PRG.
For this we go into the editor window. We have selected the Continuous Function
Chart editor and we consequently obtain, under the menu bar, a CFC symbol bar
with all of the available elements (see chapter 5.4.4, The Continuous Function Chart
Editor).
Click on the right mouse key in the editor window and select the element Box. Click
on the text AND and write ”SEQUENCE” instead. This brings up the block
SEQUENCE with all of the already defined input and output variables. Insert two
further block elements which you name PHASES. Phases is a function block and this
causes you to obtain three red question marks over the block which you replace with
the already locally declared variables LIGHT1 and LIGHT2. Now set an element of
the type Input, which award the title ON and six elements of the type Output which
you award variable names to, as described, namely L1_green, L1_yellow, L1_red,
L2_green, L2_yellow, L2_red.
All of the elements of the programme are now in place and you can connect the
inputs and outputs, by clicking on the short line at the input/output of an element and
dragging this with a constantly depressed mouse key to the input/output of the
desired element.
Your program should finally look like the example shown here.
3-12 BODAS / 10
Chapter 3 - We Write a Little Program
Image 3.19: PLC_PRG, Declaration and presentation with the continuous function chart editor
TRAFFICSIGNAL simulation
Now test your program. For this you must compile it ('Project' 'Rebuild all') login
('Online' 'Login' and then load it 'Online' 'Download'). Now select 'Online' 'Run'
and set the variable ON to TRUE. This you can do by a doubleclick on the variable
in the input box which you have created in the PLC_PRG CFC editor. The value
"TRUE" will appear in turquoise in the box and then you must select 'Online'
'Write values' to set this value. After that you will see that the traffic signal cylces
start running and you can follow the chronological order of the individual steps of
your main program. The window of the POU PLC_PRG has now changed to the
monitor window. Click twice on the plus sign in the declaration editor, the variable
display drops down, and you can see the values of the individual variables.
With the visualization of BODAS you can quickly and easily bring project variables
to life. You find an complete description of the visualization in chapter 8. We will
now plot two traffic signals and an ON-Switch for our traffic light unit which will
illustrate the switching process.
Creating a new visualization
In order to create a visualization you must first select the range of Visualization in
the Object Organizer. First click on the lower edge of the window on the left side
with the POU on the register card with this symbol and the name Visualization.
If you now choose the command 'Project' 'Object Add', then a dialog box opens.
BODAS / 10 3-13
Visualizing a Traffic Signal Unit
Enter here any name. When you confirm the dialog with OK, then a window opens
in which you can set up your new visualization.
Insert element in Visualization
For our TRAFFICSIGNAL visualization you should proceed as follows:
• Give the command 'Insert' 'Ellipse' and try to draw a medium sized circle
(∅2cm). For this click in the editor field and draw with pressed left mouse button the
circle in its length.
• Now doubleclick the circle. The dialog box for editing visualization elements
opens
• Choose the category Variables and enter in the field Change color the variable
name .L1_red or choose this variable using the input assistance (button <F2>). This
addresses the variable RED of the function block instance TRAFFICSIGNAL1 of
the POU PLC_PRG.
• Then choose the category Color and click on the button Inside in the area
Color. Choose as neutral a color as possible, such as black.
• Now click on the button within in the area Alarm color and choose the red
which comes closest to that of a red light.
3-14 BODAS / 10
Chapter 3 - We Write a Little Program
The resulting circle will normally be black, and when the variable RED from
TRAFFICSIGNAL1 is TRUE, then its color will change to red. We have therefore
created the first light of the first TRAFFICSIGNAL!
The other traffic lights
Now enter the commands 'Edit' 'Copy' (<Ctrl>+<C>) and then twice 'Edit' 'Paste'
(<Ctrl>+<V>). That gives you two more circles of the exact same size lying on top
of the first one. You can move the circles by clicking on the circle and dragging it
with pressed left mouse button. The desired position should, in our case, be in a
vertical row in the left half of the editor window. Doubleclick on one of the other
two circles in order to open the configuration dialog box again. Enter in the field
Change Color of the corresponding circle the following variables:
for the middle circle: L1_yellow
for the lowest circle: L1-green
Now choose for the circles in the category Color and in the area Alarm color the
corresponding color (yellow or green).
The TRAFFICSIGNAL case
Now enter the command 'Insert' 'Rectangle', and insert in the same way as the
circle a rectangle which encloses the three circles. Once again choose as neutral a
color as possible for the rectangle and give the command 'Extras' 'Send to back' so
that the circles are visible again.
If simulation mode1 is not yet turned on, you can activate it with the command
'Online' 'Simulation'. If you now start the simulation with the commands 'Online'
'Login' and 'Online' 'Run', then you can observe the color change of the first traffic
signal.
1
The simulation mode is active if a check mark (ü) appears in front of the menu
item "Simulation" in the 'Online' menu..
BODAS / 10 3-15
Visualizing a Traffic Signal Unit
In order to set the variable ON to TRUE with a mouse click on the switch, the
variable .ON must be entered into the category Inputs. Also select the Option
Variable keying and enter the variable .ON at this point. Variable keying means that
when a mouse click is made on the visualization element the variable .ON is set to
the value TRUE but is reset to the value FALSE when the mousekey is released
again (we have created hereby a simple switch-on device for our traffic lights
program).
3-16 BODAS / 10
Chapter 3 - We Write a Little Program
BODAS / 10 3-17
Chapter 4 - The Individual Components
The following elements are found in the main window of BODAS (from top to
bottom):
• The menu bar
• The Tool bar (optional); with buttons for faster selection of menu commands.
• The Object Organizer with register cards for POUs, Data types, Visualizations,
and Resources
• A vertical screen divider between the Object Organizer and the Work space of
BODAS
• The Work space in which the editor windows are located
• The message window (optional)
• The Status bar (optional); with information about the current status of the
project
BODAS / 10 4-1
The Main Window
Menu bar
The menu bar is located at the upper edge of the main window. It contains all menu
commands.
Tool bar
By clicking with the mouse on a symbol you can select a menu command more
quickly. The choice of the available symbols automatically adapts itself to the active
window.
The command is only carried out when the mouse button is pressed on the symbol
and then released.
If you hold the mouse pointer for a short time on a symbol in the tool bar, then the
name of the symbol is shown in a Tooltip.
In order to see a description of each symbol on the tool bar, select in Help the editor
about which you want information and click on the tool bar symbol in which you are
interested.
The display of the tool bar is optional (see chapter 4.2, 'Project' 'Options' category
Desktop).
Object Organizer
The Object Organizer is always located on the left side of BODAS. At the bottom
there are four register cards with symbols for the four types of objects POUs,
Data types, Visualizations and Resources. In order to change between the
respective object types click with the mouse on the corresponding register card or
use the left or right arrow key.
You will learn in chapter Managing Objects how to work with the objects in the
Object Organizer.
4-2 BODAS / 10
Chapter 4 - The Individual Components
Screen divider
The screen divider is the border between two non-overlapping windows. In BODAS
there are screen dividers between the Object Organizer and the Work space of the
main window, between the interface (declaration part) and the implementation
(instruction part) of POUs and between the Work space and the message window.
You can move the screen divider with the mouse pointer. You do this by moving the
mouse with the left mouse button pressed.
Make sure the screen divider always remains at its absolute position, even when the
window size has been changed. If it seems that the screen divider is no longer
present, then simply enlarge your window.
Work space
The Work space is located on the right side of the main window in BODAS. All
editors for objects and the library manager are opened in this area. The current object
name appears in the title bar; in the case of POUs an abbreviation for the POU type
and the programming language currently in use appears in brackets after it.
You find the description of the editors in Chapter 5 'Editors in BODAS'
Under the menu item 'Window' you find all commands for window management.
Message window
The message window is separated by a screen divider underneath the work space in
the main window.
It contains all messages from the previous compilations, checks or comparisons.
Search results and the cross-reference list can also be output here.
If you doubleclick with the mouse in the message window on a message or press
<Enter>, the editor opens with the object. The relevant line of the object is selected.
With the commands 'Edit' 'Next error' and 'Edit' 'Previous error' you can can
quickly jump between the error messages.
The display of the message window is optional (see 'Window' 'Messages').
Status bar
The status bar at the bottom of the window frame of the main window in BODAS
gives you information about the current project and about menu commands.
If an item is relevant, then the concept appears on the right side of the status bar in
black script, otherwise in gray script.
When you are working in online mode, the concept Online appears in black script. If
you are working in the offline mode it appears in gray script.
In Online mode you can see from the status bar whether you are in the simulation
(SIM), the program is being processed (RUNS), a breakpoint is set (BP), or
variables are being forced (FORCE).
With text editor the line and column number of the current cursor position is
indicated (e.g. Line:5, Col.:11). In online mode 'OV' is indicated black in the status
bar. Pressing the <Ins> key switches between Overwrite and Insert mode.
BODAS / 10 4-3
Options
If the mouse point is in a visualization, the current X and Y position of the cursor in
pixels relative to the upper left corner of the screen is given. If the mouse pointer is
on an Element, or if an element is being processed, then its number is indicated. If
you have an element to insert, then it also appears (e.g. Rectangle).
If you have chosen a menu command but haven't yet confirmed it, then a short
description appears in the status bar.
The display of the statusbar is optional (see chapter 4.2, 'Project' 'Options' category
Desktop).
Context Menu
Shortcut: <Shift>+<F10>
Instead of using the menu bar for executing a command, you can use the right mouse
button. The menu which then appears contains the most frequently used commands
for a selected object or for the active editor. The choice of the available commands
adapts itself automatically to the active window. The choice of the available
commands adapts itself automatically to the active window.
4.2 Options
About BODAS there can be of course only one viewpoint. In BODAS, however, you
can configure the view of the main window (and have more than one viewpoint). In
addition you can make other settings. For this you have the command 'Project'
'Options' at your disposal. The settings you make thereby are, unless determined
otherwise, saved in the file "BODAS.ini" and restored at the next BODAS startup.
'Project' 'Options'
With this command the dialog box for setting options is opened. The options are
divided into different categories. Choose the desired category on the left side of the
dialog box by means of a mouse click or using the arrow keys and change the
options on the right side.
You have at your disposal the following categories:
• Load & Save
• User information
• Editor
• Desktop
• Color
• Directories
• Log
• Build
• Passwords
• Symbol configuration
• Macros
4-4 BODAS / 10
Chapter 4 - The Individual Components
• Targettype
Image 4.5: Option dialog box of the category Load & Save
You can now decide whether you want to open the original file or the auto save file.
Ask for project info: When saving a new project or saving a project under a new
name, the project info is automatically called. You can visualize the project info with
the command 'Project' 'Project info' and also process it.
BODAS / 10 4-5
Options
Auto Load:At the next start of BODAS the last open project is automatically
loaded. The loading of a project at the start of BODAS can also take place by
entering the project in the command line.
Save before compile: The project is saved before each compilation.
User information
If you choose this category in the Options dialog box, then you get the following
dialog box:
To User information belong the Name of the user, his Initials and the Company for
which he works. Each of the entries can be modified.
Editor
If you choose this category in the Options dialog box, then you get the following
dialog box:
4-6 BODAS / 10
Chapter 4 - The Individual Components
Mark: When choosing Mark in the Editor category in the Options dialog box you
can choose whether the current selection in your graphic editors should be
BODAS / 10 4-7
Options
Tool bar: The tool bar with the buttons for faster selection of menu commands
becomes visible underneath the menu bar.
Status bar: The status bar at the lower edge of the BODAS main window becomes
visible.
Online in Security mode: In Online mode with the commands 'Run', 'Stop',
'Reset' 'Toggle Breakpoint', 'Single cycle', 'Write values', 'Force values' and
'Release force', a dialog box appears with the confirmation request whether the
command should really be executed. This option is saved with the project.
Display print ranges: In every editor window, the limits of the currently set print
range are marked with red dashed lines. Their size depends on the printer
characteristics (paper size, orientation) and on the size of the “Content” field of the
set print layout (menu: 'File” “Documentation Settings”).
F4 ignores warnings: After compilation, when F4 is pressed in a message window,
the focus jumps only to lines with error messages; warning messages are ignored.
Language: Define here, in which language the menu and dialog texts should be
displayed.
Note: Please note, that the language choice is only possible under Windows
NT!
When an option is activated, a check appears in front of it.
4-8 BODAS / 10
Chapter 4 - The Individual Components
Colors
If you choose this category in the Options dialog box , then you get the following
dialog box:
You can edit the default color setting of BODAS. You can choose whether you want
to change the color settings for Line numbers (default presetting: light gray), for
Breakpoint positions (dark gray), for a Set breakpoint (light blue), for the Current
position (red), for the Reached Positions (green) or for the Monitoring of Boolean
values (blue).
If you have chosen one of the indicated buttons, the dialog box for the input of colors
opens.
BODAS / 10 4-9
Options
Directories
If you choose this category in the Options dialog box, then you get the following
dialog box:
Directories can be entered in the Project and Common areas for BODAS to use in
searching for libraries and controller configuration. If you activate the button (...)
behind a field, the directory selection dialog opens. For library and configuration
files, several paths can be entered for each, separated by semicolons “;”.
The information in the Project area is stored with the project; information in the
Common area is written to the ini file of the programming system and thus apply to
all projects.
The Target area displays the directories for libraries and configuration files set in
the target system, e.g. through entries in the Target file. These fields cannot be
edited, but an entry can be selected and copied (right mouse button context menu).
BODAS generally searches first in the directories entered in 'Project', then in those
in 'Target System' (defined in the Target file), and finally those listed under
'Common'. If two files with the same name are found, the one in the directory that is
searched first will be used.
Options for Log
If you choose this category in the Options dialog box, then you get the following
dialog box shown below. In this dialog, you can configure a file that acts as a project
log, recording all user actions and internal processes during Online mode processing
(see in this connection chapter 4.7, Log).
If an existing project is opened for which no log has yet been generated, a dialog box
opens which calls attention to the fact that a log is now being set up that will receive
its first input after the next login process.
4-10 BODAS / 10
Chapter 4 - The Individual Components
The log is automatically stored as a binary file in the project directory when the
project is saved. If you prefer a different target directory, you can activate the option
Directory for project logs: and enter the appropriate path in the edit field. Use the
button to access the “Select Directory” dialog for this purpose.
The log file is automatically assigned the name of the project with the extension .log.
The maximum number of Online sessions to be recorded is determined by
Maximum project log size. If this number is exceeded while recording, the oldest
entry is deleted to make room for the newest.
The Log function can be switched on or off in the Option field Activate logging.
You can select in the Filter area which actions are to be recorded: User actions,
Internal actions, Status changes, Exceptions. Only actions belonging to categories
checked here will appear in the Log window and be written to the Log file. (For a
description of the categories, please see chapter 4.7, Log).
The Log window can be opened with the command 'Window' 'Log' (see also chapter
4.7, Log).
Build
If you choose this category in the Options dialog box , then you get the following
dialog box:
BODAS / 10 4-11
Options
The Debugging option has no effect if the program is loaded on a target system. This
option is always activated for simulation.
When the Replace constants option is selected, the value of each constant is loaded
directly, and in Online mode the constants are displayed in green. Forcing, writing
and monitoring of a constant is then no longer possible. If the option is deactivated,
the value is loaded into a storage location via variable access (this does in fact allow
writing the variable value, but implies longer processing time).
If the Nested comments option is active, comments can be placed within other
comments. Example:
(*
a:=inst.out; (* to be checked *)
b:=b+1;
*)
Here, the comment that begins with the first bracket is not closed by the bracket
following “checked,” but only by the last bracket.
The Create binary file option has no effect. The boot project is set up on the
controller with the command 'Online' 'Create boot project'.
When an option is activated, a check appears next to the option.
By entering a Number of data you can determine how many storage segments are to
be reserved for your project data in the controller. This space is required so that an
Online Change can still be carried out when new variables are added. If during
compilation the message “The global variables require too much storage; increase
the number you have entered here”.
In order to exert control over the compilation process you can set up two macros: the
macro in the Macro before compile field is executed before the compilation
process; the macro in the Macro after compile field afterwards. The following
macro commands can not, however, be used here: file new, file open, file close, file
save as, file quit, online, project compile, project check, project build, debug,
watchlist.
All entries in the Build Options dialog are stored with the project.
4-12 BODAS / 10
Chapter 4 - The Individual Components
If you now save the file and then reopen it, then you get a dialog box in which you
are requested to enter the password. The project can then only be opened if you enter
the correct password. Otherwise BODAS reports:
"The password is not correct."
Along with the opening of the file, you can also use a password to protect against the
file being changed. For this you must enter a password in the field Write Protection
Password and confirm this entry in the field underneath.
A write-protected project can be opened without a password. For this simply press
the button Cancel, if BODAS tells you to enter the write-protection password when
opening a file. Now you can compile the project, load it into the PLC, simulate, etc.,
but you cannot change it.
Of course it is important that you memorize both passwords. However, if you should
ever forget a password, then contact the manufacturer of your PLC.
The passwords are saved with the project.
In order to create differentiated access rights you can define user groups and
"Passwords for user groups").
BODAS / 10 4-13
Options
Image4.17: Set object attributes dialog (in option category Symbol configuration)
Use the tree-structured selection editor to select project POUs and set the desired
options in the lower part of the dialog box by clicking the mouse on the
corresponding small boxes. Activated options are checked. The following options
can be set:
Export variables of object: The variables of the selected object are exported in the
symbol file.
The following options can take effect only if the Export variables of object option
is activated:
Export data entries: Entries for access to the global variables are created for
object’s structures and arrays.
Export structure components: An individual entry is created for each variable
component of object’s structures.
Export array entries: An individual entry is created for each variable component of
object’s arrays.
Write Access: Object’s variables may be changed by the OPC server.
4-14 BODAS / 10
Chapter 4 - The Individual Components
Once the option settings for the currently selected POU are complete, other POUs
can be also be selected and given an option configuration. This can be carried out for
any desired number of POU selections, one after the other. When the dialog box is
closed by selecting OK, all configurations carried out since the dialog box was
opened are applied.
Macros
If you choose this category , the following dialog box opens:
In this dialog, macros can be defined using the commands of the BODAS batch
mechanism, which can then be called up in the 'Edit' 'Macros' menu (see chapter 4.5,
General editor functions).
In the input field Name, you enter a name for the macro to be created. After the New
button is pressed, this name is transferred into the Macro field and marked as
selected there. If the focus is on a selected macro, it can be deleted using the <Del>
key or given a new name entered in Name by pressing the Rename button.
In the editor field Commands you define and/or edit the commands that are to
constitute the newly created or selected macro. All the commands of the BODAS
batch mechanism (see Appendix G, Command lines / command file commands) are
allowed; you can obtain a list by pressing the Help button.
A new command line is started by pressing <Ctrl><Enter>. The context menu with
the common text editor functions is obtained by pressing the right mouse button.
Command components that belong together can be grouped using quotation marks.
The Menu field is used to define the menu entry with which the macro will appear in
the 'Edit' 'Macros' menu. In order to be able to use a single letter as a short-cut, the
letter must be preceded by the symbol '&'. Example: the name “Ma&cro 1” generates
the menu entry “Macro 1”.
The actual writing of the macros into the project occurs upon leaving the dialog box
by selecting OK.
BODAS / 10 4-15
Managing Projects
The macro menu entries in the 'Edit' 'Macros' menu are displayed in the order in
which they were defined.
The macros are first tested when a menu selection is made.
Targettype
When you select this category in the 'Options' box, the following dialog is displayed:
Select the target system where you wish to load the project.
Note: Please note that the library for the relevant Runtime System must be
loaded. See 'Window' 'Library management'.
The commands which refer to entire project are found under the menu items 'File'
and 'Project'. Some of the commands under 'Project' deal with objects and are
therefore described in the chapter Managing Objects.
'File' 'New'
Symbol:
With this command you create an empty project with the name "Untitled". This
name must be changed when saving.
'File' 'Open'
Symbol:
With this command you open an already existing project. If a project has already
been opened and changed, then BODAS asks whether this project should be saved or
not.
The dialog box for opening a file appears, and a project file with the extension
"*.pro" or a library file with the extension "*.lib" must be chosen. This file must
already exist. It is not possible to create a project with the command "Open".
4-16 BODAS / 10
Chapter 4 - The Individual Components
To upload a project file from the PLC, press PLC at Open project from PLC. You
will obtain, as next, the dialog Communication parameters (see menu ‘Online‘
‘Communication parameters‘) for setting the transmission parameters when no
connection exists yet to the PLC. Once an on-line connection has been created, the
system checks whether the same named project files already exist in the directory on
your computer hard disc. When this is the case you receive the dialogue Load the
project from the controller where you can decide whether the local files should be
replaced by those being used by the controller. (This sequence is the reverse of the
sequence of 'Online' 'Load source code', with which the project source file is stored
in the controller. Do not confuse with 'Create Boot project'!)
Note: Please note, that you in any case have to give a new name to a project,
when you load it from the PLC to your local directory, otherwise it is unnamed.
If there has not yet been loaded a project to the PLC, you get an error message.
(See also 'Project' 'Options' category 'Sourcedownload').
The most recently opened files are listed under the command 'File' 'Exit'. If you
choose one of them, then this project is opened.
If Passwords or User groups have been defined for the project, then a dialog box
appears for entering the password.
'File' 'Close'
With this command you close the currently-open project. If the project has been
changed, then BODAS asks if these changes are to be saved or not.
If the project to be saved carries the name "Untitled", then a name must be given to it
(see 'File' 'Save as').
'File' 'Save'
BODAS / 10 4-17
Managing Projects
With this command you save any changes in the project. If the project to be saved is
called "Untitled", then you must give it a name (see 'File' 'Save as').
'File' 'Save as'
With this command the current project can be saved in another file or as a library.
This does not change the original project file.
After the command has been chosen the Save dialog box appears. Choose either an
existing File name or enter a new file name and choose the desired file type.
If the project is to be saved under a new name, then choose the file type BODAS
Project (*.pro).
You can also save the current project as a library in order to use it in other projects.
Choose the file type Internal library (*.lib) if you have programmed your POUs in
BODAS.
Choose the file type External library (*.lib) if you want to implement and integrate
POUs in other languages (e.g. C). This means that another file is also saved which
receives the file name of the library, but with the extension "*.h". This file is
constructed as a C header file with the declarations of all POUs, data types, and
global variables. If external libraries are used, in the simulation mode the
implementation, written for the POUs in BODAS, will be executed. Working with
the real hardware the implementation written in C will be executed.
Then click OK. The current project is saved in the indicated file. If the new file
name already exists, then you are asked if you want to overwrite this file.
When saving as a library, the entire project is compiled. If an error occurs thereby,
then you are told that a correct project is necessary in order to create a library. The
project is then not saved as a library.
4-18 BODAS / 10
Chapter 4 - The Individual Components
file. The zip file can be stored or can be directly sent in an email. This is useful if
you want to give forward a set of all project relevant files.
When the command is executed, the dialog box 'Save Archive' opens:
Here you can define which file categories should be added to the archive zip file:
Select or deselect a category by activating/deactivating the corresponding checkbox.
Do this by a single mouseclick in the checkbox or by a doubleclick on the category
name. If a category is marked with , all files of this category will be added to the
zip file, if it is marked with , none of the files will be added. To select single files
of a category press the corresponding button Details.
The dialog 'Details' will open with a list of available files:
BODAS / 10 4-19
Managing Projects
Image 4.22: Dialog box for detailled selection of files for the Archive ZIP
In this dialog select/deselect the desired files: Use the button Select All or Select
None to affect the complete list. A single file can be selected/deselected by a
mouseclick in the checkbox, also by a doubleclick on the list entry or by pressing the
spacebar when the list entry is marked.
Close the Details dialog with Save to store the new settings.
In the main dialog the checkbox of categories, for which not all files are selected,
will appear with a grey background color .
The following file categories are available, the right column of the table shows
which files can be added to the zip file:
4-20 BODAS / 10
Chapter 4 - The Individual Components
HKEY_LOCAL_MACHINE\SOFTWARE\3S-Smart
Software Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\AutomationA
lliance“
Bitmap Files *.bmp (bitmaps for project POUs and visualizations)
Gateway Files Gateway.exe, GatewayDDE.exe, GClient.dll,
GDrvBase.dll, GDrvStd.dll, GHandle.dll, GSymbol.dll,
GUtil.dll, further DLLs in the gateway directory if
available
To add any other files to the zip, press the button Other Files. The dialog 'Other
files' will open where you can set up a list of desired files.
Image 4.23: Dialog box for adding other files for the Archive ZIP
Press the button Add to open the standard dialog for opening a file, where you can
browse for a file. Choose one and confirm with Open. The file will be added to the
list in the 'Other files' dialog. Repeat this for each file you want to add. To delete
entries from the list, press the button Remove. When the list of selected files is ok,
close the dialog with OK.
To add a Readme file to the archive zip, press the button Comment. A text editor
will open, where you can enter any text. If you close the dialog with OK, during
creation of the zip file a readme.txt file will be added. Additionally to the entered
comments it will contain information about the build date and version of BODAS.
If all desired selections have been made, in the main dialog press
• Save... to create and save the archive zip file: The standard dialog for saving a
file will open and you can enter the path, where the zip should be stored. The zip
file per default is named <projectname>.zip. Confirm with Save to start
building it. During creation the current progress status is displayed and the
subsequent steps are listed in the message window.
• Mail… to create a temporary archive zip and to automatically generate an empty
email which contains the zip as an attachment. This feature only works if the
MAPI (Messaging Application Programming Interface) has been installed
BODAS / 10 4-21
Managing Projects
'File' 'Print'
Shortcut: <Ctrl>+<P>
With this command the content of the active window is printed.
After the command has been chosen, then the Print dialog box appears. Choose the
desired option or configure the printer and then click OK. The active window is
printed. Color output is available from all editors.
You can determine the number of the copies and print the version to a file.
With the button Properties you open the dialog box to set up the printer.
You can determine the layout of your printout with the command 'File' 'Printer
Setup'.
If you already wish to take page breaks into account while working in the Editor
windows, you can display the limits of the currently set print range by activating the
option 'Display print ranges' in the 'Project' 'Options' 'Desktop'.
During printing the dialog box shows you the number of pages already printed.
When you close this dialog box, then the printing stops after the next page.
In order to document your entire project, use the command 'Project' 'Document'.
If you want to create a document frame for your project in which you can store
comments regarding all the variables used in the project, open a global variable list
and enter the command 'Extras' 'Make docuframe file'.
4-22 BODAS / 10
Chapter 4 - The Individual Components
If the focus is in the message, the complete contents are printed out, line by line, as
displayed in the window. Possible contents: compiler output, cross-reference list,
search result, comparison result, batch log.
'File' 'Printer setup'
With this command you can determine the layout of the printed pages. The following
dialog box is now opened:
In the field File you can enter the name of the file with the extension ".dfr" in which
the page layout should be saved. The default destination for the settings is the file
DEFAULT.DFR. If you would like to change an existing layout, then browse
through the directory tree to find the desired file with the button Browse.
You can also choose whether to begin a new page for each object and for each
subobject. Use the Printer Setup button to open the printer configuration.
If you click on the Edit button, then the frame for setting up the page layout appears.
Here you can determine the page numbers, date, filename and POU name, and also
place graphics on the page and the text area in which the documentation should be
printed.
BODAS / 10 4-23
Managing Projects
Image 4.26: Window for pasting the placeholders on the page layout
With the menu item 'Insert' 'Placeholder' and subsequent selection among the five
placeholders (Page, POU name, File name, Date, and Content), insert into the
layout a so-called placeholder by dragging a rectangle2 on the layout while pressing
the left mouse button. In the printout they are replaced as follows:
Command Placeholder Effect
Page {Page} Here the current page number appears in
the printout.
POU name {POU Name} Here the current name of the POU
appears.
File name {File Name} Here the name of the project appears.
Date {Date} Here the current date appears.
Contents {Contents} Here the contents of the POU appear.
In addition, with 'Insert' 'Bitmap' you can insert a bitmap graphic (e.g. a company
logo) in the page. After selecting the graphic, a rectangle should also be drawn here
on the layout using the mouse. Other visualization elements can be inserted (see
chapter 8, Visualization).
If the template was changed, then BODAS asks when the window is closed if these
changes should be saved or not.
'File' 'Exit'
Shortcut: <Alt>+<F4>
With this command you exit from BODAS.
If a project is opened, then it is closed as described in 'File' 'Save'.
'Project' 'Build'
Shortcut: <F11>
The project is compiled using 'Project' 'Build'. The compilation process is basically
incremental, that is only changed POUs are recompiled. A non-incremental
compilation can also be obtained if the command 'Project' 'Clear all' is first executed.
For target systems that support Online Change, all POUs that will be loaded into the
controller on the next download are marked with a blue arrow in the Object
Organizer after compilation.
The compilation process that is carried out with 'Project' 'Build' occurs automatically
if the controller is logged-in via 'Online' 'Log-in'.
During compilation a message window is opened which shows the progress of the
compilation process and any errors and warnings which may occur during
compilation. Errors and warnings are marked with numbers. Using F1 you get more
information about the currently selected error.
2
Drawing a rectangle on the layout by dragging the mouse diagonally while pressing
the left mouse button.
4-24 BODAS / 10
Chapter 4 - The Individual Components
See Appendix N for a listing of all available error messages and warnings.
If the option Save before compilation is selected in the options dialog of the Load
& Save category, the project is stored before compilation.
Note: Cross references are created during compilation and are stored with the
compilation information. In order to be able to use the commands 'Show Call Tree',
'Show Cross Reference' and the commands 'Unused Variables', 'Concurrent
Access', and 'Multiple Write Access on output' in the 'Project' 'Check' menu, the
project must be rebuilt after any change.
‘Project’ ’Rebuild all’
With 'Project' 'Rebuild all', unlike the incremental compilation ('Project' 'Build'), the
project is completely recompiled. Downoad-Information is not discarded, however,
as is the case with the command 'Clear All'.
‘Project’ 'Clean all’
With this command, all the information from the last download (Download-
Information) and from the last compilation is deleted.
After the command is selected a dialog box appears, reporting that Online Change is
no longer possible. At this point the command can either be cancelled or confirmed.
Note: After 'Clear all' a login on the PLC project is only possible if the *.ri file
with the project information from the last download was first explicitly saved outside
the project directory (see 'Load Download-Information') and can now be reloaded
prior to logging-in.
'Project' 'Load Download-
Information'
With this command the Download-Information belonging to the project can get
reloaded, if it was saved to a directory different from that where the project is. After
choosing the command the standard dialogue 'File Open' opens.
The Download-Information is saved automatically at each download to a file, which
is named <project name><target identifier>.ri and which is put to the project
directory. This file is loaded, when the project is opened and at login it is used to
check whether the PLC project is fitting to the currently opened BODAS project (Id-
check). Furthermore it is used to check, in which POUs the code has been changed.
In systems which support the online change functionality, then only these POUs will
be loaded to the PLC during online change procedure.
BODAS / 10 4-25
Managing Projects
But: If the *.ri-file in the project directory gets deleted by the command 'Project'
'Clean all', you only can reload the Download-Information, if you had stored the
*.ri-file in another directory too.
‘Project’ 'Translate into
another language‘
This menu item is used for translating the current project file into another language.
This is carried out by reading in a translation file that was generated from the project
and externally enhanced in the desired national language with the help of a text
editor.
Two menu sub-items are present:
• Create translation file
• Translate project
In the Translation file field, enter a path that shows where the file is to be stored.
The default file extension is *.tlt; this is a text file.
If there already exists a translation file which you want to process, give the path of
this file or use the Search button to reach the standard Windows file selection
dialog.
The following information from the project can optionally be passed to the
translation file that is being modified or created, so that they will be available for
translation: Names (names, e.g. the title 'POUs' in Object Organizer), Identifiers,
Strings, Comments, Visualisation texts. In addition, Position information for
these project elements can be transferred.
4-26 BODAS / 10
Chapter 4 - The Individual Components
If the corresponding options are checked, the information from the current project
will be exported as language symbols into a newly created translation file or added to
an already existing one. If the respective option is not selected, information
belonging to the pertinent category, regardless of which project it came from, will be
deleted from the translation file.
The “Text” and “Tooltip-Text” elements in the visualization elements are considered
here to be visualization texts.
Note: For visualization texts (‚Text' and ‚Text for Tooltip’ in the visualization
elements) it must be noted that they must be bracketed by two “#” symbols in the
configuration dialog of the visualization element (e.g. #text#) in order to be
transferred to the translation file. (See in this connection chapter 8, Visualization).
These texts are also not translated with the command 'Project' 'Translate into other
languages' ! A language change for the visualization can only occur in Online mode
if the corresponding language is entered in the 'Extras' 'Settings' dialog.
Position information: This describes with the specifications file path, POU and line
the position of the language symbol made available for translation. Three options are
available for selection:
None: No position information is generated.
First appearance: The position on which the element first appears is added
to the translation file.
All: All positions on which the corresponding element appears
are specified.
If a translation file created earlier is to be edited which already contains more
position information than that currently selected, it will be correspondingly truncated
or deleted, regardless of which project it was generated from.
BODAS / 10 4-27
Managing Projects
Image 4.29: Dialog for excluding library information for the translation file
Image 4.30: Dialog for adding a target language (Project, Translate into Another Language)
A language identifier must be entered into the editor field; it may not have a space or
an umlaut character (ä, ö, ü) at either the beginning or the end.
OK closes the 'Add Target Language' dialog and the new target language appears in
the target language list.
The Remove button removes a selected entry from the list.
You may also confirm the “Create translation file” dialog via OK, in order to
generate a translation file.
If a translation file of the same name already exists you will get the following
confirmation message to be answered Yes or No:
" The specified translation file already exists. It will now be altered and a backup
copy of the existing file will be created. Do you want to continue?"
No returns you without action to the 'Create translation file' dialog. If Yes is selected,
a copy of the existing translation file with the filename “Backup_of_<translation
file>.xlt” will be created in the same directory and the corresponding translation file
will be modified in accordance with the options that have been entered.
The following takes place when a translation file is generated:
For each new target language, a placeholder (”##TODO”) is generated for each
language symbol to be displayed.
If an existing translation file is processed, file entries of languages that appear in the
translation file, but not in the target language list, are deleted, regardless of the
project from which they were generated.
4-28 BODAS / 10
Chapter 4 - The Individual Components
after translation:
The ##TODOs have been replaced by the English resp. French word for
'Visualisierung':
##NAME_ITEM
[D:\BODAS\projects\Bspdt_22.pro::ST_Visualisierung::0]
ST_Visualisierung
##English :: ST_Visualization
##French :: ST_Visu
##END_NAME_ITEM
Please check that the translated Identifier and Names remain valid concerning the
standard and that strings and comments are in correct brackets.
Hint: The following parts of a translation file should not be modified without
detailed knowledge: Language block, Flag block, Position information, Original
texts.
Translate Project (into another
Language)
This command in the 'Project' 'Translate into Another Language' menu opens the
'Translate Project into Another Language' dialog.
Image 4.31: Dialog for translating the project into another language
BODAS / 10 4-29
Managing Projects
Note: If you want to save the version of the project in the language in which it
was originally created, save a copy of the project prior to translation under a
different name. The translation process cannot be undone.
In the field Translation file, provide the path to the translation file to be used. By
pressing Search you may access the standard Windows file selection dialog.
The field Target language contains a list of the language identifiers entered in the
translation file, from which you can select the desired target language.
OK starts the translation of the current project into the chosen target language with
the help of the specified translation file. During translation, a progress dialog is
displayed, as well as error messages, if any. After translation, the dialog box and all
open editor windows of the project are closed.
Cancel closes the dialog box without modification to the current project.
If the translation file contains erroneous entries, an error message is displayed after
OK is pressed, giving the file path and the erroneous line, e.g.:
“[C:\Programs\BODAS\projects\visu.tlt (78)]; Translation text expected”
'Project' 'Document'
This command lets you print the documentation of your entire project. The elements
of a complete documentation are:
• The POUs,
• the contents of the documentation,
• the data types,
• the visualizations
• the resources ,global variables, variables configuration, the Sampling Trace,
the PLC Configuration, the Task Configuration, the Watch and Receipt
Manager)
• the call trees of POUs and data types, as well as
• the cross reference list.
For the last two items the project must have been built without errors.
Only those areas in the dialog box are printed which are highlighted in blue.
If you want to select the entire project, then select the name of your project in the
first line.
If, on the other hand, you only want to select a single object, then click on the
corresponding object or move the dotted rectangle onto the desired object with the
arrow key. Objects which have a plus sign in front of their symbols are organization
objects which contain other objects. With a click on a plus sign organization object is
expanded, and with a click on the resulting minus sign it can be closed up again.
When you select an organization object, then all relevant objets are also selected. By
pressing the <Shift> key you can select a group of objects, and by pressing the
<Ctrl> key you can select several individual objects.
4-30 BODAS / 10
Chapter 4 - The Individual Components
Once you have made your selection, then click on OK. The Print dialog box appears.
You can determine the layout of the pages to be printed with 'File' 'Printer setup'.
'Project' 'Export'
With BODAS projects can be exported or imported. That allows you to exchange
programs between different IEC programming systems.
There is a standardized exchange format for POUs in IL, ST, and SFC (the Common
Elements format of IEC 1131-3). For the POUs in LD and FBD and the other objects
BODAS has its own filing format since there is no text format for this in
IEC 1131-3.
The selected objects are written to an ASCII file.
POUs, data types, visualizations, and the resources can be exported. In addition,
entries in the library manager, that is the linking information to the libraries, can be
exported (not the libraries themselves!).
BODAS / 10 4-31
Managing Projects
parts to one file or to export in separate files, one for each object. Switch on or off
the option One file for each object then click on OK. The dialog box for saving
files appears. Enter a file name with the expansion ".exp" respectively a directory for
the object export files, which then will be saved there with the file name
<objectname.exp>.
'Project' 'Import'
In the resulting dialog box for opening files select the desired export file.
The data is imported into the current project. If an object with the same name already
exists in the same project, then a dialog box appears with the question "Do you want
to replace it?": If you answer Yes, then the object in the project is replaced by the
object from the import file. If you answer No, then the name of the new objects
receives as a supplement an underline and a digit ("_0", "_1", ..). With Yes, all or
No, all this is carried out for all objects.
If the information is imported to link with a library, the library will be loaded and
appended to the end of the list in the library manager. If the library was already
loaded into the project, it will not be reloaded. If, however, the export file that is
being imported shows a different storage time for the library, the library name is
marked with a “*” in the library manager (e.g. standard.lib*30.3.99 11:30:14),
similar to the loading of a project. If the library can not be found, then an
information dialog appears: “Cannot find library {<path>\}<name> <date> <time>”,
as when a project is loaded.
In the message window the import is registered.
‘Project‘ ‘Merge‘
With this command you can merge objects (POUs, data types, visualizations, and
resources) as well as links to libraries from other projects into your project.
When the command has been given, first the standard dialog box for opening files
appears. When you have chosen a file there, a dialog box appears in which you can
choose the desired object. The selection takes place as described with 'Project'
'Document' .
If an object with the same name already exists in the project, then the name of the
new object receives the addition of an underline and a digit ("_1", "_2" ...).
‘Project‘ ‘Compare‘
This command is used to compare two projects or to compare the actual version of
one project with that which was saved last.
Overview:
In the following the name 'actual project' will be used for the project which is
currently under way, the name 'reference project' will be used for that project which
has been called to get compared with.
After the command has been executed, the actual project and the reference project
will be presented in 'compare mode' in a bipartited window. The names of the POUs,
for which differences have been found, are marked by color. For editor POUs also
the content of the POUs is displayed in a vis-a-vis way. The results and the way of
presenting in compare mode depend on: 1. what filters have been activated for the
4-32 BODAS / 10
Chapter 4 - The Individual Components
Execute comparison:
After executing the command 'Project' 'Compare' the dialog 'Project Comparison'
opens:
Insert the path of the reference project at Project to compare. Press button if
you want to use the standard dialog for opening a project. If you insert the name of
the actual project, the current version of the project will be compared with the
version which was saved last.
The following options concerning the comparison can be activated:
Ignore whitespaces: There will be detected no differences which consist in a
different number of whitespaces.
Ignore comments: There will be detected no differences in comments.
Oppose differences: If a line, a network or an element wihthin a POU has been
modified, in compare mode it will be displayed in the bipartited window directly
opposite to the version of the other project (marked red, see below). If the option is
deactivated, the corresponding line will be displayed in the reference project as
'deleted' and in the actual project as 'inserted' (blue/green, see below). This means it
will not be displayed directly opposite to the same line in the other project.
Example:
Line 0005 has been modified in actual project (left side).
BODAS / 10 4-33
Managing Projects
When the dialog Project Comparison is closed by pressing OK, the comparison will
be executed according to the settings.
Representation of the result of the comparison:
1. Project overview in compare mode:
After the project compare has been executed, a bipartited window opens which
shows the project in compare mode. In the title bar you find the project paths:
"Project comparison <path of actual project> - <path of reference project>". The
actual project is represented In the left half of the window, the reference project in
the right one. Each structure tree shows the projects' name at the uppermost position,
apart from that it corresponds to the the object organizer structure.
POUs which are different, are marked in the structure tree by a shadow, a specific
color and eventually by an additional text :
4-34 BODAS / 10
Chapter 4 - The Individual Components
Red: Unit has been modified; is displayed with red colored letters in both partitions
of the window.
Blue: Unit only available in compare project; a gap will be inserted at the
corresponding place in the structure overview of the actual project.
Grün: Unit only available in actual project; a gap will be inserted at the
corresponding place in the structure overview of the actual project.
Black: Unit for which no differences have been detected.
"(Properties changed)": This text is attached to the POU name in the project
structure tree, if differences in the properties of the POU have been detected.
"(Access rights changed)": This text is attached to the POU name in the project
structure tree, if differences in the access rights of the POU have been detected.
If it is not a editor POU, but the task configuration, the target settings etc., then the
POU version of the actual and the reference project can be opened in separate
windows by a double click on the respective line in the project structure. For those
project POUs no further details of differences will be displayed.
BODAS / 10 4-35
Managing Projects
4-36 BODAS / 10
Chapter 4 - The Individual Components
When you press the button Statistics you receive statistical information about the
project.
It contains information such as the number of the POUs, data types, and the local and
global variables as they were traced at the last compilation.
BODAS / 10 4-37
Managing Projects
If you choose the option Ask for project info in the category Load & Save in the
Options dialog box, then while saving a new project, or while saving a project under
a new name, the project info is called automatically.
‘Project‘ ‘Global Search‘
With this command you can search for the location of a text in POUs, data types, or
in the objects of the global variables.
When the command is entered, a dialog box opens in which you can choose the
desired object. The selection is made as in the 'Project' 'Document' description.
If the selection is confirmed with OK, the standard dialog for Search will be opened.
This appears immediately when the command 'Global Search' is invoked via the
symbol in the menu bar; the search is then automatically carried out in all
searchable parts of the project. The most recently entered search strings can be
selected through the combo box of the Search for field. If a text string is found in an
object, the object is loaded into the corresponding editor or in the library manager
and the location where the string was found is displayed. The display of the text that
is found, as well as the search and find next functions behave similarly to the
command 'Edit' 'Search'.
If you select the In message window button, all locations where the series of
symbols searched for appears in the selected object will be listed line by line in
tabular form in the message window. Afterward, the number of locations found will
be displayed.
If the report window was not opened, it will be displayed. For each location that is
found, the following will be displayed:
• Object name
• Location of the find in the Declaration (Decl) or in the Implementation (Impl)
portion of a POU
• Line and network number if any
• The full line in the text editors
• Complete text element in the graphic editors
If you double-click the mouse on a line in the message window or press <Enter>, the
editor opens with the object loaded. The line concerned in the object is marked. You
can jump rapidly between display lines using the function keys <F4> and
<Shift>+<F4>.
4-38 BODAS / 10
Chapter 4 - The Individual Components
BODAS / 10 4-39
Managing Projects
When a new project is launched, then all passwords are initially empty. Until a
password has been set for the 0 group, one enters the project automatically as a
member of the 0 group.
If a password for the user group 0 is existing while the project is loaded, then a
password will be demanded for all groups when the project is opened. For this the
following dialog box appears:
In the combobox User group on the left side of the dialog box, enter the group to
which you belong and enter on the right side the relevant password. Press OK. If the
password does not agree with the saved password, then the message appears:
"The password is not correct."
Only when you have entered the correct password the project can be opened.
With the command 'Passwords for user group' you can assign the passwords, and
with 'Object' 'Access rights' you can define the rights for single objects or for all of
them.
‘Project‘‘Passwords for user
groups‘
With this command you open the dialog box for password assignment for user
groups. This command can only be executed by members of group 0. When the
command has been given, then the following dialog box appears:
In the left combobox User group you can select the group. Enter the desired
password for the group in the field Password. For each typed character an asterisk
(*) appears in the field. You must repeat the same password in the field Confirm
password. Close the dialog box after each password entry with OK. If you get the
message:
"The password does not agree with the confirmation",
4-40 BODAS / 10
Chapter 4 - The Individual Components
then you made a typing error during one of the two entries. In this case repeat both
entries until the dialog box closes without a message.
Then, if necessary, assign a password for the next group by calling the command
again.
Use the command 'Object' 'Access rights' to assign the rights for single objects or
all of them.
Now we shall explain how to work with objects and what help is available to keep
track of a project (Folders, Call tree, Cross reference list,..).
Object
POUs, data types, visualizations and the resources global variables, the variable
configuration, the Sampling Trace, the PLC Configuration, the Task Configuration,
and the Watch and Receipt Manager are all defined as "objects". The folders inserted
for structuring the project are partially involved. All objects of a project are in the
Object Organizer.
If you hold the mouse pointer for a short time on a POU in the Object Organizer,
then the type of the POU (Program, Function or Function block) is shown in a
Tooltip. For the global variables the tooltip shows the keyword (VAR_GLOBAL,
VAR_CONFIG).
With drag & drop you can shift objects (and also folders, see 'Folder') within an
object type. For this, select the object and shift it to the desired spot by holding down
the left mouse button. If the shift results in a name collision, the newly introduced
element will be uniquely identified by an appended, serial number (e.g. “Object_1”).
Folder
In order to keep track of larger projects you should group your POUs, data types,
visualizations, and global variables systematically in folders.
You can set up as many levels of folders as you want. If a plus sign is in front of a
closed folder symbol , then this folder contains objects and/or additional
folders. With a click on the plus sign the folder is opened and the subordinated
objects appear. With a click on the minus (which has replaced the plus sign) the
folder can be closed again. In the context menu you find the commands 'Expand
nodes' and 'Collapse nodes' with the same functions.
With Drag&Drop you can move the objects as well as the folders within their object
type. For this select the object and drag it with pressed left mouse button to the
desired position.
You can create more folders with the command 'New folder'.
BODAS / 10 4-41
Managing Objects in a Project
Note: Folders have no influence on the program, but rather serve only to
structure your project clearly.
‘New Folder‘
With this command a new folder is inserted as a structural object. If a folder has
been selected, then the new one is created underneath it. Otherwise it is created on
the same level. If an action is selected, the new folder will be inserted at the level of
the POU to which the action belongs.
The context menu of the Object Organizer which contains this command appears
when an object or the object type has been selected and you have pressed the right
mouse button or <Shift>+<F10>.
The newly inserted folder initially has the designation 'New Folder'. Observe the
following naming convention for folders:
• Folders at the same level in the hierarchy must have distinct names. Folders on
different levels can have the same name.
• A folder can not have the same name as an object located on the same level.
If there is already a folder with the name “New Folder” on the same level, each
additional one with this name automatically receives an appended, serial number
(e.g. “New Folder 1”). Renaming to a name that is already in use is not possible.
4-42 BODAS / 10
Chapter 4 - The Individual Components
With this command the currently selected object (a POU, a data type, a visualization,
or global variables), or a folder with the subordinated objects is removed from the
Object Organizer and is thus deleted from the project
For safety you are asked once more for confirmation.
If the editor window of the object was open, then it is automatically closed.
If you delete with the command 'Edit' 'Cut', then the object is parked on the
clipboard.
‘Project‘ ‘Object Add‘
Shortcut: <Insert>
With this command you create a new object. The type of the object (POU, data type,
visualization, or global variables) depends upon the selected register card in the
Object Organizer. Enter the Name of the new POU in the dialog box which appears.
Remember that the name of the object may not have already been used.
Take note of the following restrictions:
• The name of a POU can not include any spaces
• A POU can not have the same name as another POU, or a data type.
• A data type can not receive the same name as another data type or a POU.
• A global variable list can not have the same name as another global variable list.
• An action can not have the same name as another action in the same POU.
• A visualization can not have the same name as another visualization.
In all other cases, identical naming is allowed. Thus for example actions belonging
to different POUs can have the same name, and a visualization may have the same as
a POU.
In the case of a POU, the POU type (program, function or function block) and the
language in which it is programmed must also be selected. 'Program' is the default
value of Type of the POU, while that of Language of the POU is that of most
recently created POU. If a POU of the function type is created, the desired data type
must be entered in the Return Type text input field. Here all elementary and defined
data types (arrays, structures, enumerations, aliases) are allowed. Input assistance
(e.g. via <F2>) can be used.
BODAS / 10 4-43
Managing Objects in a Project
After pressing OK, which is only possible if there is no conflict with the naming
conventions described above, the new object is set up in the Object Organizer and
the appropriate input window appears.
If the command 'Edit' 'Insert' is used, the object currently in the clipboard is
inserted and no dialog appears. If the name of the inserted object conflicts with the
naming conventions (see above), it is made unique by the addition of a serial number
appended with a leading underline character (e.g. “Rightturnsig_1”).
‘Project‘ ‘Object Rename‘
Shortcut: <Spacebar>
With this command you give a new name to the currently-selected object or folder.
Remember that the name of the object may not have already been used.
If the editing window of the object is open, then its title is changed automatically
when the name is changed.
4-44 BODAS / 10
Chapter 4 - The Individual Components
BODAS / 10 4-45
Managing Objects in a Project
Members of the user group 0 can now assign individual access rights for each user
group. There are three possible settings:
• No Access: the object may not be opened by a member of the user group.
• Read Access: the object can be opened for reading by a member of the user
group but not changed.
• Full Access: the object may be opened and changed by a member of the user
group.
The settings refer either to the currently-selected object in the Object Organizer or, if
the option Apply to all is chosen, to all POUs, data types, visualizations, and
resources of the project.
The assignment to a user group takes place when opening the project through a
password request if a password was assigned to the user group 0.
‘Project’ ‘Object properties'
This command is only available if a global variable list in the Object Organizer is
marked. It opens the dialog 'Global Variable List', in which the parameters for the
updating of the list and, if applicable, for data exchange of network global variables,
are configured. Entries can be changed here. When a new global variable list is
created, this dialog is opened with the command 'Insert Object' if the folder 'Global
Variables' or any entry above is marked in the Object Organizer.
‘Project’ ‘Add Action’
This command is used to generate an action allocated to a selected block in the
Object Organizer. One selects the name of the action in the dialog which appears and
also the language in which the action should be implemented.
The new action is placed under your block in the Object Organiser. A plus sign
appears in front of the block. A simple mouse click on the plus sign causes the action
objects to appear and a minus sign appears in front of the block. Renewed clicking
on the minus sign causes the actions to disappear and the plus sign appears again.
4-46 BODAS / 10
Chapter 4 - The Individual Components
This can also be achieved over the context menu commands ‘Expand Node’ and
‘Collapse Node’.
'Project' 'Open Instance'
With this command it is possible to open and display the instance of the function
block which is selected in the Object Organizer. In the same manner, a double click
on the function block in the Object Organizer gives access to a selection dialog in
which the instances of the function block as well as the implementation are listed.
Select here the desired instance or the implementation and confirm using OK. The
desired item is then displayed in a window.
Attention: If you want to view instances, you first have to log in ! (The project
has been compiled with no errors and downloaded to the PLC with ‘Online’
’Login’).
BODAS / 10 4-47
General Editing Functions
Choose first the category 'Variable' or 'POU' and then enter the name of the desired
element. To obtain all elements of the entered category enter a “*” in Name.
By clicking on the button Cross References you get the list of all application points.
Along with the POU and the line or network number, the variable name and the
address binding, if any, are specified. The Domain space shows whether this is a
local or a global variable; the Access column shows whether the variable is to be
accessed for ‚reading’ or ‚writing’ at the current location.
When you select a line of the cross reference list and press the button Go To or
doubleclick on the line, then the POU is shown in its editor at the corresponding
point. In this way you can jump to all application points without a time-consuming
search.
In order to make processing easier, you can use the Send to message window button
to bring the current cross reference list into the message window and from there
change to the respective POU.
You can use the following commands in all editors and some of them in the Object
Organizer. The commands are located under the menu item 'Edit' and in the context
menu that is opened with the right mouse button.
4-48 BODAS / 10
Chapter 4 - The Individual Components
Note: The commands Undo and Redo apply to the current window. Each
window carries its own action list. If you want to undo actions in several windows,
then you must activate the corresponding window. When undoing or redoing in the
Object Organizer the focus must lie here.
‘Edit‘ ‘Redo‘
Shortcut: <Ctrl>+<Y>
With the command in the currently-open editor window or in the Object Organizer
you can restore an action you have undone ('Edit' 'Undo').
As often as you have previously executed the command 'Undo' , you can also carry
out the command 'Redo'.
Note: The commands 'Undo' and 'Redo' apply to the current window. Each
window carries its own action list. If you want to undo actions in several windows,
then you must activate the corresponding window. When undoing or redoing in the
Object Manager must lie there.
‘Edit‘ ‘Cut‘
Symbol:
Shortcut: <Ctrl>+<X> or <Shift>+<Delete>
This command transfers the current selection from the editor to the clipboard. The
selection is removed from the editor.
In the Object Organizer this similarly applies to the selected object, whereby not all
objects can be deleted, e.g. the PLC Configuration.
Remember that not all editors support the cut command, and that its use can be
limited in some editors.
The form of the selection depends upon the respective editor:
In the text editors IL, ST, and declarations the selection is a list of characters.
BODAS / 10 4-49
General Editing Functions
In the FBD and LD editors the choice is a number of networks which are indicated
by a dotted rectangle in the network number field or a box with all preceding lines,
boxes, and operands.
In the SFC editor the selection is a part of a series of steps surrounded by a dotted
rectangle.
In order to paste the content of the clipboard you use the command 'Edit' 'Paste'. In
the SFC editor you can also use the commands 'Extras' 'Insert parallel branch (right)'
or 'Extras' 'Paste after'.
In order to copy a selection onto the clipboard without deleting it, use the command
'Edit' 'Copy'.
In order to remove a selected area without changing the clipboard, use the command
'Edit' 'Delete'.
‘Edit‘ ‘Copy‘
4-50 BODAS / 10
Chapter 4 - The Individual Components
Remember that pasting is not supported by all editors and that its use can be limited
in some editors.
The current position can be defined differently according to the type of editor:
With the text editors (IL, ST Declarations) the current position is that of the blinking
cursor (a vertical line) which you place by clicking with the mouse).
In the FBD and LD editors the current position is the first network with a dotted
rectangle in the network number area. The contents of the clipboard are inserted in
front of this network. If a partial structure has been copied, then it is inserted in front
of the selected element.
In the SFC editor the current position is determined the selection which is
surrounded by a dotted rectangle. Depending upon the selection and the contents of
the clipboard, these contents are inserted either in front of the selection or into a new
branch (parallel or alternative) to the left of the selection.
In SFC the commands 'Extras' 'Insert parallel branch (right)' or 'Extras' 'Paste after'
can be used in order to insert the contents of the clipboard.
In order to copy a selection onto the clipboard without deleting it, use the command
'Edit' 'Copy'.
In order to remove a selected area without changing the clipboard, use the command
'Edit' 'Delete'.
‘Edit‘ ‘Delete'
Shortcut: <Del>
Deletes the selected area from the editor window. This does not change the contents
of the clipboard.
In the Object Organizer this applies likewise to the selected object, whereby not all
objects can be deleted, e.g. the PLC Configuration.
For the type of selection the same rules apply as with 'Edit' 'Cut'.
The form of the selection depends upon the respective editor:
In the text editors (IL, ST, and declarations) the selection is a list of characters.
In the FBD and LD editors the selection is a number of networks which are
highlighted with a dotted rectangle in the network number field.
In the SFC editor the selection is a part of a series of steps surrounded by a dotted
rectangle.
In the library manager the selection is the currently selected library name.
In order to delete a selected area and simultaneously put it on the clipboard, use the
command 'Edit' 'Cut'.
'Edit' ‘Find‘
Symbol:
With this command you search for a certain text passage in the current editor
window. The Find dialog box opens. It remains opens until the button Cancel is
pressed.
BODAS / 10 4-51
General Editing Functions
In the field Find what you can enter the series of characters you are looking for.
In addition, you can decide whether the text you are looking for Match whole word
only or not, or also whether Match case is to be considered, and whether the search
should proceed Up or Down starting from the current cursor position.
The button Find next starts the search which begins at the selected position and
continues in the chosen search direction. If the text passages is found, then it is
highlighted. If the passage is not found, then a message announces this. The search
can be repeated several times in succession until the beginning or the end of the
contents of the editor window has been reached.
Remember that the found text can be covered up by the Find dialog box.
4-52 BODAS / 10
Chapter 4 - The Individual Components
• Unstructured Display:
The POUs, variables or data types in each category are simply sorted linearly in
alphabetical order.
At various places (e.g. in the Watch List), multi-stage variable names are required. In
that event, the Input Assistant dialog displays a list of all POUs as well as a single
point for the global variables. After each POU name there is a point. If a POU is
BODAS / 10 4-53
General Editing Functions
• Structured Display:
If Structured display is selected, the POUs, variables or data types will be sorted
hierarchically. This is possible for standard programs, standard functions, standard
function blocks, defined programs, defined functions, defined function blocks, global
variables, local variables, defined types, watch variables. The visual and hierarchical
display corresponds to that of the Object Organizer; if elements in a library are
referred to, these are inserted in alphabetical order at the very top and the pertinent
hierarchy is displayed as in the Library Manager.
The in- and output variables of function blocks which are declared as local or
global variables are listed in the category 'Local Variables' or 'Global Variables'
under the instance name (e.g. Inst_TP ET, Inst_TP IN,...). To get there, select the
instance name (e.g. Inst_TP) and confirm with OK.
If the instance of a function block is selected here, the option With arguments
may be selected. In the text languages ST and IL as well as during task
configuration, the instance name and the input parameters of the function block are
then inserted.
For example, if Inst (DeklarationInst: TON;) is selected, the following is inserted:
Inst(IN:= ,PT:=)
If the option is not selected, only the instance name will be inserted. In the graphical
languages or in the Watch window, only the instance name is generally inserted.
4-54 BODAS / 10
Chapter 4 - The Individual Components
Note: Some entries (e.g. Global Variables) are only updated in the Input
Assistant dialog after compilation.
‘Edit’ ’Declare Variable’
Shortcut: <Shift>+<F2>
This command opens the dialog for the declaration of a variable. This dialog also
opens automatically when the option 'Project' 'Options' 'Editor' 'Autodeclaration' is
switched on and when a new undefined variable is used the declaration editor.
‘Edit‘ ‘Next error'
Shortcut: <F4>
After the incorrect compilation of a project this command can show the next error.
The corresponding editor window is activated and the incorrect place is selected. At
the same time in the message window the corresponding error message is shown.
‘Edit‘ ‘Previous error‘"
Shortcut: <Shift>+<F4>
BODAS / 10 4-55
General Online Functions
After the incorrect compilation of a project this command shows the previous error.
The corresponding editor window is activated and the incorrect place is selected. At
the same time in the message window the corresponding error message is shown.
‘Edit’ ’Macros’
This menu item leads to a list of all macros, which are defined for the project. (For
info on generating macros see 'Project' 'Options' 'Macros' ). When an executable
macro is selected the dialog 'Process Macro'. The name of the macro and the
currently active command line are displayed. The button Cancel can be used to stop
the processing of the macro. In that event the processing of the current command
will be finished anyway. Then an appropriate message is displayed in the message
window and in the log during Online operation: "<Macro>: Execution interrupted by
user“.
Macros can be executed offline and online, but in each case only those commandes
are executed which are available in the respective mode.
The available online commands are assembled under the menu item 'Online'. The
execution of some of the commands depends upon the active editor.
The online commands become available only after logging in.
Thanks to 'Online Change' functionality you have the possibility of making changes
to programs on the running controller. See in this connection 'Online' 'Log-in'.
'Online' 'Login'
4-56 BODAS / 10
Chapter 4 - The Individual Components
After a successful login all online functions are available (if the corresponding
settings in 'Project' 'Options' category 'Build' have been entered). The current values
are monitored for all visible variable declarations.
Use the 'Online' 'Logout' command to change from online back to offline mode.
If the system reports
Error:
„Communication error. Log-out has occurred“
Check whether the controller is running.
Check whether the parameters entered in 'Online' 'Communications parameters'
match those of your controller. In particular, you should check whether the correct
port has been entered and whether the baud rates in the controller and the
programming system match. If the gateway server is used, check whether the correct
channel is set.
Check wether the PLC had been connected to BODEM or BB-3 during start-up.
Restart the PLC and log-in again.
Error:
"The program has been modified! Should the new program be loaded?"
The project which is open in the editor is incompatible with the program currently
found in the PLC (or with the Simulation Mode program being run). Monitoring and
debugging is therefore not possible. You can either choose "No," logout, and open
the right project, or use "Yes" to load the current project in the PLC.
‘Online‘ ‘Logout'
BODAS / 10 4-57
General Online Functions
Stops the execution of the program in the PLC or in Simulation Mode between two
cycles.
Use the 'Online' 'Run' command to continue the program.
'Online' 'Reset'
The controller is reset and restarts the program.
'Online' 'Toggle Breakpoint'
4-58 BODAS / 10
Chapter 4 - The Individual Components
In order to delete a breakpoint, highlight the breakpoint to be deleted from the list of
the set breakpoints and press the Delete button.
The Delete All button can be used to delete all the breakpoints.
In order to go to the location in the editor where a certain breakpoint was set,
highlight the respective breakpoint from the list of set breakpoints and press the Go
to button.
To set or delete breakpoints, you can also use the 'Online' 'Toggle Breakpoint'
command.
BODAS / 10 4-59
General Online Functions
• For boolean variables, the value is toggled (switched between TRUE and
FALSE, with no other value allowed) by double-clicking on the line in which the
variable is declared; no dialog appears.
The value set for Writing is displayed in brackets and in turquoise colour behind the
former value of the variable. e.g. a=0 <:=34>.
Hint: Exception: In the FBD and LD Editor the value is shown turquoise
without brackets next to the variable name.
4-60 BODAS / 10
Chapter 4 - The Individual Components
Note: In the sequential function chart language (SFC), the individual values
from which a transition expression is assembled cannot be changed with 'Write
values'. This is due to the fact that in monitoring the 'Total value' of the expression,
not the values of the individual variables are displayed (e.g. "a AND b" is only
displayed as TRUE if both variables actually have the value TRUE).
In FBD, on the other hand, only the first variable in an expression, used for example
as input to a function block, is monitored. Thus a 'Write values' command is only
possible for this variable.
'Online' 'Force values'
Shortcut: <F7>
With this command, one or more variables are permanently set (see 'Online' 'Write
values' for setting only once at the beginning of a cycle) to user-defined values. The
setting occurs in the run-time system, both at the beginning and at the end of the
cycle.
The time sequence in one cycle: 1.Read inputs, 2. Force values 3. Process code, 4.
Force values 5. Write outputs.
The function remains active until it is explicitly suspended by the user (command
'Online' 'Release force') or the programming system is logged-out.
For setting the new values, a writelist is first created, just as described under 'Online'
'Write values'. The variables contained in the writelist are accordingly marked in
Monitoring. The writelist is transferred to a forcelist as soon as the command
'Online' 'Force values' is executed. It is possible that an active forcelist already exists,
in which case it is updated as required. The writelist is then emptied and the new
BODAS / 10 4-61
General Online Functions
Note: In the sequential function chart language, the individual values from
which a transition expression is assembled cannot be changed with 'Force values'.
This is due to the fact that in monitoring the 'Total value' of the expression, not the
values of the individual variables are displayed (e.g. "a AND b" is only displayed as
TRUE if both variables actually have the value TRUE).
In FBD, on the other hand, only the first variable in an expression, used for example
as input to a function block, is monitored. Thus a 'Force values' command is only
possible for this variable.
‘Online’ ‘Release force'
Shortcut: <Shift>+<F7>
This command ends the forcing of variable values in the controller. The variable
values change again in the normal way.
Forced variables can be recognized in Monitoring by the red color in which their
values are displayed. You can delete the whole forcelist, but you can also mark
single variables for which the forcing should be released.
To delete the whole forcelist, which means to release force for all variables, choose
one of the following ways:
• Command 'Release Force' in menu 'Online'.
• Button 'Release Force' in dialog 'Editing the writelist and the forcelist'
• Delete the whole forcelist using the command ‘Release Force’ in the dialog
‘Remove Write-/Forcelist’. This dialog opens if you choose the command
‘Release Force’ while also a writelist exists.
To release force only for single variables you have to mark these variable first. Do
this in one ways described in the following. After that the chosen variables are
marked with an turquoise extension <Release Force>:
• A double mouse click on a line, in which a non boolean variable is declared,
opens the dialog ‘Write variable <x>’. Press button <Release Force for this
variable> .
• Repeat double mouse clicks on a line in which a boolean variable is declared to
toggle to the display <Release Force> at the end of the line.
• In the menu ‘Online’ open the Write/Force-Dialog and delete the value in the
edit field of the column ‘Forced value’.
4-62 BODAS / 10
Chapter 4 - The Individual Components
When for all desired variables the setting “<Release Force>” is shown in the
declaration window, choose the command ‘Force’ to transfer the modifications of
the forcelist to the program.
If the current writelist (see 'Online' 'Write Values') is not empty while you execute
the command ‘Release Force’, the dialog 'Remove Write-/Forcelist’ will be opened.
There the user has to decide whether he just wants to Release Force or additionally
wants to Remove the writelist or if he wants to remove both lists.
Image 4.58: Dialog for editing the writelist and the forcelist
BODAS / 10 4-63
General Online Functions
The variables reach the watchlist via the commands 'Online' 'Write Values' and are
transferred to the forcelist by the command 'Online' 'Force Values'. The values can
be edited here in the „Prepared Value“ or „Forced Value“ columns by clicking the
mouse on an entry to open an editor field. If the entry is not type-consistent, an error
message is displayed. If a value is deleted, it means that the entry is deleted from the
writelist or the variable is noticed for suspension of forcing as soon as the dialog is
closed with any other command than Cancel.
The following commands, corresponding to those in the Online menu, are available
via buttons:
Force Values: All entries in the current writelist are transferred to the forcelist, that
is the values of the variables in the controller are forced. All variables marked with
'Release Force' are no longer forced. The dialog is then closed.
Write Values: All entries in the current writelist are written once only to the
corresponding variables in the controller. The dialog is then closed.
Release Force: All entries in the forcelist will be deleted or, if a writelist is present,
the dialog “Delete write-/forcelist” comes up, in which the user must decide whether
he only wants to release forcing or discard the writelist, or both. The dialog will
close at that point, or after the selection dialog is closed as the case may be.
‘Online‘ ‘Show Call Stack‘
The first POU is always PLC_PRG, because this is where the executing begins.
The last POU is always the POU being executed.
After you have selected a POU and have pressed the Go to button, the selected POU
is loaded in its editor, and it will display the line or network being processed.
4-64 BODAS / 10
Chapter 4 - The Individual Components
BODAS / 10 4-65
General Online Functions
‘Online’ ’Communication
Parameters’
You are offered a special dialog for setting communication parameters when the
communication between the local PC and the run-time system is running over a
gateway server in your system. (If the OPC or DDE server is used, the same
communications parameters must be entered in its configuration).
Before the handling of the dialog will be described, see first the
Principle of a gateway system
Let us examine the principle of the gateway system before explaining the operation
of the dialog:
A gateway server can be used to allow your local PC to communicate with one or
more run-time systems. The setting concerning which run-time systems can be
addressed, which is specifically configured for each gateway server, and the
connection to the desired gateway server, is made on the local PC. Here it is possible
that both the gateway server and the run-time system(s) can run together on the local
PC. If we are dealing with a gateway server which is running on another PC we must
ensure that it has been started there. If you are selecting a locally installed gateway
server, it automatically starts when you log onto the target run-time system. You can
recognise this through the appearance of a BODAS symbol on the bottom right in the
task bar. This symbol lights up as long as you are connected to the run-time system
over the gateway. The menu points Info and Finish are obtained by clicking with the
right mousekey on the symbol. Finish is used to switch off the gateway.
See the scheme shown below presenting a gateway system:
PC_local is your local PC, PC_x is another PC, which gateway addresses.
PC_gateway is the PC on which the gateway server is installed, PC_PLC1 through
to PC_PLC4 are PCs on which the run-time systems are running. The diagram
shows the modules as separated but it is fully possible for the Gateway server and /
or run-time systems to be installed together on the local PC.
4-66 BODAS / 10
Chapter 4 - The Individual Components
The connections from gateway to the various run-time computers can, on the other
hand, run over different protocols (TCP/IP, Pipe, etc.).
Image 4.61: Dialog for setting the gateway communications parameters, example
BODAS / 10 4-67
General Online Functions
configuration parameters are stored locally in the project but they will first be known
to the gateway the next time log-in to the run-time system occurs. This has already
occurred for PC_PLC1 since the associated gateway address has appeared as an
additional ”sub-branch” to the ”channel tree”.
In the central part of the dialog one finds the designation, in each case, of the left
selected channel and the associated parameter under Name, Value and Comment.
Bild 4.62: Example dialog, definition of the local connection to the gateway
4-68 BODAS / 10
Chapter 4 - The Individual Components
• The computer’s port on which the gateway server that you wish to use is
running, as a rule the correct value for the selected gateway is already given.
If the dialog is closed with OK, the corresponding entry (computer address) appears
in the Channels field at the top of the 'Communication parameters' dialog, and
below it the channels available on this gateway server.
The input field Name automatically contains the name used for the last inputted
channel. If no channel has yet been defined, the current gateway name will be
offered, followed by an underline character , e.g. 'localhost_'. You can edit the
channel name at this point. The channel name is purely informative, it does not have
to be a unique name but it is recommended to use one.
BODAS / 10 4-69
General Online Functions
The device drivers available on the gateway computer are listed in the table under
Device. In the Name column, select by mouse click one of the available drivers; the
corresponding comment, if any, appears in the Info column.
If you close the '...New Channel' dialog with OK, the newly defined channel appears
in the 'Communication Parameters' dialog as a new entry in Channels at the lowest
position under the minus sign. So far, it is only stored locally in the project (see
above). At this point you can edit the Value column (see tips below). Now confirm
the entered parameters with OK, thus leaving the 'Communication Parameters'
dialog.
In order for the newly entered gateway channel and its parameters to also be known
to the gateway server xy, and thus also to make it available to other computers that
access this gateway xy, you must log into the run-time system. If you then re-open
the 'Online' 'Communication parameters' dialog, the new channel appears in the
„channel tree“, not only in its previous position but also indented under the address
or name of the gateway server xy. This indicates that it is known to the network. You
can now open the Communication Parameter dialog on a computer other than the
local one, select gateway xy and use its new channel.
If a communications error occurs when logging in, it is possible that the interface
cannot be opened (e.g. COM1 for a serial connection) possibly because it is being
used by another device. It is also possible that the controller is not running.
The parameters for a channel already known by the gateway server can no longer be
edited in the configuration dialog. The parameter fields appear grey. You can,
however, delete the connection as long as it is not active.
4-70 BODAS / 10
Chapter 4 - The Individual Components
• Has the gateway server been started (the three-color symbol appears in the
bottom right portion of the toolbar) ?
• Is the IP address that you entered in the 'Gateway: Communication Parameters'
dialog really that of the computer on which the gateway is running ? (use „ping“
to check)
• Is the TCP/IP connection working locally? The error may possibly lie with
TCP/IP.
4.7 Log
The log stores in chronological order actions that occur during an Online session. For
this purpose a binary log file (*.log) is set up. Afterward, the user can store excerpts
from the appropriate project log in an external log.
The log window can be opened in either Offline or Online mode and can thus serve
as a direct monitor online.
'Window' 'Log'
To open, select the menu item 'Window' 'Log'.
In the log window, the filename of the currently displayed log appears after Log:. If
this is the log of the current project, the word "(Internal)" will be displayed.
Registered entries are displayed in the log window. The newest entry always appears
at the bottom.
Only actions belonging to categories that have been activated in the 'Filter' field of
the menu 'Project' 'Options' 'Log' will be displayed.
BODAS / 10 4-71
Log
Available information concerning the currently selected entry is displayed below the
log window:
Category: The category to which the particular log entry belongs. The following
four categories are possible:
• User action: The user has carried out an Online action (typically from the Online
menu).
• Internal action: An internal action has been executed in the Online layer (e.g.
Delete Buffers or Init Debugging).
• Status change: The status of the runtime system has changed (e.g. from Running
to Break, if a breakpoint is reached).
• Exception: An exception has occurred, e.g. a communication error.
Description: The type of action. User actions have the same names as their
corresponding menu commands; all other actions are in English and have the same
name as the corresponding OnlineXXX() function.
Info: This field contains a description of an error that may have occurred during an
action. The field is empty if no error has occurred.
System time: The system time at which the action began, to the nearest second.
4-72 BODAS / 10
Chapter 4 - The Individual Components
Relative time: The time measured from the beginning of the Online session, to the
nearest millisecond.
Duration: Duration of the action in milliseconds.
Menu Log
When the log window has the input focus, the menu option Log appears in the menu
bar instead of the items 'Extras' and 'Options'.
The menu includes the following items:
Save… This menu item can only be selected if the project log is
currently displayed. It allows an excerpt of the project log
to be stored in an external file. For that, the following
dialog will be displayed, in which the Online sessions to
be stored can be selected:
BODAS / 10 4-73
Window set up
The maximum number of Online sessions to be stored can be entered in the 'Project'
'Options' 'Log' dialog. If this number is exceeded during recording, the oldest session
is deleted to make room for the newest one.
Under the 'Window' menu item you will find all commands for managing the
windows. There are commands both for the automatic set up of your window as well
as for opening the library manager and for changing between open windows. At the
end of the menu you will find a list of all open windows in the sequence they were
opened. You can switch to the desired window by clicking the mouse on the relevant
entry. A check will appear in front of the active window.
'Window' 'Tile Horizontal'
With this command you can arrange all the windows horizontally in the work area so
that they do not overlap and will fill the entire work area.
'Window' 'Tile Vertical'
With this command you can arrange all the windows vertically in the work area so
that they do not overlap and will fill the entire work area.
'Window' 'Cascade'
With this command you can arrange all the windows in the work area in a cascading
fashion, one behind another.
'Window' 'Arrange Symbols'
With this command you can arrange all of the minimized windows in the work area
in a row at the lower end of the work area.
'Window' 'Close All'
With this command you can close all open windows in the work area.
'Window' 'Messages'
Shortcut: <Shift>+<Esc>
With this command you can open or close the message window with the messages
from the last compiling, checking, or comparing procedure.
If the messages window is open, then a check (ü) will appear in front of the
command.
'Window' 'Library Manager'
With this command you can open or close the library manager (see Chapter 7).
'Window' 'Log'
With this command you can open or close the Log window, where protocols of the
online sessions can be displayed.
4-74 BODAS / 10
Chapter 4 - The Individual Components
An Online Help system is available to you for using BODAS. There you will find all
the information that is also contained in this handbook.
'Help' 'Contents and Index'
With this command you can open the help topics window.
Under the Contents register card you will find the contents. The books can be
opened and closed using a doubleclick or the corresponding button. Doubleclicking
or activating the Show button on a highlighted topic will display the topic in the
main window of help or in the index window.
Click on the Index register card to look for a specific word, and click on the Search
register card to select a full-text search. Follow the instructions in the register cards.
BODAS / 10 4-75
Help when you need it
4-76 BODAS / 10
Chapter 4 - The Individual Components
Index Window
The index window contains explanations about the menu commands, terms, or
sequences.
The index window will always remain on the surface by default, unless the help
option is placed in the background in the main window of help.
The following buttons are available:
• Help topics opens the help topics window
• Back shows the help entry that was previously displayed
• Print opens the dialog box for printing
• << shows the help entry directly prior to the present entry
• >> shows the help entry that is next in sequence
BODAS / 10 4-77
Chapter 5 - Editors in BODAS
5 Editors in BODAS
All editors for POUs (Program Organization Units) consist of a declaration part and
a body. These are separated by a screen divider that can be dragged as required by
clicking it with the mouse and moving it up or down. The body can consist of other a
text or a graphic editor; the declaration portion is always a text editor.
Print margins
The vertical and horizontal margins that apply when the editor contents are printed,
are shown by red dashed lines if the 'Show print range' option in the project options
in the dialog 'Workspace' was selected. The properties of the printer that was
entered apply, as well as the size of the print layout selected in the 'File' 'Printer
Setup' menu. If no printer setup or no print layout is entered, a default configuration
is used (Default.DFR and default printer). The horizontal margins are drawn as if the
options 'New page for each object' or 'New page for each sub-object' were selected in
'Documentation settings'. The lowest margin is not displayed.
Note: An exact display of the print margins is only possible when a zoom factor of
100% is selected.
Comment
User comments must be enclosed in the special symbol sequences „(*“ and „*)“.
Example: (*This is a comment.*)
Comments are allowed in all text editors, at any location desired, that is in all
declarations, the IL and ST languages and in self-defined data types. If the Project is
printed out using a template, the comment that was entered during variable
declaration appears in text-based program components after each variable.
In the FBD and LD graphic editors, comments can be entered for each network. To
do this, search for the network on which you wish to comment and activate 'Insert'
'Comment'. In CFC there are special comment POUs which can be placed at will.
In SFC, you can enter comments about a step in the dialog for editing step attributes.
Nested comments are also allowed if the appropriate option in the 'Project'
'Options' 'Build Options' dialog is activated.
In Online mode, if you rest the mouse cursor for a short time on a variable, the type
and comment of that variable are displayed in a tooltip.
Zoom to POU
Shortcut: <Alt>+<Enter>
With this command a selected POU is loaded into its editor. The command is
available in the context menu (<F2>) or in the 'Extras' menu, if the cursor is
positioned on the name of a POU in a text editor or if the POU box is selected in a
graphic editor.
If you are dealing with a POU from a library, then the library manager is called up,
and the corresponding POU is displayed.
BODAS / 10 5-1
Declaration Editor
Open instance
This command corresponds to the command 'Project' 'Open instance'. It is available
in the context menu (<F2>) or in the 'Extras' menu, if the cursor is positioned on the
name of a function block in a text editor or if the function block box is selected in a
graphic editor.
The declaration editor is used to declare variables of POUs and global variables, for
data type declarations, and in the Watch and Receipt Manager. It gives access to the
usual Windows functions, and even those of the IntelliMouse can be used if the
corresponding driver is installed.
In Overwrite mode, 'OV' is shown in black on the status bar; switching between
Overwrite and Insert modes can be accomplished with the <Ins> key.
The declaration of variables is supported by syntax coloring.
The most important commands are found in the context menu (right mouse button or
<Ctrl>+<F10>).
Declaration Part
All variables to be used only in this POU are declared in the declaration part of the
POU. These can include: input variables, output variables, input/output variables,
local variables, retain variables, and constants. The declaration syntax is based on the
IEC61131-3 standard. An example of a correct declaration of variables in BODAS-
Editor:
5-2 BODAS / 10
Chapter 5 - Editors in BODAS
Input Variable
Between the key words VAR_INPUT and END_VAR, all variables are declared
that serve as input variables for a POU. That means that at the call position, the value
of the variables can be given along with a call.
Example:
VAR_INPUT
in1:INT (* 1. Inputvariable*)
END_VAR
Output Variable
Between the key words VAR_OUTPUT and END_VAR, all variables are declared
that serve as output variables of a POU. That means that these values are carried
back to the POU making the call. There they can be answered and used further.
Example:
VAR_OUTPUT
out1:INT; (* 1. Outputvariable*)
END_VAR
Input and Output Variables
Between the key words VAR_IN_OUT and END_VAR, all variables are declared
that serve as input and output variables for a POU.
Attention: With this variable, the value of the transferred variable is changed
("transferred as a pointer"). That means that the input value for such variables cannot
be a constant.
Attention: With this variable, the value of the transferred variable is changed
("transferred as a pointer", Call-by-Reference). That means that the input value for
such variables cannot be a constant. For this reason, even the VAR_IN_OUT
variables of a function block can not be read or written directly from outside via
<functionblockinstance><in/outputvariable>.
Example:
VAR_IN_OUT
inout1:INT; (* 1. Inputoutputvariable *)
END_VAR
Local Variables
Between the keywords VAR and END_VAR, all of the local variables of a POU are
declared. These have no external connection; in other words, they can not be written
from the outside.
Example:
VAR
loc1:INT; (* 1. Local Variable*)
END_VAR
Constants, Typed Literals
Constants are identified by the key word CONSTANT. They can be declared locally
or globally.
BODAS / 10 5-3
Declaration Editor
Syntax:
VAR CONSTANT
<Identifier>:<Type> := <initialization>;
END_VAR
Example:
VAR CONSTANT
con1:INT:=12; (* 1. Constant*)
END_VAR
A listing of possible constants can be found in the Appendix F(Operanden in
BODAS). See there also regarding the possibility of using typed constants (Typed
Literals).
External variables
Global variables which are to be imported into the POU are designated with the
keyword EXTERNAL. They also appear in the Watch window of the declaration
part in Online mode.
If the VAR_EXTERNAL declaration does not match the global declaration in every
respect, the following error message appears: "Declaration of '<var>' does not match
global declaration!"
If the global variable does not exist, the following error message appears: "Unkown
global variable: '<var>'!"
Example:
VAR EXTERNAL
var_ext1:INT:=12; (* 1st external variable *)
END_VAR
Keywords
Keywords are to be written in uppercase letters in all editors. Keywords may not be
used as variables.
Variables declaration
A variables declaration has the following syntax:
<Identifier>:<Type> {:=<initialization>};
The parts in the braces {} are optional.
Regarding the identifier, that is the name of a variable, it should be noted that it may
not contain spaces or umlaut characters, it may not be declared in duplicate and may
not be identical to any keyword. Upper/lowercase writing of variables is ignored, in
other words VAR1, Var1 and var1 are not different variables. Underlines in
identifiers are meaningful, e.g. A_BCD and AB_CD are interpreted as different
identifiers. Multiple consecutive underlines at the beginning of an identifier or within
a identifier are not allowed. The length of the identifier, as well as the meaningful
part of it, are unlimited.
All declarations of variables and data type elements can include initialization. They
are brought about by the ":=" operator. For variables of elementary types, these
initializations are constants. The default-initialization is 0 for all declarations.
5-4 BODAS / 10
Chapter 5 - Editors in BODAS
Example:
var1:INT:=12; (* Integer variable with initial value of 12*)
If you wish to link a variable directly to a definite address, then you must declare the
variable with the keyword AT.
For faster input of the declarations, use the shortcut mode.
In function blocks you can also specify variables with incomplete address
statements. In order for such a variable to be used in a local instance, there must be
an entry for it in the variable configuration.
Pay attention to the possibility of an automatic declaration
Identifier
An identifier is a sequence of letters, numbers, and underscores that begins with a
letter or an underscore.
The variable identifier may not contain any blank spaces or special characters, may
not be declared more than once and cannot be the same as any of the keywords.
Capitalization is not recognized which means that VAR1, Var1, and var1 are all the
same variable. The underscore character is recognized in identifiers (e.g., "A_BCD"
and "AB_CD" are considered two different identifiers). An identifier may not have
more than one underscore character in a row. The first 32 characters are significant.
'Insert' 'Declarations keywords'
You can use this command to open a list of all the keywords that can be used in the
declaration part of a POU. After a keyword has been chosen and the choice has been
confirmed, the word will be inserted at the present cursor position.
You also receive the list, when you open the Input Assistant (<F2>) and choose the
Declarations category.
'Insert' 'Type'
With this command you will receive a selection of the possible types for a
declaration of variables. You also receive the list when you access the Input
Assistant (<F2>).
The types are divided into these categories:
• Standard types BOOL, BYTE, etc.
• Defined types Structures, enumeration types, etc.
• Standard function blocks for instance declarations
• Defined function blocks for instance declarations
BODAS supports all standard types of IEC1131-3:
Examples for the use of the various types are found in the Appendix F.
Syntax Coloring
In all editors you receive visual support in the implementation and declaration of
variables. Errors are avoided, or discovered more quickly, because the text is
displayed in color.
A comment left unclosed, thus annotating instructions, will be noticed immediately;
keywords will not be accidentally misspelled, etc.
BODAS / 10 5-5
Declaration Editor
Shortcut Mode
The declaration editor for BODAS allows you to use the shortcut mode. This mode
is activated when you end a line with <Ctrl><Enter>
The following shortcuts are supported:
• All identifiers up to the last identifier of a line will become declaration variable
identifiers
• The type of declaration is determined by the last identifier of the line. In this
context, the following will apply:
B or BOOL gives the result BOOL
I or INT gives the result INT
S or string gives the result STRING
• If no type has been established through these rules, then the type is BOOL and
the last identifier will not be used as a type (Example 1.).
• Every constant, depending on the type of declaration, will turn into an
initialization or a string (Examples 2. and 3.).
• A text after a semicolon (;) becomes a comment (Example 4.).
• All other characters in the line are ignored (e.g., the exclamation point in
Example 5.).
Examples:
Shortcut Declaration
A A: BOOL;
ABI2 A, B: INT := 2;
ST S 2; A string ST:STRING(2); (* A string *)
B! B: BOOL;
Autodeclaration
If the Autodeclaration option has been chosen in the Editor category of the Options
dialog box , then a dialog box will appear in all editors after the input of a variable
that has not yet been declared. With the help of this dialog box, the variable can now
be declared.
5-6 BODAS / 10
Chapter 5 - Editors in BODAS
With the help of the Class combobox, select whether you are dealing with a local
variable (VAR), input variable( (VAR_INPUT), output variable (VAR_OUTPUT),
input/output variable (VAR_INOUT), or a global variable (VAR_GLOBAL).
With the CONSTANT option, you can define whether you are dealing with a
constant variable
The RETAIN option cannot be used in BODAS, because the target systems do not
support retain variables.
The variable name you entered in the editor has been entered in the Name field,
BOOL has been placed in the Type field. The button opens the Input Assistant
dialog which allows you to select from all possible data types.
If ARRAY is chosen as the variable type, the dialog for entering array boundaries
appears.
Image 5.3: Dialog for determining array boundaries during automatic declaration
For each of the three possible dimensions (Dim.), array boundaries can be entered
under Start and End by clicking with the mouse on the corresponding field to open
an editing space. The array data type is entered in the Type field. In doing this, the
button can be used to call up an input assistant dialog.
Upon leaving the array boundaries dialog via the OK button, variable declarations in
IEC format are set up based on the entries in the Type field in the dialog. Example:
ARRAY [1..5, 1..3] OF INT
In the field Initial value, you may enter the initial value of the variable being
declared. If this is an array or a valid structure, you can open a special initialization
BODAS / 10 5-7
Declaration Editor
dialog via the button or <F2>, or open the input assistant dialog for other
variable types.
In the initialization dialog for an array you are presented a list of array elements; a
mouse click on the space following „:=“opens an editing field for entering the initial
value of an element.
In the initialization dialog for a structure, individual components are displayed in a
tree structure. The type and default initial value appear in brackets after the variable
name; each is followed by „:=“. A mouse click on the field following „:=“ opens an
editing field in which you can enter the desired initial value. If the component is an
array, then the display of individual fields in the array can be expanded by a mouse
click on the plus sign before the array name and the fields can be edited with initial
values.
After leaving the initialization dialog with OK, the initialization of the array or the
structure appears in the field Initial value of the declaration dialog in IEC format.
Example: x:=5,field:=2,3,struct2:=(a:=2,b:=3)
An entry in the Address field has no effect in BODAS.
If applicable, enter a Comment. The comment can be formatted with line breaks by
using the key combination <Ctrl> + <Enter>.
By pressing OK, the declaration dialog is closed and the variable is entered in the
corresponding declaration editor in accordance to the IEC syntax.
Note: The dialog box for variable declaration you also get by the command
'Edit' 'Declare Variable' (see Chapter 4.5 General Editing Functions). If the cursor is
resting on a variable in Online mode, the Autodeclare window can be opened with
<Shift><F2> with the current variable-related settings displayed.
5-8 BODAS / 10
Chapter 5 - Editors in BODAS
In order to edit a new variable, select the 'Insert' 'New Declaration' command.
BODAS / 10 5-9
The Text Editors
When a variable is open, all of its components are listed after it. A minus sign
appears in front of the variable. If you doubleclick again or press <Enter>, the
variable will be closed, and the plus sign will reappear.
Pressing <Enter> or doubleclicking on a single-element variable will open the dialog
box to write a variable (see chapter 4.6, ' General Online Functions'). Here it is
possible to change the present value of the variable. In the case of Boolean variables,
no dialog box appears; these variables are toggled.
The new value is displayed after the variable, in pointed brackets and in turquoise
color, and remains unchanged. If the 'Online' 'Write values' command is given,
then all variables are placed in the selected list and are once again displayed in black.
If the 'Online' 'Force values' command is given, then all variables will be set to the
selected values, until the 'Release force' command is given. In this event, the color of
the force value changes to red
The text editors used for the implementation portion (the Instruction List editor and
the Structured Text editor) of BODAS provide the usual Windows text editor
functions.
The implementation in the text editors is supported by syntax coloring.
In Overwrite mode the status bar shows a black OV. You can switch between
Overwrite mode and Insert mode by key <Ins>.
The most important commands are found in the context menu (right mouse button or
<Ctrl>+<F10>).
5-10 BODAS / 10
Chapter 5 - Editors in BODAS
Image 5.5: Text Editors for the Instruction List and Structured Text
The text editors use the following menu commands in special ways:
‘Insert’’Operators’
With this command all of the operators available in the current language are
displayed in a dialog box.
If one of the operators is selected and the list is closed with OK, then the highlighted
operator will be inserted at the present cursor position. (This is managed here just as
it is in the Input Assistant).
‘Insert’ ’Operand’
With this command all variables in a dialog box are displayed. You can select
whether you would like to display a list of the global, the local, or the system
variables.
If one of the operands is chosen, and the dialog box is closed with OK, then the
highlighted operand will be inserted at the present cursor position. (This is managed
here just as it is in the Input Assistant).
‘Insert’ ’Function’
With this command all functions will be displayed in a dialog box. You can choose
whether to have a list displaying user-defined or standard functions.
If one of the functions is selected and the dialog box is closed with OK, then the
highlighted function will be inserted at the current cursor position. (The management
will proceed, as in the input selection.)
If the With arguments option was selected in the dialog box, then the necessary
input and output variables will also be inserted.
‘Insert’ ’Function Block’
With this command all function blocks are displayed in a dialog box. You can
choose whether to have a list displaying user-defined or standard function blocks.
BODAS / 10 5-11
The Text Editors
If one of the function blocks is selected and the dialog box is closed with OK, then
the highlighted function block will be inserted at the current cursor position. (This is
managed here just as it is in the Input Assistant).
If the With arguments option was selected in the dialog box, then the necessary
input variables of the function block will also be inserted.
Calling POUs with output
parameters
The output parameters of a called POU can be directly assigned upon being called in
the text languages IL and ST. Example: Output parameter out1 of afbinst is assigned
variable a.
IL: CAL afbinst(in1:=1, out1=>a)
ST: afbinst(in1:=1, out1=>a);
The text editors in Online mode
The online functions in the editors are set breakpoint and single step processing
(steps). Together with the monitoring, the user thus has the debugging capability of a
modern Windows standard language debugger.
In Online mode, the text editor window is vertically divided in halves. On the left
side of the window you will then find the normal program text; on the right side you
will see a display of the variables whose values were changed in the respective lines.
The display is the same as in the declaration part. That means that when the PLC is
running, the present values of the respective variables will be displayed.
The following should be noted when monitoring expressions or Bit-addressed
variables: in the case of expressions, the value of the entire expression is always
displayed. Example: a AND b is displayed in blue or with „:=TRUE“ if both a and b
are TRUE. For Bit-addressed variables, the bit value that is addressed is always
monitored (e.g. a.3 is displayed in blue or with „:=TRUE, if a has the value 4).
If you place the mouse pointer briefly above a variable, then the type, the address
and the comment about the variable will be displayed in a Tooltip.
5-12 BODAS / 10
Chapter 5 - Editors in BODAS
BODAS / 10 5-13
The Text Editors
Image 5.7: IL Editor with Possible Breakpoint Positions (darker number fields)
5-14 BODAS / 10
Chapter 5 - Editors in BODAS
This is how a POU written in the IL looks under the corresponding BODAS editor:
All editors for POUs consist of a declaration part and a body. These are separated by
a screen divider.
The Instruction List editor is a text editor with the usual capabilities of Windows text
editors. The most important commands are found in the context menu (right mouse
button or <Ctrl>+<F10>).Multiline POU calls are also possible: Example:
CAL CTU_inst(
CU:=inval,
PV:=(
LD A
ADD 5
)
)
For information concerning the language, see chapter 2.2.1, Instruction List (IL).
IL in Online mode
With the 'Online' 'Flow control' command, an additional field in which the
accumulator contents is displayed is inserted in the IL editor on the left side of every
line.
For further information concerning the IL editor in Online mode, see above 'The
Text Editors in Online Mode'.
BODAS / 10 5-15
The Text Editors
This is how a POU written in ST appears under the corresponding BODAS editor:
All editors for POUs consist of a declaration part and a body. These are separated by
a screen divider.
The editor for Structured Text is a text editor with the usual capabilities of Windows
text editors. The most important commands are found in the context menu (right
mouse button or <Ctrl>+<F10>).
For information about the ST editor in Online mode, read Text Editors in Online
Mode.
For information about the ST editor in Online mode, read above 'The Text Editors in
Online Mode'.
For information about the language, read the chapter 2.2.2, Structured Text (ST).
5-16 BODAS / 10
Chapter 5 - Editors in BODAS
The editors of the graphically oriented languages, sequential function chart SFC,
ladder diagram LD and function block diagram FBD and of free graphic function
block diagrams have many points in common. In the following paragraphs these
features will be summarized; the specific descriptions of LD, FBD an CFC, as well
as the Sequential Function Chart language SFC follow in separate sections. The
implementation in the graphics editors is supported by syntax coloring.
Zoom
Objects such as POUs, actions, transitions etc. in the languages SFC, LD, FBD, CFC
and in visualizations can be enlarged or reduced in size with a zoom function. All
elements of the window contents of the implementation part are affected; the
declaration part remains unchanged.
In standard form, every object is displayed with the zoom level 100%. The zoom
level that is set is saved as an object property in the project.
The printing of project documentation always occurs at the 100% display level!
The zoom level can be set through a selection list in the toolbar. Values between
25% and 400% can be selected; individual values between 10% and 500% can be
entered manually.
The selection of a zoom level is only available if the cursor rests on an object created
in a graphical language or a visualization object.
Even with the object zoomed, cursor positions in the editors can be further selected
and even reached with the arrow keys. Text size is governed by the zoom factor and
the font size that is set.
The execution of all editor menu features (e.g. inserting a box) as a function of
cursor position is available at all zoom levels, taking the same into account.
In Online mode, each object is displayed according to the zoom level that has been
set; Online functionality is available without restriction.
When the IntelliMouse is used, an object can be enlarged/reduced by pressing the
<CTRL> key and at the same time turning the wheel forward or backwards.
Network
In the LD and FBD editors, the program is arranged in a list of networks. Each
network is designated on the left side by a serial network number and has a structure
consisting of either a logical or an arithmetic expression, a program, function or
function block call, and a jump or a return instruction.
Label
Each network has a label that can optionally be left empty. This label is edited by
clicking the first line of the network, directly next to the network number. Now you
can enter a label, followed by a colon.
BODAS / 10 5-17
The Graphic Editors
Network Comments,‘Extras’
‘Options’
Every network can be supplied with a multi-lined comment. In 'Extras' 'Options',
you can enter the maximum number of lines to be made available for a network
comment. This entry is made in the maximum comment size field. (The default
value here is 4.) You can also enter the number of lines that generally should be
reserved for comments (minimum comment size). If, for example, the number 2 is
entered, then, at the start of each network there will be two empty lines after the label
line. The default value here is 0, which has the advantage of allowing more networks
to fit in the screen area.
If the minimal comment size is greater than 0, then in order to enter a comment you
simply click in the comment line and then enter the comment. Otherwise you must
next select the network to which a comment is to be entered, and use 'Insert'
'Comment' to insert a comment line. In contrast to the program text, comments are
displayed in gray.
'Insert' 'Network (after)' or
'Insert' "Network (before)"
Shortcut: <Shift>+<T> (Network after)
In order to insert a new network in the FBD or the LD editor, select the 'Insert'
'Network (after)' or the 'Insert' 'Network (before)' command, depending on
whether you want to insert the new network before or after the present network. The
present network can be changed by clicking the network number. You will recognize
it in the dotted rectangle under the number. With the <Shift key> and a mouse click
you can select from the entire area of networks, from the present one to the one
clicked.
5-18 BODAS / 10
Chapter 5 - Editors in BODAS
lines carry Boolean values, then they will be shaded blue, in the event that they carry
TRUE. Therefore, you can accompany the flow of information while the PLC is
running.
If you hold the mouse cursor for a short time on a variable, the type and comment of
the variable are displayed in a tooltip.
This is how a POU written in the FBD under the corresponding BODAS editor
looks:
The Function Block Diagram editor is a graphic editor. It works with a list of
networks, in which every network contains a structure that displays, respectively, a
logical or an arithmetical expression, the calling up of a function block, a function, a
program, a jump, or a return instruction.The most important commands are found in
the context menu (right mouse button or <Ctrl>+<F10>).
Cursor positions in FBD
Every text is a possible cursor position. The selected text is on a blue background
and can now be changed.
You can also recognize the present cursor position by a dotted rectangle. The
following is a list of all possible cursor positions with an example:
BODAS / 10 5-19
The Graphic Editors
2) Every input:
6) Behind the outermost object on the right of every network ("last cursor
position," the same cursor position that was used to select a network):
How to set the cursor: The cursor can be set at a certain position by clicking the
mouse, or with the help of the keyboard.
Using the arrow keys, you can jump to the nearest cursor position in the selected
direction at any time. All cursor positions, including the text fields, can be accessed
this way. If the last cursor position is selected, then the <up> or <down> arrow keys
can be used to select the last cursor position of the previous or subsequent network.
An empty network contains only three question marks "???". By clicking behind
these, the last cursor position is selected.
5-20 BODAS / 10
Chapter 5 - Editors in BODAS
'Insert' 'Assign'
BODAS / 10 5-21
The Graphic Editors
In functions and function blocks, the formal names of the in- and outputs are
displayed.
In function blocks there exists an editable instance field above the box. If another
function block that is not known is called by changing the type text, an operator box
with two inputs and the given type is displayed. If the instance field is selected, Input
Assistant can be obtained via <F2> with the categories for variable selection.
The newest POU is inserted at the selected position (see ):
• If an input is selected (Cursor Position 2), then the POU is inserted in front of
this input. The first input of this POU is linked to the branch on the left of the
selected input. The output of the new POU is linked to the selected input.
• If an output is selected (Cursor Position 4), then the POU is inserted after this
output. The first input of the POU is connected with the selected output. The
output of the new POU is linked to the branch with which the selected output
was linked.
• If a POU, a function, or a function block is selected (Cursor Position 3), then the
old element will be replaced by the new POU.
• As far as possible, the branches will be connected the same way as they were
before the replacement. If the old element had more inputs than the new one,
then the unattachable branches will be deleted. The same holds true for the
outputs.
• If a jump or a return is selected, then the POU will be inserted before this jump
or return. The first input of the POU is connected with the branch to the left of
the selected element. The output of the POU is linked to the branch to the right
of the selected element.
• If the last cursor position of a network is selected (Cursor Position 6), then the
POU will be inserted following the last element. The first input of the POU is
linked to the branch to the left of the selected position.
All POU inputs that could not be linked will receive the text "???". This text must be
clicked and changed into the desired constant or variable.
If there is a branch to the right of an inserted POU, then the branch will be assigned
to the first POU output. Ansonsten bleiben die Ausgänge unbelegt.
‘Insert’ ‘Input'
5-22 BODAS / 10
Chapter 5 - Editors in BODAS
‘Insert‘ ‘Output‘
Symbol:
This command inserts an additional assignment into an existing assignment. This
capability serves the placement of so-called assignment combs; i.e., the assignment
of the value presently located at the line to several variables.
If you select the lined cross above an assignment (Cursor Position 5) (see above
'Cursor positions in FBD') or the output directly in front of it (Cursor Position 4),
then there will be another assignment inserted after the ones already there.
If the line cross directly in front of an assignment is selected (Cursor Position 4),
then another assignment will be inserted in front of this one.
The inserted output is allocated with the text "???". This text must be clicked and
changed into the desired variable. For this you can also use the Input Assistant.
‘Extras‘ ‘Negation‘
Symbol:
With this command you can define outputs as Set or Reset Outputs. A grid with Set
Output is displayed with [S], and a grid with Reset Output is displayed with [R].
An Output Set is set to TRUE, if the grid belonging to it returns TRUE. The output
now maintains this value, even if the grid jumps back to FALSE.
An Output Reset is set to FALSE, if the grid belonging to it returns FALSE. The
output maintains its value, even if the grid jumps back to FALSE.
BODAS / 10 5-23
The Graphic Editors
With multiple executions of the command, the output will alternate between set,
reset, and normal output.
Cutting, Copying, Pasting, and
Deleting in FBD
The commands used to 'Cut', 'Copy', 'Paste', and 'Delete' are found under the
'Edit' menu item.
If a line cross is selected (Cursor Position 5) (see above 'Cursor positions in FBD'),
then the assignments, jumps, or RETURNS located below the crossed line will be
cut, deleted, or copied.
If a POU is selected (Cursor Position 3), then the selected object itself, will be cut,
deleted, or copied, along with all of the branches dependent on the inputs, with the
exception of the first (highest position) branch.
Otherwise, the entire branch located in front of the cursor position will be cut,
deleted, or copied.
After copying or cutting, the deleted or copied part is located on the clipboard and
can now be pasted, as desired.
In order to do so, you must first select the pasting point. Valid pasting points include
inputs and outputs.
If a POU has been loaded onto the clipboard (As a reminder: in this case all
connected branches except the first are located together on the clipboard), the first
input is connected with the branch before the pasting point.
Otherwise, the entire branch located in front of the pasting point will be replaced by
the contents of the clipboard.
In each case, the last element pasted is connected to the branch located in front of the
pasting point.
Note: The following problem is solved by cutting and pasting: A new operator
is inserted in the middle of a network. The branch located on the right of the operator
is now connected with the first input, but should be connected with the second input.
You can now select the first input and perform the command 'Edit' 'Cut'. Following
this, you can select the second input and perform the command 'Edit' 'Paste'. This
way, the branch is dependent on the second input.
The Function Block Diagram in
the Online Mode
In the Function Block Diagram, breakpoints can only be set to networks. If a
breakpoint has been set to a network, then the network numbers field will be
displayed in blue. The processing then stops in front of the network where the
breakpoint is located. In this case, the network numbers field will become red. Using
stepping (single step), you can jump from network to network.
The current value is displayed for each variable. Exception: If the input to a function
block is an expression, only the first variable in the expression is monitored.
5-24 BODAS / 10
Chapter 5 - Editors in BODAS
Doubleclicking on a variable opens the dialog box for writing a variable. Here it is
possible to change the present value of the variable. In the case of Boolean variables,
no dialog box appears; these variables are toggled.
The new value will turn red and will remain unchanged. If the 'Online' 'Write
values' command is given, then all variables are placed in the selected list and are
once again displayed in black.
The flow control is started with the 'Online' 'Flow control' command Using the
flow control, you can view the present values that are being carried in the networks
over the connecting lines. If the connecting lines do not carry Boolean values, then
the value will be displayed in a specially inserted field. If the lines carry Boolean
values, then they will be shaded blue in the event that they carry TRUE. By this
means, you can accompany the flow of information while the PLC is running.
If you hold the mouse cursor for a short time on a variable, the type and comment of
the variable are displayed in a tooltip.
All editors for POUs consist of a declaration part and a body. These are separated by
a screen divider.
BODAS / 10 5-25
The Graphic Editors
The LD editor is a graphic editor. The most important commands are found in the
context menu (right mouse button or <Ctrl>+<F10>).
For information about the elements, see Ladder Diagram (LD).
Cursor Positions in the LD
Editors
The following locations can be cursor positions, in which the function block and
program accessing can be handled as contacts. POUs with EN inputs and other POUs
connected to them are treated the same way as in the Function Block Diagram.
Information about editing this network part can be found in the Chapteron the FBD
Editor.
1. Every text field (possible cursor positions framed in black)
3. Every Coil
The Ladder Diagram uses the following menu commands in a special way:
‘Insert’ ’Contact’
5-26 BODAS / 10
Chapter 5 - Editors in BODAS
If the marked position is a coil (Cursor Position 3) or the connecting line between the
contacts and the coils (Cursor Position 4), then the new contact will be connected
serially to the previous contact connection.
The contact is preset with the text "???". You can click on this text and change it to
the desired variable or the desired constant. For this you can also use the Input
Assistant.
‘Insert‘ ‘Parallel Contact‘
BODAS / 10 5-27
The Graphic Editors
5-28 BODAS / 10
Chapter 5 - Editors in BODAS
BODAS / 10 5-29
The Graphic Editors
'Extras' 'Negate'
5-30 BODAS / 10
Chapter 5 - Editors in BODAS
The Sequential Function Chart editor is a graphic editor. The most important
commands are found in the context menu (right mouse button or <Ctrl><F10>).
Tooltips show in Offline as well as in Online mode and in the zoomed state the full
names or expressions of steps, transitions, jumps, jump labels, qualifiers or
associated actions.
For information about the Sequential Function Chart see also chapter 2..2.3.
This is how a POU written in the SFC appears in the BODAS editor:
The editor for the Sequential Function Chart must agree with the particulars of the
SFC. In reference to these, the following menu items will be of service:
Marking Blocks in the SFC
A marked block is a bunch of SFC elements that are enclosed in a dotted rectangle.
(In the example somewhat above, the step is marked Shift1.)
You can select an element (a step, a transition, or a jump) by pointing the mouse on
this element and pressing the left mouse button, or you can use the arrow keys. In
order to mark a group of several elements, press <Shift> for a block already marked,
and select the element in the lower left or right corner of the group. The resulting
selection is the smallest cohesive group of elements that includes both of these
elements.
Observe that all commands can only be executed, if they do not contradict the
conventions of the language.
BODAS / 10 5-31
The Graphic Editors
Symbol:
This command inserts an alternative branch in the SFC editor as the left branch of
the marked block. For this the marked block must both begin and end with a
transition. The new branch is then made up of one transition.
'Insert' 'Parallel Branch
(right)"
Symbol:
’This command inserts a parallel branch in the SFC editor as the left branch of the
marked block. For this the marked block must both begin and end with a step. The
new branch is then made up of one step. To allow jumps to the parallel branches that
have been created, these must be provided with a jump label (see 'Extras' 'Add label
to parallel branch').
5-32 BODAS / 10
Chapter 5 - Editors in BODAS
’Insert’ ’Jump’
’This command inserts a jump in the SFC editor at the end of the branch, to which
the marked block belongs. For this the branch must be an alternative branch.
The inserted text string 'Step' in the inserted jump can then be selected and replaced
by the step name or the jump label of a parallel branch to be jumped to.
’Insert’ ’Transition-Jump’
Symbol:
This command inserts a transition in the SFC editor, followed by a jump at the end
of the selected branch. For this the branch must be a parallel branch.
The inserted text string 'Step' in the inserted jump can then be selected and replaced
by the step name or the jump label of a parallel branch to be jumped to.
’Insert’ ’Add Entry-Action’
With this command you can add an entry-action to a step. An entry-action is only
executed once, right after the step has become active. The entry-action can be
implemented in a language of your choice.
A step with an entry-action is designated by an "E" in the bottom left corner.
’Insert’ ’Add Exit-Action’
With this command you can add an exit-action to a step. An exit-action is only
executed once, before the step is deactivated. The exit-action can be implemented in
a language of your choice.
A step with an exit-action is designated by an "X" in the lower right corner.
'Extras' 'Paste Parallel Branch
(right)'
This command pastes the contents of the clipboard as a right parallel branch of the
marked block. For this the marked block must both begin and end with a step. The
contents of the clipboard must, likewise, be an SFC block that both begins and ends
with a step.
'Extras' 'Add label to parallel
branch'
In order to provide a newly inserted parallel branch with a jump label, the transition
occurring before the parallel branching must be marked and the command 'Add label
to parallel branch' must be executed. At that point, the parallel branch will be given a
standard name consisting of „Parallel“ and an appended serial number, which can be
edited according to the rules for identifier names. In the following example,
"Parallel" was replaced by "Par_1_2" and the jump to the transition "End" was
steered to this jump label.
BODAS / 10 5-33
The Graphic Editors
Delete a label
A jump label can be deleted by deleting the label name.
’Extras‘ ‘Paste after‘
This command pastes the SFC block on the clipboard after the first step or the first
transition of the marked block. (Normal copying pastes it in front of the marked
block.) This will now be executed, if the resulting SFC structure is correct, according
to the language norms.
‘Extras‘ ‘Zoom
Action/Transition‘
Shortcut: <Alt>+<Enter>
The action of the first step of the marked block or the transition body of the first
transition of the market block is loaded into the editor in the respective language, in
which it has been written. If the action or the transition body is empty, then the
language must be selected, in which it has been written.
'Extras' 'Clear
Action/Transition'
With this command you can delete the actions of the first step of the marked block or
of the transitions body of the first transition.
If, during a step, you implement either only the action, the entry-action, or the exit-
action, then the same will be deleted by the command. Otherwise a dialog box
appears, and you can select which action or actions are to be deleted.
If the cursor is located in the action of an IEC step, then only this association will be
deleted. If an IEC step with an associated action is selected, then this association will
be deleted. During an IEC step with several actions, a selection dialog box will
appear.
’Extras’ ’Step Attributes’
With this command you can open a dialog box in which you can edit the attributes
for the marked step.
5-34 BODAS / 10
Chapter 5 - Editors in BODAS
You can take advantage of three different entries in the step attribute dialog box.
Under Minimum Time, you enter the minimum length of time that the processing of
this step should take. Under the Maximum Time, you enter the maximum length of
time that the processing of this step should take. Note that the entries are of the
TIME type, so you use a TIME constant (i.e. T#3s) or a variable of the TIME type.
Under Comment you can insert a comment to the step. In the 'Sequential function
chart options' dialog which you open under 'Extras' 'Options', you can then enter
whether comments or the time setting is displayed for the steps in the SFC editor.
On the right, next to the step, either the comment or the time setting will appear.
If the maximum time is exceeded, SFC flags are set which the user can query.
The example shows a step whose execution should last at least two, and at the most,
ten seconds. In Online mode, there is, in addition to these two times, a display of
how long the step has already been active.
’Extras’ ’Time Overview’
With this command you can open a window in which you can edit the time settings
of your SFC steps:
BODAS / 10 5-35
The Graphic Editors
In the time boundaries overview, all steps of your SFC POU are displayed. If you
have entered a time boundary for a step, then the time boundary is displayed to the
right of the step (first, the lower limit, then the upper limit). You can also edit the
time boundaries. To do so, click on the desired step in the overview. The name of
the step is then shown below in the window. Go to the Minimum Time or
Maximum Time field, and enter the desired time boundary there. If you close the
window with OK, then all of the changes will be stored.
In the example, steps 2 and 6 have a time boundary. Shift1 lasts at least two, and at
most, ten seconds. Shift2 lasts at least seven, and at most, eight seconds.
’Extras’ ’Options’
With this command you open a dialog box in which you can set different options for
your SFC POU.
5-36 BODAS / 10
Chapter 5 - Editors in BODAS
In the SFC Options dialog box you can undertake five entries. Under Step Height,
you can enter how many lines high an SFC step can be in your SFC editor. 4 is the
standard setting here. Under Step Width, you can enter how many columns wide a
step should be. 6 is the standard setting here. You can also preset the Display at
Step. With this, you have three possibilities: You can either have Nothing displayed,
or the Comment, or the Time Limits. The last two are shown the way you entered
them in 'Extras' 'Step Attributes'.
’Extras’ ’Associate Action’
With this command actions and Boolean variables can be associated with IEC steps.
To the right of, and next to the IEC step, an additional divided box is attached, for
the association of an action. It is preset in the left field with the qualifier "N" and the
name "Action." Both presets can be changed. For this you can use the Input
Assistant.
New actions for IEC steps are created in the Object Organizer for an SFC POU with
the 'Project' 'Add Action' command.
’Extras’ ’Use IEC-Steps’
Symbol:
If this command is activated (denoted by a check in front of the menu item and a
printed symbol in the Tool bar), then IEC steps will be inserted instead of the
simplified steps upon insertion of step transitions and parallel branches.
If this option is switched on, the Init step is set as an IEC step when you create a new
SFC POU.
This settings are saved in the file "BODAS.ini" and are restored when BODAS gets
started again.
Sequential Function Chart in
Online Mode
With the Sequential Function Chart editor in Online mode, the currently active steps
will be displayed in blue. If you have set it under 'Extras' 'Options', then the time
management is depicted next to the steps. Under the lower and upper bounds that
you have set, a third time indicator will appear from which you can read how long
the step has already been active.
In the picture above the step depicted has already been active 8 seconds and 410
milliseconds. The step must, however, be active for at least 7 minutes before the step
will be left.
With 'Online' 'Toggle Breakpoint' a breakpoint can be set on a step, or in an action
at the locations allowed by the language in use. Processing then stops prior to
execution of this step or before the location of the action in the program. Steps or
program locations where a breakpoint is set are marked in light blue.
BODAS / 10 5-37
The Graphic Editors
If several steps are active in a parallel branch, then the active step whose action will
be processed next is displayed in red.
If IEC steps have been used, then all active actions in Online mode will be displayed
in blue.
Image 5.17: Sequential Function Chart in the Online Mode with an Active Step (Shift1) and a Breakpoint
(Step10)
With the command 'Online' 'Step over' it is stepped always to the next step which
action is executed. If the current location is:
• a step in the linear processing of a POU or a step in the rightmost parallel branch
of a POU, execution returns from the SFC POU to the caller. If the POU is the
main program, the next cycle begins.
• a step in a parallel branch other than the rightmost, execution jumps to the active
step in the next parallel branch.
• the last breakpoint location within a 3S action, execution jumps to the caller of
the SFC.
• the last breakpoint location within an IEC action, execution jumps to the caller of
the SFC.
• the last breakpoint position within an input action or output action, execution
jumps to the next active step.
5-38 BODAS / 10
Chapter 5 - Editors in BODAS
With 'Online' 'Step in' even actions can be stepped into. If an input, output or IEC
action is to be jumped into, a breakpoint must be set there. Within the actions, all the
debugging functionality of the corresponding editor is available to the user.
If you rest the mouse cursor for a short time on a variable in the declaration editor,
the type, the address and the comment of the variable will be displayed in a tooltip.
BODAS / 10 5-39
The Graphic Editors
It looks like a block which has been produced using the continuous function chart
editor (CFC):
No snap grid is used for the continuous function chart editor so the elements can be
placed anywhere. Elements of the sequential processing list include boxes, input,
output, jump, label, return and comments. The inputs and outputs of these elements
can be connected by dragging a connection with the mouse. The connecting line will
be drawn automatically. The shortest possible connection line is drawn taking into
account existing connections. The connecting lines are automatically adjusted when
the elements are moved. If the case arises where a connecting line cannot be drawn
simply because of lack of space, a red line will be shown between the input and the
associated output instead. This line will be converted into a connecting line just as
soon as space is available.
One advantage of the continuous function chart as opposed to the usual function
block diagram editor FBD is the fact that feedback paths can be inserted directly.
The most important commands can be found in the context menu
Cursor positions Each text is a possible cursor position. The selected text is shaded
in blue and can be modified.
In all other cases the current cursor position is shown by a rectangle made up of
points. The following is a list of all possible cursor positions with examples:
5-40 BODAS / 10
Chapter 5 - Editors in BODAS
1. Trunks of the elements box, input, output, jump, label, return and comments.
2. Text fields for the elements box, input, output, jump, label, return and comments
as well as text fields for connection marker
3. Inputs for the elements box, input, output, jump and return
‘Insert’ ‘Box’
Symbol: Shortcut: <Ctrl>+<B>
This command can be used to paste in operators, functions, function blocks and
programs First of all, it is always inserted an “AND” operator. This can be converted
by Selection and Overwrite of the text into every other operator, into every function,
into every function block and every program. The input assistance serves to select
the desired block from the list of supported blocks. If the new block has another
minimum number of inputs, these will be attached. If the new block has a smaller
highest number of inputs, the last inputs will be deleted.
BODAS / 10 5-41
The Graphic Editors
‚Insert‘ ‚Input
5-42 BODAS / 10
Chapter 5 - Editors in BODAS
Symbol:
These commands are available as soon as a macro is opened for editing. They are
used for inserting in- or out-pins as in- and outputs of the macro. They differ from
the normal in- and outputs of POUs by the way they are displayed and in that they
have no position index.
‘Extras’ ‘Negate'
Symbol: Shortcut: <Ctrl> + <N>
This command is used to negate inputs, outputs, jumps or RETURN commands. The
symbol for the negation is a small cross on the connection.
The input of the element block, output, jump or return is negated when it is selected
(Cursor position 3).
The output of the element block or input is negated when it is selected (Cursor
position 4).
A negation can be deleted by negating again.
‘Extras’ ‘Set/Reset‘
Symbol: Shortcut: <Ctrl> + <T>
This command can only be used for selected inputs of the element output (Cursor
position 3).
The symbol for Set is S and for Reset is R.
VarOut1 is set to TRUE, if VarIn1 delivers TRUE. VarOut1 retains this value, even
when VarIn1 springs back to FALSE.
VarOut2 is set to FALSE, if VarIn2 delivers TRUE. VarOut2 retains this value, even
when VarIn2 springs back to FALSE.
Multiple activation of this command causes the output to change between Set, Reset
and the normal condition.
‘Extras’ ‘EN/ENO‘
Symbol: Shortcut: <Ctrl> + <0>
This command is used to give a selected block (Cursor position 3) an additional
Boolean enable input EN (Enable In) and a Boolean output ENO (Enable Out).
BODAS / 10 5-43
The Graphic Editors
ADD is only executed in this example when the Boolean variable “Bedingung”
(condition) is TRUE. VarOut is also set to TRUE after ADD has been executed.
ADD will not be executed when the variable “Bedingung” (condition) is FALSE and
VarOut retains its value FALSE.
The example below shows how the value ENO can be used for further blocks.
x should initialised to 1 and y initialised to 0. The numbers in the right corner of the
block indicate the order in which the commands are executed.
x will be increased by one until it reaches the value 10. This causes the output of the
block LT(0) to deliver the value FALSE and SUB(3) and ADD(5) will be executed.
x is set back to the value 1 and y is increased by 1. LT(0) is executed again as long
as x is smaller than 10. y thus count the number of times x passes though the value
range 1 to 10.
‚Extras‘ ‚Properties...‘
Constant input parameters (VAR_INPUT CONSTANT) from functions and function
blocks are not shown directly in the continuous function chart editor. These can be
shown and their value can be changed when one selects the trunk of the block in
question (Cursor position 1) and then selects the command ‚Extras‘ ‚Properties‘ or
simply double clicks on the trunk. The „Edit parameters“ dialog opens:
5-44 BODAS / 10
Chapter 5 - Editors in BODAS
BODAS / 10 5-45
The Graphic Editors
Place the mouse on the output of element E1 (Cursor position 4), click with the left
mousekey, hold the left mousekey down and drag the mouse cursor onto the input of
element E2 (Cursor position 3) and let the left mousekey go. A connection is made
from the output of element E1 to the mouse cursor during this dragging operation
with the mouse.
Place the mouse on the input of element E2, click with the left mousekey, hold the
left mousekey down and drag the mouse cursor onto the output of element E1 and let
the left mousekey go.
Move one of the elements E1 or E2 (Cursor position 1) and place it in such a way by
letting go of the left mousekey that the output of element E2 and the input of element
E1 touch.
Where element E2 is a block with a free input, a connection can also be made by
dragging the mouse from an output from E1 to the trunk of E2. A connection with
the free input at the highest position on E2 will be created when the mousekey is
released. In the case where block E2 does not have a free input but is an operator
which can have an input added to it, a new input will be automatically generated.
The output and input of a block can be connected together (feedback path) by using
this method. To establish a connection between two pins, click with the left mouse
button on one pin, hold the button down and thus drag the connection to the desired
pin, where you then release the button. If during the dragging of the connection
extends outside working area of the editor, scrolling occurs automatically. For
simple data types, type testing is carried out during the connection. If the types of the
two pins are not compatible, the cursor changes to „Forbidden“. For complex data
types, no testing takes place.
Deleting connections
There are a number of possibilities for removing the connection between the output
of an element E1 and the input of an element E2:
Select the output of element E1 (Cursor position 4) and press the <Delete> key or
execute the command ‘Edit’ ‘Delete'. Several connections will be removed at the
same if the output of E1 is connected to more than one of inputs.
Select the input of element E2 (Cursor position 4) and press the <Delete> key or
execute the command ‘Edit’ ‘Delete‘.
Select the input of E2 with the mouse, hold the left mousekey depressed and drag the
connection from the input to E2 away. The connection is removed when the left
mousekey is released in a free area of the screen.
Changing connections
A connection between the output of an element E1 and the input of an element E2
can easily be changed into a connection between the output of element E1 and the
input of element E3. The mouse is clicked on the input of E2 (Cursor position 3), the
left mousekey is kept depressed, the mouse cursor is moved to the input of E3 and
then released.
5-46 BODAS / 10
Chapter 5 - Editors in BODAS
A unique name is given as standard by the program which begins with M, but which
can be changed The connector name is stored as an output parameter, but can be
edited both at the input and at the output.
It is important to know that the connector name is associated with a property of the
output of a connection and is stored with it.
BODAS / 10 5-47
The Graphic Editors
The sequence influences the result and must be changed in certain cases.
If the sequence is displayed, the corresponding sequential execution number is
shown in the upper right hand corner of the element.
‘Extras‘ ’Order‘ ’Display‘
This command switches the display of the order of execution on and off. The default
setting is to show it (recognised by a tick (ü) in front of the menu point).
The relevant order of execution number appears in the upper right hand corner for
the elements block, output, jump, return and label.
Image 5.20: Sequence before the topological ordering of the three elements
The elements with numbers 1, 2 and 3 are selected. If the command ’Order
topologically‘ is selected the elements are first taken out of the sequential processing
list. Var3, the jump and the AND-operator are then inserted again one after the other.
Var3 is placed before the label and receives the number 2. The jump is then ordered
and receives the number 4 at first but this then becomes 5 after the AND is inserted.
The new order of execution which arises is:
5-48 BODAS / 10
Chapter 5 - Editors in BODAS
Image 5.21: Sequence after the topological ordering of the three elements
BODAS / 10 5-49
The Graphic Editors
When this command is selected the first thing to happen is that the elements are
ordered topographically. A new sequential processing list is then created. Based on
the known values of the inputs, the computer calculates which of the as yet not
numbered elements can be processed next. In the above ”network” the block AND,
for example, could be processed immediately since the values at its inputs (1 and 2)
are known. Block SUB can only then be processed since the result from ADD must
be known first, etc.
Feedback paths are inserted last.
The advantage of the data flow sequencing is that an output box which is connected
to the output of a block comes immediately after it in the data flow sequencing
system which by topological ordering would not always be the case. The topological
5-50 BODAS / 10
Chapter 5 - Editors in BODAS
ordering can deliver another result in some cases than ordering by data flow, a point
which one can recognise from the above example.
'Extras' 'Create macro'‘
With this command, several POUs that are selected at the same time can be
assembled into a block, which can named as a macro. Macros only can be
reproduced by Copy/Paste, whereby each copy becomes a separate macro whose
name can be chosen independently. Macros are thus not references. All connections
that are cut by the creation of a macro generate in- or out-pins on the macro.
Connections to inputs generate an in-pin. The default name appears next to the pin in
the form In<n>. For connections to outputs, Out<n> appears. Affected connections
which had connection markers prior to the creation of the macro, retain the
connection marker on the PIN of the macro.
At first, a macro has the default name "MACRO". This can be changed in the Name
field of the macro use. If the macro is edited, the name of the macro will be
displayed in the title bar of the editor window appended to the POU name.
Example:
Selection
Macro:
In the editor:
BODAS / 10 5-51
The Graphic Editors
Note: If the project is saved under project version number 2.1, the macros will
likewise all be expanded. All macros will also be expanded before conversion into
other languages.
Symbols:
These commands are also available in the toolbar, as soon as a macro is opened for
editing. If macros are nested within one another, it is possible to switch to the next
higher or to the highest display level.
Feedback paths
Feedback paths can only be displayed directly in the continuous function chart editor
and not in the usual function block diagram editor. Here it should be observed that
the output of a block always carries an internal intermediate variable. The data type
of the intermediate variable results, for operators, from the largest data type of the
inputs.
The data type of a constant is obtained from the smallest possible data type, that is
the constant ‘1’ adopts the data type SINT. If now an addition with feedback and the
constant ‘1’ is executed, the first input gives the data type SINT and the second is
undefined because of the feedback. Thus the intermediate variable is also of the type
SINT. The value of the intermediate variable is only then allocated to the output
variable.
5-52 BODAS / 10
Chapter 5 - Editors in BODAS
The diagram below shows an addition with feedback and an addition with a variable.
The variables x and y should be of the type INT here.
Non-boolean connections with connection markers display their value within the
connection marker. For boolean connections, the lines as well as the marker names
are displayed in blue if the line is carrying the value TRUE, otherwise black.
BODAS / 10 5-53
The Graphic Editors
Flow control:
When flow control is switched on, the connections that have been traversed are
marked with the color selected in the project options.
Breakpoints:
Breakpoints can be set on all elements that also have a processing sequence order
index. The processing of the program will be halted prior to execution of the
respective element, that is for POUs and outputs before the assignment of inputs, for
jump labels before execution of the element with the next index. The processing
sequence index of the element is used as the breakpoint position in the Breakpoint
dialog.
The setting of breakpoints on a selected element is accomplished with the F9 key or
via the menu item 'Breakpoint on/off' in the 'Online' or 'Extras' menu or in the
editor’s context menu. If a breakpoint is set on an element, then this will be erased
and reversed the next time the command 'Breakpoint on/off' is executed. In addition,
the breakpoint on an element can be toggled by double-clicking on it.
Breakpoints are displayed in the colors entered in the project options.
RETURN label:
In Online mode, a jump label with the name „RETURN“ is automatically generated
in the first column and after the last element in the editor. This label marks the end of
the POU and is jumped to when stepping just before execution leaves the POU. No
RETURN marks are inserted in macros.
Stepping:
When using 'Step over' the element with the next-higher order index will always be
jumped to. If the current element is a macro or a POU, then its implement branches
when 'Step in' is in effect. If a 'Step over' is executed from there, the element whose
order index follows that of the macro is jumped to.
Please note: Flow control, Stepping and Breakpoints are only available in
online simulation.
5-54 BODAS / 10
Chapter 6 - The Resources
6 The Resources
In the Resources register card of the Object Organizer, there are objects for
configuring and organizing your project and for keeping track of the values of the
variables:
• Global Variables that can be utilized in the entire project; the global variables of
the project as well as the libraries.
• PLC Configuration for setting up parameters and process variables for BODEM
/ BB-3
• Sampling Trace for graphic logging of variable values
• Target settings for selecting the hardware platform (target) and if available for
customizing target specific parameters
• Task Configuration for controlling your program control via tasks
• Watch and Receipt Manager for indicating and presetting variable values
• Additionally there might be created and loaded a Docuframe file which offers a
set of comments for the project variables (e.g. in a certain language), which will
be printed when documenting the project with 'Project' 'Document'.
BODAS / 10 6-1
Global Variables
„Normal“ variables, constants or remanent variables that are known throughout the
project can be declared as global variables, but also network variables that are also
used for data exchange with other network subscribers.
With the help of network variables, automatic data exchange can be achieved
(compare this to the non-automatic kind that uses the OD directory) within a
BODAS compatible controller network that requires no controller-specific functions.
For this, the network subscribers must use identical declaration lists and matching
transfer configurations for network variables in their projects. In order to make this
possible it is recommended that the declaration not be entered manually in each
controller application, but loaded from a separate file when creating the list. (see
'Creating a global variables list').
Create a Global Variable List
6-2 BODAS / 10
Chapter 6 - The Resources
BODAS / 10 6-3
PLC Configuration
6-4 BODAS / 10
Chapter 6 - The Resources
The configuration is displayed in the editor in tree structure and can be edited using
menu commands and dialog boxes.
The configuration editor is divided up in two parts. In the left window the
configuration tree is displayed, in the right window the currently available dialog is
shown.
The configuration dialogs are displayed by default, but can be faded out by
deactivating the menu command 'Extras' 'Properties'.
Insert elements, ‘Insert’ ‘Insert
element’, ‘Insert’ ‘Append
subelement’
You can insert additional elements by selecting either the root of the tree or an
element on the fist level.
• If you select the “BODEM / BB-3” root:
'Insert' 'Append subelement': an element can be selected and appended as last
subelement.
• If you select a first-level element (“Process_<x>”, “Menu_<x>”, “Error”):
'Insert' 'Insert element: an element can be selected and inserted in front of the
highlighted element.
You will also find these commands in the Context menu (right-hand mouse button).
declaration !
BODAS / 10 6-5
PLC Configuration
Modulparameter
In this dialog the parameters which are given by the device file are shown. Only the
column ‘value’ is editable.
Index: The Index is a consecutive digit (i), which numbers through all the way the
parameters of the module.
Name: Name of the parameter
Value : Value of the parameter, editable
Initially the default is displayed.
Default: Default value of the parameters
Min.: minimum value of the parameter
Max.: maximum value of the parameter
A tooltip may give additional information on the currently marked parameter.
6-6 BODAS / 10
Chapter 6 - The Resources
In addition to declaring the special PLC_PRG program, you can also control the
processing of your project using the task management.
The Task Configuration is found as an object in the Resources register card in the
Object Organizer. The task editor contains a series of tasks. The task declaration
consists of the name of the task, an entry for the priority the task is to have, and an
entry for the condition under which the task is to be executed. This requirement can
either be a time interval, according to which the task is to be executed, or a global
variable, in the event it has a rising edge, brings about an execution.
For each task you can now specify a series of programs that will be started by the
task. If the task is executed in the present cycle, then these programs will be
processed the length of one cycle.
The Task Configuration is displayed in the following form:
• The Task Configuration is located in the first line.
• Underneath and indented from the Task Configuration, you will find a sequence
of task entries (with name, priority, interval, and occurrence).
• Below each task entry, there is again a series of program call ups.
In this example of a Task Configuration, Task2 has a lower priority than Task1.
Task1, however, is only executed every two seconds. (The entry under Single is
disregarded.) Thus, in this Task Configuration, Task1 is executed every two seconds,
and, in between, Task2 can be executed at any time, provided that the global variable
"Schalten" has a rising edge.
Which task is being processed?
For the execution, the following rules apply:
• That task is executed, whose condition has been met; i.e., its specified time has
expired, or after its condition variable exhibits a rising edge.
• If several tasks have a valid requirement, then the task with the highest priority
will be executed.
• If several tasks have valid conditions and equivalent priorities, then the task that
has had the longest waiting time will be executed first.
• The most important commands are found in the context menu (right mouse
button or <Ctrl>+<F10>).
BODAS / 10 6-7
Task Configuration
In the dialog box you can enter the desired attributes: the Name; the Priority
(a number between 0 and 31, with the following validities: 0 has the highest, and, 31,
the lowest priority); the Interval after which the task should be started again; or a
variable that, following a raising edge, will cause an execution of the task (in the
Single field). With the Select... button, you can open the Input Assistant to select
from the declared variables.
If an entry is on hand for both the interval and for the variable, then only the interval
time will be considered for the execution requirement. If an entry has not been made
in either of the two fields, then the execution intervall is depending on which target
system is used (see the runtime system documentation; e.g. an interval of 10 ms is set
by the runtime BODASSP NT V2.2).
6-8 BODAS / 10
Chapter 6 - The Resources
In the field, specify a valid program name for your project, or open the Input
Assistant with the Select button to select a valid program name. If the selected
program requires input variables, then enter these in their usual form and of the
declared type (for example, prg(invar:=17)).
‘Extras‘ ‘Edit Entry‘
Depending on the element selected, you can use this command in the Task
Configuration to open either the dialog box for setting the task attributes (see 'Insert'
'Task') or the dialog box for entering the program call (see 'Insert' 'Program
Call').
If the cursor is located at the task entry, and there is no list of program calls
appended to the task entry, then you open the dialog for setting the doubleclicking
on the entry or by pressing <Enter>.
If the cursor is located on an entry for a program call, then you can also open the
dialog box for editing the program entry by doubleclicking on the entry.
By clicking on the task or program name, or by pressing the <Space bar>, you can
set an edit control box around the name. Then, you can change the designation
directly in the task editor.
‘Extras‘ ‘Set Debug Task‘
With this command a debugging task can be set in Online mode in the Task
Configuration. The text [DEBUG] will appear after the set task.
The debugging capabilities apply, then, only to this task. In other words, the program
only stops at a breakpoint if the program is gone through by the set task.
BODAS / 10 6-9
Sampling Trace
Sample tracing means that the progression of values for variables is traced over a
certain time frame. These values are written in a ring buffer (trace buffer). If the
memory is full, then the "oldest" values from the start of the memory will be
overwritten. As a maximum, 20 variables can be traced at the same time. A
maximum of 500 values can be traced per variable.
Since the size of the trace buffer in the PLC has a fixed value, in the event of very
many or very wide variables (DWORD), fewer than 500 values can be traced.
Example: if 10 WORD variables are traced and if the memory in the PLC is 5000
bytes long, then, for every variable, 250 values can be traced.
In order to be able to perform a trace, open the object for Sampling Trace in the
Resources register card in the Object Organizer. After this, you must enter the trace
variables to be traced. (See 'Extras' 'Trace Configuration'.) After you have sent the
configuration with 'Save Trace' to the PLC and have started the trace in the PLC
('Start Trace'), then the values of the variables will be traced. With 'Read Trace',
the final traced values will be read out and displayed graphically as curves.
‘Extras‘ ‘Trace Configuration‘
With this command you will be given the dialog box for entering the variables to be
traced, as well as diverse trace parameters for the Sampling Trace. The dialog can
also be opened by a double click in the grey area of the dialog Sampling Trace.
The list of the Variables to be traced is initially empty. In order to append a variable
the variable must be entered in the field under the list. Following this, you can use
the Add button or the <Enter> to append the variable to the list. You can also use the
Input Assistant.
A variable is deleted from the list when you select the variable and then press the
Delete button.
A Boolean or analogue variable can be entered into the field Trigger Variable. The
input assistance can also be used here. The trigger variable describes the termination
condition of the trace. In Trigger Level you enter the level of an analogue trigger
variable at which the trigger event occurs. When Trigger edge positive is selected
the trigger event occurs after an ascending edge of the Boolean trigger variable or
when an analogue variable has passed through the trigger level from below to above.
Negative causes triggering after a descending edge or when an analogue variable
went from above to below. Both causes triggering for both descending and ascending
edges or by a positive or negative pass, whereas none does not initiate a triggering
event at all. Trigger Position is used to set the percentage of the measured value
which will be recorded before the trigger event occurs. If, for example, you enter 25
here then 25 % of the measured values are shown before the triggering event and
75% afterwards and then the trace is terminated. The field Sample Rate is used set
the time period between two recordings in milliseconds. The default value ”0” means
one scanning procedure per cycle.
6-10 BODAS / 10
Chapter 6 - The Resources
Select the mode for recalling the recorded values: With Single the Number of the
defined samples are displayed one time. With Continuous the reading of the
recording of the defined number of measured values is initiated anew each time. If,
for example, you enter the number ‘35’ the first display contains the first measured
values 1 to 35 and the recording of the next 35 measured values (36-70) will then be
automatically read, etc.. Manual selection is used to read the trace recordings
specifically with ’Extras‘ ‘Read trace'.
The recall mode functions independently of whether a trigger variable is set or not. If
no trigger variable is set the trace buffer will be filled with the defined number of
measured values and the buffer contents will be read and displayed on recall.
The button Save is used to store the trace configuration which has been created in a
file. The standard window ”File save as” is opened for this purpose.
Stored trace configurations can be retrieved using the button Load. The standard
window ”File open” is opened for this purpose.
Note: Please note that Save and Load in the configuration dialog only relates to
the configuration, not to the values of a trace recording (in contrast to the menu
commands ‘Extras’ ‘Save trace’ and ‘Extras’ ‘Load trace’).
BODAS / 10 6-11
Sampling Trace
If the field Trigger Variable is empty, the trace recording will run endlessly and can
be stopped by 'Extras' 'Stop Trace'.
‘Extra‘ ‘Start Trace‘
Symbol:
With this command the trace configuration is transferred to the PLC and the trace
sampling is started in the PLC.
‘Extra‘ ‘Read Trace‘
Symbol:
With this command the present trace buffer is read from the PLC, and the values of
the selected variables are displayed.
‘Extra‘ ‘Auto Read‘
With this command the present trace buffer is read automatically from the PLC, and
the values are continuously displayed.
If the trace buffer is automatically read, then a check (ü) is located before the menu
item.
‘Extra‘ ‘Stop Trace‘
Symbol:
This command stops the Sampling Trace in the PLC.
6-12 BODAS / 10
Chapter 6 - The Resources
The Y axis is inscribed with values in the appropriate data type. The scaling is laid
out in a way that allows the lowest and the highest value to fit in the viewing area. In
the example, Var 0 has taken on the lowest value of 6, and the highest value of 100:
hence the setting of the scale at the left edge.
If the trigger requirement is met, then a vertical dotted line is displayed at the
interface between the values before and after the appearance of the trigger
requirement.
A memory that has been read will be preserved until you change the project or leave
the system.
‘Extras‘ ‘Cursor Mode‘
The easiest way to set a cursor in the monitoring area is to click there with the left
mouse button. A cursor appears and can be moved by the mouse. At the top of the
monitoring window the current x-position of the cursor is displayed. In the fields
next to 'Var 0', 'Var 1', ..., 'Var n' the value of the respective variable is shown.
Another way is the command 'Extras' 'Cursor mode'. With this command two vertical
lines will appear in the Sampling Trace. First they are laying one on the other. One of
the lines can be moved to the right or to the left by the arrow keys. By pressing
<Ctrl>+<left> or <Ctrl>+<right> the speed of the movement can be increased by
factor 10.
If additionally the <Shift> key is pressed, the second line can be moved, showing the
difference to the first one.
‘Extras‘ ‘Multi Channel‘
With this command you can alternate between single-channel and multi-channel
display of the Sampling Trace. In the event of a multi-channel display, there is a
check (ü) in front of the menu item.
The multi-channel display has been preset. Here the display window is divided into
as many as eight display curves. For each curve the maximum and the minimum
value are displayed at the edge.
BODAS / 10 6-13
Sampling Trace
In a single-channel display, all curves are displayed with the same scaling factor and
are superimposed. This can be useful when displaying curve abnormalities.
‘Extras’ ‘Show grid’
With this command you can switch on and off the grid in the graphic window. When
the grid is switched on, a check (ü) will appear next to the menu item.
‘Extras‘ ‘Y Scaling‘
With this command you can change the preset Y scaling of a curve in the trace
display.
In the dialog box specify the number of the desired curve (Channel) and the new
maximum (maximum y scale) and the new minimum value (minimum y scale) on
the y axis.
By doubleclicking on a curve you will also be given the dialog box. The channel and
the former value are preset.
‘Extras‘ ‘Stretch‘
Symbol:
With this command you can stretch (zoom) the values of the Sampling Trace that are
shown. The beginning position is set with the horizontal picture adjustment bar. With
repeated stretches that follow one-after-another, the trace section displayed in the
window will increasingly shrink in size.
This command is the counterpart to 'Extras' 'Compress'.
‘Extras‘ ‘Compress‘
Symbol:
With this command the values shown for the Sampling Trace are compressed; i.e.,
after this command you can view the progression of the trace variables within a
larger time frame. A multiple execution of the command is possible.
This command is the counterpart to 'Extras' 'Stretch'.
‘Extras‘ ‘Save Trace‘
With this command you can save a Sampling Trace (values + configuration data).
The dialog box for saving a file is opened. The file name receives the extension
"*.trc".
6-14 BODAS / 10
Chapter 6 - The Resources
Be aware, that here you save the traced values as well as the trace configuration,
whereas Save trace in the configuration dialog only concerns the configuration data.
The saved Sampling Trace can be loaded again with 'Extras' 'Load Trace'.
‘Extras‘ ‘Load Trace‘
With this command a saved Sampling Trace (traced values + configuration data)can
be reloaded. The dialog box for opening a file is opened. Select the desired file with
the "*.trc" extension.
With 'Extras' 'Save Trace' you can save a Sampling Trace.
‘Extras‘ ‘Trace in ASCII-file‘
With this command you can save a Sampling Trace in an ASCII-file. The dialog box
is opened for saving a file. The file name receives the extension "*.txt". The values
are deposited in the file according to the following scheme:
BODAS Trace
D:\BODAS\PROJECTS\TRAFFICSIGNAL.PRO
Cycle PLC_PRG.COUNTER PLC_PRG.LIGHT1
021
121
221
.....
If no frequency scan was set in the trace configuration, then the cycle is located in
the first column; that means one value per cycle has been recorded at any given time.
In the other respects, the entry here is for the point in time in ms at which the values
of the variables have been saved since the Sampling Trace has been run.
In the subsequent columns, the corresponding values of the trace variables are saved.
At any given time the values are separated from one another by a blank space.
The appertaining variable names are displayed next to one another in the third line,
according to the sequence (PLC_PRG.COUNTER, PLC_PRG.LIGHT1).
BODAS / 10 6-15
Watch and Receipt Manager
In order to work with the Watch and Receipt Manager, open the object for the
Watch and Receipt Manager in the Resources register card in the Object
Organizer.
The variables in the watch list can be preset with constant values. That means that in
Online mode you can use the 'Extras' 'Write Receipt' command to write these
values into the variables. To do to do must use := to assign the constant value of the
variable:
Example:
PLC_PRG.TIMER:=50
In the example, the PLC_PRG.COUNTER variable is preset with the value 6
‘Insert‘ ‘New Watch List‘
With this command a new watch list can be inserted into the Watch and Receipt
Manager. Enter the desired name for the watch list in the dialog box that appears.
6-16 BODAS / 10
Chapter 6 - The Resources
In the Offline Mode you can preset variables with constant values (through inputting
:= <value> after the variable). In the Online Mode, these values can now be written
into the variables, using the 'Extras' 'Write Receipt' command.
BODAS / 10 6-17
Watch and Receipt Manager
With the 'Extras' 'Read Receipt' command you can replace the presetting of the
variable with the present value of the variable.
Note: Only those values the watch list are loaded which was selected in the
Watch and Receipt Manager!
‘Extra‘ ‘Monitoring Active‘
With this command at the Watch and Receipt Manager in the Online mode, the
display is turned on or off. If the display is active, a check (ü) will appear in front of
the menu item.
In order to enter new variables or to preset a value (see Offline Mode, the display
must be turned off through the command. After the variables have been entered, you
can use the same command again to activate the display of the values.
‘Extras‘ ‘Write Receipt‘
With this command in the Online Mode of the Watch and Receipt Manager you can
write the preset values (see Offline Mode) into the variables.
Note: Only those values of the watch list are loaded which was selected in the
Watch and Receipt Manager!
‘Extras‘ ‘Read Receipt‘
With the command, in the Online Mode of the Watch and Receipt Manager, you can
replace the presetting of the variables (see Offline Mode) with the present value of
the variables.
Example:
PLC_PRG.Counter [:= <present value>] = <present value>
Note: Only the values of that watch list are loaded which was selected in the
Watch and Receipt Manager!
Force values
In the Watch and Receipt Manager you can also 'Force values' and 'Write values'.
If you click on the respective variable value, then a dialog box opens, in which you
can enter the new value of the variable. Changed variables appear in red in the Watch
and Receipt Manager.
6-18 BODAS / 10
Chapter 7 - Library Manager
7 Library Manager
The library manager shows all libraries that are connected with the current project.
The POUs, data types, and global variables of the libraries can be used the same way
as user-defined POUs, data types, and global variables.
The library manager is opened with the 'Window' 'Library Manager' command.
Information concerning included libraries is stored with the project.
BODAS / 10 7-1
Watch and Receipt Manager
7-2 BODAS / 10
Chapter 8 - Visualization
8 Visualization
Visualization
Visualizations allow you to view your project variables. With the help of
visualizations, you can draw geometrical elements offline which can then change e.g.
their form or color online in response to specified values of variables. For example it
is possible to display the increase in a variable value with a bar chart.
In Online mode, input to the program can then be carried out also via mouse and
keyboard. This is also the basis for the use of a project in the BODAS operating
version, in which all program functions must be controlled in this way (see further in
this regard under 'Special input capabilities for the BODAS operating version').
By using placeholders instead of concrete variables and text strings in configuring
the visualization elements, a visualization object (visualization POU) can easily be
used many time (referenced) by inserting it in other visualization objects and
providing it there with various configuration (for example for visualizing different
instances of a function block).
If a visualization object is to be inserted in another visualization, it is named
'Reference' and behaves in Online mode just like the original visualization, that is the
corresponding elements of a reference from VisuA react simultaneously and
identically to those from VisuA.
When a suitable translation file (see 'Project' 'Translate into other language') is
available, visualization texts can be switched to another national language in Online
mode.
BODAS / 10 8-1
Visualization Elements, Insert
Create Visualization
In order to create a visualization, you must select the register card for
Visualization in the Object OrganizerUsing the 'Project' 'Object Add' command,
you can create a new visualization object. Open the 'New visualization' dialog, in
which you can enter the name of the new visualization. Once a valid entry is made,
that is not a name that is already in use and no special characters used, you can close
the dialog with OK. A window opens, in which you can edit the new visualization.
Symbol:
With the command you can insert a rectangle as an element into your present
visualization. (Use, see Visualization Elements, Insert)
8-2 BODAS / 10
Chapter 8 - Visualization
Symbol:
With the command you can insert a rectangle with rounded corners as an element in
your present visualization. (Use, see Visualization Elements, Insert).
‘Insert‘ ‘Ellipse‘
Symbol:
With the command you can insert a circle or an ellipse as an element in your present
visualization. (Use, see Visualization Elements, Insert).
‘Insert‘ ‘Polygon‘
Symbol:
With the command you can insert a polygon as an element in your present
visualization. (Use, see Visualization Elements, Insert).
‘Insert‘ ‘Line‘
Symbol:
With the command you can insert a line as an element into your current visualization.
(Use, see Visualization Elements, Insert).
‘Insert’ ‘Curve’
Symbol:
With the command you can insert a Bezier curve as an element into your current
visualization. (Use, see Visualization Elements, Insert).
‘Insert‘ ‘Bitmap‘
Symbol:
With the command you can insert a bitmap as an element in your present
visualization. (Use, see Visualization Elements, Insert).
While pressing the left mouse button, bring up an area in the desired size. The dialog
box is opened for opening a file. Once you have selected the desired bitmap, it will
be inserted into the area brought up.
‘Insert‘ ‘Visualization‘
Symbol:
With the command you can insert an existing visualization as an element in your
present visualization. (Use, see Visualization Elements, Insert).
While pressing the left mouse button, bring up an area in the desired size. A selection
list of existing visualizations opens. After you have selected the desired visualization,
it will be inserted in the defined area.
An inserted visualization will also be named as a reference.
BODAS / 10 8-3
Working with Visualization Elements
‘Insert’ ‘Button’
Symbol:
This command is used to insert a button into your current visualization. (Use, see
Visualization Elements, Insert).
Drag the element to the desired size with the left mouse button held down.
If a toggle variable is configured for the button it displays the state of this variable by
visually displaying whether it is pressed or not pressed. Conversely, the variable is
toggled by „pressing“ the button.
Selecting Visualization
Elements
In order to select an element, click with the mouse on the element. You can also
select the first element of the elements list by pressing the <Tab> key and jump to
the next by each further keystroke. If you press the <Tab> key while pressing the
<Shift> key, you jump backwards in the order of the elements list.In order to mark
multiple elements, press and hold the <Shift> key and click the corresponding
elements, one after another; or, while holding down the left mouse button, pull a
window over the elements to be selected.
In order to select all the elements, use the 'Extras' 'Select All' command.
If you are in the element list (called by 'Extras' 'Element list'), you can select the
concerned element in the visualization by selecting a line.
Modifying Visualization
Elements
You can select an element which has already been inserted by a mouse click on the
element or by pressing the <tab> key. A small black square will appear at each
corner of each of the elements, (with ellipses at the corners of the surrounding
rectangle). Except in the case of polygons, lines or curves further squares appear in
the middle of the element edges between the corner points.
With a selected element, the turning point (balance point) is also displayed at the
same time. You can then rotate the element around this point with a set motion/angle.
The turning point is displayed as a small black circle with a white cross ( ). You
can drag the turning point with a pressed left mouse button.
You can change the size of the element by clicking on one of the black squares and,
while keeping the left mouse button pressed, controlling the new outline.
With the selection of a polygon, you can drag each individual corner using the same
technique. While doing this, if you press the <Ctrl>-key then an additional corner
8-4 BODAS / 10
Chapter 8 - Visualization
point will be inserted at the corner point, an additional corner point will be inserted,
which can be dragged by moving the mouse. By pressing the <Shift>+<Ctrl>-key,
you can remove a corner point.
Dragging Visualization
Elements
One or more selected elements can be dragged by pressing the left mouse button or
the arrow key.
Copying Visual Elements
One or more selected elements can be inserted with the 'Edit' 'Copy'command, the
<Ctrl>+<C> key combination, or the corresponding copy symbol, and with 'Edit'
'Paste'.
A further possibility is to select the elements and to again click in one of these
elements with the <Ctrl> key held down. If you now hold the left mouse button
down, you can separate the elements thus copied from the original.
Changing the Selection and
Insert Mode
After the insertion of a visualization element, there is an automatic change back into
the selection mode. If you want to insert an additional element the same way, you
can once again select the corresponding command in the menu or the symbol in
the tool bar.
You can also quickly change between the selection mode and the insert mode by
pressing the <Ctrl>-key and the right mouse button simultaneously.
In the insert mode, the corresponding symbol will also appear at the mouse pointer,
and the name will also be indicated in black in the status bar.
Status Bar in the Visualization
If a visualization has the focus, the current X and Y position of the mouse cursor in
pixels relative to the upper left corner of the image is displayed in the status bar. If
the mouse pointer is located on an Element, or if the element is being processed,
then the number of the element will be displayed. If you have selected an element to
insert, then this element will also appear (for example, Rectangle).
‘Extras‘ ‘Configure‘
With this command, the 'Configure element' dialog opens for configuring the
selected visualization element (see Select visualization element). You are given the
dialog box when you doubleclick on the element.
Select a category in the left area of the dialog box, and fill out the requested
information in the right area.
Depending on the visualization element selected, various categories can be selected:
BODAS / 10 8-5
Visualization Elements, Configure
8-6 BODAS / 10
Chapter 8 - Visualization
Image 8.1: Placeholder list for input of possible replacements for the placeholders
All placeholders provided for in the visualization are listed in the Placeholder
column. The Element number column shows in which element a placeholder has
been configured. A selection of strings, which can then be used as input in a
reference in place of the placeholder, can be entered for these placeholders in the
Replacements column. The elements of the selection must be entered separated by
commas. If an impossible replacement string is specified, then the placeholder can be
replaced with any desired text when configuring the reference that contains it.
Shape
In the visualization element configuration dialog box, you can select in the Shape
category from among Rectangle, Rounded Rectangle, and Ellipse respectively
Polygon, Line and Curve. The form will change into the size already set.
Image 8.2: Dialog Box for Configuring Visualization Elements (Shape Category)
BODAS / 10 8-7
Visualization Elements, Configure
Text
In the dialog for configuring visualization elements, you can specify a text for the
element in the Text category, which can be entered directly or represented by a
placeholder.
Enter the text in the Content field. With the key combination <Crtl>+<Enter> you
can insert line breaks, with <Crtl>+<Tab>, tab stops.
If you enter "<name>" into the text, then this location, in Online mode, will be
replaced by the value of the variable from the Text Output field of the Variables
category.
Note: If a text string is to be transferred into a translation file, which will then
be used in Online mode to enable switching into another national language, it must
be delimited at the beginning and end by #.
Examples: “#Pump 1#” or else even “#Pump# 1"
The second case might for example, in the event of multiple occurrences of the text
Pump (Pump 1, Pump 2, etc.), prevent multiple appearances in the translation.
The configured text will appear online in the prescribed alignment within the
element: horizontally left, center or right and vertically top, center or bottom.
If you use the Font button, a dialog box for selection of the font will appear. Select
the desired font and confirm the dialog with OK. With the Standard-Font button
you can set the font that is selected in the project options (‘Project’ ‘Options’
'Editor'). If the font is changed there, then this font will be displayed in all elements
except in those elements for which another font has explicitly been selected by using
the Font button.
Image 8.3: Dialog Box for Configuring Visualization Elements (Text Category)
Line width
In the dialog for configuring visualization elements, you can choose the line width
for an element. As predefined options you find width settings from 1 to 5 pixel,
additionally an other value can be entered manually.
8-8 BODAS / 10
Chapter 8 - Visualization
Image 8.4: Dialog Box for Configuring Visualization Elements (Line width category)
Color
In the visualization element configuration dialog box, in the Color category you can
select primary colors and alarm colors for the inside area and for the frame of your
element. Chosing the options no color inside and no frame color you can create
transparent elements.
Image 8.5: Dialog Box for Configuring Visualization Elements (Color Category)
If you now enter a Boolean variable in the Variables category in the Change Color
field, then the element will be displayed in the Color set, as long as the variable is
FALSE. If the variable is TRUE, then the element will be displayed in its Alarm
Color.
Note: The change color function only becomes active, if the PLC is in Online
Mode!
If you want to change the color of the frame, then press the Frame button, instead of
the Inside button. In either case, the dialog box will open for selection of the color.
Here can to choose the desired hue from the primary colors and the user-defined
colors. By pressing the Define Colors you can change the user-defined colors.
BODAS / 10 8-9
Visualization Elements, Configure
Motion absolute
In the visualization element configuration dialog box, in the Motion absolute
category, X- or Y-Offset fields variables can be entered. These variables can shift the
element in the X or the Y direction, depending on the respective variable value. A
variable in the Scale field changes the size of the element linear to the value of the
variable.
A variable in the Angle field causes the element to turn on its turning point,
depending on the value of the variable. (Positive Value = Mathematic Positive =
Clockwise). The value is evaluated in degrees. With polygons, every point rotates; in
other words, the polygon turns. With all other elements, the element rotates, in such a
way, that the upper edge always remains on top.
The turning point appears after a single click on the element, and is displayed as a
small black circle with a white cross ( ). You can drag the turning point with a
pressed left mouse button.
Image 8.6: Visualization Element Configuration Dialog Box (Motion Absolute Category)
Motion relative
In the dialog for configuring visualization elements in the Motion Relative category,
you can assign variables to the individual element edges. Depending on the values of
the variables, the corresponding element edges are then moved. The easiest way to
enter variables into the fields is to use the Input Assistant (<F2>).
The four entries indicate the four sides of your element. The base position of the
corners is always at zero. A new value in the variables, in the corresponding column,
shifts the boundary in pixels around this value. Therefore, the variables that are
entered ought to be INT variables.
Note: Positive values shift the horizontal edges downward, or, the vertical
edges, to the right!
8-10 BODAS / 10
Chapter 8 - Visualization
Image 8.7: Dialog Box for Configuration of Visualization Elements (Motion Relative Category)
Variables
You can enter the variables that describe the status of the visualization elements in
the Variable category within the dialog box for configuring visualization elements.
The simplest way to enter variables in the fields is to use the Input Assistant.
You can enter Boolean variables in the Invisible and Change color fields. The
values in the fields determine their actions. If the variable of the Invisible field
contains the value FALSE, the visualization element will be visible. If the variable
contains the value TRUE, the element will be invisible.
If the variable at the Change color field contains the value FALSE, the visualization
element will be displayed in its default color. If the variable is TRUE, the element
will be displayed in its alarm color.
In the Textdisplay field, you can specify a variable whose value is displayed in the
visualization, as long as you have entered „<name>“ in addition to the text in the
Content field of the Text category. The „<name>“ is replaced in Online mode by the
value of the variable from the Textdisplay field. If you want to edit the value of the
variable in Online mode using the keyboard, you can do this via the 'Text input of
variable' 'Textdisplay' in the Input category.
BODAS / 10 8-11
Visualization Elements, Configure
Input
Selecting the field Toggle variable allows you, in online mode, to toggle the value
of the variables which are located in the input field with every mouse click on the
element. You can obtain input assistance for data entry via <F2>. The value of the
Boolean variable changes with each mouse click from TRUE to FALSE and then
back to TRUE again at the next mouse click, etc.
You can also use input assistance for entry of a variable for the Tip Variable option.
This option allows you, in online mode, to change the value of the Boolean variable
which is located in the input field, between TRUE and FALSE. Place the mouse
cursor on the element, press the mousekey and hold it depressed. If option Tip
FALSE is activated, the value is set to FALSE as soon as the mouse key is pressed,
otherwise it is set to TRUE at this moment. The variable changes back to its initial
value as soon as you release the mouse key.
Selecting the field Zoom to Vis... allows you to enter the name of a visualization
object of the same project into the edit field. You can then switch to the window
showing this visualization in Online mode by clicking on the element with the
mouse. The window of the target visualization will first open, followed by the
closing of that of the current one. While in online mode use a mouse click to change
to the element in the window of the visualization which has been entered. If a
program variable of the type STRING (e.g. PLC_PRG.xxx) has been entered instead
of a visualization object, then this variable can be used to define the name of the
visualization object (e.g. ,visu1’) which the system should change to when a mouse
click occurs (e.g. xxx:= ,visu1).
If a visualization reference that contains placeholders is to be jumped to, these can
be directly replaced by variable names or text when called up. For this purpose,
conform to the following syntax:
<Visuname>(<Placeholder1>:=<Text1>, <Placeholder2>:=<Text2>,..., <Placeholder
n>:=<Textn>)
Example:
Calling the visualization visu1, whereby the placeholders $var_ref1$ and
$var_ref2$ used in visu1 are replaced by the variables PLC_PRG.var1 and
PROG.var1 respectively:
visu1(var_ref1:=PLC_PRG.var1, var_ref2:=PROG.var1)
If you issue the command „ZOOMTOCALLER“ in the Zoom to vis. field, a
backward jump into the calling visualization is achieved in Online mode by a mouse
click on the element, if such a constellation was configured.
Selecting the option Execute program allows you to enter any executable program
in the input field and then to execute it in online mode by clicking on the element
with the mouse. Example: notepad C:/help.txt (the Notepad program is started and
the help.txt file is opened).
Note: The configuration field Execute program plays a major role for the
BODAS operating version, since BODAS program actions can be initiated here
over defined commands, which are available as menu commands in the full version
(see Special input possibilities for the BODAS operating version).
8-12 BODAS / 10
Chapter 8 - Visualization
If you select the Text input of variable 'Textdisplay' in Online mode, you get an
editing space in this visualization element. You can enter a value in this which will
upon pressing <Enter> be written to the variable that appears in the Textdisplay
field of the Variables category.
BODAS / 10 8-13
Visualization Elements, Configure
SAVEWATCH ‘Save watch list' The receipt will be read into the
current watch list which will be
stored in a file. Important: call a
previous DEFINERECEIPT to
define the current receipt !
LOADWATCH ‘Load watch list' + The standard window ‚File open‘
‘Write receipt' appears, from which a previously
stored receipt can be selected.
This receipt will be immediately
written into the controller
system.
EXITPROGRAM ‚File‘ ‘Close' The program will be exited.
PRINT ‚File‘ ‘Print' The current visualization will be
printed out online.
HELP <name of Call of a help file Depending on which language is
help file> set for the visualization, a help
file will be called which is
entered for that language in the
BODAS.ini file. (see 'Extras'
'settings')
8-14 BODAS / 10
Chapter 8 - Visualization
Image 8.1: Dialog for the trace recording in the operation version
ToolTip
The dialog Text for Tooltip offers an input field for text which appears in a text field
as soon as the mouse cursor is passed over the object in online mode. The text can be
formatted with line breaks by using the key combination <Ctrl> + <Enter>.
Bitmap
You can enter the options for a bitmap in the Bitmap category within the
visualization element configuration dialog box.
Enter the bitmap file and its path in the Bitmap field. You can use the ... button to
open the standard Windows Browse dialog box from which you can select the
desired bitmap.
All other entries affect the frame of the bitmap.
By selecting Anisotropic, Isotropic or Fixed you specify how the bitmap should
react to changes in the size of the frame. Anisotropic means that the bitmap remains
the same size as the frame which allows you to change the height and width of the
bitmap independently. Isotropic means that the bitmap retains the same proportions
even if the overall size is changed (i.e., the relationship between height and width is
BODAS / 10 8-15
Visualization Elements, Configure
maintained). If Fixed is selected, the original size of the bitmap will be maintained
regardless of the size of the frame.
If the Clip option is selected together with the Fixed setting, only that portion of the
bitmap that is contained within the frame will be displayed.
If you select the Draw option, the frame will be displayed in the color selected in the
Color and Alarm color buttons in the color dialog boxes. The alarm color will only
be used if the variable in the Change Color field in the Variable category is TRUE.
Visualization
You can enter the options for a visualization as an element in another visualization in
the Visualization category within the visualization element configuration dialog box.
Enter the object name for the visualization in the Visualization field. Use the ...
button to open a dialog box containing the visualizations available in this project.
Any visualization may be used with the exception of the current one.
8-16 BODAS / 10
Chapter 8 - Visualization
BODAS / 10 8-17
Additional Visualization Element Functions
8-18 BODAS / 10
Chapter 8 - Visualization
‘Extras‘ ‘Settings‘
When this command is used, a dialog box will open in which you can make certain
settings that affect the visualization.
Note: The categories Display, Frame and Language also can be edited in the
online mode.
BODAS / 10 8-19
Additional Visualization Element Functions
Category Display : Enter a zoom factor into the field Zoom of between 10 and
500 % in order to increase or decrease the size of the visualization display.
Category Frame: If Auto-scrolling is selected, the visible portion of the
visualization window will move automatically when you reach the edge while
drawing or moving a visualization element. If Best fit in Online mode is selected,
the entire visualization including all elements will be shown in the window in Online
mode regardless of the size of the window. When Include Background Bitmap is
selected, the background bitmap will be fitted into the window as well, otherwise
only the elements will be considered.
Category Grid: Define here whether the grid points are visible in the offline mode,
whereby the spacing between the visible points is at least 10 even if the entered size
is smaller than that. In this case the grid points only appear with a spacing which is a
multiple of the entered size. Selecting Active causes the elements to be placed on the
snap grid points when they are drawn and moved. The spacing of the grid points is
set in the field Size.
Category Language : Here you can specify in which national language the text that
you assigned to an element in the Text and Text for Tooltip options should be
displayed.
If different languages should be selectable for the display in online mode, either a
*.tlt translation file for the project, or a *.vis language file created especially for the
visualization must exist.
Regarding creating a translation file, please see Chapter 4, Manage projects, or the
menu item 'Project' 'Translate into other languages'.
For creating a special *.vis language file for the visualization, see below. This option
is retained for reasons of compatibility with projects created under Version 2.1.
8-20 BODAS / 10
Chapter 8 - Visualization
In order to select a translation or language file, activate the Language file option in
the dialog and enter in the input field next to it the appropriate file path, or obtain the
help of the standard file opening dialog via the button.
In the selection window under Language you can now select among the options
German and English in the example shown here.
BODAS / 10 8-21
Additional Visualization Element Functions
You get a list of the text variables for the language currently used in the
visualization. It includes a reference to the title of this list, for example "1=german"
as reference to the title [german]. You can extend the list by copying all lines, then
replacing the German by English text and setting a new title [english]. Beyond the
line 1=german you accordingly have to add 2=english.
To view the visualization in one of the prepared languages, open the dialog
Language again. In the option field beyond Language now you can choose between
german and english (for the example described above).
Note: The text display does not change before switching to Online Mode !
Calling up language-dependent Online Help via a visualization element:
The calling of a different Help file with a visualization element can be tied in with
the language currently entered for the visualization. For this purpose, the command
INTERN HELP must be entered for this element in the 'Configure element' dialog at
the location 'Execute program', and a [Visu-Helpfiles] section must be present in the
BODAS .ini file. Below this, the corresponding help files must be assigned to the
languages available for selection in the visualization: e.g.:
[Visu-Helpfiles]
German=C:\PROGRAMME\HELP_D.HLP
English=C:\PROGRAMME\HELP_E.HLP
8-22 BODAS / 10
Chapter 8 - Visualization
Note: Operation over the keyboard in online mode is of greatest significance for
the operation version of BODAS!
'File‘ 'Print' in online mode
‘File‘ ‘Print is used to print out the contents of the visualization window in online
mode. Visualizations which stretch over the border of the window can lead to
inconsistencies particularly when there are moving elements in the visualization.
Visualizations can also be stored in libraries and thus be made available to projects
as library POUs. They can be inserted as references like the visualizations directly
present in the project, or they can be called up via the command „Zoom to vis.“ in
the input configuration of another visualization.
BODAS / 10 8-23
Chapter 9 - DDE Interface
9 DDE Interface
DDE Kommunikation mit
BODAS
BODAS has a DDE (dynamic data exchange) interface for reading data. BODAS
uses this interface to provide other applications that also use a DDE Interface with
the contents of control variables.
If the GatewayDDEServer is used, which works with symbols, BODAS is not
needed to read variables values from the PLC and to transfer them to applications
with an DDE interface.
Attention: The DDE interface has been tested with Word 97 and Excel 97 on
Windows NT 4.0. If the DDE communication fails caused by a mismatch of other
versions or additionally installed programs on a computer, 3S – Smart Software
Solutions cannot take any responsibility.
Examples:
PLC_PRG.TEST (* Reads the variable TEST from the POU PLC_PRG*)
.GlobVar1 (* Reads the global variable GlobVar1 *)
BODAS / 10 9-1
DDE communcation with the GatewayDDE Server
9-2 BODAS / 10
Chapter 9 - DDE Interface
Using the command 'File' 'Open' you can call an already existing file which stores a
set of configuration parameters. The standard dialog for selecting a file will open and
available files with the extension “.cfg” will be offered. If a configuration file is
selected, the configuration parameters and the defined target device are displayed
If the option 'File' 'Autoload' is activated, the GatewayDDE Server automatically
opens with that configuration, which was active before the last terminating of the
server.
If the server is started without any predefined configuration and without the setting
Autoload, then in the configuration window 'Gateway:' und 'Device:' are displayed.
Then you have to set up a new configuration.
The command 'File' 'Settings' opens the dialog 'Server settings', in which the
following parameters can be set:
BODAS / 10 9-3
DDE communcation with the GatewayDDE Server
To get the gateway in active mode, login by the command 'Online' 'Login'. (The
gateway symbol in the status bar will get lightened then.) At login the desired
connection will be built up and the available symbols can be accessed.. These must
have been created before in the BODAS Project !
To log out use the command 'Online' Logout'.
General Approach to Data
A DDE inquiry can be divided into three parts:
1. Name of the program (here: BODAS),
2. File name and
3. Variable name to be read.
Name of the program: BODAS
File name: complete project path (c:\example\example.pro).
Variable name: The name of a variable as it appears in the Watch and Receipt
Manager .
Which variables can be read?
All addresses and variables are readable. Variables or addresses should be entered in
the format used in the Watch and Receipt Manager
Examples:
PLC_PRG.TEST (* Reads the variable TEST from the POU PLC_PRG*)
.GlobVar1 (* Reads the global variable GlobVar1 *)
Linking variables using WORD
In order to get the current value of the variable TEST from the POU PLC_PRG
through the DDE interface in Microsoft WORD, a field (e.g., the date) must be
inserted in WORD ('Insert' "Field"). Now when you click on the field with the right
mouse button and select the command "Toggle Field Codes" you can change the
field function for the chosen text. In our example, this would look as follows:
{ DDEAUTO GATEWAYDDESERVER "BSP.PRO" "PLC_PRG.TEST" }
Click on the field with the right mouse button again, then click on "Update Field"
and the desired variable content appears in the text.
Linking variables using EXCEL
The following must be entered in Microsoft EXCEL before you can assign a variable
to a cell.
=GATEWAYDDESERVER|<Dateiname>!<Variablenname>
Beispiel:
=GATEWAYDDESERVER|'bsp.pro'!'PLC_PRG.TEST'
When you click on 'Edit' then "Links", the result for this link will be:
Type: BODAS
Source file: C:\BODAS\PROJECT\IFMBSP.PRO
Element: PLC_PRG.TEST
{ DDEAUTO GATEWAYDDESERVER "BSP.PRO" "PLC_PRG.TEST" }
9-4 BODAS / 10
Chapter 9 - DDE Interface
Example:
Command line:
GATEWAYDDE /s=i /c="D:\DDE\conf_1.cfg"
The GatewayDDE Server will be started, the dialog window will appear as an icon,
the configuration which is stored in the file conf_1.cfg will be loaded.
BODAS / 10 9-5
10 - APPENDIX
10 APPENDIX
Key Combinations
BODAS / 10 10-1
Key Combinations
General Commands
‘File’ ‘Save’ <Ctrl>+<S>
‘File’ ‘Print’ <Ctrl>+<P>
‘File’ ‘Exit’ <Alt>+<F4>
‘Project’ ‘Check’ <Strg>+<F11>
‘Project’ ‘Build’ <Umschalt>+<F11>
‘Project’ ‘Rebuild all’ <F11>
‘Project’ ‘Delete Object’ <Del>
‘Project’ ‘Add Object’ <Ins>
‘Project’ ‘Rename Object’ <Spacebar>
‘Project’ ‘Open Object’ <Enter>
‘Edit’ ‘Undo’ <Ctrl>+<Z>
‘Edit’ ‘Redo’ <Ctrl>+<Y>
‘Edit’ ‘Cut’ <Ctrl>+<X> or
<Shift>+<Del>
‘Edit’ ‘Copy’ <Ctrl>+<C>
‘Edit’ ‘Paste’ <Ctrl>+<V>
‘Edit’ ‘Delete’ <Del>
‘Edit’ ‘Find next’ <F3>
‘Edit’ ‘Input Assistant’ <F2>
‘Edit’ ‘Next Error’ <F4>
‘Edit’ ‘Previous Error’ <Shift>+<F4>
‘Online’ ’Log-in’ <Alt><F8>
‘Online’ ’Logout’ <Ctrl>+<F8>
‘Online’ ‘Run’ <F5>
‘Online’ ‘Toggle Breakpoint’ <F9>
‘Online’ ‘Step over’ <F10>
‘Online’ ‘Step in’ <F8>
‘Online’ ‘Single Cycle’ <Ctrl>+<F5>
‘Online’ ‘Write Values’ <Ctrl>+<F7>
‘Online’ ‘Force Values’ <F7>
‘Online’ ‘Release Force’ <Shift>+<F7>
'Online’ ‘'Write/Force dialog' <Shift>+<F7>
‘Window’ ‘Messages’ <Shift>+<Esc>
10-2 BODAS / 10
Appendix A: - Use of Keyboard
LD Editor Commands
‘Insert’ ‘Network (after)’ <Shift>+<T>
‘Insert’ ‘Contact’ <Ctrl>+<O>
‘Insert’ ‘Parallel Contact’ <Ctrl>+<R>
‘Insert’ ‘Function Block’ <Ctrl>+<B>
‘Insert’ ‘Coil’ <Ctrl>+<L>
‘Extras’ ’Paste below’ <Ctrl>+<U>
BODAS / 10 10-3
Key Combinations
10-4 BODAS / 10
Appendix B: - Data Types
Data types
You can use standard data types and user-defined data types when programming.
Each identifier is assigned to a data type which dictates how much memory space will
be reserved and what type of values it stores.
The type "REAL" is offered by the standard IEC61131-3 but is not supported by the
BODAS runtime system. Due to this you cannot use REAL numbers in online mode.
BOOL
BOOL type variables may be given the values TRUE and FALSE. 8 bits of memory
space will be reserved.
(see also: BOOL constants)
Integer Data Types
BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, and UDINT are all
integer data types
Each of the different number types covers a different range of values. The following
range limitations apply to the integer data types:
Type Lower limit Upper limit Memory
space
BYTE 0 255 8 Bit
WORD 0 65535 16 Bit
DWORD 0 4294967295 32 Bit
SINT: -128 127 8 Bit
USINT: 0 255 8 Bit
INT: -32768 32767 16 Bit
UINT: 0 65535 16 Bit
DINT: -2147483648 2147483647 32 Bit
UDINT: 0 4294967295 32 Bit
As a result when larger types are converted to smaller types, information may be lost.
see also Appendix F: Numerical Constants
STRING
A STRING type variable can contain any string of characters. The size entry in the
declaration determines how much memory space should be reserved for the variable.
It refers to the number of characters in the string and can be placed in parentheses or
BODAS / 10 10-5
Defined Data Types
square brackets. If no size specification is given, the default size of 80 characters will
be used.
Example of a String Declaration with 35 characters:
str:STRING(35):='This is a String';
see also Appendix F: STRING constants
Time Data Types
The data types TIME, TIME_OF_DAY (abb. TOD), DATE and
DATE_AND_TIME (abb. DT) are handled internally like DWORD.
Time is given in milliseconds in TIME and TOD, time in TOD begins at 12:00 A.M.
Time is given in seconds in DATE and DT beginning with January 1, 1970 at
12:00 A.M.
The time data formats used to assign values are described in the chapter 'Operands in
BODAS, Constants'.
see also Appendix F: TIME-/DATE-/TIME_OF_DAY/DATE_AND_TIME constants
ARRAY
One-, two-, and three-dimensional fields (arrays) are supported as elementary data
types. Arrays can be defined both in the declaration part of a POU and in the global
variable lists.
Syntax:
<Field_Name>:ARRAY [<ll1>..<ul1>,<ll2>..<ul2>] OF <elem. Type>.
ll1, ll2, ll3identify the lower limit of the field range; ul1, ul2 and ul3 identify the
upper limit. The range values must be integers.
Example:
Card_game: ARRAY [1..13, 1..4] OF INT;
Initializing Arrays:
Example for complete initialization of an array:
arr1 : ARRAY [1..5] OF INT := 1,2,3,4,5;
arr2 : ARRAY [1..2,3..4] OF INT := 1,3(7); (* short for 1,7,7,7 *)
arr3 : ARRAY [1..2,2..3,3..4] OF INT := 2(0),4(4),2,3;
(* short for 0,0,4,4,4,4,2,3 *)
Example of the initialization of an array of a structure:
TYPE STRUCT1
STRUCT
p1:int;
p2:int;
p3:dword;
END_STRUCT
10-6 BODAS / 10
Appendix B: - Data Types
Note: If you define a function in your project with the name CheckBounds, you
can automatically check for out-of-range errors in arrays !
The name of the function is fixed and can only have this designation.
The following sample program for testing the CheckBounds function exceeds the
bounds of a defined array. The CheckBounds function allows the value TRUE to be
assigned, not to location A[10], but to the still valid range boundary A[7] above it.
With the CheckBounds function, references outside of array boundaries can thus be
corrected.
BODAS / 10 10-7
Defined Data Types
Pointer
Variable or function block addresses are saved in pointers while a program is running.
Pointer declarations have the following syntax:
<Identifier>: POINTER TO <Datatype/Functionblock>;
A pointer can point to any data type or function block even to user-defined types.
The function of the Address Operator ADR is to assign the address of a variable or
function block to the pointer.
A pointer can be dereferenced by adding the content operator "^" after the pointer
identifier.
Example:
pt:POINTER TO INT;
var_int1:INT := 5;
var_int2:INT;
pt := ADR(var_int1);
var_int2:= pt^; (* var_int2 is now 5 *)
Enumeration
Enumeration is a user-defined data type that is made up of a number of string
constants. These constants are referred to as enumeration values.
Enumeration values are recognized in all areas of the project even if they were
declared within a POU. It is best to create your enumerations as objects in the
Object Organizer under the register card Data types. They begin with the keyword
TYPE and end with END_TYPE.
Syntax:
TYPE <Identifier>:(<Enum_0> ,<Enum_1>, ...,<Enum_n>);
END_TYPE
A variable of the type <Identifier> can take on one of the enumeration values and will
be initialized with the first one. These values are compatible with whole numbers
which means that you can perform operations with them just as you would with INT.
You can assign a number x to the variable. If the enumeration values are not
initialized, counting will begin with 0. When initializing, make certain the initial
values are increasing. The validity of the number will be reviewed at the time it is run.
10-8 BODAS / 10
Appendix B: - Data Types
Example:
TYPE TRAFFIC_SIGNAL: (Red, Yellow, Green:=10); (*The initial value for
each of the colors is red 0, yellow 1, green 10 *)
END_TYPE
TRAFFIC_SIGNAL1 : TRAFFIC_SIGNAL;
TRAFFIC_SIGNAL1:=0; (* The value of the traffic signal is red*)
FOR i:= Red TO Green DO
i := i + 1;
END_FOR;
The same enumeration value could not be used twice.
Example:
TRAFFIC_SIGNAL: (red, yellow, green);
COLOR: (blue, white, red);
Error: red may not be used for both TRAFFIC_SIGNAL and COLOR.
Structures
Structures are created as objects in the Object Organizer under the register card
Data types. They begin with the keywords TYPE and STRUCT and end with
END_STRUCT and END_TYPE.
The syntax for structure declarations is as follows:
TYPE <Structurename>:
STRUCT
<Declaration of Variables 1>
.
.
<Declaration of Variables n>
END_STRUCT
END_TYPE
<Structurename> is a type that is recognized throughout the project and can be used
like a standard data type.
Interlocking structures are allowed. The only restriction is that variables may not be
placed at addresses (the AT declaration is not allowed!).
Example for a structure definition named Polygonline:
TYPE Polygonline:
STRUCT
Start:ARRAY [1..2] OF INT;
Point1:ARRAY [1..2] OF INT;
Point2:ARRAY [1..2] OF INT;
Point3:ARRAY [1..2] OF INT;
Point4:ARRAY [1..2] OF INT;
End:ARRAY [1..2] OF INT;
END_STRUCT
END_TYPE
Example for the initialization of a structure:
Poly_1:polygonline := ( Start:=3,3, Point1 =5,2, Point2:=7,3, Point3:=8,5,
Point4:=5,7, End := 3,5);
BODAS / 10 10-9
Defined Data Types
Initializations with variables are not possible. See an example of the initialization of
an array of a structure under 'Arrays'.
You can gain access to structure components using the following syntax:
<Structure_Name>.<Componentname>
For example, if you have a structure named "Week" that contains a component named
"Monday", you can get to it by doing the following:
Week.Monday
References
You can use the user-defined reference data type to create an alternative name for a
variable, constant or function block.
Create your references as objects in the Object Organizer under the register card
Data types. They begin with the keyword TYPE and end with END_TYPE.
Syntax:
TYPE <Identifier>: <Assignment term>;
END_TYPE
Example:
TYPE message:STRING[50];
END_TYPE;
Subrange types
A subrange type is a type whose range of values is only a subset of that of the basic
type. The declaration can be carried out in the data types register, but a variable can
also be directly declared with a subrange type:
Syntax for the declaration in the 'Data types' register:
TYPE <Name> : <Inttype> (<ug>..<og>) END_TYPE;
<Name> must be a valid IEC identifier,
<Inttype> is one of the data types SINT, USINT, INT, UINT, DINT, UDINT,
BYTE, WORD, DWORD (LINT, ULINT, LWORD).
<ug> Is a constant which must be compatible with the basic type and which sets
the lower boundary of the range types. The lower boundary itself is
included in this range.
<og> Is a constant that must be compatible with the basic type, and sets the
upper boundary of the range types. The upper boundary itself is included
in this basic type.
Example:
TYPE
SubInt : INT (-4095..4095);
END_TYPE
Direct declaration of a variable with a subrange type:
VAR
i : INT (-4095..4095);
ui : UINT (0..10000);
END_VAR
10-10 BODAS / 10
Appendix B: - Data Types
BODAS / 10 10-11
Defined Data Types
10-12 BODAS / 10
Appendix C: - The IEC Operators
Arithmetic Operators
ADD
Addition of variables of the types: BYTE, WORD, DWORD, SINT, USINT, INT,
UINT, DINT, and UDINT.
Two TIME variables can also be added together resulting in another time
(e.g., t#45s + t#50s = t#1m35s)
Example in IL:
LD 7
ADD 2,4,7
ST Var 1
Example in ST:
var1 := 7+2+4+7;
Example in FBD:
MUL
Multiplication of variables of the types: BYTE, WORD, DWORD, SINT, USINT,
INT, UINT, DINT, and UDINT.
BODAS / 10 10-13
Arithmetic Operators
Example in IL:
LD 7
MUL 2,4,7
ST Var 1
Example in ST:
var1 := 7*2*4*7;
Example in FBD:
SUB
Subtraction of variables of the types: BYTE, WORD, DWORD, SINT, USINT, INT,
UINT, DINT, and UDINT.
A TIME variable may also be subtracted from another TIME variable resulting in
third TIME type variable. Note that negative TIME values are undefined.
Example in IL:
LD 7
SUB 8
ST Var 1
Example in ST:
var1 := 7-2;
Example in FBD:
DIV
Division of variables of the types: BYTE, WORD, DWORD, SINT, USINT, INT,
UINT, DINT, and UDINT.
Example in IL:
LD 8
DIV 2
ST Var 1 (* Result is 4 *)
Example in ST:
var1 := 8/2;
Example in FBD:
MOD
Modulo Division of one variable by another of the types: BYTE, WORD, DWORD,
SINT, USINT, INT, UINT, DINT, UDINT. The result of this function will be the
remainder of the division. This result will be a whole number.
10-14 BODAS / 10
Appendix C: - The IEC Operators
Example in IL:
LD 9
MOD 2
ST Var 1 (* Result is 1 *)
Example in ST:
var1 := 9 MOD 2;
Example in FBD:
INDEXOF
Perform this function to find the internal index for a POU.
Example in ST:
var1 := INDEXOF(POU2);
SIZEOF
Perform this function to determine the number of bytes required by the given data
type.
Example in IL:
arr1:ARRAY[0..4] OF INT;
Var1 INT
LD arr1
SIZEOF
ST Var 1 (* Result is 10 *)
Example in ST:
var1 := SIZEOF(arr1);
Bitstring Operators
AND
Bitwise AND of bit operands. The operands should be of the type BOOL, BYTE,
WORD or DWORD.
Example in IL:
Var1 BYTE
LD 2#1001_0011
AND 2#1000_1010
ST Var 1 (* Result is 2#1000_0010 *)
Example in ST:
var1 := 2#1001_0011 AND 2#1000_1010
Example in FBD:
BODAS / 10 10-15
Bitstring Operators
Note: If you have a program step in the SFC like the following
and if you use 68xxx- or C-code generators, please note the following: The allocation
of the value of the second input variable at the AND operator module to variable z
will not be executed ! This is due to the optmized processing in the SFC in case of
value FALSE at the input variable.
OR
Bitwise OR of bit operands. The operands should be of the type BOOL, BYTE,
WORD or DWORD.
Example in IL:
var1 :BYTE;
LD 2#1001_0011
OR 2#1000_1010
ST var1 (* Result is 2#1001_1011 *)
Example in ST:
Var1 := 2#1001_0011 OR 2#1000_1010
Example in FBD:
Note: If you have a program step in the SFC like the following
and if you use 68xxx- or C-code generators, please note the following: The allocation
of the value of the second input variable at the AND operator module to variable z
will not be executed ! This is due to the optmized processing in the SFC in case of
value FALSE at the input variable.
XOR
Bitwise XOR of bit operands. The operands should be of the type BOOL, BYTE,
WORD or DWORD.
Example in IL:
Var1 :BYTE;
LD 2#1001_0011
XOR 2#1000_1010
ST Var1 (* Result is 2#0001_1001 *)
10-16 BODAS / 10
Appendix C: - The IEC Operators
Example in ST:
Var1 := 2#1001_0011 XOR 2#1000_1010
Example in FBD:
NOT
Bitwise NOT of a bit operand. The operand should be of the type BOOL, BYTE,
WORD or DWORD.
Example in IL:
Var1 :BYTE;
LD 2#1001_0011
NOT
ST Var1 (* Result is 2#0110_1100 *)
Example in ST:
Var1 := NOT 2#1001_0011
Example in FBD:
Bit-Shift Operators
Note: The code generator for the Infineon C16x target system carries out bit-
shift calculating operations with modulo 16.
SHL
Bitwise left-shift of an operand : erg:= SHL (in, n)
The input variables erg, in and n should be of the type BYTE, WORD, or DWORD.
in will be shifted to the left by n bits and filled with zeros on the right.
Note: Please note, that the amount of bits, which is regarded for the arithmetic
operation, is pretended by the data type of the input variable !. If the input variable is
a constant the smallest possible data type is regarded. The data type of the output
variable has no effect at all on the arithmetic operation.
See in the following example in hexadecimal notation that you get different results
for erg_byte and erg_word depending on the data type of the input variable (BYTE
BODAS / 10 10-17
Bit-Shift Operators
or WORD), although the values of the input variables in_byte and in_word are the
same.
Example in ST:
Example in FBD:
Example in IL:
LD 16#45
SHL 2
ST erg_byte
SHR
Bitwise right-shift of an operand: erg:= SHR (in, n)
erg, in and n should be of the type BYTE, WORD or DWORD. in will be shifted to
the right by n bits and filled with zeros on the left.
See the following example in hexadecimal notation to notice the results of the
arithmetic operation depending on the type of the input variable (BYTE or WORD).
Example in ST:
10-18 BODAS / 10
Appendix C: - The IEC Operators
Example in FBD:
Example in IL:
LD 16#45
SHL 2
ST erg_byte
ROL
Bitwise rotation of an operand to the left: erg:= ROL (in, n)
erg, in and n should be of the type BYTE, WORD or DWORD. in will be shifted one
bit position to the left n times while the bit that is furthest to the left will be
reinserted from the right.
Note: Please note, that the amount of bits, which is regarded for the arithmetic
operation, is pretended by the data type of the input variable !. If the input variable is
a constant the smallest possible data type is regarded. The data type of the output
variable has no effect at all on the arithmetic operation.
See in the following example in hexadecimal notation that you get different results
for erg_byte and erg_word depending on the data type of the input variable (BYTE
or WORD), although the values of the input variables in_byte and in_word are the
same.
Example in ST:
BODAS / 10 10-19
Bit-Shift Operators
Example in FBD:
Example in IL:
LD 16#45
SHL 2
ST erg_byte
ROR
Bitwise rotation of an operand to the right: erg = ROR (in, n)
erg, in and n should be of the type BYTE, WORD or DWORD. in will be shifted one
bit position to the right n times while the bit that is furthest to the left will be
reinserted from the left.
Note: Please note, that the amount of bits, which is regarded for the arithmetic
operation, is pretended by the data type of the input variable !. If the input variable is
a constant the smallest possible data type is regarded. The data type of the output
variable has no effect at all on the arithmetic operation.
See in the following example in hexadecimal notation that you get different results
for erg_byte and erg_word depending on the data type of the input variable (BYTE
or WORD), although the values of the input variables in_byte and in_word are the
same.
Example in ST:
10-20 BODAS / 10
Appendix C: - The IEC Operators
Example in FBD:
Example in IL:
LD 16#45
SHL 2
ST erg_byte
Selection Operators
All selection operations can also be performed with variables. For purposes of clarity
we will limit our examples to the following which use constants as operators.
SEL
Binary Selection.
OUT := SEL(G, IN0, IN1) means:
OUT := IN0 if G=FALSE;
OUT := IN1 if G=TRUE.
IN0, IN1 and OUT can be any type of variable, G must be BOOL. The result of the
selection is IN0 if G is FALSE, IN1 if G is TRUE.
Example in IL:
LD TRUE
SEL 3,4
ST Var1 (* Result ist 4 *)
LD FALSE
SEL 3,4
ST Var1 (* Result ist 3 *)
Example in ST:
Var1:=SEL(TRUE,3,4); (* Result is 4 *)
BODAS / 10 10-21
Selection Operators
Example in FBD:
Note: Note that an expression occurring ahead of IN1 or IN2 will not be
processed if IN0 is TRUE.
MAX
Maximum function. Returns the greater of the two values.
OUT := MAX(IN0, IN1)
IN0, IN1 and OUT can be any type of variable.
Example in IL:
LD 90
MAX 30
MAX 40
MAX 77
ST Var1 (* Result is 90 *)
Example in ST:
Var1:=MAX(30,40); (* Result is 40 *)
Var1:=MAX(40,MAX(90,30)); (* Result is 90 *)
Example in FBD:
MIN
Minimum function. Returns the lesser of the two values.
OUT := MIN(IN0, IN1)
IN0, IN1 and OUT can be any type of variable.
Example in IL:
LD 90
MIN 30
MIN 40
MIN 77
ST Var 1 (* Result is 30 *)
Example in ST:
Var1:=MIN(90,30); (* Result is 30 *);
Var1:=MIN(MIN(90,30),40); (* Result is 30 *);
Example in FBD:
10-22 BODAS / 10
Appendix C: - The IEC Operators
LIMIT
Limiting
OUT := LIMIT(Min, IN, Max) means:
OUT := MIN (MAX (IN, Min), Max)
Max is the upper and Min the lower limit for the result. Should the value IN exceed
the upper limit Max, LIMIT will return Max. Should IN fall below Min, the result
will be Min.
IN and OUT can be any type of variable.
Example in IL:
LD 90
LIMIT 30,80
ST Var 1 (*Result is 80 *)
Example in ST:
Var1:=LIMIT(30,90,80); (* Result is 80 *);
MUX
Multiplexer
OUT := MUX(K, IN0,...,INn) means:
OUT := INK.
IN0, ...,INn and OUT can be any type of variable. K must be BYTE, WORD,
DWORD, SINT, USINT, INT, UINT, DINT or UDINT. MUX selects the Kth value
from among a group of values.
Example in IL:
LD 0
MUX 30,40,50,60,70,80
ST Var 1 (*Result is 30 *)
Example in ST:
Var1:=MUX(0,30,40,50,60,70,80); (* Result is 30 *);
Note: Note that an expression occurring ahead of an input other than INK will
not be processed to save run time ! Only in simulation mode all expressions will be
executed.
BODAS / 10 10-23
Comparison Operators
Comparison Operators
GT
Greater than
A Boolean operator which returns the value TRUE when the value of the first
operand is greater than that of the second. The operands can be BOOL, BYTE,
WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT, TIME, DATE,
TIME_OF_DAY, DATE_AND_TIME and STRING.
Example in IL:
LD 20
GT 30
ST Var 1 (* Result is FALSE *)
Example in ST:
VAR1 := 20 > 30 > 40 > 50 > 60 > 70;
Example in FBD:
LT
Less than
A Boolean operator that returns the value TRUE when the value of the first operand
is less than that of the second. The operands can be BOOL, BYTE, WORD,
DWORD, SINT, USINT, INT, UINT, DINT, UDINT, TIME, DATE,
TIME_OF_DAY, DATE_AND_TIME and STRING.
Example in IL:
LD 20
LT 30
ST Var 1 (* Result is TRUE *)
Example in ST:
VAR1 := 20 < 30;
Example in FBD:
LE
Less than or equal to
A Boolean operator that returns the value TRUE when the value of the first operand
is less than or equal to that of the second. The operands can be BOOL, BYTE,
10-24 BODAS / 10
Appendix C: - The IEC Operators
WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT, TIME, DATE,
TIME_OF_DAY, DATE_AND_TIME and STRING.
Example in IL:
LD 20
LE 30
ST Var 1 (* Result is TRUE *)
Example in ST:
VAR1 := 20 <= 30;
Example in FBD
GE
Greater than or equal to
A Boolean operator that returns the value TRUE when the value of the first operand
is greater than or equal to that of the second. The operands can be BOOL, BYTE,
WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT, TIME, DATE,
TIME_OF_DAY, DATE_AND_TIME and STRING.
Example in IL:
LD 60
GE 40
ST Var 1 (* Result is TRUE *)
Example in ST:
VAR1 := 60 >= 40;
Example in FBD:
EQ
Equal to
A Boolean operator that returns the value TRUE when the operands are equal. The
operands can be BOOL, BYTE, WORD, DWORD, SINT, USINT, INT, UINT,
DINT, UDINT, TIME, DATE, TIME_OF_DAY, DATE_AND_TIME and STRING.
Example in IL:
LD 40
EQ 40
ST Var 1 (* Result is TRUE *)
BODAS / 10 10-25
Address Operators
Example in ST:
VAR1 := 40 = 40;
Example in FBD:
NE
Not equal to
A Boolean operator that returns that value TRUE when the operands are not equal.
The operands can be BOOL, BYTE, WORD, DWORD, SINT, USINT, INT, UINT,
DINT, UDINT, TIME, DATE, TIME_OF_DAY, DATE_AND_TIME and STRING.
Example in IL:
LD 40
NE 40
ST Var 1 (* Result is FALSE *)
Example in ST:
VAR1 := 40 <> 40;
Example in FBD:
Address Operators
ADR
Address Function
ADR returns the address of its argument in a DWORD. This address can be sent to
manufacturing functions to be treated as a pointer or it can be assigned to a pointer
within the project.
Example in IL:
LD Var 1
ADR
ST Var 2
man_fun1
Content Operator
A pointer can be dereferenced by adding the content operator "^" after the pointer
identifier.
Example in ST:
pt:POINTER TO INT;
10-26 BODAS / 10
Appendix C: - The IEC Operators
var_int1:INT;
var_int2:INT;
pt := ADR(var_int1);
var_int2:=pt^;
Calling Operator
CAL
Calling a function block or a program
Use CAL in IL to call up a function block instance. The variables that will serve as
the input variables are placed in parentheses right after the name of the function
block instance.
Example: Calling up the instance Inst from a function block where input variables
Par1 and Par2 are 0 and TRUE respectively.
CAL INST(PAR1 := 0, PAR2 := TRUE)
Its is forbidden to implicitly convert from a ”larger” type to a ”smaller” type (for
example from INT to BYTE or from DINT to WORD). Special type conversions are
required if one wants to do this. One can basically convert from any elementary type
to any other elementary type.
Syntax:
<elem.Typ1>_TO_<elem.Typ2>
Please regard that at ...TO_STRING conversions the string is generated left-justified.
If it is defined to short, it will be cut from the right side.
BOOL_TO Conversions
Conversion from type BOOL to any other type:
For number types the result is 1, when the operand is TRUE, and 0, when the
operand is FALSE.
For the STRING type the result is ‚TRUE‘ or ‚FALSE‘.
Examples in AWL:
LD TRUE (*Result is 1 *)
BOOL_TO_INT
ST i
LD TRUE (*Result is 'TRUE' *)
BOOL_TO_STRING
ST str
LD TRUE (*Result is T#1ms *)
BOOL_TO_TIME
ST t
BODAS / 10 10-27
Type Conversion Functions
Examples in FUP:
(*Result is 1 *)
(*Result is 'TRUE' *)
(*Result is T#1ms *)
(*Result is TOD#00:00:00.001 *)
(*Result is D#1970-01-01 *)
(*Result is
DT#1970-01-01-00:00:01 *)
TO_BOOL Conversions
Conversion from another variable type to BOOL:
The result is TRUE when the operand is not equal to 0. The result is FALSE when
the operand is equal to 0.
The result is true for STRING type variables when the operand is "TRUE", otherwise
the result is FALSE.
Examples in AWL:
LD 213 (*Result is TRUE *)
BYTE_TO_BOOL
10-28 BODAS / 10
Appendix C: - The IEC Operators
ST b
LD 0 (*Result is FALSE *)
INT_TO_BOOL
ST b
LD T#5ms (*Result is TRUE *)
TIME_TO_BOOL
ST b
LD 'TRUE' (*Result is TRUE *)
STRING_TO_BOOL
ST b
Examples in FUP:
(*Result is TRUE *)
(*Result is FALSE *)
(*Result is TRUE *)
(*Result is TRUE *)
Examples in St:
b := BYTE_TO_BOOL(2#11010101); (* Result is TRUE *)
b := INT_TO_BOOL(0); (* Result is FALSE *)
b := TIME_TO_BOOL(T#5ms); (* Result is TRUE *)
b := STRING_TO_BOOL('TRUE'); (* Result is TRUE *)
BODAS / 10 10-29
Type Conversion Functions
TIME_TO/TIME_OF_DAY
Conversions
Converting from the variable type TIME or TIME_OF_DAY to a different type:
The time will be stored internally in a DWORD in milliseconds (beginning with
12:00 A.M. for the TIME_OF_DAY variable). This value will then be converted.
When you perform a type conversion from a larger to a smaller type, you risk losing
some information
For the STRING type variable, the result is a time constant.
Examples in IL:
LD T#12ms (*Result is 'T#12ms' *)
TIME_TO_STRING
ST str
LD T#300000ms (*Result is 300000 *)
TIME_TO_DWORD
ST dw
LD TOD#00:00:00.012 (*Result is 12 *)
TOD_TO_SINT
ST si
Examples in St:
str :=TIME_TO_STRING(T#12ms);
dw:=TIME_TO_DWORD(T#5m);
si:=TOD_TO_SINT(TOD#00:00:00.012);
Examples in FBD:
DATE_TO/DT_TO
Conversions
Converting from the variable type DATE or DATE_AND_TIME to a different type:
The date will be stored internally in a DWORD in seconds since Jan. 1, 1970. This
value will then be converted.
When you perform a type conversion from a larger to a smaller type, you risk losing
some information
For STRING type variables, the result is the date constant.
Examples in St:
10-30 BODAS / 10
Appendix C: - The IEC Operators
STRING_TO Conversions
Converting from the variable type STRING to a different type:
The operand from the STRING type variable must contain a value that is valid in the
target variable type, otherwise the result will be 0.
Examples in St:
b :=STRING_TO_BOOL('TRUE'); (* Result is TRUE *)
w :=STRING_TO_WORD('abc34'); (* Result is 0 *)
t :=STRING_TO_TIME('T#127ms'); (* Result is T#127ms *)
BODAS / 10 10-31
Numeric Functions
Numeric Functions
ABS
Returns the absolute value of a number. ABS(-2) equals 2.
The following type combinations for input and output variables are possible:
IN OUT
INT INT, WORD, DWORD, DINT
BYTE INT, BYTE, WORD, DWORD, DINT
WORD INT, WORD, DWORD, DINT
DWORD DWORD, DINT
UINT INT, WORD, DWORD, DINT, UDINT, UINT
DINT DWORD, DINT
UDINT DWORD, DINT, UDINT
Example in IL:
LD 2
ABS
ST i (*Result is 2 *)
Example in ST:
i:=ABS(-2);
Example in FBD:
10-32 BODAS / 10
Appendix D: - Standard Library Elements
Please note:
String functions are not "thread safe": When using tasks, string functions may only
be used in a single task. If the same function is used in different tasks, there is a
danger of overwriting.
LEN
Returns the length of a string. Input STR is of type STRING, the return value of the
function is type INT.
Example in IL:
LD 'SUSI'
LEN
ST VarINT1 (* Ergebnis ist 4 *)
Example in FBD:
Example in ST:
VarSTRING1 := LEN (‘SUSI’);
LEFT
Left returns the left, initial string for a given string. Input STR is type STRING,
SIZE is of type INT, the return value of the function is type STRING.
LEFT (STR, SIZE) means: Take the first SIZE character from the right in the string
STR.
Example in IL:
LD 'SUSI'
LEFT 3
ST VarSTRING1 (* Ergebnis ist ‘SUS’ *)
Example in FBD:
Example in ST:
VarSTRING1 := LEFT (‘SUSI’,3);
BODAS / 10 10-33
String functions
RIGHT
Right returns the right, initial string for a given string.
RIGHT (STR, SIZE) means: Take the first SIZE character from the right in the string
STR.
Input STR is of type STRING, SIZE is of type INT, the return value of the function
is of type STRING.
Example in IL:
LD 'SUSI'
RIGHT 3
ST VarSTRING1 (* Ergebnis ist ‘USI’ *)
Example in FBD:
Example in ST:
VarSTRING1 := RIGHT (‘SUSI’,3);
MID
Example in ST:
VarSTRING1 := MID (‘SUSI’,2,2);
10-34 BODAS / 10
Appendix D: - Standard Library Elements
CONCAT
Concatenation (combination) of two strings.
The input variables STR1 and STR2 as well as the return value of the function are
type STRING.
Example in IL:
LD 'SUSI'
CONCAT ‘WILLI’
ST VarSTRING1 (* Ergebnis ist ‘SUSIWILLI’ *)
Example in FBD:
Example in ST:
VarSTRING1 := CONCAT (‘SUSI’,’WILLI’);
INSERT
INSERT inserts a string into another string at a defined point.
The input variables STR1 and STR2 are type STRING, POS is type INT and the
return value of the function is type STRING.
INSERT(STR1, STR2, POS) means: insert STR2 into STR1 after position POS.
Example in IL:
LD 'SUSI'
INSERT ‘XY’,2
ST VarSTRING1 (* Ergebnis ist ‘SUXYSI’ *)
Example in FBD:
Example in ST:
VarSTRING1 := INSERT (‘SUSI’,’XY’,2);
DELETE
DELETE removes a partial string from a larger string at a defined position.
The input variable STR is type STRING, LEN and POS are type INT, the return
value of the function is type STRING.
DELETE(STR, L, P) means: Delete L characters from STR beginning with the
character in the P position.
BODAS / 10 10-35
String functions
Example in IL:
LD 'SUXYSI'
DELETE 2,23
ST Var1 (* Ergebnis ist ‘SUSI’ *)
Example in FBD:
Example in ST:
Var1 := DELETE (‘SUXYSI’,2,3);
REPLACE
REPLACE replaces a partial string from a larger string with a third string.
The input variable STR1 and STR2 are type STRING, LEN and POS are type INT,
the return value of the function is type STRING.
REPLACE(STR1, STR2, L, P) means: Replace L characters from STR1 with STR2
beginning with the character in the P position.
Example in IL:
LD 'SUXYSI'
REPLACE 'K', 2,2
ST VarSTRING1 (* Ergebnis ist ‘SKYSI’ *)
Example in FBD:
Example in ST:
VarSTRING1 := REPLACE (‘SUXYSI’,’K’,2,2);
FIND
FIND searches for a partial string within a string.
The input variable STR1 and STR2 are type STRING, the return value of the
function is type STRING.
FIND(STR1, STR2) means: Find the position of the first character where STR2
appears in STR1 for the first time. If STR2 is not found in STR1, then OUT:=0.
Example in IL:
LD 'SUXYSI'
FIND 'XY'
ST VarINT1 (* Ergebnis ist ‘3’ *)
10-36 BODAS / 10
Appendix D: - Standard Library Elements
Example in FBD:
Example in ST:
arINT1 := FIND (‘SUXYSI’,’XY’);
SR
Making Bistable Function Blocks Dominant:
Q1 = SR (SET1, RESET) means:
Q1 = (NOT RESET AND Q1) OR SET1
The input variables SET1 and RESET as well as the output variable Q1 are type
BOOL.
Declaration example:
SRInst : SR ;
Example in IL:
CAL SRInst(SET1 := VarBOOL1, RESET := VarBOOL2)
LD SRInst.Q1
ST VarBOOL3
Example in FBD:
Example in ST:
SRInst(SET1:= VarBOOL1 , RESET:=VarBOOL2 );
VarBOOL3 := SRInst.Q1 ;
RS
Resetting Bistable Function Blocks
Q1 = RS (SET, RESET1) means:
Q1 = NOT RESET1 AND (Q1 OR SET)
The input variables SET and RESET1 as well as the output variable Q1 are type
BOOL.
Declaration example:
RSInst : RS ;
BODAS / 10 10-37
Bistable Function Blocks
Example in IL:
CAL RSInst(SET := VarBOOL1, RESET1 := VarBOOL2)
LD RSInst.Q1
ST VarBOOL3
Example in FBD:
Example in ST:
RSInst(SET:= VarBOOL1 , RESET1:=VarBOOL2 );
VarBOOL3 := RSInst.Q1 ;
SEMA
A Software Semaphore (Interruptible)
BUSY = SEMA(CLAIM, RELEASE) means:
BUSY := X;
IF CLAIM THEN X:=TRUE;
ELSE IF RELEASE THEN BUSY := FALSE; X:= FALSE;
END_IF
X is an internal BOOL variable that is FALSE when it is initialized.
The input variables CLAIM and RELEASE as well as the output variable BUSY are
type BOOL.
If BUSY is TRUE when SEMA is called up, this means that a value has already been
assigned to SEMA (SEMA was called up with CLAIM = TRUE). If BUSY is
FALSE, SEMA has not yet been called up or it has been released (called up with
RELEASE = TRUE).
Declaration example:
SEMAInst : SEMA ;
Example in IL:
CAL SEMAInst(CLAIM := VarBOOL1, RELEASE := VarBOOL2)
LD SEMAInst.BUSY
ST VarBOOL3
Example in FBD:
Example in ST:
SEMAInst(CLAIM:= VarBOOL1 , RELEASE:=VarBOOL2 );
VarBOOL3 := SEMAInst.BUSY;
10-38 BODAS / 10
Appendix D: - Standard Library Elements
Trigger
R_TRIG
The function block R_TRIG detects a rising edge.
FUNCTION_BLOCK R_TRIG
VAR_INPUT
CLK : BOOL;
END_VAR
VAR_OUTPUT
Q : BOOL;
END_VAR
VAR
M : BOOL := FALSE;
END_VAR
Q0 := CLK AND NOT M;
M := CLK;
END_FUNCTION_BLOCK
The output Q0 and the help variable M will remain FALSE as long as the input
variable CLK is FALSE. As soon as S1 returns TRUE, Q will first return TRUE,
then M will be set to TRUE. This means each time the function is called up, Q will
return FALSE until CLK has falling edge followed by an rising edge.
Declaration example:
RTRIGInst : R_TRIG ;
Example in IL:
CAL RTRIGInst(CLK := VarBOOL1)
LD RTRIGInst.Q
ST VarBOOL2
Example in FBD:
Example in ST:
RTRIGInst(CLK:= VarBOOL1);
VarBOOL2 := RTRIGInst.Q;
F_TRIG
The function block F_TRIG a falling edge.
FUNCTION_BLOCK F_TRIG
VAR_INPUT
CLK: BOOL;
END_VAR
VAR_OUTPUT
Q: BOOL;
END_VAR
VAR
M: BOOL := FALSE;
BODAS / 10 10-39
Counter
END_VAR
Q := NOT CLK AND NOT M;
M := NOT CLK;
END_FUNCTION_BLOCK
The output Q and the help variable M will remain FALSE as long as the input
variable CLK returns TRUE. As soon as CLK returns FALSE, Q will first return
TRUE, then M will be set to TRUE. This means each time the function is called up,
Q will return FALSE until CLK has a rising followed by a falling edge.
Declaration example:
FTRIGInst : F_TRIG ;
Example in IL:
CAL FTRIGInst(CLK := VarBOOL1)
LD FTRIGInst.Q
ST VarBOOL2
Example in FBD:
Example in ST:
FTRIGInst(CLK:= VarBOOL1);
VarBOOL2 := FTRIGInst.Q;
Counter
CTU
The function block Incrementer:
The input variables CU and RESET as well as the output variable Q are type BOOL,
the input variable PV and the output variable CV are type INT.
The counter variable CV will be initialized with 0 if RESET is TRUE. If CU has a
rising edge from FALSE to TRUE, CV will be raised by 1.Q will return TRUE when
CV is greater than or equal to the upper limit PV.
Declaration example:
CTUInst : CTU ;
Example in IL:
CAL CTUInst(CU := VarBOOL1, RESET := VarBOOL2, PV := VarINT1)
LD CTUInst.Q
ST VarBOOL3
LD CTUInst.CV
ST VarINT2
10-40 BODAS / 10
Appendix D: - Standard Library Elements
Example in FBD:
Example in ST:
CTUInst(CU:= VarBOOL1, RESET:=VarBOOL2 , PV:= VarINT1);
VarBOOL3 := CTUInst.Q ;
VarINT2 := CTUInst.CV;
CTD
Function Block Decrementer:
The input variables CD and LOAD as well as the output variable Q are type BOOL,
the input variable PV and the output variable CV are type INT.
When LOAD_ is TRUE, the counter variable CV will be initialized with the upper
limit PV. If CD has a rising edge from FALSE to TRUE, CV will be lowered by 1
provided CV is greater than 0 (i.e., it doesn't cause the value to fall below 0).
Q returns TRUE when CVis equal 0.
Declaration example:
CTDInst : CTD ;
Example in IL:
CAL CTDInst(CD := VarBOOL1, LOAD := VarBOOL2, PV := VarINT1)
LD CTDInst.Q
ST VarBOOL3
LD CTDInst.CV
ST VarINT2
Example in FBD:
Example in ST:
CTDInst(CD:= VarBOOL1, LOAD:=VarBOOL2 , PV:= VarINT1);
VarBOOL3 := CTDInst.Q ;
VarINT2 := CTDInst.CV;
CTUD
Function Block Incrementer/Decrementer
The input variables CU, CD, RESET, LOAD as well as the output variables QU and
QD are type BOOL, PV and CV are type INT.
If RESET is valid, the counter variable CV will be initialized with 0. If LOAD is
valid, CV will be initialized with PV.
BODAS / 10 10-41
Timer
Example in ST:
CTUDInst(CU := VarBOOL1, CU:= VarBOOL2, RESET := VarBOOL3,
LOAD:=VarBOOL4 , PV:= VarINT1);
VarBOOL5 := CTUDInst.QU ;
VarBOOL6 := CTUDInst.QD ;
VarINT2 := CTUDInst.CV;
Timer
TP
The function blockTimer is a trigger. TP(IN, PT, Q, ET) means:
IN and PT are input variables of the BOOL and TIME types respectively. Q and ET
are output variables of the BOOL and TIME types respectively. If IN is FALSE, Q is
FALSE and ET is 0.
As soon as IN becomes TRUE, the time will begin to be counted in milliseconds in
ET until its value is equal to PT. It will then remain constant.
Q is TRUE if IN is TRUE and ET is less than or equal to PT. Otherwise it is FALSE.
Q returns a signal for the time period given in PT.
Graphic Display of the TP Time Sequence
10-42 BODAS / 10
Appendix D: - Standard Library Elements
Declaration example:
TPInst : TP ;
Example in IL:
CAL TPInst(IN := VarBOOL1, PT := T#5s)
LD TPInst.Q
ST VarBOOL2
Example in FBD:
Example in ST:
TPInst(IN := VarBOOL1, PT:= T#5s);
VarBOOL2 :=TPInst.Q;
TON
The function block Timer On Delay implements a turn-on delay..
TON(IN, PT, Q, ET) means:
IN and PT are input variables of the BOOL and TIME types respectively. Q and ET
are output variables of the BOOL and TIME types respectively. If IN is FALSE, Q is
FALSE and ET is 0.
As soon as IN becomes TRUE, the time will begin to be counted in milliseconds in
ET until its value is equal to PT. It will then remain constant.
Q is TRUE when IN is TRUE and ET is equal to PT. Otherwise it is FALSE.
Thus, Q has a rising edge when the time indicated in PT in milliseconds has run out.
Graphic display of TON behavior over time:
Declaration example:
TONInst : TON ;
BODAS / 10 10-43
Timer
Example in IL:
CAL TONInst(IN := VarBOOL1, PT := T#5s)
LD TONInst.Q
ST VarBOOL2
Example in FBD:
Example in ST:
TONInst(IN := VarBOOL1, PT:= T#5s);
TOF
The function block TOF implements a turn-off delay..
Declaration example:
TOFInst : TOF ;
Example in IL:
CAL TOFInst(IN := VarBOOL1, PT := T#5s)
LD TOFInst.Q
ST VarBOOL2
Example in FBD:
10-44 BODAS / 10
Appendix D: - Standard Library Elements
Example in ST:
TOFInst(IN := VarBOOL1, PT:= T#5s);
VarBOOL2 :=TOFInst.Q;
RTC
The function block Runtime Clock returns, starting at a given time, the current date
and time.
BODAS / 10 10-45
Appendix E: - Description of the Runtime System
BODAS / 10 10-47
BCD conversion
BCD conversion
A byte in the BCD format contains integers between 0 and 99. Four bits are used for
each decimal place. The ten decimal place is stored in the bits 4-7. Thus the BCD
format is similar to the hexadecimal presentation, with the simple difference that
only values between 0 and 99 can be stored in a BCD byte, whereas a hexadecimal
byte reaches from 0 to FF.
An example: The integer 51 should be converted to BCD format. 5 in binary is
0101, 1 in binary is 0001, which makes the BCD byte 01010001, which corresponds
to the value $51=81.
BCD_TO_INT
This function converts a byte in BCD format into an INT value:
The input value of the function is type BYTE and the output is type INT.
Where a byte should be converted which is not in the BCD format the output is -1.
Examples in ST:
i:=BCD_TO_INT(73); (* Result is 49 *)
k:=BCD_TO_INT(151); (* Result is 97 *)
l:=BCD_TO_INT(15); (* Output -1, because it is not in BCD format *)
INT_TO_BCD_
This function converts an INTEGER value into a byte in BCD format:
The input value of the function is type INT, the output is type BYTE.
The number 255 will be outputted where an INTEGER value should be converted
which cannot be converted into a BCD byte.
Examples in ST:
i:=INT_TO_BCD(49); (* Result is 73 *)
k:=BCD_TO_INT(97); (* Result is 151 *)
l:=BCD_TO_INT(100); (* Error! Output: 255 *)
Bit/byte functions
EXTRACT
Inputs to this function are a DWORD X, as well as a BYTE N. The output is a
BOOL value, which contains the content of the Nth bit of the input X, whereby the
function begins to count from the zero bit.
Examples in ST:
10-48 BODAS / 10
Appendix F: - The UTIL_NO_REAL.LIB Library
STATISTICS_INT
This function block calculates some standard statistical values:
The input IN is of the type INT. All values are initialised anew when the BOOLean
input RESET is TRUE.
The output MN contains the minimum, MX of the maximum value from IN. AVG
describes the average, that is the expected value of IN. All three outputs are of the
type INT.
Block in FBD:
BODAS / 10 10-49
Signal generators
Signal generators
BLINK
The function block BLINK generates a pulsating signal. The input consists of
ENABLE of the type BOOL, as well as TIMELOW and TIMEHIGH of the type
TIME. The output OUT is of the type BOOL.
If ENABLE is set to TRUE, BLINK begins, to set the output for the time period
TIMEHIGH to TRUE, and then afterwards to set it for the time period TIMELOW to
FALSE.
Example in CFC:
Function manipulators
CHARCURVE
This function block serves to represent values, piece by piece, on a linear function:
IN of the type INT is fed with the value to be manipulated. The BYTE N designates
the number of points which defines the presentation function. This characteristic line
is then generated in an ARRAY P[0..10] with P of the type POINT which is a
structure based on two INT values (X and Y).
The output consists of OUT of the type INT, the manipulated value and BYTE ERR,
which will indicate an error if necessary.
The points P[0]..P[N-1] in the ARRAY must be sorted according to their X values,
otherwise ERR receives the value 1. If the input IN is not between P[0].X and P[N-
1].X, ERR=2 and OUT contains the corresponding limiting value P[0]. Y or P[N-
1].Y.
If N lies outside of the allowed values which are between 2 and 11, then ERR=4.
Example in ST:
10-50 BODAS / 10
Appendix F: - The UTIL_NO_REAL.LIB Library
RAMP_INT
RAMP_INT serves to limit the ascendance or descendance of the function being fed:
The input consists on the one hand out of three INT values: IN, the function input,
and ASCEND and DESCEND, the maximum increase or decrease for a given time
interval, which is defined by TIMEBASE of the type TIME. Setting RESET to
TRUE causes RAMP_INT to be initialised anew.
The output OUT of the type INT contains the ascend and descend limited function
value.
When TIMEBASE is set to t#0s, ASCEND and DESCEND are not related to the
time interval, but remain the same.
Beispiel in CFC:
BODAS / 10 10-51
Function manipulators
LIMITALARM
This function block specifies, whether the input value is within a set range and which
limits it has violated if it has done so.
The input values IN, HIGH and LOW are each of the type INT, while the outputs O,
U and IL are of the type BOOL.
If the upper limit HIGH is exceeded by IN, O becomes TRUE, and when IN is below
LOW, U becomes TRUE. IL is TRUE if IN lies between LOW and HIGH.
Example in FBD: Result:
10-52 BODAS / 10
Appendix G: - Operands in BODAS
Constants in BODAS
BOOL Constants
BOOL constants are the logical values TRUE and FALSE.
TIME Constants
TIME constants can be declared in BODAS. These are generally used to operate the
timer in the standard library. A TIME constant is always made up of an initial "t" or
"T" (or "time" or "TIME" spelled out) and a number sign "#".
This is followed by the actual time declaration which can include days (identified by
"d"), hours (identified by "h"), minutes (identified by "m"), seconds (identified by
"s") and milliseconds (identified by "ms"). Please note that the time entries must be
given in this order according to length (d before h before m before s before m before
ms) but you are not required to include all time increments.
Examples of correct TIME constants in a ST assignment:
TIME1 := T#14ms;
TIME1 := T#100S12ms; (*The highest component may be allowed to
exceed its limit*)
TIME1 := t#12h34m15s;
the following would be incorrect:
TIME1 := t#5m68s; (*limit exceeded in a lower component*)
TIME1 := 15ms; (*T# is missing*)
TIME1 := t#4ms13d; (*Incorrect order of entries*)
DATE Constants
These constants can be used to enter dates. A DATE constant is declared beginning
with a "d", "D", "DATE" or "date" followed by "#". You can then enter any date with
format Year-Month-Day.
Examples:
DATE#1996-05-06
d#1972-03-29
TIME_OF_DAY Constants
Use this type of constant to store times of the day. A TIME_OF_DAY declaration
begins with "tod#", "TOD#", "TIME_OF_DAY#" or "time_of_day#" followed by a
time with the format: Hour:Minute:Second.
Examples:
TIME_OF_DAY#15:36:30.123
tod#00:00:00
BODAS / 10 10-53
Constants in BODAS
DATE_AND_TIME Constants
Date constants and the time of day can also be combined to form so-called
DATE_AND_TIME constants. DATE_AND_TIME constants begin with "dt#",
"DT#", "DATE_AND_TIME#" or "date_and_time#". Place a hyphen after the date
followed by the time.
Examples:
DATE_AND_TIME#1996-05-06-15:36:30
dt#1972-03-29-00:00:00
Number Constants
Number values can appear as binary numbers, octal numbers, decimal numbers and
hexadecimal numbers. If an integer value is not a decimal number, you must write its
base followed by the number sign (#) in front of the integer constant. The values for
the numbers 10-15 in hexadecimal numbers will be represented as always by the
letters A-F.
You may include the underscore character within the number.
Examples:
14 (decimal number)
2#1001_0011 (dual number)
8#67 (octal number)
16#A (hexadecimal number)
These number values can be from the variable types BYTE, WORD, DWORD,
SINT, USINT, INT, UINT, DINT or UDINT.
Implicit conversions from "larger" to "smaller" variable types are not permitted. This
means that a DINT variable cannot simply be used as an INT variable. You must use
the type conversion (see chapter Type Conversions chapter in the appendix).
STRING Constants
A string is a sequence of characters. STRING constants are preceded and followed
by single quotation marks. You may also enter blank spaces and special characters
(umlauts for instance). They will be treated just like all other characters.
In character sequences, the combination of the dollar sign ($) followed by two
hexadecimal numbers is interpreted as a hexadecimal representation of the eight bit
character code. In addition, the combination of two characters that begin with the
dollar sign are interpreted as shown below when they appear in a character sequence:
$$ Dollar signs
$' Single quotation mark
$L or $l Line feed
$N or $n New line
$P or $p Page feed
$R or $r Line break
$T or $t Tab
10-54 BODAS / 10
Appendix G: - Operands in BODAS
Examples:
'w1Wüß?'
' Abby and Craig '
':-)'
Typed Literals
Basically, in using IEC constants, the smallest possible data type will be used. If
another data type must be used, this can be achieved with the help of typed literals
without the necessity of explicitly declaring the constants. For this, the constant will
be provided with a prefix which determines the type.
This is written as follows: <Type>#<Literal>
<Type> specifies the desired data type; possible entries are: BOOL, SINT, USINT,
BYTE, INT, UINT, WORD, DINT, UDINT, DWORD. The type must be written in
uppercase letters.
<Literal> specifies the constant. The data entered must fit within the data type
specified under <Type>.
Example:
var1:=DINT#34;
If the constant can not be converted to the target type without data loss, an error
message is issued:
Typed literals can be used wherever normal constants can be used.
Variables
BODAS / 10 10-55
Functions
<Fieldname>[Index1, Index2]
Structure variables can be accessed using the following syntax:
<Structurename>.<Variablenname>
Function block and program variables can be accessed using the following syntax:
<Functionblockname>.<Variablename>
Addressing bits in variables
In integer variables, individual bits can be accessed. For this, the index of the bit to
be addressed is appended to the variable, separated by a dot. The bit-index can be
given by any constant. Indexing is 0-based. Example:
a : INT;
b : BOOL;
...
a.2 := b;
The third bit of the variable a will be set to the value of the variable b.
If the index is greater than the bit width of the variable, the following error message
is issued: Index '<n>' outside the valid range for variable '<var>'!
Bit addressing is possible with the following variable types: SINT, INT, DINT,
USINT, UINT, UDINT, BYTE, WORD, DWORD.
If the variable type does not allow it, the following error message is issued: „Invalid
data type '<type>' for direct indexing“
A bit access must not be assigned to a VAR_IN_OUT variable!
Functions
10-56 BODAS / 10
Appendix H: - Command Line/Command File Commands
When BODAS is started, you can add commands in the command line which will
be asserted during execution of the program. These commands start with a „/“.
Capitalization/Use of small letters is not regarded. The commands will be executed
sequentially from the left to the right.
See the following table for a list of commands, which can be used in a command file
(<cmdfile>). The command file you can call by a command line (see above)
aufrufen können. Capitalizing/Use of small letters is not regarded. The command
line will be displayed as a message in the message window and can be given out in a
message file (see below). Additionally to the command a „@“ is prefixed. All signs
after a semicolon (;) will be ignored (comment).
BODAS / 10 10-57
Command File (cmdfile) Commands
10-58 BODAS / 10
Appendix H: - Command Line/Command File Commands
Commands for the control of replace of objects respectively for the control of files
for import, export, replace:
replace ok Replace
replace yes
replace no Do not replace
replace yesall Replace all
replace noall Replace none
BODAS / 10 10-59
Command File (cmdfile) Commands
Linking libraries:
library add <library Attaches the specified library file to the library list of
file1> <library file2> .. the currently open project. If the file path is a relative
<library fileN> path, the library directory entered in the project is used
as the root of the path.
library delete [<library1> Deletes the specified library, or (if no library name is
<library2> .. <libraryN>] specified) all libraries from the library list of the
currently open project.
Copying objects:
object copy <source Copies objects from the specified path of the source
project file> <source project file to the target path of the already opened
path> <target path> project.
If the source path is the name of an object, this will be
copied. If it is a folder, all objects below this folder
will be copied. In this case, the folder structure below
the source folder will be duplicated.
If the target path does not yet exist, it will be created.
10-60 BODAS / 10
Appendix H: - Command Line/Command File Commands
device guid <guid> Sets the device with the specified GUID as the current
device.
GUID must have the following format:
{01234567-0123-0123-0123-0123456789ABC}
The curly brackets and the hyphens must appear at the
specified positions.
device instance <Instance Sets the instance name for the current device to the
name> name specified
device parameter <Id> Assigns the specified value, which will then be
<Value> interpreted by the device, to the parameter with the
specified ID.
System call:
system <command> Carries out the specified operating system command.
BODAS / 10 10-61
Appendix I: - Overview BODAS Operators
BODAS / 10 10-63
Command File (cmdfile) Commands
LIMIT(MIN,in,Max) LIMIT Limits the value range (in is set back to BODAS
MIN or MAX in case of exceeding the
range)
10-64 BODAS / 10
Appendix I: - Overview BODAS Operators
BODAS / 10 10-65
Command File (cmdfile) Commands
1
Description see Appendix D: Standard Library
2
Description see Appendix E:Library Util.lib
3
Description see Appendix J:Library File.lib
4
Description see Appendix K:Library SerCommlib
5
Description see Appendix I Library ObjDict.lib
10-66 BODAS / 10
Appendix I: - Overview BODAS Operators
1
Description see Appendix D: Standard Library
2
Description see Appendix E:Library Util.lib
3
Description see Appendix J:Library File.lib
4
Description see Appendix K:Library SerCommlib
5
Description see Appendix I Library ObjDict.lib
BODAS / 10 10-67
Appendix J: - Compiler Errors and Warnings
1100
"Unknown function '<name>' in library."
An external library is used. Please check, whether all functions, which are defined in the .hex file, are also defined in the
.lib file.
1101
"Unresolved symbol '<Symbol>'."
The code generator expects a POU with the name <Symbol>. It is not defined in the project. Define a function/program
with this name.
1102
"Invalid interface for symbol '<Symbol>'."
The code generator expects a function with the name <Symbol> and exactly one scalar input, or a program with the name
<Symbol> and no input or output.
1103
"he constant '<name>' at code address '<address>' overwrites a 16K page boundary!"
A string constant exceeds the 16K page boundary. The system cannot handle this. It depends on the runtime system
whether the problem could be avoided by an entry in the target file. Please contact the PLC manufacturer.
1200
"Task '%s', call of '%Access variables in the parameter list are not updated"
Variables, which are only used at a function block call in the task configuration, will not be listed in the cross reference list.
1300
"File not found '<name>'"
The file, to which the global variable object is pointing, does not exist. Please check the path.
1301
"Analyze-Library not found! Code for analyzation will not be generated."
The analyze function is used, but the library analyzation.lib is missing. Add the library in the library manager.
1302
"New externally referenced functions inserted. Online Change is therefore no longer possible!"
Since the last download you have linked a library containing functions which are not yet referenced in the runtime system.
For this reason you have to download the complete project.
1400
"Unknown Pragma '<name>' is ignored!"
This pragma is not supported by the compiler. See keyword ‘pragma’ for supported directives.
1401
"The struct '<name>' does not contain any elements."
The structure with name <name> does not contain any elements. But Variables of this type will use 1 Byte of memory.
1500
"Expression contains no assignment. No code was generated."
The result of this expression is not used. For this reason there is no code generated for the whole expression.
BODAS / 10 10-69
Warnings
1501
"String constant passed as 'VAR_IN_OUT': '<name>' must not be overwritten!"
The constant may not be written within the POU, because there no size check is possible.
1502
"Variable '<name>' has the same name as a POU. The POU will not be called!"
A variable is used, which has the same nameSie verwenden eine Variable, die den gleichen Namen wie ein Baustein trägt.
Beispiel:
PROGRAM a
...
VAR_GLOBAL
a: INT;
END_VAR
...
1503
"The POU ‘<name>’ has no outputs. Box result is set to 'TRUE'."
The Output pin of a POU which has no outputs, is connected in FBD or KOP. The assignment automatically gets the value
TRUE.
1504
"’<name>’ (‘<number>’): Statement may not be executed due to the evaluation of the logical expression"
Eventually not all branches of the logic expression will be executed.
Example:
IF a AND funct(TRUE) THEN ....
If a has is FALSE then funct will not be called.
1505
"Side effect in '<name>'! Branch is probably not executed !"
The first input of the POU is FALSE, for this reason the side branch, which may come in at the second input, will not be
executed.
1506
"Variable '%s' has the same name as a local action. The action will not be called!"
Rename the variable or the action.
1600
"Open DB unclear (generated code may be erroneous)."
The original Siemens program does not tell, which POU is openend.
1700
"Input box without assignment."
An input box is used in CFC which has no assignment. For this no code will be generated.
1800
"<name>(element #<element number>): Invalid watchexpression '%s'"
The visualization element contains an expression which cannot be monitored. Check variable name and placeholder
replacements.
1801
"'<name> (number): No Input on Expression '<name>' possible"
In the configuration of the visualization object at field input a composed expression is used. Replace this by a single
variable.
10-70 BODAS / 10
Appendix J: - Compiler Errors and Warnings
1900
"POU '<name>' (main routine) is not available in the library"
The Start-POU (z.B. PLC_PRG) will not be available, when the project is used as library.
1901
"Access Variables and Variable Configurations are not saved in a library!"
Access variables and variable configuration are not stored in the library.
1902
"'<name>': is no Library for the current machine type!"
The .obj file of the lib was generated for another device.
1903
"<name>: is no valid Library"
The file does not have the format requested for the actual target.
Compiler Errors
3100
"Code too large. Maximum size: '<number>' Byte (<number>K)"
The maximum program size is exceeded. Reduce project size.
3101
"Total data too large. Maximum size: '<number>' Byte (<number>K)"
Memory is exceeded. Reduce data usage of the application.
3110
"Fehler in Bibliotheks-Datei '<name>'."
The .hex file is not in INTEL Hex format.
3111
"Library '<name>' is too large. Maximum size: 64K"
The .hex file exceeds the set maximum size.
3112
"Nonrelocatable instruction in library."
The .hex file contains a nonrelocatable instruction. The library code cannot be linked.
3113
"Library code overwrites function tables."
The ranges for code and function tables are overlapping.
3114
"Library uses more than one segment."
The tables and the code in the .hex file use more than one segment.
3115
"Unable to assign constant to VAR_IN_OUT. Incompatible data types."
The internal pointer format for string constants cannot get converted to the internal pointer format of VAR_IN_OUT,
because the data are set "near" but the string constants are set " huge" or "far". If possible change these target settings.
BODAS / 10 10-71
Compiler Errors
3120
"Current code-segment exceeds 64K."
The currently generated code is bigger than 64K. Eventually to much initializing code is created.
3121
"POU too large."
A POU may not exceed the size of 64K.
3122
"Initialisation too large. Maximum size: 64K"
The initialization code for a function or a structure POU may not exceed 64K.
3130
"User-Stack too small: '<number>' DWORD needed, '<number>' DWORD available."
The nesting depth of the POU calls is to big. Enter a higher stack size in the target settings or compile build project without
option ‚Debug’ (can be set in dialog ‘Project’ ‘Options’ ‘Build’).
3131
"User-Stack too small: '<number>' WORD needed, '<number>' WORD available."
Please contact the PLC manufacturer.
3132
"System-Stack too small: '<number>' WORD needed, '<number>' WORD available."
Please contact the PLC manufacturer.
3150
"Parameter <number> of function '<name>': Cannot pass the result of a IEC-function as string parameter to a C-
function."
Use a intermediate variable, to which the result of the IEC function is assigned.
3160
"Can't open library file '<name>'."
A library <name> is included in the library manager for this project, but the library file does not exist at the given path.
3161
"Library '<name>' contains no codesegment"
A .obj file of a library at least must contain one C function. Insert a dummy function in the .obj file, which is not defined in
the .lib file.
3162
"Could not resolve reference in Library '<name>'(Symbol '<name>', Class '<name>', Type '<name>')"
The .obj file contains a not resolvable reference to another symbol. Please check-the settings of the C-Compiler.
3163
"Unknown reference type in Library '<name>' (Symbol '<name>' , Class '<name>' , Type '<name>')"
The .obj file contains a reference type, which is not resolvable by the code generator. Please check-the settings of the C-
Compiler.
3200
"%s (%d): Boolean expression to complex"
The temporary memory of the target system is insufficient for the size of the expression. Divide up the expression into
several partial expressions thereby using assignments to intermediate variables.
3201
"<name> (<network>): A network must not result in more than 512 bytes of code"
Internal jumps can not be resolved. Activate option "Use 16 bit Sprungoffsets" in the 68k target settings.
10-72 BODAS / 10
Appendix J: - Compiler Errors and Warnings
3202
"Stack overrun with nested string/array/structure function calls"
A nested function call CONCAT(x, f(i)) is used. This can lead to data loss. Divde up the call into two expressions.
3203
"Expression too complex (too many used adress registers)."
Divide up the assignment in several expressions.
3204
"A jump exceeds 32k Bytes"
Jump distances may not be bigger than 32767 bytes.
3205
"Internal Error: Too many constant strings"
In a POU there at the most 3000 string constants may be used.
3206
"Function block data exceeds maximal size"
A function block may produce maximum 32767 Bytes of code.
3207
"Array optimization"
The optimization of the array accesses failed because during index calculation a function has been called.
3208
"Conversion not implemented yet"
A conversion function is used, which is not implemented for the actual code generator.
3209
"Operator not implemented"
A operator is used, which is not implemented for this data type and the actual code generator. MIN(string1,string2).
3210
"Function '<name>' not found"
A function is called, which is not available in the project.
3211
"Max string usage exceeded"
A variable of type string can be used in one expression 10 times at the most.
3250
"Real not supported for 8 Bit Controller"
The target is currently not supported.
3251
"date of day types are not supported for 8 Bit Controller"
The target is currently not supported.
3252
"size of stack exeeds <number> bytes"
The target is currently not supported.
3253
"Could not find hex file: '<name>' "
The target is currently not supported.
BODAS / 10 10-73
Compiler Errors
3254
"Call to external library function could not be resolved."
The target is currently not supported.
3400
"An error occured during import of Access variables"
The .exp file contains an incorrect access variables section.
3401
"An error occured during import of variable configuration"
The .exp file contains an incorrect configuration variables section.
3402
"An error occured during import of global variables"
The .exp file contains an incorrect global variables section.
3403
"Could not import <name>"
The section for object <name> in the .exp file is not correct.
3404
"An error occured during import of task configuration"
The section for the task configuration the .exp file is not correct.
3405
"An error occured during import of PLC configuration"
The section for the PLC configuration in the .exp file is not correct.
3406
"Two steps with the name '<name'. Second step not imported."
The section for the SFC POU in the .exp file contains two steps with equal names. Rename one of the steps in the export
file.
3407
"Predecessor step '<name>' not found"
The step <name> is missing in the .exp file.
3408
"Successor step '<name>' not found"
The step <name> is missing in the .exp file.
3409
"No successing transition for step '<´name>' "
In the .exp file a transition is missing, which requires step <name> as preceeding step.
3410
"No successing step for transition '<name>'"
In the .exp file a step is missing which requires the transition <name> as preceeding condition.
3411
"Step '<name>' not reachable from initial step"
In the .exp file the connection between step <name> and the initial step is missing.
3450
"PDO'<PDO-name>': Missing COB-Id!"
Click on the button ‚Properties’ in the PLC configuration dialog for the module and enter a COB ID for the PDO <PDO
Name>.
10-74 BODAS / 10
Appendix J: - Compiler Errors and Warnings
3451
"Error during load: EDS-File '<name>' could not be found, but is referenced in hardware configuration!"
Eventually the device file needed for the CAN configuration is not in the correct directory. Check the directory setting for
configuration files in ‚Project' 'Options' 'Directories'.
3452
"The module '<name>' couldn't be created!"
The device file for module <name> does not fit to the current configuration. Eventually it has been modified since the
configuration has been set up in BODAS or it is corrupted.
3453
"The channel '<name>' couldn't be created!"
The device file for channel <name> does not fit to the current configuration. Eventually it has been modified since the
configuration has been set up in BODAS or it is corrupted.
3454
"The address '<name>' points to an used memory!"
Option 'Check for overlapping addresses' is activated in the dialog ‚Settings’ of the PLC configuration and an overlap has
been detected. Regard, that the area check is based on the size which results of the data types of the modules, not on the
size which is given by the entry ‚size’ in the configuration file.
3455
"Error during load: GSD-File '<name>' could not be found, but is referenced in hardware configuration!"
Eventually the device file required by the Profibus configuration is not in the correct directory. . Check the directory setting
for configuration files in ‚Project' 'Options' 'Directories'.
3456
"The profibus device '<name>' couldn't be created!"
The device file for module <name> does not fit to the current configuration. Eventually it has been modified since the
configuration has been set up in BODAS or it is corrupted.
3457
"Error in module description!"
Please check the device file of this module.
3500
"No 'VAR_CONFIG' for '<name>'"
Insert a declaration for this variable in the global variable list which contains the 'Variable_Configuration'.
3501
"No address in 'VAR_CONFIG' for '<name>'."
Assign an address to this variable in the global variable list which contains the 'Variable_Configuration'.
3502
"Wrong data type for '<name>' in 'VAR_CONFIG"
In the global variables list which contains the ‚Variable_Configuration’ the variable is declared with a different data type
than in the POU.
3503
"Wrong data type for '<name>' in 'VAR_CONFIG'"
In the global variables list which contains the ‚Variable_Configuration’ the variable is declared with a different address
than in the POU.
3504
"Initial values are not supported for 'VAR_CONFIG”
A variable of the ‚Variable_Configuration’ is declared with address and initial value. But an initial value can only be
defined for input variables without address assignment.
BODAS / 10 10-75
Compiler Errors
3505
"’<name>’is no valid instance path"
The Variable_Configuration contains a nonexisting variable.
3506
"Access path expected"
In the global variable list for Access Variables the access path for a variable is not correct. Correct: <Identifier>:'<Access
path>':<Type> <Access mode>
3507
"No address specification for 'VAR_ACCESS'-variables"
The global variable list for Access Variables contains an address assignment for a variable. This is not allowed.
Valid variable definition: <Identifier>:'<Access path>':<Type> <Access mode>
3550
"Duplicate definition of identifier '<name>'"
There are two tasks are defined with an identic same name. Rename one of them.
3551
"The task '<name>' must contain at least one program call"
Insert a program call or delete task.
3552
"Event variable '<name>' in task '%s' not defined"
There is an event variable set in the ‘Single’ field of the task properties dialog which is not declared globally in the project.
Use another variable or define the variable globally.
3553
"Event variable '<name>' in task '%s' must be of type 'BOOL'"
Use a variable of type BOOL as event variable in the ‘Single’ field of the task properties dialog.
3554
"Task entry '<name>' must be a program or global function block instance"
In the field ‚Program call’ a function or a not defined POU is entered. Enter a valid program name.
3555
"The task entry '<name>' contains invalid parameters"
In the field ‚Append program call’ there are parameters used which do not comply with the declaration of the program
POU.
3600
“Implicit variables not found!”
Use command ‚Rebuild all’. If nevertheless you get the error message again please contact the PLC manufacturer.
3601
"<name> is a reserved variable name"
The given variable is declared in the project, although it is reserved for the codegenerator. Rename the variable.
3610
" '<name>' not supported"
The given feature is not supported by the current version of the programming system.
3611
"The given compile directory '<name>' is invalid"
There is an invalid directory given in the ‚Project’ ‚Options’ ‚Directories’ for the Compile files.
10-76 BODAS / 10
Appendix J: - Compiler Errors and Warnings
3612
"Maximum number of POUs (<number>) exceeded! Compile is aborted."
Too many POUs and data types are used in the project. Modify the maximum number of POUs in the Target Settings /
Memory Layout.
3613
"Build canceled"
The compile process was cancelled by the user.
3614
"Project must contain a POU named '<name>' (main routine) or a taskconfiguration"
Create an init POU of type Program (e.g. PLC_PRG) or set up a task configuration.
3615
"<name> (main routine) must be of type program"
A init POU (e.g. PLC_PRG) is used in the project which is not of type Program.
3616
"Programs musn't be implemented in external libraries"
The project which should be saved as an external library contains a program. This will not be available, when the library
will be used.
3617
"Out of memory"
Increase the virtual memory capacity of your computer.
3618
"BitAccess not supported in current code generator!"
The code generator for the currently set target system does not support bit access on variables.
3700
" POU with name ‘<name>' is already in library '<name>'"
A POU name is used in the project, which is already used for a library POU. Rename the POU.
3701
"Name used in interface is not identical with POU Name"
Use command ‘Project’ ‘Rename object’ to rename the POU in the object organizer, or change the name of the POU in
the declaration window. There the POU name has to be placed next to one of the keywords PROGRAM, FUNCTION oder
FUNCTIONBLOCK..
3702
"Overflow of identifier list"
Maximum 100 identifiers can be entered in one variable declaration.
3703
"Duplicate definition of identifier '<name>'"
Take care that there is only one identifier with the given name in the declaration part of the POU.
3704
"data recursion: "<POU 0> -> <POU 1> -> .. -> <POU 0>"
Eine FB-Instanz wurde verwendet, die sich selbst wieder benötigt.
3720
"Address expected after 'AT'"
Add a valid address after the keyword AT or modify the keyword.
BODAS / 10 10-77
Compiler Errors
3721
"Only 'VAR' and 'VAR_GLOBAL' can be located to addresses"
Put the declaration to a VAR or VAR_GLOBAL declaration area.
3722
"Only 'BOOL' variables allowed on bit addresses"
Modify the address or modify the type of the variable to which the address is assigned.
3729
"Invalid type '<name>' at address: '<name>' "
The type of this variable cannot be placed on the given address. Example: For a target system working with ‘alignment 2’
the following declaration is not valid: var1 AT %IB1:WORD;
3740
"Invalid type: '<name>' "
An invalid data type is used in a variable declaration.
3741
"Expecting type specification"
A keyword or an operator is used instead of a valid type identifier.
3742
"Enumeration value expected"
In the definition of the enumeration type an identifier is missing after the opening bracket or after a comma between the
brackets.
3743
"Integer number expected"
Enumerations can only be initialized with numbers of type INT.
3744
"Enum constant '<name>' already defined"
Check if you have followed the following rules for the definition of enumeration values:
- Within one enum definition all values have to be unique.
- Within all global enum definitions all values have to be unique.
- Within all local enum definitions all values have to be unique.
3745
"Subranges are only allowed on Integers!”
Subrange types can only be defined resting on integer data types.
3746
"Subrange '<name>' is not compatible with Type '<name>'"
One of the limits set for the range of the subrange type is out of the range which is valid for the base type.
3747
"unknown string length: '<name>'"
There is a not valid constant used for the definition of the string length.
3748
"More than three dimensions are not allowed for arrays"
More than the allowed three dimensions are given in the definition of an array. If applicable use an ARRAY OF ARRAY.
3749
"lower bound '<name>' not defined"
There is a not defined constant used to define the lower limit for a subrange or array type.
10-78 BODAS / 10
Appendix J: - Compiler Errors and Warnings
3750
"upper bound '<name>' not defined"
There is a not defined constant used to define the upper limit for a subrange or array type.
3760
"Error in inital value"
Use an initial value which corresponds to the type definition. To change the declaration you can use the declaration dialog
for variables (Shift/F2 or 'Edit''Autodeclare').
3761
"'VAR_IN_OUT' variables must not have an inital value."
Remove the initialization at the declaration of the VAR_IN_OUT variable.
3780
"'VAR', 'VAR_INPUT', 'VAR_OUTPUT' or 'VAR_IN_OUT' expected"
The first line following the name of a POU must contain one of these keywords.
3781
"'END_VAR' or identifier expected"
Enter a valid identifier of a END_VAR at the beginning of the given line in the declaration window.
3782
"Unexpected end"
In the declaration editor: Add keyword END_VAR at the end of the declaration part.
In the texteditor of the programming part: Add an instruction which terminates the last instruction sequence (e.g. END_IF).
3783
"END_STRUCT' or identifier expected"
Ensure that the type declaration is terminated correctly.
3800
"The global variables need too much memory. Increase the available memory in the project options."
Increase the number of segments given in the settings in dialog ‚Project’ ‚Options’ ‚Build’.
3801
"Die Variable '<name>' ist zu groß. (<Größe> Byte)"
The variable uses a type which is bigger than 1 data segment. The segment size is a target specific parameter and can be
modified in the target settings/memory layout. If you do not find this in the current target settings, please contact your PLC
manufacturer.
3802
"Out of retain memory. Variable '<name>', <number> bytes."
The memory space available for Retain variables is exhausted. The size of the memory area can be set target-specific in the
target settings /memory layout. If you do not find the settings field in the dialog, please contact your PLC manfacturer.
(Please regard: If retain variables are used in an function block instance, the complete instance POU will be stored in the
retain memory area !)
3803
"Out of global data memory. Variable '<name>', ‚<number>’ bytes."
The memory space available for global variables is exhausted. Der verfügbare Speicherplatz für globale Variablen ist
erschöpft. The size of the memory area can be set target-specific in the target settings /memory layout. If you do not find
the settings field in the dialog, please contact your PLC manfacturer.
3820
"'VAR_OUTPUT' and 'VAR_IN_OUT' not allowed in functions"
In a function no output or in_output variables may be defined.
BODAS / 10 10-79
Compiler Errors
3821
"At least one input required for functions"
Add at least on input parameter for the function.
3840
"Unknown global variable '<name>'!"
In the POU a VAR_EXTERNAL variable is used, for which no global variable declared.
3841
"Declaration of '<name>' do not match global declaration!"
The type given in the declaration of the VAR_EXTERNAL variable is not the same as that in the global declaration.
3900
"Multiple underlines in indentifier"
Remove multiple underlines in the identifier name.
3901
"At most 4 numerical fields allowed in addresses"
There is a direct assignment to an address which has more than four levels. (e.g. %QB0.1.1.0.1).
3902
"Keywords must be uppercase"
Use capital letters for the keyword or activate option ‚Autoformat’ in ‚Project’ ‚Options’.
3903
"Invalid duration constant"
The notation of the constant does not comply with the IEC61131-3 format.
3904
"Overflow in duration constant"
The value used for the time constant cannot be represented in the internal format. The maximum value which is
representable is t#49d17h2m47s295ms.
3905
"Invalid date constant"
The notation of the constant dies not comply with the IEC61131-3 format.
3906
"Invalid time of day constant"
The notation of the constant dies not comply with the IEC61131-3 format.
3907
"Invalid date and time constant"
The notation of the constant dies not comply with the IEC61131-3 format.
3908
"Invalid string constant"
The string constant contains an invalid character.
4000
"Identifier expected"
Enter a valid identifier at this position.
4001
"Variable '<name>' not declared"
Declare variable local or global.
10-80 BODAS / 10
Appendix J: - Compiler Errors and Warnings
4010
"Type mismatch: Cannot convert '<name>' to '<name>'."
Check what data type the operator expects (Browse Online Help for name of operator) and change the type of the variable
which has caused the error, or select another variable.
4011
"Type mismatch in parameter '<name>' of '<name>': Cannot convert '<name>' to '<name>'."
The data type of the actual parameter cannot be automatically converted to that of the formal parameter. Use a type
conversion or use another variable type.
4012
"Type mismatch in parameter '<name>' of '<name>': Cannot convert '<name>' to '<name>'."
A value with the invalid type <Typ2> is assigned to the input variable '<name>'. Replace the variable or constant to one of
type <Typ1> or use a type conversion respectively a constant with type-prefix..
4013
"Type mismatch in output '<name>' of '<name>': Cannot convert '<name>' to '<name>'."
A value with the invalid type <Typ2> is assigned to the output variable '<name>'. Replace the variable or constant to one
of type <Typ1> or use a type conversion respectively a constant with type-prefix..
4014
"Typed literal: Cannot convert '<name>' to '<name>'"
The type of the constant is not compatible with the type of the prefix.
Example: SINT#255
4015
"Data type ‘<name>' illegal for direct bit access"
Direct bit addressing is only allowed for Integer- and Bitstring datatypes. You are using a variable var1 of type Typ
REAL/LREAL or a constant in bit access <var1>.<bit>.
4016
"Bit index '<number>' out of range for variable of type '<name>'"
You are trying to access a bit which is not defined for the data type of the variable.
4017
"'MOD' is not defined for 'REAL'"
The operator MOD can only be used for integer and bitstring data types.
4020
"Variable with write access or direct address required for 'ST', 'STN', 'S', 'R'"
Replace the first operand by a variable with write access.
4021
"No write access to variable '%s' allowed"
Replace the variable by a variable with write access.
4022
"Operand expected"
Add an operand behind the command.
4023
"Number expected after '+' or '-'"
Enter a digit.
4024
"<operator 0> or <operator 1> or ... expected before '<name>'"
Enter a valid operand at the named position.
BODAS / 10 10-81
Compiler Errors
4025
"':=' or '=>' expected before '<name>'"
Enter one of the both operators at the named position.
4026
"'BITADR' expects a bit address or a variable on a bit address"
Use a valid bit address (e.g. %IX0.1).
4027
"Integer number or symbolic constant expected"
Enter a integer number or the identifier of a valid constant.
4028
"'INI' operator needs function block instance or data unit type instance"
Check the data type of the variable, for which the INI operator is used.
4029
"Nested calls of the same function are not possible."
At not reentrant target systems and in simulation mode a function call may not contain a call of itself as a parameter.
Example: fun1(a,fun1(b,c,d),e);
Use a intermediate table.
4030
"Expressions and constants are not allowed as operands of 'ADR'"
Replace the constant or the expression by a variable or a direct address.
4031
"'ADR' is not allowed on bits! Use 'BITADR' instead."
Use BITADR. Please note: The BITADR function does not return a physical memory address
4032
"’<number>’ operands are too few for '<name>'. At least ‘<number>’ are needed"
Check how many operands the named operator requires and add the missing operands.
4033
"’<number>’ operands are too many for '<name>'. At least ‘<number>’ are needed"
Check how many operands the named operator requires and remove the surplus operands.
4034
"Division by 0"
You are using a division by 0 in a constant expression. If you want to provocate a runtime error, use – if applicable - a
variable with the value 0.
4035
"ADR must not be applied on 'VAR CONSTANT' if 'replaced constants' is activated"
An address access on constants for which the direct values are used, is not possible. If applicable, deactivate the option
‚Replace Constants’ in ‚Project’ ‚Options’ ‚Build’.
4040
"Label '<name>' is not defined"
Define a label with the name <LabelName> or change the name <LabelName> to that of a defined label.
4041
"Duplicate definition of label '<name>'"
The label '<name>' is multiple defined in the POU. Rename the label or remove one of the definitions.
10-82 BODAS / 10
Appendix J: - Compiler Errors and Warnings
4042
"No more than %d labels in sequence are allowed"
The number of jump labels is limited to '<Anzahl>'. Insert a dummy instruction.
4043
"Format of label invalid. A label must be a name optionally followed by a colon."
The label name is not valid or the colon is missing in the definition.
4050
"POU '%s' is not defined"
Define a POU with the name '<name>' using the command ‘Project’ ‘Add Object’ or change '<name>' to the name of a
defined POU.
4051
"'%s' is no function"
Use instead of <name> a function name which is defined in the project or in the libraries.
4052
"'%s' must be a declared instance of FB '%s'"
Use an instance of data type '<name>' which is defined in the project or change the type of <Instance name> to '<name>' .
4053
"'%s' is no valid box or operator"
Replace '<name>' by the name of a POU or an operator defined in the project.
4054
"POU name expected as parameter of 'INDEXOF'"
The given paramter is not a valid POU name.
4060
"'VAR_IN_OUT' parameter '%s' of '%s' needs variable with write access as input"
To VAR_IN_OUT parameters variables with write access have to be handed over, because a VAR_IN_OUT can be
modified within the POU.
4061
"'VAR_IN_OUT' parameter '%s' of '%s' must be used."
A VAR_IN_OUT parameter must get handed over a variable with write access, because a VAR_IN_OUT can be modified
within the POU
4062
"No external access to 'VAR_IN_OUT' parameter '%s' of '%s'."
VAR_IN_OUT Parameter only may be written or read within the POU, because they are handed over by reference.
4063
"'VAR_IN_OUT' parameter '%s' of '%s' must not be used with bit addresses."
A bit address is not a valid physical address. Hand over a variable or a direct non-bit address.
4064
"'VAR_IN_OUT' must not be overwritten in local action call!"
Delete the parameters set for the VAR_IN_OUT variable in the local action call.
4070
"The POU contains a too complex expression"
Decrease nesting depth by dividing up the expression into several expressions. Use intermediate variables for this purpose.
4071
"Network too complex"
Divide up the network into several networks.
BODAS / 10 10-83
Compiler Errors
4100
"'^' needs a pointer type"
You are trying to dereference a variable which is not declared as a pointer.
4110
"'[<index>]' needs array variable"
[<index>] is used for a variable which is not declared as an array with ARRAY OF.
4111
"Index expression of an array must be of type 'INT'"
Use an expression of the correct type or a type conversion.
4112
"Too many indexes for array"
Check the number of indices (1, 2, oder 3), for which the array is declared and remove the surplus.
4113
"Too few indexes for array"
Check the number of indices (1, 2, oder 3), for which the array is declared and add the missing ones.
4114
"One of the constant indizes is not within the array range"
Make sure that the used indices are within the bounds of the array.
4120
"'.' needs structure variable""
The identifier on the left hand of the dot must be a variable of type STRUCT or FUNCTION_BLOCK or the name of a
FUNCTION or a PROGRAM.
4121
" '<name>' is not a component of <object name>"
The component '<name>' is not included in the definition of the object <object name>.
4122
"'%s' is not an input variable of the called function block"
Check the input variables of the called function block and change ‘<name>' to one of these.
4200
"'LD' expected"
Insert at least one LD instruction after the jump label in the IL editor.
4201
"IL Operator expected"
Each IL instruction must start with an operator or a jump label.
4202
"Unexpected end of text in brackets"
Insert a closing bracket after the text.
4203
"<name> in brackets not allowed"
The operator <name> is not valid in a IL bracket expression.
(not valid are: 'JMP', 'RET', 'CAL', 'LDN', 'LD', 'TIME')
4204
"Closing bracket with no corresponding opening bracket"
Insert an opening bracket or remove the closing one.
10-84 BODAS / 10
Appendix J: - Compiler Errors and Warnings
4205
"No comma allowed after ')'"
Remove comma after closing bracket.
4206
"Label in brackets not allowed"
Shift jump label so that it is outside of the brackets.
4207
"'N' modifier requires operand of type 'BOOL','BYTE','WORD' or 'DWORD'"
The N modifier requires a data type, for which a boolean negation can be executed.
4208
"Conditional Operator requires type 'BOOL'"
Make sure that the expression gives out a boolean result or use a type conversion.
4209
"Function name not allowed here"
Replace the function call by a variable or a constant.
4210
"'CAL', 'CALC' and 'CALN' require a function block instance as operand"
Declare an instance of the function block which you want to call.
4211
"Comments are only allowed at the end of line in IL"
Shift the comment to the end of the line or to an extra line.
4212
"Accumulator is invalid before conditional statement"
The accu is not defined. This happens if an instruction is preceeding which does not submit a result (e.g. 'CAL').
4213
"'S' and 'R' require 'BOOL' operand"
Use a boolean variable at this place.
4250
"Another 'ST' statement or end of POU expected"
The line does not start with a valid ST instruction.
4251
"Too many parameters in function '%s'"
There are more parameters given than are declared in the definition of the function.
4252
"Too few parameters in function '%s'"
There are less parameters given than are declared in the definition of the function.
4253
"'IF' or 'ELSIF' require 'BOOL' expression as condition"
Make sure that the condition for IF or ELSIF is a boolean expression.
4254
"'WHILE' requires 'BOOL' expression as condition"
Make sure that the condition following the ‘WHILE’ is a boolean expression.
BODAS / 10 10-85
Compiler Errors
4255
"'UNTIL' requires 'BOOL' expression as condition"
Make sure that the condition following the ‘UNTIL’ is a boolean expression.
4256
"'NOT' requires 'BOOL' operand"
Make sure that the condition following the ‘NOT’ is a boolean expression.
4257
"Variable of 'FOR' statement must be of type 'INT'"
Make sure that the counter variable is of an integer or bitstring data type (e.g. DINT, DWORD).
4258
"Expression in 'FOR' statement is no variable with write access"
Replace the counter variable by a variable with write access.
4259
"Start value in 'FOR' statement is no variable with write access"
The start value in the ‚FOR' instruction must be compatible to the type of the counter variable.
4260
"End value of 'FOR' statement must be of type 'INT'"
The end value in the ‚FOR' instruction must be compatible to the type of the counter variable.
4261
"Increment value of 'FOR' statement must be of type 'INT'"
The incremental value in the ‚FOR' instruction must be compatible to the type of the counter variable.
4262
"'EXIT' outside a loop"
Use 'EXIT' only within 'FOR', 'WHILE' or 'UNTIL' instructions.
4263
"Expecting Number, 'ELSE' or 'END_CASE'"
Within a ‘CASE' expression you only can use a number or a 'ELSE' instruction or the ending instruction 'END_CASE'.
4264
"'CASE' requires selector of an integer type"
Make sure that the selector is of an integer or bitstring data type (e.g. DINT, DWORD).
4265
"Number expected after ','"
In the enumeration of the CASE selectors there must be inserted a further selector after a comma.
4266
"At least one statement is required"
Insert an instruction, at least a semicolon.
4267
"Function block call requires function block instance"
The identifier in the functionblock call is no instance. Declare an instance of the desired functionblock or use the name of
an already defined instance.
4268
"Expression expected"
An dieser Stelle muß ein Ausdruck eingegeben werden.
10-86 BODAS / 10
Appendix J: - Compiler Errors and Warnings
4269
"'END_CASE' expected after 'ELSE'-branch"
Terminate the 'CASE' instruction after the 'ELSE' part with an 'END_CASE'.
4270
"'CASE' constant '%ld' already used"
A 'CASE' selector may only be used once within a ‘CASE' instruction.
4271
"The lower border of the range is greater than the upper border."
Modify the area bounds for the selectors so that the lower border is not highte than the upper border.
4272
"Exptecting parameter '%s' at place %d in call of '%s'!"
You can edit a function call in that way, that also the parameter names are contained, not only the parameter values. But
nevertheless the position (sequence) of the parameters must be the same as in the function definition.
4273
Parts of the 'CASE'-Range '%ld..%ld' already used in Range '%ld..%ld'
Make sure that the areas for the selectors which are used in the CASE instruction, don’t overlap.
4274
"Multiple 'ELSE' branch in 'CASE' statement"
A CASE instruction may not contain more than one ‚ELSE' instruction.
4300
"Jump requires 'BOOL' as input type"
Make sure that the input for the jump respectively the RETURN instruction is a boolean expression.
4301
"POU '%s' need exactly %d inputs"
The number of inputs does not correspond to the number of VAR_INPUT and VAR_IN_OUT variables which is given in
the POU definition.
4302
"POU '%s' need exactly %d outputs"
The number of outputs does not correspond to the number of VAR_OUTPUT variables which is given in the POU
definition..
4303
"'%s' is no operator"
Replace '<name>' by a valid operator.
4320
"Non-boolean expression '<name>' used with contact"
The switch signal for a contact must be a boolean expression.
4321
"Non-boolean expression '<name>' used with coil"
The output variable of a coil must be of type BOOL.
4330
"Expression expected at input 'EN' of the box '<name>' "
Assign an input or an expression to the input EN of POU '<name>’.
4331
"Expression expected at input '<number>' of the box '<name>' "
The input <number> of the operator POU is not assigned.
BODAS / 10 10-87
Compiler Errors
4332
Expression expected at input '<name>' of the box '<name>'"
The input of the POU is of type VAR_IN_OUT and is not assigned.
4333
"Identifier in jump expected"
The given jump mark is not a valid identifier.
4334
"Expression expected at the input of jump"
Assign a boolean expression to the input of the jump. If this is TRUE, the jump will be executed.
4335
"Expression expected at the input of the return"
Assign a boolean expression to the input of the RETURN instruction. If this is TRUE, the jump will be executed.
4336
"Expression expected at the input of the output"
Assign a suitable expression to the output box.
4337
"Identifier for input expected"
Insert a valid expression or identifier in the input box.
4338
"Box '%s' has no inputs"
To none of the inputs of the operator POU '<name>' a valid expression is assigned.
4339
"Typemismatch at output: Cannot convert '<name>' to '<name>'.
The type of the expression in the output box is not compatible to that of the expression which should be assigned to it.
4340
"Jump requires 'BOOL' as input type"
Make sure that the input for the jump is a boolean expression.
4341
"Return benötigt eine boolsche Eingabe"
Make sure that the input for the RETURN instruction is a boolean expression.
4342
"Expression expected at input 'EN' of the box '<name>'"
Assign a valid boolean expression to the EN input of the box.
4343
"Values of Constants: ‘<name>’"
Input '<name>' of box '<name>' is declared as VAR_INPUT CONSTANT. But to this POU box an expression has been
assigned in the dialog 'Edit Parameters' which is not type compatible.
4344
"'S' and 'R' require 'BOOL' operand"
Insert a valid boolean expression after the Set resp. Reset instruction.
4345
"Invalid Type for parameter '<name>' of '<name>': Cannot convert '<type>' to '<type>'."
An expression is assigned to input '<name>' of POU box '<name>' which is not type compatible.
10-88 BODAS / 10
Appendix J: - Compiler Errors and Warnings
4346
"Not allowed to use a constant as an output"
You can only assign an output to a variable or a direct address with write access.
4347
"'VAR_IN_OUT' parameter needs variable with write access as input"
To VAR_IN_OUT parameters only variables with write access can be handed over, because these can be modified within
the POU.
4350
"An SFC-Action can not be accessed from outside!"
SFC actions only can be called within the SFC POU in which they are defined.
4351
"Step name is no identifier: '<name>'"
Rename the step or choose a valid identifier as step name.
4352
"Extra characters following valid step name:'<name>'"
Remove the not valid characters in the step name.
4353
"Step name duplicated: '<name>'"
Rename one of the steps.
4354
"Jump to undefined Step: '<name>'"
Choose an existent step name as aim of the jump resp. insert a step with name ‚<name>’.
4355
"A transition must not have any side effects (Assignments, FB-Calls etc.)"
A transition must be a boolean expression.
4356
"Jump without valid Step Name: '<name>' "
Use a valid identifier as aim (mark) of the jump.
4357
"IEC-Library not found"
Check whether the library iecsfc.lib is inserted in the library manager and whether the library paths defined in ‘Project’
‘Options’ ‘Paths’are correct.
4358
"Action not declared: '%s'"
Make sure that in the object organizer the action of the IEC step is inserted below the SFC POU and that in the editor the
action name is inserted in the box on the right hand of the qualifier.
4359
"Invalid Qualifier: '%s'"
In the box on the left hand of the action name enter a qualifier for the IEC action.
4360
"Time Constant expected after qualifier '%s'"
Enter next to the box on the left hand of the action name a time constant behind the qualifier.
BODAS / 10 10-89
Compiler Errors
4361
"'%s' is not the name of an action"
Enter next to the box on the right hand of the qualifier the name of an action or the name of a variable which is defined in
the project.
4362
"Nonboolean expression used in action: '%s'"
Insert a boolean variable or a valid action name.
4363
"IEC-Step name already used for variable: '<name>'"
Please rename the step or the variable.
4364
"A transition must be a boolean expression"
The result of the transition expression must be of type BOOL.
4365
"Time Constant expected after qualifier '<name>'"
Open dialog ‚step attributes’ for the step '<name>' and enter a valid time variable or time constant
4366
"The label of the parallel branch is no valid identifier: '<name>'"
Enter a valid identifier next to the triangle which marks the jump label.
4367
"The label '<name>' is already used"
There is already a jump label or a step with this name. Please rename correspondingly.
4368
"Action '<name>' is used in multiple step chains, where one is containing the other!"
The action '<name>' is used in the POU as well as in one or several actions of the POU.
4369
"Exactly one network requried for a transition"
There are used several FBD resp. LD networks for a transition. Please reduce to 1 network.
4370
"Additional lines found after correct IL-transition"
Remove the not needed lines at the end of the transition.
4371
"Invalid characters following valid expression: '<name>"
Remove the not needed characters at the end of the transition.
4400
Import / conversion of POU '%s' contains errors resp. is not complete."
The POU cannot be converted to IEC 61131-3 completely.
4401
"S5 time constant %lu seconds is too big (max. 9990s)."
There is no valid BCD coded time in the accu.
4402
"Direkter Zugriff nur auf E/As erlaubt."
Make sure that you only access variables which are defined as input or output.
10-90 BODAS / 10
Appendix J: - Compiler Errors and Warnings
4403
"STEP5/7 instruction invalid or not convertible to IEC 61131-3."
Some STEP5/7 commands are not convertable ato IEC 61131-3, e.g. CPU commands like MAS.
4404
"STEP5/7 operand invalid or not convertible to IEC 61131-3."
Some STEP5/7 operands are not convertable ato IEC 61131-3 respectively an operand is missing.
4405
"Reset of a STEP5/7 timer cannot be converted into IEC 61131-3."
The corresponding IEC timer have no reset input.
4406
"STEP5/7 Counter constant out of range (max. 999)."
There is no valid BCD coded ckounter constant in the accu.
4407
"STEP5 instruction not convertible to IEC 61131-3."
Some STEP5/7 instructions cannot be converted to IEC 61131-3, e.g. DUF.
4408
"Bit access of timer or counter words not convertible into IEC 61131-3."
Special timer/counter commands are not convertable into IEC 61131-3.
4409
"Contents of ACCU1 or ACCU2 undefined, not convertible into IEC 61131-3."
A command, which connects the both accus, cannot be converted, because the accu values are not defined.
4410
"Called POU not in project."
Import the called POU.
4411
"Error in global variable list."
Please check the SEQ file.
4412
"Internal error no.11"
Please contact the PLC manufacturer.
4413
"Error in format of line in data block"
In the code which should be imported there is an errouneous date.
4414
"FB/FX name missing."
In the original S5D file the symbolic name of an (extended) POU is missing.
4415
"Instruction after block end not allowed."
A protected POU cannot get imported.
4416
"Invalid Command"
The S5/S7 command´cannot be disassembled.
BODAS / 10 10-91
Compiler Errors
4417
"Comment not closed"
Close the comment with "*)".
4418
"FB/FX-Name too long (max. 8 characters)"
The symbolic name of an (extended) POU is to long.
4419
"Expected format of line ""(* Name: <FB/FX-Name> *)"" "
Correct the line correspondingly.
4420
"Name of FB/FX parameter missing"
Check the POUs.
4421
"Type of FB/FX parameter invalid"
Check the POUs.
4422
"Type of FB/FX parameter missing"
Check the POUs.
4423
"Invalid FB/FX call parameter"
Check the interface of the POU.
4424
"Warning: FB/FX for call either missing or parameters invalid or has '0' parameters"
The called POU is not imported yet or is not correct or has no parameters (in the last case you can ignore the error
message).
4425
"Definition of label missing"
The aim (label) of the jump is not defined.
4426
"POU does not have a valid STEP 5 block name, e.g. PB10"
Modify the POU name.
4427
"Timer type not declared"
Add a declaration of the timer in the global variables list.
4428
"Maximum number of open STEP5 brackets exceeded"
You may not use more than seven open brackets.
4429
"Error in name of formal parameter"
The parameter name may not exceed four characters.
4430
"Type of formal parameter not IEC-convertible"
In IEC 61131-3 Timer, counter and POUs cannot be converted as formal parameters.
10-92 BODAS / 10
Appendix J: - Compiler Errors and Warnings
4431
"Too many 'VAR_OUTPUT' parameters for a call in STEP5 STL"
A POU may not contain more than 16 formal parameters as outputs.
4432
"Labels within an expression are not allowed"
In IEC 61131-3 jump labels may not be inserted at any desired position.
4434
"Too many labels"
A POU may not contain more than 100 labels.
4435
"After jump / call, a new expression must start"
After jump or call a Load command LD must follow.
4436
"Bit result undefined, not convertible to IEC 61131-3."
The command which is used by VKE verwendet cannot get converted, because the value of the VKE is not known.
4437
"Type of instruction and operand are not compatible"
A bit command is used for a word operand or the other way round.
4438
"No data block opened (insert instruction C DB before)"Insert a „A DB“.
4500
"Unrecognized variable or address"
The watch variable is not declared within the project. By pressing <F2> you get the input assistant which lists the declared
variables.
4501
"Extra characters following valid watch expression"
Remove the surplus signs.
4520
"Error in Pragma: Flag expected before '<name>'!"
The pragma is not correct. Check whether ‘<name>' is a valid flag.
4521
"Error in Pragma: Unexpected element '<name>'!"
Check whether pragma is composed correctly.
4522
"flag off' pragma expected!"
Das Ausschalten des Pragmas fehlt, fügen Sie eine 'flag off' Anweisung ein.
4550
"Index out of defined range : Variable OD "number>, Line <line number>."
Ensure that the index is within the area which is defined in the target settings/networkfunctionality.
4551
"Subindex out of defined range : Variable OD "number>, Line <line number>."
Ensure that the subindex is within the area which is defined in the target settings/networkfunctionality.
BODAS / 10 10-93
Compiler Errors
4552
"Index out of defined range : Parameter OD "number>, Line <line number>."
Ensure that the index is within the area which is defined in the target settings/networkfunctionality.
4553
"Subindex out of defined range : Parameter OD "number>, Line <line number>."
Ensure that the subindex is within the area which is defined in the target settings/networkfunctionality.
4554
"Variablename invalid: Variable OD <number>, Line <line number>."
Enter a valid project variable in the filed ‚variable’. Use the syntax <POU name>.<variable name> resp. for global
variables .<variable name>
4555
"Empty table-entry, input not optional: Parameter OD <number>, Line <line number>
You must make an entry in this field.
4556
"Empty table-entry, input not optional: Variable OD <number>, Line <number>"
You must make an entry in this field.
10-94 BODAS / 10
11 - Index
BODAS / 10 I
Index
II BODAS / 10
11 - Index
'
H
'Extras' 'Nächster Unterschied' 4-36
'Extras' 'Vorheriger Unterschied' 4-36 Help 4-75
Help Menu
Contents and Index 4-75
F Help Topics Window 4-75
F_TRIG 10-39
F4 4-8 I
falling edge 10-39
FBD 2-2, 2-5, 2-23, 4-58, 5-19 Identifier 5-4, 10-55
FBD Editor 5-19 IEC 61131-3 2-29
Feedback paths in CFC 5-52 IEC Step 2-20, 5-37
Fields 2-1, 10-6 IEC steps 2-21
File 4-16 Iecsfc.lib 2-20
File Menu IF instruction 2-12, 2-14
Close 4-17 IL 2-2, 2-3, 2-5, 2-9, 4-58, 5-15
Exit 4-24 IL Editor 5-15
New 4-16 IL operator 2-9
Open 4-16 Implicit variables in SFC 2-21
Print 4-22 Import 4-32
Printer Setup 4-23 Incrementer 10-40
Save 4-17 Incrementer/Decrementer 10-41
Save as 4-18 Index Window 4-77
FIND 10-36 INDEXOF 10-15
Find' 4-51 Initialization 5-4
Flow control 5-15 Input and Output Variable 5-3
Flow Control Input assistant
FBD 5-25 structured 4-53
Folder 4-41, 4-42 unstructured 4-53
Font 4-7 Input Assistant 4-53
FOR 2-16 Input in FBD 5-22
FOR loop 2-13, 2-16 INSERT 10-35
Force 4-61 Insert in SFC 5-32
Force values 4-61 Insert Menu
Forcing 5-10, 6-18 Add Entry-Action 5-33
Formatting, automatic 4-7 Add Exit-Action 5-33
Frame 8-20 Additional Library 7-2
Function 2-1, 10-56 Alternative Branch (left) 5-32
BODAS / 10 III
Index
IV BODAS / 10
11 - Index
BODAS / 10 V
Index
VI BODAS / 10
11 - Index
BODAS / 10 VII
Index
Window Menu
U Arrange symbols 4-74
UDINT 10-5 Cascade 4-74
UDINT Constants 10-54 Close all 4-74
UINT 10-5 Library Manager 4-74, 7-1
UINT Constants 10-54 Log 4-74
Undo 4-49 Messages 4-74
UNPACK 10-49 Tile Horizontal 4-74
User group 4-39 Tile Vertical 4-74
User information 4-6 WORD 10-5
USINT 10-5 WORD Constants 10-54
USINT Constants 10-54 Work space 4-3
Write 4-60
Write protection password 4-13
V Write Receipt 6-18
Write values 4-60
VAR 5-3, 5-7
VAR_CONFIG 6-2
VAR_CONSTANT 6-3 X
VAR_GLOBAL 5-7, 6-2, 6-3
VAR_IN_OUT 5-3 XOR 10-16
VAR_INOUT 5-7
VAR_INPUT 5-3, 5-7
VAR_INPUT CONSTANT 5-45 Y
VAR_OUTPUT 5-3, 5-7 Y Scaling 6-14
Variable name 5-4
Variables 10-55
Variables declaration 5-4 Z
Visualisation
Input possibilities for the operating version 8-13 Zoom 5-1, 5-17
Visualisierung Zoom Action 5-34
Line width 8-8 Zoom to POU 5-1
Visualization 2-9, 4-2, 8-1 Zoom Transition 5-34
Bitmap 8-15
Colors 8-9
File - Print 8-23
Input 8-12
Motion absolute 8-10
Motion relative 8-10
Operation in online mode 8-22
Operation over the keyboard 8-22
Placeholder 8-6, 8-17
Reference 8-6
Shape 8-7
Text 8-8
Tooltip 8-15
Variables 8-11
Visualization Elements, Configure 8-5
Visualization Elements, Copy 8-5
Visualization Elements, Shift, Move 8-5
W
Watch and Receipt Manager 6-15
Watch and Receipt Manager Offline 6-16
Watch and Receipt Manager Online 6-17
Watch List 6-15
Watch Variable 5-10, 5-25
WHILE loop 2-13, 2-16
Window' 4-74
VIII BODAS / 10