Open PCS
Open PCS
2008
Innovation in Automation
1 © 1994 – 2008 infoteam Software GmbH • www.infoteam.de
English
OpenPCS
6.6
User Manual
Contents
Innovation in Automation 1
1 A Quick Tour through OpenPCS 12
1.1 Installation 12
1.2 Hardware and Software Requirements 12
1.3 Starting OpenPCS 12
1.4 OpenPCS Samples 13
1.5 Guided Tour 14
1.5.1 Guided_Tour: Intro 14
1.5.2 Sample Program 14
1.5.3 Executing code 16
1.5.4 Monitoring Code 18
1.5.5 Control Data Analyzer 20
1.5.6 Online Edit 20
1.6 Additional 22
1.6.1 Adding Hardware Support 22
1.6.2 Templates 23
1.6.3 XML-Import/Export 23
1.6.4 About this manual 24
1.6.5 More Information 24
2 OpenPCS Tools 25
2.1 OpenPCS Framework 25
2.1.1 OpenPCS Framework: Introduction 25
2.1.2 Output Window 25
2.2 Browser 25
2.2.1 Browser: Introduction 25
2.2.2 Browser: Overview 26
2.2.3 Projects 30
2.2.4 Files 31
2.2.5 Resources and Tasks 31
2.2.6 OPC - I/O 33
2.2.7 Compiler 34
2.2.8 Online 34
2.2.9 Other Browser Features 37
2.3 Catalog 39
2.3.1 Catalog 39
2.3.2 Variable Catalog 40
2.4 Declaration Editor 41
2.4.1 Declaration Editor: introduction 41
2.4.2 Declaration Sections 41
2.4.3 Structure of a Declaration Line 43
2.4.4 Elementary Data Types 43
2.4.5 See also Constants 44
2.4.6 Directly represented variables 44
2.4.7 Derived data types 45
2.4.8 Declaration of array data types 46
2.4.9 Declaration of structured data types 46
2.4.10 Declaration of enumeration data types 47
If the startup-screen isn't displayed you can find the sample projects in the
sample folder of your OpenPCS directory.
Notes:
(1) Each sample project comes with a description that will automatically be
shown when the project is opened.
(2) The samples you see may vary due to OEM dependencies done by Brand
Labelling OpenPCS.
To add new files to a resource the user needs to right-click onto a file within the
project browser and select ‘Link To Active Resource’. A green check mark will be
visible within the icon if the file is linked to the resource.
The Guided Tour is split into two sections. The first introduces the reader into
the sample program and explains the used routines. The second part deals with
compiling, executing and monitoring the program within OpenPCS.
If a problem occurs, OpenPCS prints the error in the same window. The
manual of OpenPCS hands a complete overview on all errors and hands
possible solutions to the user.
Accept that with ‘yes’. You will see a progress bar while the code is being
transferred, but for this small example it should be finished very quickly.
When download has finished, you will see that OpenPCS automatically
opened another of its tools, the ‘Test and Commissioning’. This is proof that
OpenPCS is online:
Use PLC-> Coldstart in the menu (or press the red arrow in the toolbar) to
start execution of your code.
After starting the execution the following screen should be visible. The
coffee brewer is initialized and the init-step is colored red.
Go to SmartSIM and activate the first input (‘button’). The variable ‘start’
turns to TRUE, as can be seen in the watchlist at the bottom of the screen,
and the machine starts. Moreover, the SFC activates step ‘Fill_Water’ which
is now colored red.
Double-click some of the variable entries (white boxes with black dot), and
see the corresponding variables added to the watch list in the Test &
Commissioning:
Go back to SmartSIM and modify the inputs to see the effect in the watch
list.
OpenPCS supports ‘online edit’, for further information see Online Edit in
the user manual.
Note: if SmartSIM does not stop when you set a breakpoint, you probably
did not set optimization settings properly. Be sure your resource is
configured for ‘size only’.
The program must be compiled and running on the PLC. The source is opened
in an editor window.
The Editor can be switched from Monitor Mode (green colored symbol) to Edit
Mode (red colored symbol) and back via PLC->Online/Edit or the corresponding
button of the toolbar
Implement the desired changes and close the Edit Mode via PLC->Online/ Edit
again. The screenshot below illustrates changes in the desired water level from
100 to 555.
If the changes are accepted, OpenPCS recompiles the necessary unit and
downloads them to the PLC without stopping the running cycle. The changes
have bearing on the next cycle.
OpenPCS prompts a message in the output window, if the update is finished
Remark: The Changes will not be persistent on the PLC. Therefore you need
SaveSystem, an optional target system feature.
1.6 Additional
First, specify the directory (e.g. X:\ for CD-ROM) for the target driver, then
select the driver you want to install and thereafter click “Install”.
information provided with the target driver or the information provided by your
PLC manufacturer.
1.6.2 Templates
OpenPCS 2006 supports file and project templates, to minimize the effort of
creating solutions for specific tasks. Templates optimized to support particular
PLCs can be provided by the manufacturer of the PLC as part of a target driver.
Templates can be used for resources, tasks, declarations, projects, program files,
etc.
1.6.3 XML-Import/Export
Remark: SFC files created with an OpenPCS version earlier than 5.2.0 must be
resaved with a current OpenPCS version, because since 5.2.0 OpenPCS uses a
XML file format for SFC files.
2 OpenPCS Tools
2.1 OpenPCS Framework
The project is shown in the Project-Browser on the left side. The editor-pane
is located in the centre. Most editors will use split screen technology to edit
declarations in the upper pane and instructions in the lower pane. While
declarations look the same for all programming languages, instructions vary
widely. The OpenPCS Framework can host many files at the same time.
Diagnostic messages will be shown in the output window at the bottom.
2.2 Browser
The File-Pane contains a directory-tree with all your source files, collected under
the current project (1). These are the files that you write yourself, with one of
the editors of OpenPCS, or with different applications. All directories (2) and
files (3) under the current project-path are shown.
2.2.2.2 Resource-Pane
The OPC-I/O Pane contains the tree of locally available OPC-DA address spaces.
On the root level (1) it lists all the OPC-DA servers currently registered on the
working PC. Underneath the root level you can find several layers of nested
OPC folders (2) structuring the address space of the selected OPC-DA server.
Finally, as leafs in the tree, there are the OPC-Tags (3) representing the I/O
values of the OPC-DA server.
Since using the OPC-I/O Pane only makes sense for targets supporting OPC-I/O,
you can enable or disable the display of this pane via the "Extras -> Browser
Options…" dialog box.
Note: Non-local OPC-Servers are currently not supported. The infoteam OPC
Server (infoteam.PadtOpcSvrDA) is not available in this list.
You can use a library in a project by selecting it and choosing Project ->
Library->Use in current project. The libraries that are currently used in the
project are shown with a red symbol.
2.2.3 Projects
Note: This tool looks primary for inconsistencies and not for syntax errors.
In the `File`-menu: Here you find under the item `Recent Projects` a list of
the last opened projects; the file, which you are looking for, could be
contained in this list.
By the toolbar: Click on the button `Open Project`.
By the menu: Click on ` Project à Open...` in the main menu.
Select the desired project in the dialogbox or look for it in the folders. The
project files have the suffix `.var`.
2.2.3.4 Import/Export
It is possible to export your project to a PLCopen standard file with Project-
>Export and to import one with Project->Import.
2.2.4 Files
Note: It is possible to find some other template files (or structure) there,
depending on your OEM manufacturer.
i.e. Information about the properties of your PLC which will be used by
OpenPCS, and a connection name, i.e. Information about the kind of
communication between OpenPCS and the control system.
A resource maintains a list of tasks which are to be run on the control
system.
‘Generate Mapfile’: after generating the code three text files will be created
in which you find linker information. These files will be saved in the resource
directory named ‘Pcedata.txt’, ‘PceVars.txt’ and ‘PceSegs.txt’. Some other
features of OpenPCS (GetVarAddr) need this feature to be enabled, so you
better do not disable it without good reason.
For a description of optimization settings, see Optimisation Settings in
Advanced Topics.
OpenPCS currently supports the Data Access Specification (OPC-DA) Version 2.0
For further information on OPC, please consult the web page of the OPC
Foundation at
http://www.opcfoundation.org
2.2.7 Compiler
2.2.8 Online
2.2.8.2 Download
OpenPCS will automatically prompt whenever a download seems necessary.
If you like, you can at any time invoke a download yourself by using PLC->
PC->PLC (Download).
it is possible to download the project during runtime (without stopping the
PLC), If the current project already is on the resource. But so the download
is not persistent. This mostly matches the Online Edit functionality.
If your PLC supports the Save System feature, we offer you the ability to
persistently download your project without stopping the PLC.
Note: The usual download mode, stopping the PLC, is persistent anyway.
Note:
Do not confuse an instance of your code (located under ‘Configuration’ in
the Browser) with the source code of that block, located under ‘Project Files’
in the Browser.
You can display the resource info by marking the resource and selecting the
menu item PLC ® Resource info.
2.2.8.7 Upload
OpenPCS supports uploading of projects from your controller to your PC.
Therefore, it is not necessary to have the source code of your project when
updating your PLC, because you can upload the project.
To enable this feature, the ‘enable upload’ box has to be checked in the
resource properties before compiling and downloading a resource to the
PLC as shown in the figure below:
For uploading the project, make sure that the resource properties are set as
described above, and not connect to any PLC. Then go to PLC-> PC<= PLC.
Now you have to choose the connection to the PLC for uploading the
project.
After that, you will be asked, where to save the project (make sure that the
project doesn’t exist already):
2.2.8.8 Erase
This is only available in online mode. To remove the entire program from the
PLC select PLC->Erase from the menu or click the corresponding button in the
toolbar.
Note: The exact reaction varies depening on the implementation of the OEM
manufacturers of your PLC. If you want to know more about it, ask them.
To create a new file with resource global variables, select File-> New->
Declarations-> Global or File-> New-> Declarations-> Direct Global . Edit
these files, and link them to the resources you want to use them with.
General:
'Show only OpenPCS file types': If the checkbox is filled, only OpenPCS file
types are shown by the browser. All other files are hidden except of the
types listed in 'Additional file types'.
‘Don’t show SFC variables’ If the checkbox is filled, all variables with ‘_’ as
the first character are hidden in the resource tree.
‘Don’t show Tab captions’ If the checkbox is filled, the tabs of the browser
panes have only an icon and no caption.
Extended Settings:
‘Enable OPC Browserpane’ This checkbox is used to hide or show the OPC
Browserpane.
‘Enable OPC Configuration Compiler’ This checkbox is used to generate
automatically the OPC database.
‘Enable GWX Embedded in OpenPCS’ This checkbox is used to enable
opening GWX files in the OpenPCS Framework.
‘Save Watchlist’ This checkbox is used to enable auto saving of the
watchlist when going offline
Compiler:
‘Compiler output level’ This drop down menu is used to limit the amount
of compiler error messages (for most details use 0).
‘Warn if less than given percentage of PLC memory is left for resource’
This checkbox is used to enable warnings about low memory of the PLC
with the current resource. The minimal free memory can be set as
percentage.
Note: this option is hardware specific. It depends on support of OEM.
‘Warn if less than given percentage of max. segment size is left’ This
checkbox is used to enable warnings about large segments in the current
resource. The minimal free memory in segments can be set as percentage.
Margin width in %: changes the width of the margin. 100 corresponds to the
default width. The width may be set between 1 and 1000.
Note: The current version of OpenPCS provides only setting the font and size.
OEMs of OpenPCS can configure OpenPCS to start any particular tool with
this button. By default, the licence Editor will be launched.
2.3 Catalog
2.3.1 Catalog
The Catalog is a tool to insert function blocks to your programs. The Catalog is
visible below the project browser. If it is not there, go to View->Catalog.
With the catalog, you can insert function blocks to your programs by using
drag’n drop.
A double-click on an entry within the table opens the help on the function
block.
Using the Catalog, you don’t have to write the names or go through the
menues to insert a function block
Just insert the name and you will see all variables that fit to your input. You can
also use asterisks (e.g. write „*A*“ to the name field and you will get all
variables which have an „A“ in their names) and also use a combined filtering:
First enter a name and then change the dataype.
When you create new global variables, they will not automatically be shown
after saving the global variables file. Use a right-click into the variable grid and
select refresh to update the Variable_Catalog.
A POU of type Program may use Type, Local, Global and External
A POU of type Function block may contain Type, Input, Output,
In_Out, Local and External
A POU of type Function max use Type, Input and Local.
In this case the variable name is omitted, therefore the address statement is
not optional.
Example:
AT %I0.0 : BOOL (* At the address %I0.0 is a data of type BOOL *)
The second way of addressing should be avoided for the sake of clarity,
because the meaning of the variable relates to the variable name mostly.
This is important if other people should read or edit this POU.
Some Examples:
Variable with no initial value: InterMedSum : INT;
Variable with initial value: Pieces : INT := 5;
Directly represented variable without name and with no initial value:
AT %Q0.0 : BOOL;
Directly represented variable with name and with no initial value: Valve
AT %Q0.2 : BOOL;
Example function block: Counter1 : CTU;
Note:
(1) Initial Values can only be given as literals. It is not possible to use other
variables to initialize variables during declaration.
(2) The significant length of a variable name is 64
MyResult : BOOL;
END_VAR
LD MyInput_1
AND %I0.0
ST MyResult
END_PROGRAM
VAR
PreValvePressure: Pressure;
END_VAR
It is possible to combine different data types in a derived data type. Arrays and
structs can be integrated as well. The following example defines a struct A. The
struct itself consists of another struct called B and an integer array of size 5.
Three new data types are derived within B: Stationname as string and Value1,
Value2 as doubles.
TYPE
A:
STRUCT
B:
STRUCT
Stationname : STRING
Value1 : DOUBLE
Value2 : DOUBLE
END STRUCT
Arr_5_INT:ARRAY [1..5] OF INT;
END_STRUCT
END_TYPE
VAR
Data1: A;
END_VAR
PROGRAM feld
TYPE
Arr_5_INT:ARRAY [1..5] OF INT;
END_TYPE
VAR
Arr1 : Arr_5_INT;
END_VAR
.
END_PROGRAM
PROGRAM struktur
TYPE
RobotArm :
STRUCT
Angle_1 : REAL;
Angle_2 : REAL;
Grip: BOOL;
Length: INT;
END_STRUCT;
END_TYPE
VAR
Robot1 : RobotArm;
Robot2: RobotArm;
END_VAR
LD Robot1.Grip
.
.
END_PROGRAM
It is used to assign global variables to I/O ports, such as a value tag on an OPC-
DA server.
The Editor is realised as a grid table, each row representing a variable
assignment. The meaning of the columns is described as follows:
Name Valid name of the IEC variable to be assigned
IEC-Type IEC type of the variable to be assigned.
Address Address of the external data item to be assigned. The format depends
on the type of the item to be assigned. In case of OPC, this
column will contain the fully qualified OPC tag name.
OPC Type OPC specific type of the tag to be assigned.
R/O When checked, indicates that the variable shall be declared as read-only.
When unchecked, the variable is readable and writable.
Comment Optional textual comment on the assignment. It is just stored in
the assignment document but not used by the compiler and other
tools.
You can either manually enter the names of the OPC-Tags in the “Address”-
Field or use the OPC-I/O Browser pane to browse the address space and assign
the tags wanted using the menu items Edit -> Add tag or Edit -> Assign Tag.
Edit / Add tag (or double-click): Inserts a new declaration line into the
assignment editor for the OPC tag currently selected in the browser pane. If this
OPC tag is already defined within the assignment editor, the definition line is
made the current line in the assignment editor.
Edit / Assign tag: Assigns the tag from the browser pane to the currently
selected line of the assignment editor. This works only if exactly one line is
currently selected.
Using one of these functions, the OPC type of the assigned tag is automatically
determined and set to the “OPC Type” column. As the default IEC variable
name, the final component of the OPC tag name is used and can be changed
by the user as wanted. The IEC type of the variable has to be specified
manually by the user.
2.6 IL Editor
The IL-Editor supports bookmarks (to mark locations of interest for easy
navigation while editing a file) and Breakpoints.
Example:
Start: LD a (* Load a in the register *)
ADD b (* Add b to the register *)
ST c (* store result to variable c *)
A call to a function block instance is done using operator CAL and CALC
respectively; the operand is the instance name, followed by arguments
supplied in parentheses:
[<Label>:] CAL/CALC <Instance name>(
[<Input1>:=<Value1>,<Input2>:=<Value2>,...]
|
[<Variable1>:=<Output1>,<Variable2>:=<Output2>,...]
)
The parameter transfer consists of two parts. In the first part the parameters
are transferred to the function block by setting values to the INPUT- and
IN_OUT-variables respectively. The variables, which get no value, retain the
value of their last call and their initial value respectively. Separated by a ´|´
from the first part, output parameters are specified.
2.6.3 Instructions in IL
For a list of all instructions supported in IL, please see the reference section,
Instruction List Keywords.
2.7 ST Editor
The ST Editor supports bookmarks (for marking lines of interest while editing
a file) and Breakpoints.
2.7.2 Instructions in ST
Code written in ST is a sequence of ST-instructions. ST-instructions are
terminated with a semicolon.
Linefeeds are not significant, i.e. more than one instruction can be on one
line, and one instruction can use one or more line.
For a list of all instructions supported in ST, please see the reference section,
Structured Text Keywords.
2.7.3 Expressions in ST
Operands known in ST are:
Literal variables, e.g. 14, ‘abc’, t#3d_5h
Variables, e.g.: Var1, Var[2,3]
Function Call, e.g.: Max(a,b)
While operators are parts of ST-language, expressions are constructions
which must be constructed by aid of ST-elements. Operators need
operands to build expressions.
Parentheses ()
function call
Exponentiation **
Negation -
Complement NOT
Multiplication *
Division /
Modulo MOD
Addition +
Subtraction -
Comparison <, >,
<=, >=
Equality =
Inequality <>
Boolean AND &, AND
Boolean exclusive XOR
OR
Boolean OR OR
2.7.4 Comments in ST
Like all modern programming languages, ST supports comments. A
comment is any text included between ´(*´ and ´*)´, e.g.
(* Comments are helpful *)
The compiler will ignore comments when generating executable code, so
your program will not accelerate in any way if you omit comments.
Comments may span multiple lines, e.g.
(* This comment
is long and
needs more than one
line
*)
If the Editor is in the „Edit“ mode, the struct and it’s first level members will be
shown with data type information. In the „Online“ mode, the values will be
shown behind the resolvable members.
2.8.3 Network
The instruction section of the Ladder Diagram Editor is subdivided into so
called networks, which help structuring the graphic.
2.8.4 Operators
Within a ladder diagram, the term operator designates the graphical objects
contact, coil and jump.
2.8.5 Coils
The output variable is always situated to the right hand side of the network
and is connected to the right currency rail.
(1) The result of the logical connection will directly be assigned to the
output variable.
(2) The output variable will be assigned the negation of the result of the
logical connection.
(3) The result of the logical connection will ‘permanently set’ the output
variable: If the result of the logical connection is ‘1’, the output variable will
be set to ‘1’. If, however, the result of the logical connection is ‘0’, this will
have no implications.
(4) The result of the logical connection will ‘permanently reset’ the output
variable: If the result of the logical connection is ‘1’, the output variable will
be set to ‘0’. If, however, the result of the logical connection is ‘0’, this will
have no implications.
(5) Jump operations manipulate control flow. With jumps, networks may be
executed only if certain conditions hold. Jumps may be conditioned by a
binary combination result, or unconditioned, i.e. obligatory. The jump
target must always be the beginning of a network, designated by its
network label.
(6) Return jumps stop program execution within the current POU, and
continue at the point where the POU was invoked from. Return jumps may
be conditioned by a binary connection result, or unconditioned.
2.8.6 Contact
There are two contact symbols for Boolean input variables:
1.) Left is the contact symbol for a variable that must have the value ‘1’ to
make the corresponding Boolean connection true. If the variable is
associated with a physical address, the state ‘1’ corresponds to a released
interruptor or a pressed trigger.
2.) Right is the contact symbol for a variable that must have the value ‘0’ to
make the corresponding Boolean connection true. If the variable is
associated with a physical address, the state ‘0’ corresponds to a pressed
interruptor or a released trigger.
Insert-> Control Relay: Use this command to insert a control relay additional
to the logical symbol.
Attention:
A function block: can only be added to a network if it satisfies the following
criteria:
- The first input-parameter of the block has to be of type BOOL and has to have
the name "EN". If this parameter is set to FALSE in a network, the corresponding
block won't be started or even get parameters passed.
- The first output-parameter of the block has to be of type BOOL and has to
have the name "ENO". This parameter has to be set to TRUE if the block has
worked correctly and without errors.
After replacing this function by a contact, the comment above the function is
changed. Now, there’s pre-written „[CHECK!]“.
The main reason herefore is, that the semantic of the program has changed,
but the comment is still the same. This is a hint, to verify if this comment’s still
correct.
2.9.3 Connections
To connect two objects, first select the output object (output of a block, or
item on the left margin bar), then select the input (input of a function block,
or item on the right margin bar), then press Insert->Connection.
OpenPCS also supports Multiple Connections
In Name, enter the name of the object. This should be a valid IEC61131-3
variable name.
If you want the CFC-Editor to declare a variable for this margin bar object,
select IEC61131-Variable. Otherwise, if you select ‘CFC-Connector’, the
object is used only virtually, and all information is immediately propagated
to the connected outputs. This may be more economic in runtime and
memory consumption, but it prevents online monitoring.
For IEC61131-3 variables, select the declaration section from the combo-
box. The selection offered here depends on the type of block and the type
of margin bar. For some kinds of variables, you may choose to select a
physical address or an initial value.
For CFC-connectors, you can choose ‘compound block connector’, i.e. a
connection from within a compound block to the outside, ‘(connect to)
internal connector’, i.e. virtually connecting one entry on the right margin
bar back to one on the left margin bar. ‘Internal connector’ and ‘connect to
internal connector’ are similar, but the first is only available on a right
margin bar (where internal connectors are defined), whereas the latter is
available only at a left margin bar, where internal connectors may be used.
The CFC-Editor offers you several possibilities for printing. Use File->Print to
print the current level of a chart, and File->Print All to print all levels of the
loaded CFC chart.
A dialog box analogue to the Insert->Block dialog will appear, allowing the user
to select the desired new block type from a list of known firmware and user-
defined blocks.
Additionally the user may check the option “automatically replace all instances
of the block type in current plan”, which causes the replacement of all instances
(even the non-marked ones) of the currently marked block’s block type inside
the entire CFC-plan.
After selection of a new block type, another dialog box is shown, allowing the
user to map the connectors of the old and new block type for reconnection
after replacement. The left column of the displayed table lists the connectors of
the old block type together with the type and kind (VAR_INPUT/VAR_OUTPUT)
of the connector (*1). The right-hand column displays a list of adequate
connectors of the new block type.
The user can assign a corresponding connector for each connector of the old
block type. Note, that each connector of the new block may only assigned
once.
If a connector shall or can not be reconnected, “do not reconnect
automatically” can be chosen.
After clicking OK the CFC editor replaces the block(s) by (a) block(s) of the new
block type and rewires the connectors as specified in the assignment dialog.
(*1): VAR_IN_OUT connectors will show twice in the list of connectors: Once as
VAR_INPUT& and once as VAR_OUTPUT&. The “&” marker signals, that the
connector actually represents an VAR_IN_OUT parameter.
Negating an input is done via selecting the input and calling (context) menu
entry “Negate Input”. A negation circle is drawn at the connector.
The next call of (context) menu entry “Negate Input” removes the negation.
The suppression of connection lines is saved with plan and restored after
reloading.
Connection flags are are also used if a connection exists between connectors
with different page numbers. These flags are not visible in the program but if
Print comments and flags (see Print Form) is used for printing the chart these
flags can be printed.
Flags are numbered pagewise in Hex-Format.
Exception: The Operators SET and RESET cannot have alias names because the
Boolean variable that is set/reset is located above the block body.
2.9.6.15 Global ID
For each object (block, connector) a global ID is assigned to be uniquely
addressed. For blocks this ID is displayed below the name of the block. The
global ID can also be displayed via tooltip.
In empty grid cells, the caret takes the size and position of the whole cell.
At grid cells with comments, the caret takes the position and size according to
the selected comment.
At the network label, the caret takes the position and the size according to the
network title line (according to the measures of the selected network label).
At a margin connector, the caret takes the position and size according to the
measures of the selected margin connector.
The caret surrounds either the block field or a connector. The size of the caret at
a connector/block corresponds to the selection of a connector/block. The name
of an entity will not be surrounded by the caret.
grid cell contains a block, the caret jumps to the closest connector in
consideration of the starting position (margin connector).
By navigating onto the block field, the caret connector row is not changed and
will be evaluated by the next usage of <RIGHT>. The same behavior happens
for the caret connector column how we will see in one of the following
chapters.
For navigating faster between grid cells with blocks, you can jump directly
to the block field by using <ALT> + <UP/DOWN/LEFT/RIGHT>.
If there is no connector which fits to the current connector row or column (e.g.
JMPC), the caret will jump to the block field.
Attention: While working with the caret, there is no rectangle selection (rubber
band selection) possible!
Shift + Alt + arrow keys : release the caret from selection using fast navigation
Ctrl + shift + arrow keys : moving of blocks or margin connectors
Although in fact you are not limited in the length of your CFC chart, it is
easy to loose overview on a too lengthy chart. Compound Blocks are a
means to finer structure your application, hiding groups of logically related
blocks inside one `Compound Block`.
Signals between the blocks inside a Compound Block are not visible to the
outside. Outside a Compound Block, only those signals are visible that enter
or leave the Compound Block.
Compound Blocks can be nested, i.e. inside a Compound Block you can define,
or use, other compound blocks. The contents of a Compound Block can be
edited, you can add or delete blocks, rewire connections, add, modify or delete
connections leaving or entering the Compound Block.
On screen, the last input and output connector of a Compound Block is shorter
than any other connector, so you can easily distinguish a Compound Block
from other Blocks.
You can now fill the Compound Block first, by double-clicking and editing it
just like any other function chart. Or, add inputs and outputs to the
Compound Block first, editing its contents later using the already provided
inputs and outputs then.
Notes:
Currently there is no support for reverting the process of converting a group
of blocks to a compound block.
Top-Down:
Bottom-Up:
If you go one level up by clicking the appropriate symbol you see that
another shorter unused connector has been added to the compound block.
Note: The code language is selected once at the creation of the program.
The current version supports IL and ST.
Step: A step contains many actions. Actions contain code fragments. A step,
which is executing, is called ‘active’. If a step is active, the contained actions will
Initial step: Initial steps are active at the beginning of the program. Positions in
the plan could be marked by initial steps, at which the execution starts on
program start.
Simultaneous sequences: One transition may set active multiple steps at the
same time, starting a parallel chain. If all previous steps of transition T1 are
active and the transition condition is TRUE, all following steps (e.g., S1, S2) of
the simultaneous sequence will activate.
Jump: The program flow is continued at another location. The name of the
jump is the name of the activate step if the previous transition (T1) switches.
2.10.4 Transitions
Transitions are responsible for the change of the active state of previous
step(s) to the following step(s). Transitions show the possible change in
form of a true, Boolean statement (transition condition).
The code of the transition has to be written so that the current result at the
end of the code is of type BOOL. The transition switches if and only if the
accumulator (in IL), or the corresponding variable (in ST) is TRUE. The
communication with other SFC-elements occurs by local variables.
LD variable_of_temperature
GT 70
Note: (1) The last line of a transition code should always load a Boolean
value (in IL), or assign the variable, named like corresponding
transition (i.e. trans1) with the intended result (in ST).
(2) The declaration of the variable with the transition name in ST are
automatically generated and not shown. Do not use their names for
other variables (only in ST).
2.10.5 Jumps
Jumps are elements of a SFC-plan for controlling the flow of execution. With
the up to now introduced elements, the activation of the steps happens
always from top to button. For programming of cycles and similar things, a
further possibility is necessary to activate previous steps. Jumps exist to
provide this functionality.
The predecessor of a jump element is always a transition. The target of a
jump is always a step. The target of the jump is fixed by giving the jump the
same name as the selected target-step. If a step is given as a target of a
jump, its name must be unique. If a jump-target is not or more than once
available, corresponding error messages are created during the syntax
control.
To guarantee the consistency of an SFC-plan, the insertion of a jump is
possible only as the last element of a divergence of sequence selection.
Init1 was defined as targetwhich does not exist within the project. Within the
Output-window, OpenPCS prompts:
Error : "Init1" is not a valid jump target (no Stepp with the name "Init1" exists).
Only Steps are valid tagerts. Thus teh same message is promted, if a transition
is defined as a target.
2. No unique target
Two Steps are named Init. Since the step is chosen as target, OpenPCS cannot
decide which step should be used. It promts the following message in the
output.
Error : The jump target "Init" is ambigous – the following 2 steps with the
name "Init" exist:
...\CONTROLX\CHART.SFC(10,100,4) : Object : Step "Init"
...\CONTROLX\CHART.SFC(10,100,5) : Object : Step "Init"
3. No valid names
Attention: If the above commands are used in the IL-code, unsure or not
executable networks could arise!
Note: The current version does not support those commands for the ST editor.
complex code, this will not only yield a cleaner structure of your application,
but also reduce memory consumption and increase the ability to debug.
The mouse cursor will change, click the chart where you want to insert the new
block.
To re-arrange blocks, select the blocks and drag-and-drop them to their new
location.
When adding new blocks or moving existing blocks, the FBD Editor will make
room by moving aside existing blocks as appropriate.
To remove blocks from your chart, select them and press DEL.
2.11.3 Connections
To connect variables, functions, function blocks etc. just left click the margin
bar or the node at function etc. symbols. The margin bars or nodes highlighted
you connect with menu ‘Insert’ and there ‘Connection’ or just use the short cut
[CTRL] [B]. The new connection now is selected and therefore red. Without
selection it will be black.
1. Left click
2. Do the connect
To select a connection just left click on one of its ends (margin bar or node). A
selected connection can be deleted just with [DEL] or right click on margin bar
or node and selecting ‘Delete’.
Note: There are multiple connections possible starting from one source (it is not
possible to merge multple connections).
2.11.5 Advanced
Using the right mouse button a pop-up menu occurs that allows you to add a
new network, jump to the next or jump to the previous.
(*1): VAR_IN_OUT connectors will show twice in the list of connectors: Once as
VAR_INPUT& and once as VAR_OUTPUT&. The “&” marker signals, that the
connector actually represents an VAR_IN_OUT parameter.
Quadrant I
Quadrant is the matrix cell, which is used to display certain attributes of the
matrix such as location within the name of the application, version, date of
creation, date of modification, date of certification, Safety Integrity Level,
project tree, dimension, etc.
Quadrant II
In quadrant II all causes are listed from top to down. The alignment of a cause
line visualizes the entering of the safety-related input signal into the matrix on
the left side. A cause line is defined through the name and the safety function of
a cause. The safety function determines how many input variables have to be
assigned and how many output variables have to be written: e.g. an emergency
stop has one input variable; a SF_TwoHandControl_TypIII has two input
variables [4], both have one output. The input signals are processed according
to the safety function. The safety function is selected through a combo box in
the cell.
If pre-certified safety functions are used, the matrix allows creating a safety
application which is easily certifiable. The integration of a pre-certified function
Fig. 4. Three examples from Safety Software Technical Specification [4]. All
variables that are owner of a prefix S_ are SAFEBOOL variables.
Quadrant III
In quadrant III all effects are listed from left to right. An effect line is one row of
the grid. This alignment of the effects within the matrix visualizes the exit of the
safety-related signals from the top of the matrix into the periphery. An effect is
defined by its output variable. An effect is always the answer to the question “Is
something safe”. The input of an effect line is the result value of all causes,
which are interconnected with that effect line. The semantic how the
interconnections are merged together is explained in next chapter “Quadrant
IV”. The effect simply maps its input to its output variable according to a TON
or TOF function block that can be used to adapt the time behavior of the effect.
An effect provides a special attribute to configure the default mapping of an
assigned cause AND, OR, MAJORITY.
Quadrant IV
The intersections are the heart of the implementation of any Cause & Effect
application. Therefore most of the programming rules apply to the
intersections’ quadrant IV.
Quadrant IV contains all interconnections between the causes and the effects. It
is possible to map one output of a cause to each effect that has to respect that
cause. This is a "1 to n" relationship. On the other hand it is possible to map
every cause to one effect line. All causes in one intersection column below an
effect line are connected to that single effect. The results of all causes have to
be merged according to the semantic rules to one single SAFEBOOL value
which is the input for the effect.
If the function is specified the needed inputs apear in the left column. They are
represented through default variable names.
E.g.:
After drag and drop of the variables from variable window onto the name of the
variable the variable names and the addresses are assingned.
If the user does not specify any operation mode, the Cause is valid for all
operationmodes. At the moment there are available three different operation
modes:
1. Auto <-> automatic mode
2. Manu <-> manual mode
3. SemiAut <-> semiautomatic mode
Negation (optional)
item `PLC® Set variable`, or click directly on the variable in the T+C. Enter the
new value and accept by `Set`-button. See also Force Variables
There is always a default Watch List file with the name <name of your
resource>.WL in the project root directory.
While online, a Watch List is saved through the main menu command: SPS ->
Save Watch List As…
The saved Watch List will then show up in the Browser’s File pane. After saving,
all subsequent modifications of the variable list will be stored in this Watch List.
The OPC variables are visible in the left column, called signal tree. The signal
can be grouped by their type (analogue or digital) or the the files, they are
defined in. A new plot can be started via double clicking a variable. The user
can append variables to the plot bey dragging the variables onto the graph.
Each graph gets a unique color and y-axis.
The user can open the properties via right-clicking within the plot.
The user can edit the colors and fonts of a plot and the general appearance of
the analyzer. Under signals, the user can give graphs an offset and differ the
design. The axis can be set up in the respective sections.
Notes:
To use the Control Data Analyzer the used PLC has to support TFR (Transient
Fault Recorder). This is a real-time database for all runtime variables configured
to be captured by the TFR. The runtime system provides the data through its
standard communication channels of the online server. The infoteam SmartSim
and the infoteam SmartPLC/OPC do so.
2.14.2 Oscilloscope
The oscilloscope is a Cartesian coordinate system displaying signals over time.
Markers support measuring tasks. Three modes and triggers support display
control.
Signals are added by the signal tree. The trigger event is displayed at the
middle of the x-axis. Each time data is relative to that event. The y-axis is
centered to 0.
The toolbar enables switching between three modes: Run, Stop and OneShot:
Run: the arriving data is constantly checked to the defined trigger. If the trigger
event happens, the signal chart is centered on it.
Stop: The triggering is stopped immediately; thereby a happening trigger event
is irrelevant. The view switches to the navigator.
OneShot: Once a trigger event is identified, the mode switches to Stop mode.
2.14.3 Trigger
The current trigger can be accessed via the context menu of the caption, the
trigger button or the oscilloscope properties dialog.
There are two different triggers: a fixed one and a delayed one. The fixed one is
just a simple trigger, the delayed one consists of three simple triggers: A, B and
Reset. The delayed one is only satisfied, if B happens after A before Reset
happens.
A simple trigger is satisfied depending on the set conditions and its mode.
Conditions are value and kind of edge of the connected signal.
The value may only be in whole numbers – the data of the signal is rounded
down.
The edge of the signal can be rising, falling, alternating (vertex), or „rising or
falling“.
Depending on the mode the trigger is treated:
Normal: the trigger is satisfied if all conditions match.
Automatic: the trigger is satisfied if all conditions match or a defined count of data samples is processed
without matching conditions.
Automatic (level): the trigger is satisfied if all conditions match. If the conditions do not match for a certain
count of data samples, the value is automatically set to the half of the amplitude of the signal and the flow
continues as in automatic mode.
2.15 SmartSIM
To prevent SmartSIM from loading the program stored on disk, keep CTRL and
SHIFT pressed at start of SmartSIM.
Note:
1. Possible keys are ‘+’, ‘-’ and all ascii signs in the interval from 0x1F to
0x7F.
2. To provoke the interrupt pressing a key, the SmartSim needs to have
the focus on.
Select the Default Properties tab and select the options as in figure below:
Make sure the access permissions window contains at least the following entries:
Everyone
Interactive
Network
System
Domain Administrators
Domain Users
If these entries are not shown, click the Add button, then click Advanced
and Find Now. This lists all groups and users (if not, make sure that for
object types Groups is selected). Select the groups and press OK, also in the
next window. This adds these groups.
For domain users proceed as described in 3., but for location specify the domain name.
Repeat steps 2. to 4. for Launch and Activation Permission. Afterwards close the My Computer
Properties window. Now the setting changes are finished.
The computer has to be restarted to accept changes.
Now enter the name of the connection to be created. Take care that the
connection name has not got any spaces in it. Use the underscore (`_`)
instead of space. Select a driver by clicking on the select button, the Driver
Select window showing driver settings opens:
Click the desired driver and then the OK button. The Connection Properties
window now becomes active again. Click the settings button. The Driver’s
Settings dialog box opens:
You can modify the settings individually. When you agree with the adjusted
settings, just click OK, otherwise click cancel. If you want to place a remark, you
can do this at the Connection Properties window. Finally, click OK from the
Connection Properties window.
2.19 Compiler
The commands and options are preceded by either a slash (/) or a dash (-)
and are not case sensitive. Multiple commands per call are allowed.
Commands:
1. -s: performs a IL syntax check on the files following the command
-c: compiles all files following the command
1. -p: creates prototypes for all program organization units specified in
the list of files following the command
2. -i: creates include files for all program organization units specified in
the list of files following this command
3. -l: creates a file with all dependencies for the program organization
units specified in the list of following this command.
If more than one command is used in a call of ILC.EXE than every single
command applies to all files following the commands.
Options:
-o: with this option the user can specify an output directory or the
target path name if a single resource is built. If -o is followed by a
directory name the targets are stored in the specified directory.
-g: the input files (*.poe files) are no located resource global
variables
-m: the input files (the files specified after the command) are located
resource global variables
-x: dump object files
-f: suppress final error information
-b: Use short file names. ILC presupposes that the filenames of POUs
whose names are longer than eight characters are cut down to eight
characters.
-w: by using this flag the user can specify the output level for the
output information. It has to be followed by an integer that
indicates the output level. The following values are defined for the
"OutputLevel":
0: print all available informations. I. e. errors, warnings and info-
messages.
2: suppress warnings.
4: suppress info-messages (e.g. Compiling c:\test\test.poe).
6: suppress warnings and info-messages.
Please note that error messages are printed always and can not be
suppressed.
-y: write the initial data segment of the POUs to be compiled in a
text file. This command should be used, to obtain the initial data
segment of firmware POUs for the <hardware>.ini file.
2.19.3 Linker
Options:
-o: specify an output directory or the target path name if a single
resource is built. If –o is followed by a directory name the targets are
stored in the specified directory.
-g: the input files (the files specified after the command) contain
object information about the resource global variables.
-s: the file specified after the option contains the packed sources of the
resource. The content of this file is inserted in the resource global
segment table. This option is valid only in combination with the
command ‘-r’.
-x: dump object files
-w: by using this flag the user can specify the output level for the
output information. It has to be followed by an integer that indicates
the output level. The following values are defined for the
"OutputLevel":
0: print all available information. I. e. errors, warnings and info-
messages.
2: suppress warnings.
4: suppress info-messages (e.g. Compiling c:\test\test.poe).
6: suppress warnings and info-messages.
Please note that error messages are printed always and can not be suppressed.
2.19.4 Make
The commands and options are preceded by either a slash (/) or a dash (–)
and are not case sensitive. Multiple commands per call are not allowed.
Commands:
-p: build all resources in the specified project(s). This command
must be followed by at least one project-file-path (VAR-file-path).
-m: build the specified resources. This command must be followed
by a list of resource file names and the specifier –v followed by the
project-file-path. The resources to be build, must all be part of the
project specified by the VAR-file-name.
1. -u: uncompress archive. This command must be followed by a file
name which contains the archive to uncompress.
-y: create the initial data segment of all POUs in the project and
write it in a text file. This command should be used, to obtain the
initial data segment of firmware POUs for the <hardware>.ini file.
Options:
-o: with this option the user can specify an output directory or the
target path name, if a single resource is built. If –o is followed by a
directory name the target(s) is stored in the specified directory.
-e: this option is reserved for future implementations. It enables the
user to specify a target path for output messages. If an error file is
specified, the user output is printed in the specified file instead on
stdout. If –e is followed by a directory name an error file is created
for every compiled or linked entity and the error files are stored in
the specified directory.
1. -i: Incremental build, i. e. only changed files and files affected by this
changes are recompiled and linked.
-s: Use short file names. ITMake presupposes that the filenames of
POUs whose names are longer than eight characters are cutted
down to eight characters.
-w: by using this flag the user can specify the output level for the
output information. It has to be followed by an integer that
indicates the output level. The following values are defined for the
"OutputLevel":
0: print all available information. I. e. errors, warnings and info-
messages.
2: suppress warnings.
4: suppress info-messages (e.g. Compiling c:\test\test.poe).
6: suppress warnings and info-messages.
Please note that error messages are printed always and can not be
suppressed.
-b: use short file names. If this option is specified and the name of a
POU exceeds eight characters, the compiler uses the first eight
characters of the POU name as it’s file name.
Enter your name and company information on top, and up to nine pairs of
serial numbers and licence codes in the boxes below.
Notes:
(1) If you have got a valid licence, run this licence.
(2) For details on licences installed, press ‘Info’.
3 Advanced Topics
3.1 Runtime issues
3.1.1 Multitasking
Multitasking is highly target dependent. The behavior described here is the
standard as implemented by OpenPCS, but can be different for any
particular target device. If in doubt, check with the supplier of your
controller.
3.1.2 Interrupts
Interrupt tasks are executed immediately after an interrupt rises. There are three
different interrupt types pre-defined in OpenPCS supported by infoteam
SmartSim and infoteam SmartPLC/OPC. Please see documentation of your OEM
for supported interrupt types.
Interrupt types:
STARTUP: rises each time the PLC is started (Coldstart/Warmstart/Hotstart).
3.1.6 Performance
There are some obvious and some not so obvious factors influencing the
performance of your application:
Obvious factors include the performance of your platform, including I/O and
networks, the size of your application, measured in lines of code or in bytes
required at runtime. A native code compiler, if available, will typically increase
performance.
Not so obvious factors include
1. Task structure of your application: more tasks will typically reduce
performance due to additional overhead in task switching. Removing code
from fast, or cyclic tasks, and moving it to less often executed timer tasks, or
executing them only when needed in interrupt tasks, can on the other hand
tremendously increase throughput.
2. While native code typically executes faster, task switching is less responsive. So
even when native code is available, there is reason to leave the cyclic task with
UCODE (optimization size) and have only timer and interrupt tasks in native
code for maximum performance and minimum task switch and jitter.
3. While all code compiled to the target uses Instruction List as the common
intermediate language, code produced by the different editors varies. While
for some applications some languages might be the best choice, things can be
completely different for other applications. Carefully evaluate the different
editors and languages and pick your favourite ones for the different
applications.
3.3 Documentation
3.3.1 Crossreference
See also Cross-Reference (per variable) and CFC Crossreference.
To create a cross reference list for your project, right-click the active resource
and select ‘crossreference list…’ from the context menu.
A preview of the cross reference will be displayed, which can either be viewed
and navigated online, or printed.
where
source is a name on the right margin bar, i.e. designs a signal leaving one
compound block
destination is a name on the left margin bar, i.e. designs a signal entering a
compound block
name is the variable name automatically generated by the CFC editor for
that signal. Use that name to find this signal in the Test and Commissioning
Tool to monitor the value of that signal.
chart is a path of names of compound blocks. Use that to find the location
either in CFC-Editor by opening one sub-compound block after the other in
the specified order, or by locating the printed chart via the table of
contents.
page is the page of the printout, where the corresponding
source/destination is found.
line is the position of the connection at the block corresponding to the
margin bar.
The entries are sorted by source/destination, refer to the file stored if you
need other sort sequences.
Now move block ADD into a compound block A and block SUB into a
compound block C. Open block A and move ADD further down into a new
compound block B. Open block C and move the SUB block further down
into a new compound block D. Enter reasonable names for all margin bar
entries. If you open all blocks, the result will look like that:
With this small sample, output of the CFC cross-reference will look like:
3.3.5 Print-Options
All OpenPCS tools support forms for printing, and will automatically use the
print form assigned to the project. If no print form is assigned to a project a
default header and footer is printed.
To configure the project print form choose Extras->Tools->Print-Options:
There the print form can be selected, print form depending aliases (*) can be
set, date and time format can be localized.
Additional options:
Print front page: a front page is printed consisting of the current print form and a rich text file “cover.rtf” located
in the project folder. If “cover.rtf” is missing, only the print form is printed.
Print comments: cfc commentaries are printed on additional pages (after the corresponding chart) (only cfc).
Print comments and flags: cfc commentaries and an itemization of existing connection flags including name,
global ID, page number and grid position are printed on additional pages (after the corresponding chart). (only cfc)
Print comments on previous page: The additional pages for comments are printed preceding to the the
corresponding chart. (only cfc)
Note: The aspect ratio of the print form should correspond to the printer
configuration (especially when the print form contains images). The size is
independent.
3.4 Libraries
If you receive a library from your supplier, you will not have to `create` that
library. Proceed with `installing` this library instead!
Example:
Start the Browser and create a new project named `MyLib` using ProjectàNew...
Create a function block named `det_edge` (for edge detection): New à
Functionblock à IL. Implement this function block as shown below:
VAR_INPUT
input : BOOL ;
END_VAR
VAR_OUTPUT
output : BOOL ;
END_VAR
VAR
tempvar : BOOL ;
END_VAR
LD input
ANDN tempvar
ST output
LD input
ST tempvar
Use the `browse`-button to locate the .VAR file representing your project. If you
created the library yourself, this will be in the directory you specified when
creating the library project with ProjectàNew.... If you received the library on a
disk, this can be something beginning with `A:\`. During installation, the library
project will be copied into a sub-directory of <windows>\ openpcs.500\Lib.
Example:
Create a new project in the Browser using ProjectàNew.... Name that new
project `TEST`.
Select Project->Libraryà Install New....
Now use the browse-button to locate the MyLib-project you created just before
and press `Ok`.
Example:
VAR
sig1 AT %I0.0 : BOOL ;
anEdge : DET_EDGE;
count : UINT ;
END_VAR
CAL anEdge (
input := sig1
|
:=output
)
LDN anEdge.output
JMPC ende
LD count
ADD 1
ST count
ende:
Compile that program, add it to a resource of your choice and execute it.
Change input %i0.0 and see variable count incremented.
Example:
Mark the Library "MyLib" in the Library-pane.
Select Project->LibraryàUninstall. In the dialog, select <Windows>\
openpcs.500\MyLib`.
Press OK, and `MyLib` is no longer available as a library.
3.5 CANopen
functions via predefined function blocks. This requires a PLC with a CANopen
interface.
CANopen services for PLC programs according to the IEC61131-3 standard are
defined in the CiA (CAN in Automation e.V.) Draft Standard 405. These
standards are the basis for providing these CANopen functions.
From the point of view of CANopen, the PLC represents a ‘regular’ I/O module,
with its inputs and outputs not available to the user on standard connectors,
but in form of network variables mapped into the process image. The
appearance of the PLC, in regards to its networked inputs and outputs, can
change depending on the number and size of the network variables used in the
PLC program. This means that the same PLC can appear differently to the
CANopen network if different PLC programs are executed. In order to support
such flexible behavior, the PLC utilizes a dynamic Object Dictionary, a structure
for managing variables as well as communication and mapping parameters
similar to the ones used in databases. Regular CANopen I/O modules usually
have a static Object Dictionary.
PLC network variables are stored in the index range A000h – AFFFh within the
Object Dictionary in accordance with the CiA Draft Standard 405.
The following terms are important for further explanations of the integration of
control units with decentralized I/O expansion modules:
Mapping:
Mapping describes the connection between variables, as well as inputs and
outputs to the corresponding bytes and bit positions within a CAN message.
CANopen Configurator:
The CANopen Configurator or Configuration Tool is a special software tool that
enables design and management of CANopen networks, interconnection of
inputs and outputs on various devices, as well as configuration of network
parameters. Furthermore, the CANopen Configurator is used to connect
network variables of a PLC program to the corresponding inputs and outputs
on the CANopen I/O module. A CANopen Configurator is always a separate
software tool and NOT included in the delivery contents of the OpenPCS
IEC61131 programming system. We recommend the program ‘ProCANopen’
available from the company Vector Informatik.
EDS File:
The EDS file (Electronic Data Sheet) is provided by the manufacturer of a
CANopen device. The file describes the basic device characteristics, such as
available I/Os, factory default mapping and network communication
configuration, as well as parameters that can be modified by the user.
DCF File:
The DCF file (Device Configuration File) is generated by the CANopen
Configurator as a result of the configuration process. The CANopen
Configurator uses the EDS file as a template and adds available entries via
parameters configured by the user including identifier and mapping.
In order to assign decentralized I/Os to a PLC, the active network variables are
linked to applicable inputs and outputs on the CANopen I/O module within the
PLC program. In general this requires the use of a CANopen Configurator. In
contrast to standard CANopen I/O devices, there is no EDS file available for a
PLC that indicates the number and type of available inputs and outputs. On a
PLC only the user defines, with its specific application program, the number
and type of inputs and outputs are accessible via the CANopen network. This is
done by defining the corresponding network variables. For this reason, only a
generic EDS file is available for PLCs which define that the control unit supports
dynamic objects.
In contrast to I/O devices with static inputs and outputs, a PLC features
dynamic objects, in other words, the current network variables defined in
the corresponding PLC program. Because the manufacturer has no
knowledge about objects created during runtime, corresponding object
entries do not appear in the EDS file. Therefore, a Configurator is always
required when linking dynamic objects. The results of the configuration
process are then stored in the DCF file. The IEC61131 programming system
utilizes the DCF file generated by the Configurator in order to assign the
network variables declared as VAR_EXTERNAL and, furthermore, creates the
necessary control information for the network layer.
The network parameters used to exchange process data are defined
according to user requirements with the help of a CANopen Configurator.
If this input field does not exist in your dialog box, please contact the
manufacturer of your hardware.
VAR_EXTERNAL
NetVar1 : BYTE ;
NetVar2 : UINT ;
END_VAR
Similar to the section VAR in the free variable editor the section VAR_EXTERNAL
must be entered by hand. When using the syntax controlled variable editor the
network variables must be defined in the section External. Switching between
free and syntax controlled variable editor is done with the menu <Extras -->
Variable Editor> located in the ‘POE-Editor’ program.
The same symbolic names that are defined for the process data in the
corresponding DCF file must be used as names for the network variables. The
variable name is the common relation between the IEC61131 PLC and
CANopen.
A data type that is compatible for both IEC61131 and CANopen must be
chosen as type of the network variables.
According to the IEC61131 standard the chosen data type must match the
usage of the network variable (logic, arithmetic) when declaring the variable in
the PLC program. No clear arrangement between IEC61131 and CANopen is
however available.
Note:
No clear arrangement in regards of data types between IEC61131 and
CANopen is available. For this reason the IEC61131 data type used in the PLC
program must be select according to the usage of the corresponding variable.
Data Type Assignment between IEC61131 and CANopen:
3.5.6 Synchronisation
The majority of the CANopen function blocks for the IEC61131-3 are
implemented asynchronously with the PLC program. The process
synchronization between CANopen and the PLC program occurs with the help
of the component signals ENABLE and CONFIRM.
After the PLC program has initialized all the input variables, it sets the input
ENABLE to TRUE and gives the command that the CANopen component be
called (call #1). The component recognizes a positive transition on the input
ENABLE, and subsequently takes on all input values and starts the
corresponding CANopen service (step (a)). Finally the component returns to
the PLC program, whereby the initiated CANopen service continues to be
processed in the background.
By the time the CANopen service has been completely processed the
function block will be called multiple times by the PLC program. The input
ENABLE must remain set to TRUE during this time, in order to allow for the
execution of the CANopen service in the background (calls 2 and 3).
After successful completion of the CANopen service, the function block sets
its output CONFIRM to TRUE. This signals to the PLC program the end of
the service by CANopen and also shows that any additional output variables
are now set with valid values (for example with the data read from a node,
step (b), call 4).
The PLC program provides the function block with proof that the CANopen
service has been completed by setting the input ENABLE to FALSE. At the
same time the PLC program signals that it has adopted the output variable
delivered by the function block (step (c), call 5). In the last step the function
block sets its output CONFIRM back to FALSE, so that the system is back in
its output state (step (d)).
Note:
As a rule, the network layer allows the execution of only one CANopen
service that is not simultaneous with the execution of the PLC program.
With the start of this service by setting the input ENABLE to TRUE (step 1),
access to the network layer is locked, preventing use by other function
blocks. This lock state is maintained until the function block in question is
called once again (step 4) by setting the ENABLE input to FALSE again after
completion of the service (FB sets its output CONFIRM to TRUE, step 3). The
intermediate call of the other CANopen function block will lead to the error
report TRANSFER_BUSY on the ERROR output.
The output CONFIRM changes from FALSE to TRUE only after successful
completion of the current CANopen service. Possible errors are shown on
outputs ERROR and ERRORINFO. Thus it is required that an PLC program
monitors the value of ERROR in additon to the output CONFIRM, in order to
be able to evaluate errors that have occurred as well.
Calling the function block with the ENABLE input set to FALSE will cause the
CANopen service that is active in the background to abort, and result in an
internal reset of the function block. At the same time the output CONFIRM
will be set to FALSE and the outputs ERROR and ERRORINFO will be set to
the value NO_ERROR.
To characterize the state that a CANopen device is suppose to switch to, the
CiA Draft Standard 405 defines the specific data type
‘CIA405_TRANSITION_STATE‘. The constant values match the corresponding
definition of the CiA Draft Standard 301.
3.6 IEC61131-3
constants
'$''’ The Apostrophe ‘’’
'$$' The $ sign itself
'$L' or '$l' Line Feed
'$N' or New Line
'$n'
'$P' or Form Feed
'$p'
'$R' or '$r' Carriage Return
'$T' or '$t' Tabulator
Example
Character Meaning and Length
Constant
'A' Single character A,
length=1
'' Blank character,
length=1
'' No character, length=1
'$R$L' Carriage Return, Line
Feed, length=2
'$0D$0A' Carriage Return, Line
Feed, length=2
Examples:
TYPE
name: STRING(15) := ‘John Q. Public’; (*maximum string length 15*)
address: STRING(50) := ‘Main Street 1, 12345 Springfield, ???‘; (*maximum
string length 50*)
END_TYPE
VAR
user: name; (*maximum string length 15*)
id: string(8) := ‘12345678’; (*maximum string length 8*)
phone : STRING; (*maximum string length 32*)
END_VAR
3.6.1.3 Constants
Within a literal constant, underscores are allowed to increase readability. Such
underscores have no meaning regarding the value of a constant. Literal
constants for some data types require a special prefix
local variables will not be kept from one call to the next. A function may call
other functions, but it is not allowed to call instances of function blocks.
TIME T#0s x
DATE D#0001-01-01 x
TIME_OF_DAY TOD#00:00:00 x
DATE_AND_TIME DT#0001-01-01- x
00:00:00
STRING `(the empty string) x
3.6.2.12 Table 15: Location and size prefix features for directly represented
variables
Keyword Yes No
VAR x
VAR_INPUT x
VAR_OUTPUT x
VAR_IN_OUT x
VAR_EXTERNAL x
VAR_GLOBAL x
VAR_ACCESS x
RETAIN x
CONSTANT x
AT x
Comment:
If you are using TIME-values, only TIME_TO_DINT and DINT TO_TIME are
implemented. Other TIME-cast-functions are only available within the
Ladder-Diagram-Editor.
For no. 1, (*) is the input variable data type and (**) is the output variable
data type. The following data types are supported:
BOOL
BYTE
DINT
DWORD
INT
REAL
SINT
STRING
TIME
UDINT
UINT
USINT
WORD
14 SUB - x
15 DIV / x
16 MOD x
17 EXPT ** x
18n MOVE x
18s := x
7 EQ x
8 LE x
9 LT x
10 NE x
x
13 DATE_AND_TIME_TO_TIME_OF_DAY
x
DATE_AND_TIME_TO_DATE
14
15 RTC x
4 S (set stored) x
5 L (time limited) x
6 D (time delayed) x
7 P (pulse) x
8 SD (stored and time delayed) x
9 DS (delayed and stored) x
10 SL (stored and time limited) x
4 AND N,( x
5 & N,( x
6 OR N,( x
7 XOR N,( x
8 ADD ( x
9 SUB ( x
10 MUL ( x
11 DIV ( x
12 GT ( x
13 GE ( x
14 EQ ( x
15 NE ( x
16 LE ( x
17 LT ( x
18 JMP C, N x
19 CAL C, N x
20 RET C, N x
21 ) x
7 Divide x
8 Modulo x
9 Add x
10 Subtract x
11 Comparison x
12 Equality x
13 Inequality x
14 Boolean AND x
15 Boolean AND x
16 Boolean Exclusive XOR x
17 Boolean OR x
Horizontal/vertical connection:
5 ISO/IEC 646 `plus` character x
6 graphic or semigraphic x
Line crossing without connection:
7 ISO/IEC 646 characters x
8 graphic or semigraphic x
Connected and non-connected corners:
9 ISO/IEC 646 characters x
10 graphic or semigraphic x
Blocks with connecting lines
11 ISO/IEC 646 characters x
12 graphic or semigraphic x
Connectors using ISO/IEC 646
13 characters: x
14 Connector, Continuation of a connected x
line
graphic or semigraphic
D
L
N
P
Q
Precision of
-
representation of
seconds
in type
TIME_OF_DAY and
DATE_AND_TIME
2.3.3 Maximum
- number of array 6
subscripts < 4KB per POU
- array size < 8KB per POU
- number of structure
elements
- structure size
- number of variables
per declaration
2.3.3.1 Maximum number of < 64 KB per POU
enumerated values
2.3.3.2 Default maximum 32
length of STRING
variables 253 [see note 1]
Maximum permissible
length of STRING
variables
2.4.1.1 Maximum number of 5
hierarchical levels
Logical or physical
mapping
2.4.1.2 Maximum number of -
subscripts
-
Maximum number of
subscript values >512
Maximum number of
levels of structures
2.4.2 Initialization of system The value of the
inputs system inputs
corresponds to their
physical values
2.4.3 Maximum number of
variables per declaration < 64 KB per POU
2.5 Information to
determine execution No
times of program
organization units
2.5.1.1 Method of function Textual
representation
2.5.1.3 Maximum number of limited only by
function specifications available memory
Maximum number of
steps per SFC
2.6.3 Maximum number of -
transitions per SFC and
per step
2.6.4 Action control -
mechanism
2.6.4.2 Maximum number of -
action blocks per step
2.6.5 Graphic indication of -
step state
Transition clearing time
Maximum width of
diverge/converge
constructs
2.7.1 Content of RESOURCE -
libraries
2.7.2 Maximum number of -
tasks
Pre-emptive or non-pre-
emptive scheduling
3.3.1 Maximum length of unlimited
expressions no
Partial evaluation of
Boolean expressions
3.3.2 Maximum length of Unlimited
statements
3.3.2.3 Maximum number of Unlimited
CASE selections
4.1.1 Graphic/semigraphic Graphic
representation
Restrictions on network
topology
4.1.3 Evaluation order of -
feedback loops
a selection function
Division by 0
3.7.1 Breakpoints
OpenPCS supports Breakpoints in textual languages ST and IL. Breakpoints
are currently not supported in Native Code, so set optimization to "size".
Breakpoints are not supported with all targets due to hardware restrictions.
Breakpoints are not saved, so set new breakpoints before starting a newly
downloaded application.
If a breakpoint is reached in any one task of the OpenPCS application,
execution of all tasks will immediately be stopped. When single-stepping,
continuing to the next breakpoint, etc. it is undefined and left to the target
if other tasks should be executed in the meantime. Therefore it is
recommended to have one task only when single-stepping intuitively.
Stopping a controller with breakpoints and single-stepping can disable
many of the safety precautions in your controller and your application, so be
sure to take appropriate measures so guarantee damage to be avoided.
As a restart is not necessary, variable values of program parts that are not
affected by the changes will keep their current values (i.e. they will not be reset
to their initial values). This, however, is dependent on the complexity of the
changes.
Impact of changes:
Variables are only reset to their initial values if a initial value of a variable in their
segment changes. So changes within the code or of the type, scope, name, ...
of variables do not affect the current values of the variables (even
adding/removing of variables).
Attention: If the target system does not support Save System the changes are
not persistent. The System should be saved afterward via PLC -> Save
System… if the changes should be persistent on the controller. For further
Information see the respective section.
Note 1: Strictly, functions are also POUs. Since they are stateless, they need not
be treated by Online Edit, however.
Note 2: Online Edit is supported from OpenPCS version 5.3.0 on. It requires
Target System version 5.2.2 or above.
4 Reference
4.1 Keywords (by category)
NEG
OR
REAL_TO_*
RIGHT
ROL
ROR
SHL
SIN
SHR
SQRT
TAN
TIME_TO_*
TRUNC
XOR
RIGHT
ADD
ADD (time)
DIV
DIV (time)
MUL
MUL (time)
SUB
SUB (time)
DWORD
INT
REAL
SINT
STRING
TIME_OF_DAY
TIME
UDINT
UINT
WORD
END_TYPE
END_VAR
RETAIN
TYPE
VAR_GLOBAL
VAR_IN_OUT
VAR_INPUT
VAR_OUTPUT
VAR
S BOOL
R BOOL
Mathematical Operations:
ADD
SUB
MUL
DIV
Load/Save Instructions:
LD ANY
LDN ANY_BIT
ST ANY
STN ANY_BIT
Logical Operators:
GT
GE
EQ
NE
LE
LT
:= (Assignment)
BY
CASE
DO
ELSE
ELSIF
END_CASE
END_FOR
END_IF
END_REPEAT
END_WHILE
EXIT
FOR
IF
OF
REPEAT
RETURN
TO
UNTIL
WHILE
4.1.9 CANopen
CAN_RECV_EMCY
CAN_RECV_EMCY_DEV
CAN_NMT
CAN_GET_STATE
CAN_SDO_WRITE8
CAN_SDO_READ8
CAN_GET_CANOPEN_KERNEL_STATE
CAN_GET_LOCAL_NODE_ID
CAN_REGISTER_COBID
CAN_PDO_READ8
CAN_PDO_WRITE8
CAN_SDO_READ_STR
CAN_SDO_WRITE_STR
CAN_WRITE_EMCY
CAN_RECV_BOOTUP_DEV
CAN_RECV_BOOTUP
CAN_ENABLE_CYCLIC_SYNC
CAN_SEND_SYNC
4.1.10 Others
ACTION
ANY
ANY_BIT
ANY_DATE
ANY_INT
ANY_NUM
ANY_REAL
CD
CDT
CLK
CONFIGURATION
CU
CV
D(DATE)
D(Action Qualifier)
DS
DT
END_ACTION
END_CONFIGURATION
END_RESOURCE
END_STEP
END_STRUCT
END_TRANSITION
ET
EXPT
FROM
IN
INITIAL_STEP
Interval
L(Action Qualifier)
Lreal
Lword
N (Action Qualifier)
On
P(Action Qualifier)
Priority
PT
PV
Q(Parameter)
Q1
QD
QU
R(Action Qualifier)
R1
READ_ONLY
READ_WRITE
Release
Resource
RTC
S(Action Qualifier)
S1
SD
SEL
SEMA
Single
SL
STEP
Task
TOD
Transition
ULINT
USINT
VAR_ACCESS
WITH
)
ST f
Notes:
This is an instruction in language Instruction List
It is defined by IEC61131-3
4.2.2 *_TO_BOOL
0 is converted to false, everthing else to true.
The conversions String_to_bool and Real_to_bool are described in the
respective sections.
4.2.3 *_TO_STRING
Inputs
original data type *
Returns
converted data type string
The function block converts the first value of type * into the same value of type
string.
The following data types can be converted:
BOOL
true -> ‘true’
false -> ‘false’
REAL
For converting string function Sprintf(str, “%#g”, value); is used.
Examples:
0.0 -> ’0.000000’
123.45678 -> ’ 123.456’
-12.345678 -> ’ –12.3456’
12345678.9 -> ’ 1.23457e+007’
0.000000123 -> ’ 1.23000e-007’
4.2.4 ABS
Input
In: ANY_NUM
Returns
ANY_NUM
Notes:
Returns the absolute value of the input.
Please note the following anomaly of the ABS function: The mathematical
understanding of the ABS function is that it will never return a negative
value. The signed integer data types in IEC61131-3 have a defined range of
values which is asymmetric, e.g. SINT from -128..+127. As defined by
IEC61131-3, the ABS function will return the same data type that it is
provided as an input, e.g. when called with an SINT input, ABS will return
an SINT output. The absolute value of -128 obviously is +128, but when
passed to ABS for type SINT, exceeds the range of SINT and hence cannot
be expressed. This overflow is, for performance reasons, silently ignored by
OpenPCS, the result returned being undefined. If you need to rely on the
negative maximum value to be properly handled, use a data type with a
wider range, or check inputs.
This does not apply to the ABS function as called by the Ladder Diagram
Editor, this ABS function will signal overflow via the ENO output.
4.2.5 ACOS
Input
In: REAL
Returns
REAL: arcus cosine of input
4.2.6 ACTION
This keyword is defined by IEC61131-3 for the textual representation of
programming language SFC. OpenPCS does not support the textual
representation of SFC, hence you will not be able to enter this keyword. You
will see this when printing SFC.
4.2.7 ADD
Inputs
In1: ANY_NUM
In2: ANY_NUM
Returns
ANY_NUM sum
Addition of two numbers. See Table E.1: Error conditions for result on
overflow.
Notes:
Standardization: this is an operation defined by IEC61131-3.
The feature Append Input Connector is available for this function block
Notes:
Standardization: this is an operation defined by IEC61131-3.
4.2.9 AND
Inputs
IN1: ANY_BIT Input 1
IN2: ANY_BIT Input 2
Returns
ANY_BIT logical, bit by bit AND of Input 1 and Input 2
Notes:
Standardization: this function is defined by IEC61131-3.
The feature Append Input Connector is available for this function block
4.2.10 ANDN
Inputs
IN1: ANY_BIT Input 1
IN2: ANY_BIT Input 2
Returns
ANY_BIT logical, bitwise AND of Input 1 and negated Input 2
Notes:
Standardization: this function is defined by IEC61131-3.
The feature Append Input Connector is available for this function block
4.2.11 ANY
ANY_BIT is a ‘generic’ data type defined by IEC61131-3. You are not allowed to
use this data type to declare variables. Wherever this data type is used, it is
understood to mean any one of the following: ANY_BIT, ANY_DATE, ANY_INT,
ANY_REAL
4.2.12 ANY_BIT
ANY_BIT is a ‘generic’ data type defined by IEC61131-3. You are not allowed to
use this data type to declare variables. Wherever this data type is used, it is
understood to mean any one of the following: BOOL, BYTE, WORD, DWORD,
LWORD.
4.2.13 ANY_DATE
ANY_DATE is a ‘generic’ data type defined by IEC61131-3. You are not allowed
to use this data type to declare variables. Wherever this data type is used, it is
understood to mean any one of the following: DATE, DATE_AND_TIME,
TIME_OF_DAY.
4.2.14 ANY_INT
ANY_INT is a ‘generic’ data type defined by IEC61131-3. You are not allowed to
use this data type to declare variables. Wherever this data type is used, it is
understood to mean any one of the following: SINT, USINT, INT, UINT, DINT,
UDINT, LINT, ULINT.
4.2.15 ANY_NUM
ANY_NUM is a ‘generic’ data type defined by IEC61131-3. You are not allowed
to use this data type to declare variables. Wherever this data type is used, it is
understood to mean any one of the following: ANY_INT, ANY_REAL.
4.2.16 ANY_REAL
ANY_REAL is a ‘generic’ data type defined by IEC61131-3. You are not allowed
to use this data type to declare variables. Wherever this data type is used, it is
understood to mean any one of the following: REAL, LREAL.
4.2.17 ARRAY
ARRAY is the keyword to declare arrays of elements, see Derived Data Types
Examples:
The following declares an array of five integers and assigns initial values:
VAR
x1: ARRAY[0..4] of INT := [1,2,3,4,5];
END_VAR
Note: OpenPCS uses 16bit signed integers to represent array subscripts for
performance reasons. Array bounds may not exceed the [-32768;32767]-
range.
4.2.18 ASIN
Input
In: REAL
Returns
REAL: arcus sine of input
4.2.19 Assignment
VAR
a: INT;
b: ARRAY [0..5] OF INT;
c: REAL;
e: INT;
END_VAR
a := 5;
(* assign 5 to a *)
b[1]:= a*2; e := a; (* two assignments *)
e:= REAL_TO_INT( c );
(* assignment with function call *)
The assignment instruction will evaluate the expression on the right side and
assign the resulting value to the variable given on the left.
Notes:
This is a keyword only for language ST.
This is defined by IEC61131-3.
4.2.20 AT
AT is the keyword to define the memory location where OpenPCS should
allocate memory for a given variable.
VAR
x2 at %qw1.0: word;
END_VAR
4.2.21 ATAN
Input
In: REAL
Returns
REAL: arcus tangens of input
4.2.22 BOOL
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.23 BOOL_TO_*
Inputs
original data type bool
Returns
converted data type *
The function block converts the first value of type bool into the same value of
type *.
The following data types can be converted:
REAL
true -> 1.0
false -> 0.0
STRING
true -> ‘true’
false -> ‘false’
4.2.24 BY
See FOR
4.2.25 BYTE
See Elementary Data Types
Notes:
4.2.26 CAL
The program will be continued at the function block whose name is passed
as operand. The unconditioned invocation may only be used as the end of a
sequence and is not permitted within bracketing operations.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
See also EN.
4.2.27 CALC
If the CR holds the value TRUE, the function block specified as operand will
be called. If it holds the value “0“, there is no invocation. The program flow
continues with the instruction following the jump instruction.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
4.2.28 CALCN
If the CR holds the value FALSE, the function block specified as operand will
be called. If it holds the value "1!, there is no invocation. The program flow
continues with the instruction following the jump instruction.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
4.2.29 CAN_ENABLE_CYCLIC_SYNC
Function block for enabling or locking cyclic SYNC messages.
Input
SYNC_MODE : BOOL Enables generation of cyclic SYNC messages
SYNC_TIME : TIME Time between two SYNC messages. 0 generates 1
SYNC after each PLC cycle.
ENABLE : BOOL Input for enabling or locking the function block
NETNUMBER : USINT Network number
Output
ERROR : WORD Error code corresponding to the data type
"CIA405_CANOPEN_KERNEL_ERROR"
CONFIRM : BOOL Output for signal service completion by the function
block
The function block CAN_ENABLE_CYCLIC_SYNC is used to enable cyclic SYNC
messages. If SYNC_MODE is set to TRUE the function block will generate a
SYNC message after a PLC cycle if SYNC_TIME has passed since the lasst SYNC.
This function block is only available on control units in “PLC with CANopen
Master” mode.
4.2.30 CAN_GET_CANOPEN_KERNEL_STATE
Function block for state query of the CANopen kernel of the local PLC.
Input
ENABLE : BOOL Input for enabling or locking the function block
NETNUMBER : USINT Network number
Output
CONFIRM : BOOL Output for signal service completion by the
function block
STATE:: WORD State or error code corresponding to the data type
„CIA405_CANOPEN_KERNEL_ERROR“
4.2.31 CAN_GET_LOCAL_NODE_ID
Function block for a local node address query.
Input
ENABLE : BOOL Input for enabling or locking the function block
NETNUMBER : USINT Network number
Output
DEVICE : USINT Local Node Address of the PLC
CONFIRM : BOOL Output for signal service completion by the
function block
4.2.32 CAN_GET_STATE
Function block for node state query of various devices.
Input
DEVICE : USINT Address of the node to be queried (1-127 or 0 for
local node)
ENABLE : BOOL Input for enabling or locking the function block
NETNUMBER : USINT Network number
Output
STATE : WORD Node state corresponding to the data type
"CIA405_STATE"
CONFIRM : BOOL Output for signal service completion by the
function block
The function block CAN_GET_STATE is used to enquire the node state for a
specific device. The state query is based on monitoring by Heartbeat or
Lifeguarding. The return values on the output STATE have the following
meaning:
other: With the exception of the state values UNKNOWN and NOT_AVAIL the
return values match the corresponding definitions of the CiA Draft Standard 30.
The call of the function block with DEVICE = 0 delivers the local node state of
the local PLC.
4.2.33 CAN_NMT
Function block for sending NMT messages.
Input
DEVICE : USINT Address of the node to be controlled (1-127 or 0 for
all nodes)
STATE : WORD Node state corresponding to the data type
"CIA405_TRANSITION_STATE"
ENABLE : BOOL Input for enabling or locking the function
NETNUMBER : USINT Network number
Output
ERROR : WORD Error code corresponding to the data type
"CIA405_CANOPEN_KERNEL_ERROR
CONFIRM : BOOL Output for signal service completion by the
function block
The function block CAN_NMT is used for controlling the state of a node
(DEVICE = 1…127) or if DEVICE = 0 all the nodes in the network.
This function block is only available on a control unit in "PLC with CANopen
Master" mode
4.2.34 CAN_PDO_READ8
Function block reading PDOs and CAN Layer 2 messages via the network layer.
Input
COBIB : UINT COBID (CAN-Identifier) of the message to be read
ENABLE : BOOL Input for enabling or locking the function block
NETNUMBER : USINT Network number
Output
CONFIRM : BOOL Output for signal service completion by the function
block
The function block CAN_PDO_READ8 reads a PDO or CAN Layer 2 message via
the network layer. The message must be registered via CAN_REGISTER_COBID
before. The receiving buffer stores only the most current message and the
message will be erased from the networks layer’s receiving buffer.
After a succesful read operation, CONFIRM is set to TRUE and the elements
DATA0 to DATA7 contain the individual bytes of the received message.
DATALENGTH reports the number of valid bytes. Empty messages are valid.
If no message with the given COBID was available, CONFIRM is set to false. If
an error occurred the ERROR is set as well.
4.2.35 CAN_PDO_WRITE8
Function block sending PDOs and CAN Layer 2 messages via the network layer.
Input
COBIB : UINT COBID (CAN-Identifier) of the message to be read
ENABLE : BOOL Input for enabling or locking the function block
DATA0 – DATA7 : BYTE Data bytes of the received message
DATALENGTH : USINT Length of the received message
NETNUMBER : USINT Network number
Output
CONFIRM : BOOL Output for signal service completion by the function
block
ERROR : WORD State or error code corresponding to the data type
„CIA405_CANOPEN_KERNEL_ERROR“
ERRORINFO : DWORD Additional information on the error
4.2.36 CAN_RECV_BOOTUP
Function block for reading Bootup messages of any node from the receiving
buffer of the network layer.
Input
ENABLE : BOOL Input for enabling or locking the function block
NETNUMBER : USINT Network number
Output
ERROR : WORD Error code corresponding to the data type
"CIA405_CANOPEN_KERNEL_ERROR"
CONFIRM : BOOL Output for signal service completion by the function
block
4.2.37 CAN_RECV_BOOTUP_DEV
Function block for reading Bootup messages of a specific node from the
receiving buffer of the network layer.
Input
DEVICE : USINT Additional information for diagnostic purpose
ENABLE : BOOL Input for enabling or locking the function block
NETNUMBER : USINT Network number
Output
ERROR : WORD Error code corresponding to the data type
"CIA405_CANOPEN_KERNEL_ERROR"
CONFIRM : BOOL Output for signal service completion by the function
block
The function block CAN_RECV_BOOTUP_DEV is used for reading Bootup
messages of a specific node from the receiving buffer of the network layer. If a
message is received succesfully CONFIRM is set to TRUE, otherwise the buffer
contains no message of the specific node. After a message is read it is deleted in
the buffer.
This functiion block is only available on control units in “PLC with CANopen
Master” mode.
4.2.38 CAN_RECV_EMCY
Function block for reading emergency messages of a node from the network
layer‘s receiving buffer.
Input
ENABLE : BOOL Input for enabling or locking the function block
NETNUMBER : USINT Network number
Output
DEVICE : USINT Address of the node (1-127) from which an
emergency message was received
EMCY_ERR_CODE : WORD
EMCY_ERR_REGISTER : BYTE
EMCY_ERR_FIELD1 - EMCY_ERR_FIELD5 : BYTE
Emergency error information corresponding to the CiA Draft Standard
301
ERROR : WORD Error code corresponding to the data type
"CIA405_CANOPEN_KERNEL_ERROR"
CONFIRM : BOOL Output for signal service completion by the
function block
The function block always returns the first emergency message entered into the
receiving buffer (= oldest message), the message is subsequently erased from
the receiving buffer. Thus every emergency message can only be read one time
by the PLC program. The function blocks CAN_RECV_EMCY_DEV and
CAN_RECV_EMCY both access the same receiving buffer.
This function block is only available on control units in "PLC with CANopen
Master" mode.
4.2.39 CAN_RECV_EMCY_DEV
Function block for reading emergency messages of a specific node from the
receiving buffer of the network layer.
Input
DEVICE : USINT Address of the node (1-127), for which the receipt of
emergency messages is to be tested
ENABLE : BOOL Input for enabling or locking the function block
NETNUMBER : USINT Network number
Output
EMCY_ERR_CODE : WORD
EMCY_ERR_REGISTER : BYTE
EMCY_ERR_FIELD1 - EMCY_ERR_FIELD5 : BYTE
Emergency error information corresponding to the CiA Draft Standard
301
ERROR : WORD Error code corresponding to the data type
"CIA405_CANOPEN_KERNEL_ERROR"
CONFIRM : BOOL Output for signal service completion by the
function block
The function block always returns the first emergency message entered into the
receiving buffer (= oldest message), the message is subsequently erased from
the receiving buffer. Thus every emergency message can only be read one time
This function block is only available on one control unit in "PLC with CANopen
Master" mode
4.2.40 CAN_REGISTER_COBID
Function block for registering or erasing the receipt of PDOs and CAN Layer 2
messages via the network layer.
Input
COBIB : UINT COBID (CAN-Identifier) of the message beeing newly
registered or erased
REGISTER : BOOL TRUE : register COBID; FALSE : erase COBIS from
registration
ENABLE : BOOL Input for enabling or locking the function block
NETNUMBER : USINT Network number
Output
CONFIRM : BOOL Output for signal service completion by the function
block
ERROR : WORD State or error code corresponding to the data type
„CIA405_CANOPEN_KERNEL_ERROR“
4.2.41 CAN_SDO_READ8
Function block for reading a node’s object entries by way of an SDO
transfer.
Input
DEVICE : USINT Address of the node to be read (1-127 or 0 for local
OD)
INDEX : WORD Number of the index entry to be read
SUBINDEX : BYTE Number of the sub index entry to be read
ENABLE : BOOL Input for enabling or locking the function block
NETNUMBER : USINT Network number
Output
DATA0 – DATA7 : BYTE Data bytes of the entry that was read
DATALENGTH : USINT Length of the entry that was read
ERROR : WORD Error code corresponding to the data type
"CIA405_CANOPEN_KERNEL_ERROR"
ERRORINFO : DWORD SDO abort code of the communication partner
corresponding to the data type
"CIA405_SDO_ERROR"
If the output CONFIRM is set to TRUE upon the return of the function block, the
elements DATA0 through DATA7 receive the individual bytes of the object entry
that was read. The output DATALENGTH reports the number of valid data bytes
(beginning at DATA0).
The network layer supports only a single SDO transfer through the PLC
program at any one time. After the start of the SDO transfer by setting ENABLE
to TRUE, the SDO channel is locked, preventing use by other components. The
lock state is maintained until the SDO function block is called again by setting
the ENABLE input to FALSE after completion of the data transfer.
A call of the function block with DEVICE = 0 leads to an access of the local
Object Dictionary of the PLC. Thus values from the local Object Dictionary can
be read as well.
4.2.42 CAN_SDO_READ_STR
Function block for reading strings from the object directory of a node via SDO
transfer..
Input
DEVICE : USINT Address of the node to be read (1-127 or 0 for local OD)
INDEX : WORD Number of the index entry to be read
SUBINDEX : BYTE Number of the subindex entry to be read
SDOTYPE : SUBINDEX Type of the SDO transfer. Standard is
“SDO_TYPE_AUTO_BEST_CASE”
RXDATA : STRING String variables for storing the read characters
MAXLENGTH : INT Limit the number of characters to be read.
ENABLE : BOOL Input for enabling or locking the function block
NETNUMBER : USINT Network number
Output
RXDATA : STRING String variables for storing the read characters
RXLENGTH : INT Length of charcter sequence read
ERROR : WORD Error code corresponding to the data type
"CIA405_CANOPEN_KERNEL_ERROR"
ERRORINFO : DWORD SDO abort code of the communication partner
corresponding to the data type
"CIA405_SDO_ERROR"
CONFIRM : BOOL Output for signal service completion by the function
block
The function block CAN_SDO_READ_STR is used to read strings from a node’s
Object Directory utilizing SDO transfer.
All SDO transfers are executed in the background. Synchronization can be
handled via ENABLE and CONFIRM.
4.2.43 CAN_SDO_WRITE8
Function block for writing object entries of a node by way of an SDO
transfer.
Input
ENABLE : BOOL Input for enabling or locking the function block
DEVICE : USINT Address of the node to be written (1-127 or 0 for
local Object Dictionary)
INDEX : WORD Number of the index entry to be written
SUBINDEX : BYTE Number of the sub index entry to be written
DATA0 – DATA7 : BYTE Data bytes of the entry to be written
DATALENGTH : USINT Length of the entry to be written
NETNUMBER : USINT Network number
Output
CONFIRM : BOOL Output for signal service completion by the
function block
ERROR : WORD Error code corresponds to the data type
"CIA405_CANOPEN_KERNEL_ERROR"
ERRORINFO : DWORD SDO abort code of the communication partner
corresponding to the data type
"CIA405_SDO_ERROR"
The function block CAN_SDO_WRITE8 is used to write the object entries of a
node currently being used by the SDO transfer. The SDO transfer is always
executed in the background.
The individual bytes of the object entry to be written are transferred to the
elements DATA0 through DATA7. Whereby the input DATALENGTH specifies
the number of valid data bytes (beginning with DATA0).
The network layer only supports a single SDO transfer through the PLC
program at any one time. After the start of the SDO transfer by setting ENABLE
to TRUE, this SDO channel is locked, preventing use by other components. The
lock state is maintained until the SDO function block is called again by setting
the ENABLE input to FALSE after completion of the data transfer
A call of the function block with DEVICE = 0 leads to access of the local Object
Dictionary of the PLC. Thus values can be written to the local Object Dictionary
as well.
4.2.44 CAN_SDO_WRITE_STR
Function block for reading strings from the object directory of a node via SDO
transfer..
Input
DEVICE : USINT Address of the node to be read (1-127 or 0 for local OD)
INDEX : WORD Number of the index entry to be read
SUBINDEX : BYTE umber of the subindex entry to be read
4.2.45 CAN_SEND_SYNC
Function block for enabling or locking cyclic SYNC messages.
Input
ENABLE : BOOL Input for enabling or locking the function block
NETNUMBER : USINT Network number
Output
ERROR : WORD Error code corresponding to the data type
"CIA405_CANOPEN_KERNEL_ERROR"
CONFIRM : BOOL tput for signal service completion by the function
block
The function block CAN_SEND_SYNC send one SYNC message when ENABLE is
set to true.
This function block is only available on control units in “PLC with CANopen
Master” mode.
4.2.46 CAN_WRITE_EMCY
Function block for sending application specific Emergency-Messages through
the network layer.
Input
EMCY_ERR_CODE : WORD
EMCY_ERR_REGISTER : BYTE
EMCY_ERR_FIELD1 - EMCY_ERR_FIELD5 : BYTE
Emergency error information corresponding to the CiA Draft Standard
301
4.2.47 CASE
CASE expression OF
case_value1: { instructions; }
case_value2: { instructions; }
...
case_valueN: { instructions; }
[ ELSE instructions; ]
END_CASE;
Example:
VAR
number : INT:= 10;
amount : INT :=2;
END_VAR
CASE number OF
10: amount := amount +1;
11: amount := amount -1;
ELSE
amount := number;
END_CASE;
Notes:
This is a keyword only for language ST.
This is defined by IEC61131-3.
4.2.48 CD
This is the name of a formal parameter of a standard function block (CTD), and
as such defined to be a keyword.
4.2.49 CDT
This is the name of a formal parameter of a standard function block (RTC), and
as such defined to be a keyword.
4.2.50 CLK
This is the name of a formal parameter of a standard function block (R_TRIG),
and as such defined to be a keyword.
4.2.51 CONCAT
Inputs
In1: STRING First String
In2: STRING Second String
Returns
STRING Concatenation of both Strings
Description
The character strings ´IN1´ and ´IN2´ in the working register are chained to
form one character string which is loaded into the working register. The
strings IN1 to IN2 are written from the left to the right in ascending order.
The feature Append Input Connector is available for this function block
4.2.52 Configuration
This keyword is defined by IEC61131-3 for the textual definition of
configurations, resources and tasks. With OpenPCS, these are defined and
configured using property-dialog boxes . You will see this keyword in OpenPCS
only when printing the definition of a configuration.
4.2.53 CONSTANT
CONSTANT is the keyword to declare variables that should not be modified
by the application code. The OpenPCS compile will give an error message if
you intent to write to such a variable:
VAR CONSTANT x1 : INT := 15; END_VAR
See declaration sections.
4.2.54 COS
Input
In: REAL
Returns
REAL: cosine of input
4.2.55 CR
CR is the abbreviation of Current Result, the virtual accumulator used in
IEC61131-3 programming languages.
4.2.56 CTD
The function block "CTD" serves for counting down impulses received from the
input operand "CD". On initialization, the counter will be set to "0".
If the operand "LOAD" is "1", the value received by the operand "PV" will be
taken over as a value into the counter.
Each rising edge at the input "CD" will decrease the counter by "1".
The output operand "CV" contains the current value of the counter. If the
counter value is positive, the output operand "Q" will have the Boolean value
"0". If the counter value reaches zero or becomes negative, the output "Q" will
be set to "1".
Inputs
CD: bool counter pulse
LOAD: bool set initial value
PV: int reset value
Outputs
Q: bool signal when zero reached
CV: int counter value
Notes:
Standardization: this function block is defined by IEC61131-3.
4.2.57 CTU
The function block "CTU" serves for counting up impulses received from the
input operand "CU". On initialization, the counter will be set to "0".
The counter value will be reset if the operand "RESET" receives the value "1".
Each rising edge at the input "CU" will increase the counter by "1".
The output operand "CV" contains the current value of the counter. If the
counter value is below the margin value "PV", the output operand "Q" will have
the Boolean value "0". If the counter value reaches or passes the margin, the
output "Q" will be set to "1".
Inputs
CU: bool counter pulse
RESET: bool reset counter
PV: int counter upper limit
Outputs
Q: bool signals if counter has reached upper limit
CV: int current counter value
Notes:
Standardization: this function block is defined by IEC61131-3.
4.2.58 CTUD
The function block "CTUD" serves for counting up and down impulses. On
initialization, the counter will be set to the value "0". Every rising edge at the
input operand "CU". will increase the counter by "1", while every rising edge at
the input "CD" will decrease it by "1".
If the operand "LOAD" is "1", the value received by the operand "PV" will be
taken over as a value into the counter.
The counter value will be reset if the operand "RESET" receives the value "1".
While the static state of the operand "RESET" remains unchanged, the counting
conditions or the load condition will have no implication, independent of their
value.
The output operand "CV" contains the current value of the counter. If the
counter value is below the margin value "PV", the output operand "QD" will
have the Boolean value "0". If the counter value reaches or passes the margin,
the output "QD" will be set to "1". If the counter value is positive, the output
operand "QD" will have the Boolean value "0". If the counter value reaches zero
or becomes negative, the output "QD" will be set to "1".
Inputs
CU: bool counting impulses for counting up, rising edge
CD: bool counting impulses for counting down, rising edge
RESET: bool reset condition
LOAD: bool load condition
PV: int load value
Outputs
QU: bool signals whether counter state has reached PV
QD: bool signals whether counter state has reached "0"
CV: int counter state
Notes:
Standardization: this function block is defined by IEC61131-3.
4.2.59 CU
This is the name of a formal parameter of a standard function block (CTU), and
as such defined to be a keyword.
4.2.60 CV
This is the name of a formal parameter of a standard function block (CTD), and
as such defined to be a keyword.
4.2.61 D(Date)
nD can be used as an abbreviation to DATE when specifying the data type of a
literal constant. As data type DATE is not implemented in OpenPCS, you will
not be able to use this keyword with OpenPCS.
4.2.63 DATE
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.64 DATE_AND_TIME
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.65 DELETE
Inputs
IN1: STRING Basic character string in which a part should be deleted
L: UINT Length of the substring which should be deleted
P: UINT Starting position of substring
Returns
STRING Shortened string
The function ‘DELETE’ deletes a substring of length ‘L’ starting at position ‘P’
within the given string ‘IN1’.
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.66 DINT
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.67 DIV
Inputs
In1: ANY_NUM Value to be divided
In2: ANY_NUM Value to divide by
Returns
ANY_NUM quotient
Divides two numbers. See Table E.1: Error conditions for result if divisor is
zero.
Notes:
Standardization: this is an operation defined by IEC61131-3.
Notes:
Standardization: this is an operation defined by IEC61131-3.
4.2.69 DO
4.2.70 DS
This is an Action qualifier, see Table 45 in the compliance statement. As
OpenPCS only supports actions of type N, you will not need to use this
keyword with OpenPCS.
4.2.71 DT
DT can be used as an abbreviation to DATE_AND_TIME when specifying the
data type of a literal constant. As data type DATE_AND_TIME is not
implemented in OpenPCS, you will not be able to use this keyword with
OpenPCS.
4.2.72 DWORD
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.73 ELSE
4.2.74 ELSIF
See IF
4.2.75 EN
Function Blocks may have an input variable of type BOOL named EN. If this
is the case, an invocation of an instance of this function block is performed if
and only if the value of the input variable EN of that instance is TRUE.
See also CAL and ENO.
Notes:
1. “EN” is abbreviated for “Enable”.
2. If input and/or output variables are assigned in the same statement as the
CAL instruction, these assignments are performed even if the CAL is not
taken due to EN=FALSE.
3. By default, EN is TRUE
4.2.76 END_ACTION
This keyword is defined by IEC61131-3 for the textual representation of
programming language SFC. OpenPCS does not support the textual
representation of SFC, hence you will not be able to enter this keyword. You
will see this when printing SFC.
4.2.77 END_CASE
See CASE
4.2.78 END_CONFIGURATION
This keyword is defined by IEC61131-3 for the textual definition of
configurations, resources and tasks. With OpenPCS, these are defined and
configured using property-dialog boxes. You will see this keyword in OpenPCS
only when printing the definition of a configuration.
4.2.79 END_FOR
See FOR
4.2.80 END_FUNCTION
See Function.
4.2.81 END_FUNCTION_BLOCK
See Function Block.
4.2.82 END_IF
See IF
4.2.83 END_PROGRAM
See PROGRAM
4.2.84 END_REPEAT
See REPEAT
4.2.85 END_RESOURCE
This keyword is defined by IEC61131-3 for the textual definition of
configurations, resources and tasks. With OpenPCS, these are defined and
configured using property-dialog boxes. You will see this keyword in OpenPCS
only when printing the definition of a configuration.
4.2.86 END_STEP
This keyword is defined by IEC61131-3 for the textual representation of
programming language SFC. OpenPCS does not support the textual
representation of SFC, hence you will not be able to enter this keyword. You
will see this when printing SFC.
4.2.87 END_STRUCT
See STRUCT.
4.2.88 END_TRANSITION
This keyword is defined by IEC61131-3 for the textual representation of
programming language SFC. OpenPCS does not support the textual
representation of SFC, hence you will not be able to enter this keyword. You
will see this when printing SFC.
4.2.89 END_TYPE
4.2.90 END_VAR
Notes:
This is a keyword only for declaration parts of POUs.
This is defined by IEC61131-3.
4.2.91 END_WHILE
See WHILE
4.2.92 ENO
Function Blocks may have an output variable of type BOOL named ENO.
This typically is set to TRUE to signal correct execution and to FALSE to
signal errors during execution. Typically, this ENO is wired to the EN input
of another function block.
Notes:
1. “ENO” is abbreviated for “Enable Output”
4.2.93 EQ
Inputs
IN1: ANY input 1
IN2: ANY input 2
Returns
BOOL TRUE if Input 1 is equal to Input 2
Notes:
Standardization: this function is defined by IEC61131-3.
The function Append Input Connector is not available with this function block
4.2.94 ET
This is the name of a formal parameter of a standard function block (TOF), and
as such defined to be a keyword.
4.2.95 ETRC
Generally an event task will be executed only once. Since the reaction on a
special event can last longer than one cycle, it is necessary to restart the current
task again. To perform this action the firmware function block ETRC (Event Task
Run Control) can be used. It prolongs the execution of its own event task for
another cycle. Additionally the function block provides at its outputs
information like the cycle count or elapsed time since the first call on this the
ETRC instance. With this information a reaction on errors, which would end up
in an endless loop, could be handled.
Input:
IN : BOOL TRUE: The event task should be started for another cycle
FALSE: The event task should not be started again. The
function block is called only to get the output information;
Output:
Q : BOOL TRUE: The event task will be executed for one cycle more
FALSE: the event task will be stopped after the current cycle
EVC : USINT The event code (EVC) describes the internal reason for the
event task to be called.
ERT : TIME The elapsed runtime (ERT) returns the time since the first start
of the current event task
CCV : UDINT The cycle counter value defines the count of event task
cycles already executed
ERROR : USINT Return values of the ETRC execution.
0 : successful execution,
1 : execution not possible since function has been called
out of a task (not a valid call)
4.2.96 EXIT
Any of the loops can be ´left´ under program control before the loop
condition dictates so. The EXIT instruction will jump to the first instruction
after the innermost loop.
Example:
VAR
start: INT :=0;
summe: INT :=0;
ende : INT := 10;
END_VAR
FOR Start := 1 TO Ende BY 2 DO
Summe := Summe + 1;
IF Summe > 4 THEN
EXIT;
END_IF;
END_FOR;
(* Will continue here *)
Notes:
This is a keyword only for language ST.
This is defined by IEC61131-3.
4.2.97 EXP
Input
In: REAL
Returns
REAL: e ** In
4.2.98 EXPT
Inputs :
In1 : ANY_REAL
In2 : ANY_NUM
Returns :
ANY_REAL: In1 ** In2
4.2.99 F_EDGE
F_EDGE is used to indicate a falling edge detection function on Boolean
inputs. This leads to an implicit declaration of a function block of type F_TRIG
.
Example:
FUNCTION_BLOCK AND_EDGE
VAR_INPUT
X : BOOL R_EDGE;
Y : BOOL F_EDGE;
END_VAR
VAR_OUTPUT
Z : BOOL ;
END_VAR
4.2.100 F_TRIG
Inputs
CLK: bool input operand whose falling edge is detected
Outputs
Q: bool Output operand; indicates the falling edge of ´CLK´
The function block ´F_TRIG´ detects the status of the input operand ´CLK´. The
status change from ´1´ to ´0´ in a processing cycle is detected and indicated in
the subsequent cycle with the Boolean value ´1´ via the output ´Q´. The output
is ´1´ only in the processing cycle in which the change of the status of ´CLK´ is
detected and a falling edge is indicated.
Notes:
Standardization: this function block is defined by IEC61131-3.
4.2.101 FALSE
Constant value of type BOOL.
4.2.102 FBD
FBD is the abbreviation of Function Block Diagram, one of the programming
languages of IEC61131-3.
4.2.103 FIND
Find one character string within another character string.
Inputs
In1: String Basic character string in which a special character sequence
is searched for; the string is made available via the
working register
IN2: STRING Character sequence which is searched for in the ´IN1´
basic character string.
Returns
INT Position of first occurrence
A special character sequence is searched for in the ´IN1´ basic character
string. If this string is found, the position of the first character of this
sequence is entered into the working register or, otherwise, the value ´0´ is
entered. If there are more than one in the basic character string, the string
which was found first is entered.
4.2.104 FOR
With the FOR loop, a loop control variable will be set to a specified starting
value, then incremented (or decreased), and the loop will be terminated
when a given end value is reached.
Example
VAR
Field : ARRAY[1..5] OF INT :=[2,14,8,12,5];
Index : INT;
MaxIndex : INT :=5;
Maximum : INT :=0;
END_VAR
FOR Index :=1 TO MaxIndex BY 1 DO
IF Field[Index] > Maximum THEN
Maximum := Field[Index];
END_IF;
END_FOR;
The loop control variable ´Index´ will start with ´1´, and will be incremented
´BY 1´ on each execution of the loop. This will be done until the end value
´MaxIndex´ (=5) will be reached.
Note: the BY-term is optional and can be omitted. Default then is to
increment by 1.
Notes:
This is a keyword only for language ST.
This is defined by IEC61131-3.
4.2.105 FROM
See Transition.
4.2.106 Function
IEC61131-3 defines three block types: PROGRAM, FUNCTION and
FUNCTION BLOCK. See block types under ‘Advanced Topics’ for more
details.
Functions return values by assignment to a variable having the same name
and type as the function, e.g.
FUNCTION MyFun : INT
…
MyFun := 999;
END_FUNCTION
Note:
(1) Some IEC61131 dialects take the current result at the END_FUNCTION
or RETURN as the value to be returned by the function. OpenPCS will ignore
this value and only use the value assigned to the function name.
(2) The keywords FUNCTION and END_FUNCTION are typically invisible
within OpenPCS, as they are maintained by the Editors internally.
(3) The function return type (INT in the example shown above) is selected in
the same dialog box where you specify the function name, at the very
bottom. The default is BOOL.
(4) You can also enter user-defined data types (STRUCT's, ARRAY's, etc.) by
entering the name of the data type manually into the input-field.
(5) To change a return type of a function, open the file in the project
browser. Open the change return type dialog by selecting Edit->Change
Return Type….
The following dialog will pop up:
You can chose one of the given types or type in a user specific one.
4.2.108 GE
Inputs
IN1: ANY input 1
IN2: ANY input 2
Returns
BOOL RUE if Input 1 is greater or equal than Input 2
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.109 GetDateStruct
Input
IN: Date date to convert
InOut
DATESTRUCT_INOUT : DateStruct output of date as a struct
whereas
DateStruct: STRUCT
YEAR : UINT;
MONTH : USINT;
DAY : USINT;
END_STRUCT
4.2.110 GETSYSTEMDATEANDTIME
Inputs
EN: BOOL
Outputs
ENO: BOOL
ODT: DATE_AND_TIME
The function "GetSystemDateAndTime” returns the actual system time in ODT.
Notes:
Standardization: this function block is not defined by IEC61131-3
4.2.111 GetTaskInfo
Output
Count: DWORD; (*number of cycles this task is executed *)
LastCT: TIME; (*time needed for last cycle*)
AverageCT: TIME; (*average time needed for execution*)
MinCT: TIME; (*minimum time needed for execution*)
MaxCT: TIME; (*maximum time needed for execution*)
State: DWORD; (*not yet used
GetTaskInfo returns information about the execution time of the last cycle of
the current task. This function block has no input parameters.
4.2.112 GetTime
Input
IN1: TIME previous time
Returns
TIME: time elapsed since power on, minus IN1
GETTIME will retrieve the time elapsed since the controller has last been
switched on, less the time value supplied as an input. This can be used to
easily measure time spans.
Example „Stop Watch“
PROGRAM StopW
VAR
begin, result : TIME;
END_VAR
start:
LD t#0ms
GETTIME
ST begin
...
stop:
LD begin
GETTIME
ST result
END_PROGRAM
4.2.113 GetTimeCS
Get current system time
Input
IN1: TIME previous time
Returns
TIME: time elapsed since power on, minus IN1
GETTIME will retrieve the time elapsed at the last system control point since
the controller has last been switched on, less the time value supplied as an
input. This can be used to easily measure time spans. Compared to
GETTIME, GETTIMECS will return the same value when called multiple
times within the same cycle.
Example •Stop Watch•
PROGRAM StopW
VAR
begin, result : TIME;
END_VAR
...
start:
LD t#0ms
GETTIMECS
ST begin
...
stop:
LD begin
GETTIMECS
ST result
END_PROGRAM
4.2.114 GetVarData
InOut
VarName: STRING Name of variable requested
Output
Q: bool TRUE if VarInfo is valid
VarData: VarInfo information on variable
The variable specified as input is located within the memory address space
and information on that variable is returned. If the variable cannot be
located, Q is returned as FALSE.
Please note:
for OpenPCS to be able to locate variables by name, a MAP file has to be
generated (resource options)
for definition of VARINFO, see VARINFO under ‘keywords’.
4.2.115 GetVarFlatAddress
InOut
VarName: STRING Name of variable requested
Output
Q: bool TRUE if VarInfo is valid
Address: DWORD flat memory address of specified variable
The variable specified as input is located within the memory address space
and the address of its location is returned. If the variable cannot be located,
Q is returned as FALSE.
Please note:
for OpenPCS to be able to locate variables by name, a MAP file has to be
generated (resource options)
the memory location returned must not be stored and used in another but
the current execution cycle.
4.2.116 GT
Inputs
IN1: ANY Input 1
IN2: ANY Input 2
Returns
BOOL TRUE if Input 1 is greater than or equal to Input 2
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.117 IF
IF a>b THEN
maximum := a;
ELSE
maximum := b;
END_IF;
IF instructions may be nested, i.e. the THEN-part as well as the ELSE-part
may contain other IF instructions.
Example:
The following program will again compute the maximum of two numbers,
but if this maximum is ´a´ and ´a´ is greater than 10, it will be reduced by 1:
VAR
a: INT :=12;
b: INT :=5;
maximum: INT;
END_VAR
IF a>b THEN
maximum :=a;
IF (a>10) THEN
a:=a-1;
ELSE
a:=a+1;
END_IF;
ELSE
maximum :=b;
END_IF;
Notes:
This is a keyword only for language ST.
This is defined by IEC61131-3.
4.2.118 IL
IL is the abbreviation of Instruction List, one of the programming languages
of IEC61131-3.
4.2.119 IN
This is the name of a formal parameter of a standard function block (TOF), and
as such defined to be a keyword.
4.2.120 INITIAL_STEP
This keyword is defined by IEC61131-3 for the textual representation of
programming language SFC. OpenPCS does not support the textual
representation of SFC, hence you will not be able to enter this keyword. You
will see this when printing SFC.
4.2.121 INSERT
Inputs
IN1: STRING character string
IN2: STRING character string to be inserted
P: UINT Starting position
Returns
STRING Composed string
The ´INSERT´ function inserts the string ´IN2´ into ´IN1´. The concatenated
string consists of the first ´P´ characters of ´IN1´, the completed string
´IN2´and the rest of ´IN1´.
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.122 INT
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.123 Interval
This keyword is defined by IEC61131-3 for the textual definition of
configurations, resources and tasks. With OpenPCS, these are defined and
configured using property-dialog boxes. You will see this keyword in OpenPCS
only when printing the definition of a configuration.
4.2.124 JMP
The program flow continues at the position specified by the jump target.
The jump target must be a sequence start uniquely identified by a label.
A jump is possible only within a POU.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
4.2.125 JMPC
If the CR holds the value TRUE, the program flow continues at the position
specified by the jump target. If it holds the value “0“, there is no jump. The
program flow continues with the instruction following the jump instruction.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
4.2.126 JMPCN
If the CR holds the value FALSE, the program flow continues at the position
specified by the jump target. If it holds the value “1“, there is no jump. The
program flow continues with the instruction following the jump instruction.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
4.2.128 LD
The value of the operand is evaluated and loaded into the current result.
This overwrites data stored in CR. The operand is not modified. The data
type of the operand determines the permissible data type for consecutive
operands.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
4.2.130 LDN
The operand is evaluated, and the current result is loaded with the negated
value. The operand is not modified. The data type of the operand
determines the permissible data type for consecutive operands.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
4.2.131 LEFT
Inputs
In: STRING character string
L: ANY_NUM Number of characters to retrieve
Returns
STRING the ‘L’ leftmost characters of IN
The ´LEFT´ function enters the left part of the currently loaded character
string into the working register. The input operand ´L´ defines the number
of characters to be entered.
4.2.132 LE
Inputs
IN1: ANY input 1
IN2: ANY input 2
Returns
BOOL RUE if Input 1 is less or equal than Input 2
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.133 LEN
Inputs
In: STRING character string
Returns
INT length of IN
The function ´LEN´ determines the length of the character string in the
working register (input operand of data type ´STRING´) and enters the
determined value as INT number into the working register.
4.2.134 LIMIT
Inputs
MN: Any_Num lower limit
IN: Any_Num Test value
MX: Any_Num Upper Limit
Returns
Any_Num One of the input values, see description
The ´MN´ and ´MX´ values define the lowest and highest limit value. The
function compares the test value ´IN´ with ´MN´ and ´MX´. If ´IN´ is
between the two limit values, it is loaded into the working register. If ´IN´ is
smaller than ´MN´, the ´MN´ value is output. If ´IN´ is greater than ´MX´,
the ´MX´ value is loaded.
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.135 LINT
This is the name of an elementary data type, which is defined by IEC61131-3,
but not supported by OpenPCS. See Table 10 in the compliance statement.
4.2.136 LN
Input
In: REAL
Returns
REAL: logarithm to the base of e
4.2.137 LOG
Input
In: REAL
Returns
REAL: logarithm to the base of 10
4.2.138 LREAL
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.139 LT
Inputs
IN1: ANY I input 1
IN2: ANY Input 2
Returns
BOOL RUE if Input 1 is less than Input 2
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.140 Lword
This is the name of an elementary data type, which is defined by IEC61131-3,
but not supported by OpenPCS. See Table 10 in the compliance statement.
4.2.141 MUX
OpenPCS does not implement the MUX function.
Notes:
Standardization: this function is defined by IEC61131-3.
The feature Append Input Connector is available for this function block
4.2.142 MAX
Inputs
In1: Any_Num Input Value1
In2: Any_Num Input Value2
…
InN: Any_Num Input ValueN
Returns
Any_Num Maximum of all input values
The ´MAX´ function determines which input operand has the highest value.
The selected operand is loaded into the working register.
Notes:
Standardization: this function is defined by IEC61131-3.
The feature Append Input Connector is available for this function block
4.2.143 MID
Inputs
In: STRING character string
L: UINT number of characters to retrieve
P: UINT starting position
Returns
STRING he next ‘L’ characters of IN, starting at the P-th character
The ´MID´ function enters a middle part of the currently loaded character
string into the working register. The input operand ´P´ defines the first
character to be entered, ´L´ defines the number of characters to be entered
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.144 MIN
Inputs
In1: Any_Num Input Value1
In2: Any_Num Input Value2
…
InN: Any_Num Input ValueN
Returns
Any_Num Minimum of all input values
The ´MIN´ function determines which input operand has the smallest value.
The selected operand is loaded into the working register.
Notes:
Standardization: this function is defined by IEC61131-3.
The feature Append Input Connector is available for this function block
4.2.145 MOD
Input
In1: ANY_INT
In2: ANY_INT
Returns
ANY_INT
The first input will be divided by the second input. MOD delivers the residue
to current result.
4.2.146 MOVE
Inputs
In: ANY
Outputs
Out: ANY
The function "MOVE" is an arithmetic function that serves for assigning a
value.
4.2.147 MUL
Inputs
In1: ANY_NUM Value to be multiplied
In2: ANY_NUM Value to multiply with
Returns
ANY_NUM product
Multiplies two numbers. See Table E.1: Error conditions for result on
overflow.
Notes:
Standardization: this is an operation defined by IEC61131-3.
The feature Append Input Connector is available for this function block
Notes:
Standardization: this is an operation defined by IEC61131-3.
4.2.150 NCC
NCC is an acronym for native code compiler.
4.2.151 NE
Inputs
IN1: ANY input 1
IN2: ANY input 2
Returns
BOOL TRUE if Input 1 is not equal to Input 2
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.152 NEG
Input
In: ANY_NUM
Returns
ANY_NUM: negated numeric value of input
4.2.153 NOT
Inputs
IN1: ANYBIT Input
Returns
ANYBIT logical negation (1-complement) of Input
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.154 OF
See CASE
4.2.155 On
See RESOURCE.
4.2.156 OPC
The var qualifier OPC allows a user, to mark dedicated variables, to become part of the variable table, already within the
declaration editor of OpenPCS.
4.2.157 OR
Inputs
Notes:
Standardization: this function is defined by IEC61131-3.
The feature Append Input Connector is available for this function block
4.2.158 ORN
Inputs
IN1: ANY_BIT Input 1
IN2: ANY_BIT Input 2
Returns
ANY_BIT logical, bitwise OR of Input 1 and negated Input 2
Notes:
Standardization: this function is defined by IEC61131-3.
The feature Append Input Connector is available for this function block
4.2.160 POINTER
The data type pointer is defined by OpenPCS in addition to IEC61131-3. Using
this data type, it is now possible to call Functions or Functionblocks with arrays
of different sizes. A pointer must be declared as follows:
VAR
IntVar : INT;
pInt : POINTER;
END_VAR
To access the adress of a variable, the adress operator (‘&’) must be written in
front of the variable’s name.
Example IL: LD &IntVar
Example ST: pInt := &IntVar;
4.2.161 POU
POU is the abbreviation of Program Organization Unit, meaning a Program,
Function or Function Block written in one of the programming languages of
IEC61131-3.
4.2.162 Priority
This keyword is defined by IEC61131-3 for the textual definition of
configurations, resources and tasks. With OpenPCS, these are defined and
configured using property-dialog boxes. You will see this keyword in OpenPCS
only when printing the definition of a configuration.
4.2.163 PROGRAM
IEC61131-3 defines three block types: PROGRAM, FUNCTION and
FUNCTION BLOCK. See block types under ‘Advanced Topics’ for more
details.
The keywords PROGRAM and END_PROGRAM are typically invisible within
OpenPCS, as they are maintained by the editors internally.
4.2.164 PT
This is the name of a formal parameter of a standard function block (TOF), and
as such defined to be a keyword.
4.2.165 PV
This is the name of a formal parameter of a standard function block (CTD), and
as such defined to be a keyword.
4.2.166 Q(Parameter)
This is the name of a formal parameter of a standard function block (CTD), and
as such defined to be a keyword.
4.2.167 Q1
This is the name of a formal parameter of a standard function block, and as
such defined to be a keyword.
4.2.168 QD
This is the name of a formal parameter of a standard function block (CTUD),
and as such defined to be a keyword.
4.2.169 QU
This is the name of a formal parameter of a standard function block (CTUD),
and as such defined to be a keyword.
4.2.171 R(eset)
The operand is reset, if the content of the CR equals “1“. If this precondition
is not met, operands will not be changed. The CR is not modified.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
4.2.172 R_EDGE
R_EDGE is used to indicate a rising edge detection function on Boolean
inputs. This leads to an implicit declaration of a function block of type
R_TRIG.
Example:
FUNCTION_BLOCK AND_EDGE
VAR_INPUT
X : BOOL R_EDGE;
Y : BOOL F_EDGE;
END_VAR
VAR_OUTPUT
Z : BOOL ;
END_VAR
END_FUNCTION_BLOCK
4.2.173 R_TRIG
Inputs
CLK: bool Input operand whose rising edge is detected
Outputs
Q: bool Output operand; indicates the rising edge of ´CLK´
The function block ´R_TRIG´ detects the status of the input operand ´CLK´. The
status change from ´0´ to ´1´ in a processing cycle is detected and indicated
with the Boolean value ´1´ via the output ´Q´. The output is ´1´ only in the
processing cycle in which the change of the status of ´CLK´ is detected and a
rising edge is indicated.
Notes:
Standardization: this function block is defined by IEC61131-3.
4.2.174 R1
This is the name of a formal parameter of a standard function block, and as
such defined to be a keyword.
4.2.175 READ_ONLY
This keyword is defined by IEC61131-3 for the definition of Access Paths.
OpenPCS does not support Access Paths, hence you will not be able to use this
keyword with OpenPCS.
4.2.176 READ_WRITE
This keyword is defined by IEC61131-3 for the definition of Access Paths.
OpenPCS does not support Access Paths, hence you will not be able to use this
keyword with OpenPCS.
4.2.177 REAL
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.178 REAL_TO_*
Inputs
original data type real
Returns
converted data type *
The function block converts the first value of type real into the same value of
type *.
The following data types can be converted:
BOOL
Values within the interval ±1,175494351e-38 are cast to false all other values to
true.
Examples:
1.1 -> true
-22.33 -> true
1.1e-39 -> false
STRING
For converting string function Sprintf(str, “%#g”, value); is used.
Examples:
0.0 -> ’0.000000’
123.45678 -> ’ 123.456’
-12.345678 -> ’ –12.3456’
12345678.9 -> ’ 1.23457e+007’
0.000000123 -> ’ 1.23000e-007’
4.2.179 Release
This is the name of a formal parameter of a standard function block (SEMA),
and as such defined to be a keyword.
4.2.180 REPEAT
In contrast to the other loop types, REPEAT will check the loop expression
after execution of the loop. The syntax is:
REPEAT
instructions;
UNTIL expression
END_REPEAT;
So, the REPEAT loop will always be executed at least once. Example:
VAR
i : INT := -1;
END_VAR
REPEAT
i:=i-1;
UNTIL i < 0
END_REPEAT;
(* now, i = -2 *)
Although ´i´ will meet the loop condition from the beginning, the REPEAT
loop will be executed once anyway.
Notes:
This is a keyword only for language ST.
This is defined by IEC61131-3.
4.2.181 REPLACE
Inputs
IN1: STRING Basic character string in which a part should be replaced
IN2: STRING New character string
L: UINT Length of the substring which should be cut out off ‘IN1’
P: UINT Starting position of the inserted string
Returns
STRING New composited
The function ‘REPLACE’ replaces a substring of length ‘L’ starting at position
‘P’ within the given string ‘IN1’ by the string ‘IN2’.
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.182 Resource
This keyword is defined by IEC61131-3 for the textual definition of
configurations, resources and tasks. With OpenPCS, these are defined and
configured using property-dialog boxes. You will see this keyword in OpenPCS
only when printing the definition of a configuration.
4.2.183 RESUME
The Resume function block enables to resume the execution after its has been
stopped, e.g. in an interrupt task for error handling.
Outputs:
Q: BOOL TRUE if succeeded
4.2.184 RET
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
4.2.185 RETAIN
RETAIN is the keyword to declare variables as retentive, and is optional after
VAR, VAR_GLOBAL. Implementation of retentiveness depends on your
controller. See declaration sections.
4.2.186 RETC
Conditional Return
Instruction does not take any operands.
If the CR holds the value “1“, a return jump to the calling POU is performed
– i.e. to the system program if calling POU is of type “program“. If the CR
holds the value “0“, there is no return jump. The program flow continues
with the instruction following the jump instruction.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
4.2.187 RETCN
Conditional Return
Instruction does not take any operands.
Conditioned return jump depending on the Boolean content of the CR.
If the CR holds the value “0“, a return jump to the calling POU is performed
– i.e. to the system program if calling POU is of type “program“. If the CR
holds the value “1“, there is no return jump. The program flow continues
with the instruction following the jump instruction.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
4.2.188 RETURN
The RETURN instruction will cause the current POU to be left, transferring
control back to the caller of the current POU. Note that on working with
functions, the function value (variable with the name of the function) must
be assigned. If output values of function blocks aren’t assigned by local
values of the function block, they have the predefined values of their data
types.
Example:
IF a<b THEN
RETURN;
END_IF;
Notes:
This is a keyword only for language ST.
This is defined by IEC61131-3.
4.2.189 RIGHT
Inputs
In: STRING character string
L: ANY_NUM Number of characters to retrieve
Returns
STRING the ‘L’ rightmost characters of IN
The ´RIGHT´ function enters the right part of the currently loaded character
string into the working register. The input operand ´L´ defines the number
of characters to be entered.
4.2.190 ROL
Inputs
IN: ANY_BIT Bit Pattern
N: UINT Number of bits to shift
Returns
ANY_BIT IN, rotated left N bits
The leftmost bits will be rotated in from right
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.191 ROR
Inputs
IN: ANY_BIT Bit Pattern
N: UINT Number of bits to shift
Returns
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.192 RS
Inputs
Set: bool Set condition
Reset1: bool Reset condition
Outputs
Q1: bool Output state of the bistable element
Q1 is initially false.
Formula
Q1 ß NOT ( Reset1 ) AND ( Q1 OR Set )
Notes
Standardization: this function block is defined by IEC61131-3.
4.2.193 RTC
The RTC funtion block sets the output CDT to the input PDT if IN=1. Otherwise
CDT is unvalid
Inputs:
IN: BOOL
PDT: DATE_AND_TIME Present date and time
Outputs
Q: BOOL copy of IN
CDT: DATE_AND_TIME Current date and time, valid when IN=1
Notes:
Standardization: this function block is defined by IEC61131-3
4.2.195 S(et)
The operand is set, if the content of the CR equals “1“. If this precondition is
not met, operands will not be changed. The CR is not modified.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
4.2.196 S1
This is the name of a formal parameter of a standard function block, and as
such defined to be a keyword.
4.2.197 SD
This is an Action qualifier, see Table 45 in the compliance statement. As
OpenPCS only supports actions of type N, you will not need to use this
keyword with OpenPCS.
4.2.198 SEL
This is the name of a standard function block, which is defined in IEC61131-3,
but not provided by OpenPCS. See Table 31 in the compliance statement.
4.2.199 SEMA
This is the name of a standard function block, which is defined in IEC61131-3,
but not provided by OpenPCS. See Table 34 in the compliance statement.
4.2.200 SETSYSTEMDATEANDTIME
Inputs
EN: BOOL
IDT: DATE_AND_TIME
Outputs
ENO: BOOL
The function "SetSystemDateAndTime” sets the actual system time in IDT.
Notes:
Standardization: this function block is not defined by IEC61131-3.
4.2.201 SFC
SFC is the abbreviation of Sequential Function Chart, one of the
programming languages of IEC61131-3.
4.2.202 SHL
Inputs
IN: ANY_BIT Bit Pattern
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.203 SHR
Inputs
IN: ANY_BIT Bit Pattern
N: UINT Number of bits to shift
Returns
ANY_BIT IN, shifted right N bits
Leftmost bits will be filled with zeros
Notes:
Standardization: this function is defined by IEC61131-3
4.2.204 SIN
Input
In: REAL
Returns
REAL: sine of input
4.2.205 Single
This keyword is defined by IEC61131-3 for the textual definition of
configurations, resources and tasks. With OpenPCS, these are defined and
configured using property-dialog boxes. You will see this keyword in OpenPCS
only when printing the definition of a configuration.
4.2.206 SINT
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.207 SL
This is an Action qualifier, see Table 45 in the compliance statement. As
OpenPCS only supports actions of type N, you will not need to use this
keyword with OpenPCS.
4.2.208 SQRT
Input
In: REAL
Returns
REAL: square root of input
SQRT will compute the square root of the input
4.2.209 SR
Inputs
Set1: bool Set condition
Reset: bool Reset condition
Outputs
Q1: bool Output state of the bistable element
Q1 is initially false.
Formula
Q1 ß Set1 OR ( Q1 AND NOT Reset )
Notes
Standardization: this function block is defined by IEC61131-3.
4.2.210 ST
The content of the CR register is assigned to the operand. This overwrites
the value of the operand. The data type of the operand must match the data
type of the data element in the register. The data type of the CR is
determined by the data type of the variable first assigned a value. Further
assignments will then be possible only if the types of further variables
match. An assignment may be followed by another assignment.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3,
4.2.212 STEP
This keyword is defined by IEC61131-3 for the textual representation of
programming language SFC. OpenPCS does not support the textual
representation of SFC, hence you will not be able to enter this keyword. You
will see this when printing SFC.
4.2.213 STN
The negated content of the CR register is assigned to the operand. This
overwrites the value of the operand. The data type of the operand must
match the data type of the data element in the register. The CR register is
not modified by this operation. An assignment “STN“ may be followed by
another “ST“ or “STN“ instruction.
Notes:
This is a keyword in language Instruction List.
This is defined by IEC61131-3.
4.2.214 STRING
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.215 STRING_TO_*
Inputs
original data type string
Returns
converted data type *
The function block converts the first value of type string into the same value of
type *.
The following data types can be converted:
BOOL
The strings ‘1’ and ‘true’ are converted to true, the rest to false.
‘-1.6’ -> 254 (USINT), 65534 (UINT), 4294967294 (UDINT); (A sint -2 has the
bit pattern: 1111 1110 which is interpreted as 254)
’33.3’ -> 33
REAL
Analog the above conversion. The e-Notation is permitted
Examples:
‘-123.456’ -> -123.456
‘0.23’ -> 0.23
‘-1.2e-2’ -> ’ –0.012
4.2.216 STRUCT
STRUCT is the keyword to define structured data types, see and Derived
Data Types
4.2.217 SUB
Inputs
In1: ANY_NUM
In2: ANY_NUM
Returns
ANY_NUM Difference In1-In2
Subtraction of two numbers.
Notes:
Standardization: this is an operation defined by IEC61131-3.
The function Append Input Connector is not available with this function block
Notes:
Standardization: this is an operation defined by IEC61131-3.
4.2.219 TAN
Input
In: REAL
Returns
REAL: tangent of input
4.2.220 Task
This keyword is defined by IEC61131-3 for the textual definition of
configurations, resources and tasks. With OpenPCS, these are defined and
configured using property-dialog boxes. You will see this keyword in OpenPCS
only when printing the definition of a configuration.
4.2.221 THEN
See IF
4.2.222 TIME
See Elementary Data Types
See also Constants on how to create TIME-constants.
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.223 TIME_OF_DAY
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.224 TIME_TO_*
Inputs
original data type time
Returns
converted data type *
The function block onverts the first value of type time into the same value of
type *.
The following data types can be converted:
BOOL
BYTE
DINT
DWORD
INT
REAL
SINT
STRING
UDINT
UINT
USINT
WORD
Notes:
1. Standardization: this function is defined by IEC61131-3.
2. Except TIME_TO_DINT and TIME_TO_REAL, all TIME convert functions are only available within the Ladder-
Diagram-Editor.
4.2.225 TO
See FOR
4.2.226 TOD
TOD can be used as an abbreviation to TIME_OF_DAY when specifying the data
type of a literal constant. As data type TIME_OF_DAY is not implemented in
OpenPCS, you will not be able to use this keyword with OpenPCS.
4.2.227 TOF
If the state of the input operand "IN" is "1", this will be passed to the output
operand "Q" without any delay. If there is a falling edge, a timer function will be
started lasting as long an interval as specified by the operand "PT"
It is after the time is up that the operand "Q" will change to the state "0". If the
"PT" value changes after the start, it will have no implications until there is the
next rising edge of the operand "IN".
The operand "ET" contains the current timer value. If the time is up, the
operand "ET" will keep its value as long as the operand "IN" has the value "0". If
the state of the "IN" operand changes to "1", the value of "ET" will switch to "0".
If the input "IN" is switched off, this will switch off the output "Q" after an
interval specified by the delay value.
Inputs:
IN: Start condition
PT: time Initial time value
Outputs
Notes:
Standardization: this function block is defined by IEC61131-3
4.2.228 TON
The rising edge of the input operand "IN" will start the timer "TON", and it will
run as long a time interval as specified by the operand "PT".
While the timer is running, the output operand "Q" will have the value "0". If
the time is up, the state will change to "1" and keep this value until the operand
"IN" changes to "0".
If the "PT" value changes after the timer has been started, this will have no
implications until the next rising edge of the operand "IN".
The output operand "ET" contains the current timer value. If the time is up, the
operand "ET" will keep its value as long as the operand "IN" has the value "1". If
the state of the "IN" operand changes to "0", the value of "ET" will switch to "0".
If the input "IN" is switched on, this will switch on the output "Q" after an
interval specified by the delay value.
Inputs:
IN: Start condition
PT: time Initial time value
Outputs
Q: bool binary state of the timer
ET: time current time value
Notes:
Standardization: this function block is defined by IEC61131-3.
4.2.229 TP
A rising edge of the input operand "IN" will start the timing function of the
timer "TP", and it will run as long an interval as specified by the operand "PT".
While the timer is running, the output operand "Q" will have the state "1". Any
changes of state at the input "IN" will have no implication on the procedure.
If the "PT" value changes after the start, this will not have any implication before
the next rising edge of the "IN" operand.
The output operand "ET" contains the current timer value. If the operand "IN"
has the state "1" after the time is up, the operand "ET" will keep its value.
Every edge occurring while the timer is not running will cause an impulse at the output Q that lasts as long as
specified.
Inputs
IN: bool start timer
PT: time initial time value
Outputs
Q: bool binary state of timer
ET: time elapsed time
Notes:
Standardization: this function block is defined by IEC61131-3.
4.2.230 Transition
This keyword is defined by IEC61131-3 for the textual representation of
programming language SFC. OpenPCS does not support the textual
representation of SFC, hence you will not be able to enter this keyword. You
will see this when printing SFC.
4.2.231 TRUE
Constant value of type BOOL.
4.2.232 TRUNC
Inputs
In: REAL
Returns
ANY_INT
Returns the integer part of the supplied real value.
Notes:
Standardization: this function is defined by IEC61131-3.
4.2.233 TYPE
4.2.234 UDINT
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.235 UINT
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.236 ULINT
This is the name of an elementary data type, which is defined by IEC61131-3,
but not supported by OpenPCS. See Table 10 in the compliance statement.
4.2.237 UNTIL
See REPEAT
4.2.238 USINT
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3
4.2.239 VAR
Notes:
This is a keyword only for declaration parts of POUs.
This is defined by IEC61131-3.
4.2.240 VAR_ACCESS
This keyword is defined by IEC61131-3 for the definition of Access Paths.
OpenPCS does not support Access Paths, hence you will not be able to use this
keyword with OpenPCS.
4.2.241 VAR_INPUT
4.2.242 VAR_OUTPUT
4.2.243 VAR_IN_OUT
4.2.244 VAR_GLOBAL
4.2.245 VAR_EXTERNAL
4.2.246 VARINFO
VARINFO is defined as
VARINFO : Struct
TYP : UINT;
SIZE : UINT;
PROG : UINT;
SEG : UINT;
OFFSET:UINT;
BIT: UINT;
SCOPE: UINT;
end_struct;
4.2.247 WHILE
The WHILE loop will execute the loop body as long as the given expression
evaluates to ´true´. Syntax:
WHILE expression DO
instructions;
END_WHILE;
The expression given after the keyword WHILE will be evaluated before
entering the loop. If it is true, the loop body will be executed. This will
terminate only when the expression evaluates to ´false´.
Example
VAR
i : INT := 3;
END_VAR
WHILE i > 0 DO
i:=i-1;
END_WHILE;
Initially, ´i´ equals 3. 3 is greater than 0, so the expression after WHILE is true
and the loop body executed. This will decrement the value of ´i´ to 2. 2 is
still greater than 0, so the loop body will be executed again. Sometime later,
the loop body will decrement ´i´ from 1 to 0. On the next check, the
expression after WHILE will be false, hence the loop body will not be
executed again.
Notes:
This is a keyword only for language ST.
This is defined by IEC61131-3.
4.2.248 WITH
This keyword is defined by IEC61131-3 for the textual definition of
configurations, resources and tasks. With OpenPCS, these are defined and
configured using property-dialog boxes. You will see this keyword in OpenPCS
only when printing the definition of a configuration.
4.2.249 WORD
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.250 WSTRING
See Elementary Data Types
Notes:
Standardization: this is a data type defined by IEC61131-3.
4.2.251 XOR
Inputs
IN1: ANY_BIT Input 1
IN2: ANY_BIT Input 2
Returns
ANY_BIT logical, bitwise XOR of Input 1 and Input 2
Notes:
Standardization: this function is defined by IEC61131-3.
The feature Append Input Connector is available for this function block
4.2.252 XORN
Inputs
Notes:
Standardization: this function is defined by IEC61131-3.
The feature Append Input Connector is available for this function block
1.) The file name including path of the source code that caused the error
message.
2.) A triple of numbers where the first number indicates the section the error
occurred ( "2" for "Declaration" and "3" for "Instruction" ), the second is the line
and the last the column (within the section mentioned before).
3.) A capital letter indicates the type of message:
letter stands for
I Info
E Error
W Warning
F Fatal Error
4.) The error number code that allows you to find a detailed error description
here in the documentation.
5.) A short description of the error.
4.3.2.1 G10001
Warning G10001: The file [file name] is inconsistent. You should not use it.
The File is inconsistent. A reason might be that the file name is different from
the POU name within the file. This is normally caused by renaming files outside
of OpenPCS. POUs should always be renamed by using the OpenPCS function
File->File->Rename.
4.3.3.1 S1000
Nested comments are not allowed.
You are using an IEC 61131-3 compatible version. In this version nested
comments are not allowed.
4.3.3.2 S1001
Invalid character.
An unsupported character was used. See also Table 1: Character set features
4.3.3.3 S1002
End of file found in comment.
The end of the file was reached before an open comment has been closed.
Please close the comment before calling the syntax check.
4.3.3.4 S1003
Reserved keyword.
4.3.3.5 S1004
Invalid value for hour.
4.3.3.6 S1005
Invalid value for minute.
4.3.3.7 S1006
Invalid value for second.
4.3.3.8 S1008
Invalid value for month.
4.3.3.9 S1009
Invalid day range.
day of the month. I. e. if the respective month has less than 31 days, the
maximum number of days in the month is the greatest valid value for the
day literal.
4.3.3.10 S1010
Exponent too large.
The numeric value for the exponent of a real literal must be an integer in the
range [–37, 38] and for a LREAL literal an INT in the range [–307, 308].
4.3.3.11 S1011
Incorrect direct address.
The numeric value for a location field in the hierarchical address of a directly
represented variable is hardware dependent integer, but must not exceed
4294967295. Please consult your hardware documentation to determine
the maximum value for each field in the address hierarchy.
4.3.3.12 S1012
Invalid day entry.
The numeric value for the day unit of a TIME literal must be a fixed point
number in the range [0, 255].
4.3.3.13 S1013
Invalid hour entry.
The numeric value for the hour unit of a TIME literal must be a fixed point
number in the range [0, 24] if the hour is not the most significant unit of the
duration literal. An overflow is only permitted if the hour unit is the most
significant unit of the TIME literal.
Example:
T#25h_15m is permitted.
T#1d_25h_15m is not allowed. The correct representation of this duration
literal is: T#2d_1h_15m.
4.3.3.14 S1014
Invalid minutes entry.
The numeric value for the minute unit of a TIME literal must be a fixed point
number in the range [0, 60] if minute is not the most significant unit of the
duration literal. An overflow is only permitted if the minute unit is the most
significant unit of the TIME literal.
Example:
T#75m is permitted.
4.3.3.15 S1015
Invalid seconds entry.
The numeric value for the seconds unit of a TIME literal must be a fixed
point number in the range [0, 60] if seconds are not the most significant
unit of the duration literal. An overflow is only permitted if the seconds unit
is the most significant unit of the TIME literal.
Example:
T#75s is permitted.
T#5m_75s is not allowed. The correct representation of this duration literal
is: T#6m_15s.
4.3.3.16 S1016
Invalid milliseconds entry.
The numeric value for the milliseconds unit of a TIME literal must be a fixed
point number in the range [0, 1000] if the milliseconds are not the most
significant unit of the duration literal. An overflow is only permitted if the
milliseconds unit is the only unit of the TIME literal.
Example:
T#1200s is permitted.
T#1s_1200ms is not allowed. The correct representation of this duration
literal is: T#2s_200ms.
4.3.3.17 S1017
Direct address too complex.
4.3.3.18 S1018
Integer constant too large/small.
A constant’s value must be in the range of representable values for its type.
The type of an integer constant depends on the type of the variable the
constant is assigned to but must not exceed the range of a LINT/ULINT (8
byte integer/unsigned integer) constant.
4.3.3.19 S1019
Integer constant too large/small (does not fit into 32 bits).
The numeric value of the given constant exceeds the range of values of type
DINT/UDINT.
4.3.3.20 S1020
Numeric value too large/small.
A constant’s value must be in the range of representable values for its type.
The type of a signed integer constant depends on the type of the variable
the constant is assigned to but must not exceed the range of a LINT (8 byte
integer) constant.
4.3.3.21 S1021
Error while processing a floating-point function of the math library.
4.3.3.22 S1022
Invalid string constant.
4.3.3.23 S1023
Invalid number (i.e., numerical constant).
The given numeric constant contains an invalid character. See table Numeric
literals for examples of valid numeric literals.
4.3.3.24 S1024
Invalid constant.
For a list of valid constant representations see Table 53: Function block
invocation features for IL language.
4.3.3.25 S1025
Invalid direct address.
4.3.3.26 S1026
Invalid identifier (name, variable, parameter,...)
4.3.3.27 S1027
End of file found in file header.
An error occurred while reading the file header. You can fix this error, by
opening the file with a text editor and removing all lines preceding the
PROGRAM, FUNCTION or FUNCTION_BLOCK keyword. If this error occurs
more often, please contact your manufacturer.
4.3.3.28 S1028
This identifier is too long (> 64 characters).
4.3.3.29 S1029
This word (identifier, constant literal, string, comment) is too long (> 1024
characters).
4.3.3.30 S1030
Too many identifiers.
4.3.3.31 S1031
Unallowed usage of EN. Just allowed as an identifier for a bool variable in input
section.
A variable with the name ‘EN’ has been declared in the wrong variable
section or with incorrect type.
If the value of EN is TRUE when the function or function block is invoked the
operations defined by the function/function block are executed. These
operations can include the assignment of a Boolean value to the Boolean
output parameter ENO, if this parameter has been defined too.
4.3.3.32 S1032
Unallowed usage of ENO. Just allowed as an identifier for a bool variable in
output section.
A variable with the name ‘ENO’ has been declared in the wrong variable
section or with incorrect type.
The name ‘ENO’ (Enable Out) is reserved for Boolean output variables. The
variable ‘ENO’ requires the Boolean input variable ‘EN’.
If the value of EN is TRUE when the function or function block is invoked the
operations defined by the function/function block are executed. These
operations can include the assignment of a Boolean value to ENO.
4.3.3.33 S3000
Function block not declared.
Tips
Make sure that an instance of the requested function block is declared in
one of the variable declaration sections.
Make sure the name of the name of the function block instance is spelled
correctly.
4.3.3.34 S3001
Function not present.
Tips
Make sure that the file containing the declaration or prototype of the
function is in the scope of the project or that the function is part of the
firmware.
Make sure the name of the name of the function is spelled correctly.
4.3.3.35 S3002
Incorrect parameter.
The requested parameter was not found in the formal parameter list of the
function block.
Tips
Make sure the name of the name of the parameter is spelled correctly.
Make sure that the parameter list of the function block-definition contains a
parameter with the name used in the assignment.
4.3.3.36 S3003
Jump label not present.
Tips
Make sure that a the label is defined in the same program unit.
Make sure the name of the name of the label is spelled correctly.
4.3.3.37 S3004
Multiple assignment of a variable/name.
Tips
Make sure the identifier has not been defined twice in the same program
unit.
Make sure the identifier has not been used in a user type declaration, a
global type declaration or as a function, function block or program name.
4.3.3.38 S3005
This is not a function block instance.
A variable with the name used in a CAL-statement has been found but is not
an instance of a function block.
Tips
Make sure that the identifier is spelled correctly.
Make sure that a function block instance with the specified name has been
declared either in the scope of the program unit or in the global scope.
4.3.3.39 S3006
This is not a struct variable or a function block instance.
Tips
Make sure that the identifier is spelled correctly.
Make sure that the variable with the given name is a struct or a function
block.
4.3.3.40 S3007
This is not a FUNCTION-POU.
An identifier used as a function name has been defined but is not a function
name.
Tips
Make sure that the identifier is spelled correctly.
Make sure that the identifier is the name of a function and not the name of
a function block.
Make sure that a function invocation and not a call of a function block
instance has been desired on the specified position.
4.3.3.41 S3008
No structure element or block parameter.
Tips
Make sure that the identifier is spelled correctly.
Make sure that the right function block or struct instance is used.
If the accessed variable is an instance of a function block make sure that the
function block has a parameter with the name given by the identifier.
If the accessed variable is an instance of a struct, make sure that the struct
has a member with the name given by the identifier.
4.3.3.42 S3009
No jump label.
Tips
Make sure that the identifier is spelled correctly.
Make sure that identifier used after the JMP/JMPC/JMPCN-statement is a
label name.
4.3.3.43 S3010
Type or function block name expected.
A type or a function block name has been expected. The identifier has been
found in the current scope but is neither a type nor a function block name.
Tips:
Check if the name is spelled correctly.
Make sure that the identifier is not a variable name (e. g. a function block
name).
4.3.3.44 S3011
Identifier is not a variable or type name.
A variable or a function block instance has been expected. The identifier has
been found in the current scope but is neither a variable nor a function
block instance.
Tips:
Check if the name is spelled correctly.
Make sure that the identifier is not a type name (e. g. a function block
name).
4.3.3.45 S3012
Variable name or constant expected.
Example:
TYPE
Colors : (red, yellow, blue) := red;
END_TYPE
VAR
Color : Colors := Colors; (* Error: Enum constant expected.
EnumType is a type name *)
END_VAR
4.3.3.46 S3014
Numeric data type expected.
4.3.3.47 S3016
Bit data type expected.
4.3.3.48 S3017
Boolean value expected.
Operator and operand type are incompatible. An operand of type BOOL has
been expected.
4.3.3.49 S3018
Numeric data type expected.
4.3.3.50 S3019
Operators of type incompatible.
4.3.3.51 S3020
Operand types incompatible.
This error occurs if an illegal combination of time and date data types is
used for the input parameters of a SUB operation. For allowed combination
of the input and output data types for this operation see Table 30 -
Functions of time data types in the IEC 1131-3 Compliance Statement.
Example:
VAR
TimeVar : TIME;
DateVar : DATE;
END_VAR
LD DateVar
SUB TimeVar (* Error: SUB is not defined for the this combination of input
parameters *)
ST DateVar
4.3.3.52 S3022
Invalid operand type for this operation.
Invalid operand type for the operation on the specified position. An operand
of type TIME or of an ANYNUM type has been expected.
4.3.3.53 S3023
Invalid operand type for this operation.
Invalid operand type for the operation on the specified position. An operand
of type TIME, TIME_OF_DAY, DATE_AND_TIME or of an ANYNUM type has
been expected.
4.3.3.54 S3024
Invalid operand type for this operation.
Invalid operand type for the operation on the specified position. An operand
of an ANYBIT type has been expected.
4.3.3.55 S3025
Boolean result required.
4.3.3.56 S3026
Undeclared identifier.
This error occurs, if the identifier at the given position, has not been defined
in the scope valid for the compiled program organization unit.
Example:
TYPE
Colors : (red, yellow, blue) := red;
END_TYPE
VAR
Color : Colors := green; (* Error: green has not been declared as an enum
constant *)
END_VAR
4.3.3.57 S3028
Comparison not defined for the data type of the current result.
The comparison on the given position is not defined for the type of the
current result. I. e. the type of the actual parameter is incompatible with the
type of the first formal parameter. For more information see Table 28 -
Standard comparison functions in the IEC 1131-3 Compliance Statement.
Example:
TYPE
Day_of_Week : STRUCT
Name : String;
DayNo : INT(1..7);
END_STRUCT;
END_TYPE
VAR
DayVar1 : Day_of_Week;
DayVar2 : Day_of_Week;
BoolVar : BOOL;
END_VAR
LD DayVar1
GT DayVar2 (* Error: comparisons on structured variables are not allowed *)
ST boolVar
4.3.3.58 S3030
Comparison not defined for this type.
The type of the operand at the given position is not allowed for
comparisons. I. e. the type of the actual parameter is incompatible with the
type of the formal parameter. For more information see Table 28 - Standard
comparison functions in the 1131-3 Compliance Statement.
Example:
TYPE
Day_of_Week : STRUCT
Name : String;
DayNo : INT(1..7);
END_STRUCT;
END_TYPE
VAR
DayVar1 : Day_of_Week;
DayVar2 : Day_of_Week;
BoolVar : BOOL;
END_VAR
LD DayVar1
GT DayVar2 (* Error: comparisons on structured variables are not allowed *)
ST boolVar
4.3.3.59 S3032
Self-referencing (i.e., recursive) declarations are not allowed.
4.3.3.60 S3033
Operand of type TIME expected.
A constant or a variable of type TIME was expected and the operand at the
given position is of another type.
Example:
VAR
StartTime : TIME_OF_DAY;
StopTime : TIME_OF_DAY;
RunTime : TIME := T#10s;
END_VAR
LD StartTime
ADD 10000 (* Error: operand must be of type TIME *)
ST StopTime
LD StartTime
ADD RunTime (* Correct *)
ST Stop Time
4.3.3.61 S3034
String too long for variable.
A string literal has been assigned to a string variable but the string literal
does not fit in the string variable. I. e. the length of the string literal is
greater than the allocated length of the string variable.
4.3.3.62 S3035
Unallowed operand type for this function! Numeric operand or operand of date
or time type expected.
The operation at the given position is not defined for the type of the current
result (i.e. the first actual parameter).
Example:
VAR
BitMake: WORD;
END_VAR
LD BitMask (* Error: operand must be of type TIME, ANY_DATE or
ANY_NUM *)
SUB 3
ST BitMask
4.3.3.63 S3036
Integer constant is out of range.
The integer constant at the given position is not in the range of the
associated data type.
Example:
VAR
Range1 : UINT(-1..1000); (* Error: Sign mismatch. Values for UINT must not
be negative *)
Range2 : INT(-1..36000); (* Error: Overflow: the upper range is greater as
the
maximum valid INT value *)
END_VAR
4.3.3.64 S3037
The lower bound of the sub range must not be greater than the upper bound.
The value of the upper bound in the sub range declaration on the specified
position is lower than the value of the lower bound. A sub range declaration
restricts the range of an integer type to values between and including the
specified upper and lower limits, where the upper limit has to be greater
than the lower limit.
4.3.3.65 S3038
Initialization is out of bounds of sub range (Data type is a sub range type).
A variable of a sub range type has been initialized with a value that is out of
the range of this sub range type. A sub range declaration specifies that the
value of any data element of this type can only take on values between and
including the specified upper and lower limits.
4.3.3.66 S3039
Index is out of bounds.
4.3.3.67 S3040
Invalid data type. ANY_NUM required.
The operation at the given position is not defined for the type of the current
result (i.e. the first actual parameter).
Example:
VAR
BitMake: WORD;
END_VAR
LD BitMask (* Error: operand must be of type TIME, ANY_DATE or
ANY_NUM *)
NEG
ST BitMask
4.3.3.68 S3041
Unallowed EN/ENO type. Must be of type bool. Must not be RETAIN.
An input variable with the name EN or an output variable with name ENO
has been declared with an illegal type or with the RETAIN qualifier.
4.3.3.69 S3042
Missing EN. Use of ENO allowed only in combination with EN.
An output variable with the name ‘ENO’ has been defined but no input
variable with name ‘EN’ has been found. The output variable ‘ENO’ can only
be used in combination with ‘EN’.
4.3.3.70 S3044
Data missing. You either need a load or an expression.
4.3.3.71 S3046
Type names cannot be used as an instance names.
A type name or the name of a program organization unit has been used in a
declaration as a variable name. Program organization units and types
defined on project level are known in the whole project scope and their
names cannot be used as identifiers for local variables.
Example:
FUNCTION Power
(* function block declarations *)
(* statements *)
END_FUNCTION
PROGRAM main
VAR
Power : REAL; (* Error: Power is not allowed as a variable name, because it
already has been
used as a function name *)
END_VAR
(* Code *)
END_PROGRAM
4.3.3.72 S3047
Function parameters must be specified in the order as defined in the Function
prototype. Permutated parameter sequences will lead to incorrect code even if
parameter names are specified.
If a function block is called in ST, the ST compiler translates the given calling
parameter list directly to IL code since it has no knowledge of the function
block’s declaration. Because of this, the specified order must match the
declaration order of the function blocks Input and Output variables.
Example:
FUNCTION_BLOCK Example
VAR_INPUT
In1 : int;
In2 : int;
END_VAR
FUNCITON_BLOCK_END
Program:
VAR
Instance : Example;
Local1 : int;
Local2 : int;
END_VAR
4.3.3.73 S3048
Possible string truncation in assignment.
Example:
VAR
strDestination : string[10];
strSource : string[40];
END_VAR
strDestination := strSource;
4.3.3.74 S3049
Error in ST syntax (double click to get the ST error)
Compiling an ST POU containing a syntax error raises this error. A double click
on the message jumps to source of error and shows the corresponding synatx-
error message.
4.3.3.75 S3050
Array range mismatch.
Warning if assigning two arrays with different range but same size and type.
The compiler allows array assignments, if both arrays are from the same type
and size. E.g. an assignment of two int-arrays with range [0..9] and [1..10] is
possible, but causes this warning.
4.3.3.76 S4000
'AT%': Simultaneous declaration of several direct variables is invalid.
Example:
The following declaration is not allowed:
VAR
dirVar1, dirVar2, dirVar3 : at%I0.0;
END_VAR
4.3.3.77 S4001
Too many variables (identifiers). Maximum is 60 identifiers.
4.3.3.78 S4003
Array too big.
4.3.3.79 S4005
Upper bound must be greater or equal than lower bound.
The value of the upper bound index in the array declaration on the specified
position is lower than the value of the lower bound index of the same
dimension. The upper bound index of a dimension must be greater or equal
than the associated lower bound index.
4.3.3.80 S4006
Syntax error. [Hint: In some cases, the actual error is located in a previous line
(';' missing etc.)].
4.3.3.81 S4007
Self-referencing (i.e., recursive) declarations are invalid.
Recursion detected. A function cannot invoke itself recursively, neither
directly nor indirectly (i.e. by invoking another function, that invokes one of
the functions in the calling hierarchy). Function blocks and programs can
not declare instances of themselves, neither directly nor indirectly (i.e. by
calling an instance of another function block that declares an instance of a
function block type in the calling hierarchy).
4.3.3.82 S4008
Too many attributes 'RETAIN' or 'CONSTANT'. You may use only one.
4.3.3.83 S4009
A STRUCTure must contain at least one structure element (variable declaration).
An empty structure has been declared. This is not allowed. A structure must
contain at least one member variable.
Example:
Not allowed:
TYPE
Mystruct : struct end_struct;
END_TYPE
Allowed:
TYPE
Mystruct : STRUCT
M1 : int;
END_STRUCT
END_TYPE
4.3.3.84 S4010
Simultaneous type declarations are not allowed.
Example:
Not allowed:
TYPE
MyInt1, MyInt2, MyInt3 : int;
END_TYPE
Allowed:
TYPE
MyInt1 : int;
MyInt2 : int;
MyInt3 : int;
END_TYPE
4.3.3.85 S4011
Valid only in PROGRAMs and there within VAR- und VAR_GLOBAL-Sections.
4.3.3.86 S4012
Valid only in PROGRAMs, FUNCTION_BLOCKs, and in FUNCTIONs.
4.3.3.87 S4013
Valid only in PROGRAMs, FUNCTION_BLOCKs, and in FUNCTIONs.
4.3.3.88 S4014
Valid only in PROGRAMs and in FUNCTION_BLOCKs.
4.3.3.89 S4015
Valid only in PROGRAMs and in FUNCTION_BLOCKs.
4.3.3.90 S4016
Valid only in PROGRAMs and in FUNCTION_BLOCKs.
4.3.3.91 S4017
Valid only in PROGRAMs.
4.3.3.92 S4018
Valid only in VAR- and in VAR_GLOBAL-Sections.
4.3.3.93 S4019
Valid only in PROGRAMs or in FUNCTION_BLOCKs and there within VAR-,
VAR_OUTPUT-, or VAR_GLOBAL-Sections).
The qualifier ‘RETAIN’ has been used in a variable declaration part in which
it is not supported.
4.3.3.94 S4020
Valid only in PROGRAMs or in FUNCTION_BLOCKs and there within
VAR_INPUT-Sections with Type 'BOOL' without Initialization.
4.3.3.95 S4021
Valid only within VAR_INPUT, VAR_OUTPUT, and VAR_IN_OUT-Sections.
4.3.3.96 S4022
Valid only in FUNCTION_BLOCKs or FUNCTIONs and there within
VAR..END_VAR-Sections without CONSTANT/RETAIN-Modifiers.
4.3.3.97 S4023
Valid only in TYPE..END_TYPE-Sections.
4.3.3.98 S4024
Valid not within VAR_EXTERNAL-Sections.
Example:
VAR_EXTERNAL
A : INT := 5;
END_VAR
VAR_EXTERNAL
A : INT;
END_VAR
VAR_GLOBAL
A : INT := 5
END_VAR
4.3.3.99 S4033
Multiple initialization.
A member of a struct variable has been initialized more than once. This error
occurs when both an explicit struct initialization and a per element
initialization are made.
Example:
or
TYPE
StructType : Struct
Member1 : int := 5;
Member2 : bool := true;
END_STRUCT;
END_TYPE
4.3.3.100 S4034
Invalid POU name.
This error occurs when a keyword has been used as a POU name or if no
name has been defined.
4.3.3.101 S4035
Invalid type for function.
4.3.3.102 S4036
FUNCTIONs need at least one input parameter VAR_INPUT.
A function has been defined without an input parameter. In IEC61131-3 a
function needs at least one input-parameter.
4.3.3.103 S5000
Wrong parameter type.
4.3.3.104 S5001
Array expected. This is not an array.
Example:
PROGRAM
VAR
x : INT;
y : INT;
END_VAR
END_VAR
4.3.3.105 S5002
This FUNCTION_BLOCK is called by CAL if EN=TRUE. CALC/CALCN are both
invalid.
An instance of a function block with an ‘EN’ input parameter has been called
via CALC/CALCN. This is not allowed. Use the CAL-statement instead. The
code of a function block with an ‘EN’ parameter is invoked if the value of
this parameter is TRUE.
4.3.3.106 S5003
Function block instances may not be 'CONSTANT'.
4.3.3.107 S5004
Function blocks instances are invalid in 'FUNCTION'-POUs, STRUCTs, and in
ARRAYs.
4.3.3.108 S5005
Function block instances as function results are not supported.
4.3.3.109 S5006
Function block instances as parameters are not supported.
Parameters of a function block type are not supported in OpenPCS.
4.3.3.110 S5008
Expected an integer or an enum. Invalid array index.
4.3.3.111 S5009
Invalid sequence beginning. Current result is empty. Use 'LD' to initialize current
result.
Example:
PROGRAM main
VAR
Switch : BOOL;
END_VAR
ST Switch (* Error: Current result is undefined. *)
LD Switch
EQ TRUE
JMPC NextStep
LD TRUE
JMP End (* The value loaded in the previous statement will be lost after the
JMP-statement *)
NextStep:
LD FALSE
END:
ST Switch (* Error: Current result is undefined after a label *)
(* Code *)
END_PROGRAM
4.3.3.112 S5010
Invalid instruction within a parentheses computation.
Example:
FUNCTION_BLOCK Count
VAR_INPUT
StartValue : DINT;
FReset : BOOL;
END_VAR
VAR_OUTPUT
CurrentCountValue : DINT;
END_VAR
VAR
CountValue : DINT;
END_VAR
LD fReset
EQ TRUE
JMPCN Continue
LD StarValue
ST CountValue
Continue:
LD CountValue
ADD 1
ST CountValue
ST CurrentCountValue
END_FUNCTION_BLOCK
PROGRAM main
VAR
Counter : Count;
StartValue : DINT;
Result : DINT;
END_VAR
LD 5
ADD (StartValue
ST Counter.StartValue
EQ 1000
ST Counter.fReset
CAL Counter (* Error: CAL is not allowed between parentheses *)
LD Counter.CurrentCounter (* Error: Load is not allowed between
parentheses *)
)
ST Result
END_PROGRAM.
4.3.3.113 S5011
ARRAYs of function block instances are invalid.
4.3.3.114 S5012
Result type and operand type are incompatible.
The result type of the preceding operation and the type of the variable in
which this result is stored are incompatible.
Example:
VAR
X : INT;
END_VAR
LD 65000
ST x (* 65000 is not of type INT *)
4.3.3.115 S5013
Result type and type of the first formal input parameter are incompatible.
The result type of the preceding operation and the type of the first input
parameter in a function or function block call are incompatible.
Example:
FUNCTION Fun1
VAR
InVar : INT;
END_VAR
(* Code *)
END_FUNCTION
PROGRAM main
VAR
X : DINT;
END_VAR
LD x
ADD 1000
Fun1 (* Error: result type of the preceding operation is DINT, the type of the
first input parameter of Fun1 is INT *)
ST x
END_PROGRAM
4.3.3.116 S5014
Wrong number of parameters.
4.3.3.117 S5015
Invalid type for direct address.
4.3.3.118 S5016
Variable is read-only. Write-access invalid.
A write access has been attempted to a variable, that has only read access.
4.3.3.119 S5017
Variable is not a STRUCTure.
Example.
VAR
A : INT := (m1 := 5, m2 := TRUE); (* not allowed *)
END_VAR
4.3.3.120 S5018
Variable is no array.
Example.
VAR
A : INT := [4]; (* not allowed *)
END_VAR
4.3.3.121 S5019
Initialization value and variable type incompatible.
The type of the initialization value and the type of the variable are
incompatible.
Example:
VAR
X : INT := 65000;
END_VAR
4.3.3.122 S5020
Too many initialization values.
The initialization value for an array type or variable has more elements as
provided by the array declaration.
Example:
VAR
A : ARRAY [1..5] OF INT := [1, 2, 3, 4, 5, 6]; (* too much initialization
values,
array has only 5 elements *)
END_VAR
4.3.3.123 S5021
Formal parameter incorrectly declared.
The name of an output parameter has been expected. The identifier has
been found in the current scope but is not the name of an output
parameter.
Tips:
Check if the name is spelled correctly.
Make sure that the identifier is not an input or in/out parameter.
4.3.3.124 S5022
Multiple assignments to a parameter in a call of a function block instance.
Example:
FUNCTION_BLOCK Fb1
VAR_INPUT
InParam1 : int;
InParam2 : int;
InParam3 : bool;
END_VAR
(* Code *)
END_FUNCTION_BLOCK
PROGRAM main
VAR
fbInst : fb1;
END_VAR
(* Code *)
cal fbInst( InParam1 := 1,
InParam1 := 2,
InParam3 := true
)
(* Code *)
END_PROGRAM
4.3.3.125 S5023
Too much initialization data.
Example:
TYPE
StructType : STRUCT
Member1 : int;
Member2 : int;
Member3 : bool;
END_STRUCT;
END_TYPE
VAR
StructVar : StructType := (Member1 := 1, Member1 := 2, Member3 :=
FALSE);
END_VAR
4.3.3.126 S5024
Unallowed type for this operation.
The operation on the given position is not defined for the type of the
current result. I. e. the type of the actual parameter is incompatible with the
type of the first formal parameter.
Example:
VAR
X : REAL;
END_VAR
LD 1 (* The constant 1 can be converted implicitly to any integer or any bit
type *)
LN (* Error: LN is only defined for ANY_REAL types *)
ST X
4.3.3.127 S5025
Unallowed parameter type for this function.
The type of the actual parameter is incompatible with any type allowed for
the parameter at the given position.
Example:
VAR
X : STRING;
END_VAR
LD ‘EXAMPLE’
LEFT 3.0 (* Error: the second parameter of LEFT has type UINT *)
ST X
4.3.3.128 S5026
Invalid formal parameter type.
Tips:
Check if the name is spelled correctly.
Make sure that the identifier is not an output parameter.
4.3.3.129 S5027
Incompatible operand types.
The operands for the operation at the given position must be compatible. I.
e. they must have the same type or, if at least one of the parameter is a
constant an implicit cast to the type of the other operand has be possible.
Example:
VAR
X : REAL;
END_VAR
LD 1 (* The constant 1 can be converted implicitly to any integer or any bit
type *)
MAX X (* Error: X is of type REAL *)
ST X
4.3.3.130 S5028
Data type not allowed for this operation.
This error occurs, if the type of an actual parameter is not allowed for the
operation at the given position.
Example:
VAR
StringVar : STRING;
END_VAR
LD 1
CONCAT ‘EXAMPLE’(* Error: CONCAT expects a STRING operand as first input
parameter *)
ST StringVar
4.3.3.131 S5029
Invalid function block call.
This error occurs, if a call to a function block instance is attempted and this
instance is an input parameter of the calling function block or program.
Example:
FUNCTION_BLOCK Fb1
VAR_INPUT
InParam1 : int;
InParam2 : int;
InParam3 : bool;
END_VAR
(* Code *)
END_FUNCTION_BLOCK
FUNCTION_BLOCK Fb2
VAR_INPUT
fbInstInput : Fb1;
(* other input declarations *)
END_VAR
VAR
(* local variable declarations *)
END_VAR
(* Code *)
cal fbInstInput( InParam1 := 1,
InParam2 := 2,
InParam3 := true
)
(* Code *)
END_PROGRAM
4.3.3.132 S5030
Variable is write-only. Read-access invalid.
A read access has been attempted to a variable, that has only write access.
4.3.3.133 S5031
Bit access allowed only on bit data types.
Example:
VAR
DintVar : DINT;
BoolVar : BOOL;
END_VAR
LD DintVar.4 (* Error: bit selection allowed only on variables of type
ANY_BIT except BOOL *)
ST BoolVar
4.3.3.134 S5032
Bit position is greater than the number of bits in the selected variable.
This error occurs, when the bit position given in a bit selection is greater
than the number of the most significant bit of the selected variable. The
number of bits accessible in a bit selection depends on the variables data
type. The bit positions are counted from the least significant bit at position 0
to the most significant bit at position n – 1, where n is the number of bits in
the data type.
Example:
VAR
wVar : WORD := 5;
fVar : BOOL := FALSE;
END_VAR
(* Code *)
LD wVar.16 (* The selected variable is of type WORD. I. e. it has 16 bits with
bit positions
from 0 to 15. *)
ST fVar
(* Code *)
4.3.3.135 S5033
IN_OUT parameter missing. Please supply every formal IN_OUT parameter with
a an actual parameter.
FUNCTION_BLOCK Fb1
VAR_IN_OUT
InOutParam1 : INT;
InOutParam2 : BOOL;
END_VAR
(* Code *)
END_FUNCTION_BLOCK
PROGRAM main
VAR
fbInst : fb1;
IntVar1 : INT;
IntVar2 : INT;
END_VAR
(* Code *)
cal fbInst() (* Error: none of the IN_OUT variables of FB1 is supplied with an
actual parameter *)
cal fbInst( InOutParam1 := IntVar1
) (* Error: the actual parameter for the second IN_OUT parameter is missing
*)
4.3.3.136 S5034
Invalid IN_OUT parameter. IN_OUT parameters must not be expressions or
constants.
FUNCTION_BLOCK Fb1
VAR_IN_OUT
InOutParam1 : INT;
InOutParam2 : BOOL;
END_VAR
(* Code *)
END_FUNCTION_BLOCK
PROGRAM main
VAR
fbInst : fb1;
IntVar1 : INT;
IntVar2 : INT;
END_VAR
(* Code *)
cal fbInst( InOutParam1 := IntVar1,
InOutParam2 := 5
) (* Error: the actual parameter for the second IN_OUT parameter is a
constant. *)
4.3.3.137 S5035
Generic data types are not allowed.
Example:
FUNCTION IntegerToString : STRING
VAR_INPUT
InVar : ANY_INT; (* Error: User-defined functions cannot be overloaded *)
END_VAR
(* Code *)
END_FUNCTION
4.3.3.138 S5036
Local types are not allowed in this variable section.
This error occurs, if a local user defined type is used in the declaration of a
global or external variable or in the declaration of a parameter. Global and
external variables as well as parameters have to be of a predefined type or of
a global type. Global types are either hardware dependent types, provided
by the firmware or project global user defined types.
Example:
PROGRAM main
TYPE
StructType : STRUCT
Member1 : BOOL;
Member2 : STRING;
END_STRUCT;
(* Other type definitions *)
END_TYPE
VAR_GLOBAL
GlobVar : StructType; (* Not allowed because StructType is not known in other
POU’s *)
(* Other global variable definitions *)
END_VAR
VAR
(* Local variable definitions *)
END_VAR
(* Code *)
END_PROGRAM
FUNCTION_BLOCK Fb1
TYPE
StructType : STRUCT
Member1 : BOOL;
Member2 : STRING;
END_STRUCT;
END_TYPE
VAR_EXTERNAL
GlobVar : StructType; (* Not allowed because StructType is not known in other POU’s *)
(* Other external declarations *)
END_VAR
VAR_INPUT
InVar : StructType; (* Not allowed because StructType is not known in other
POU’s *)
(* Other input declarations *)
END_VAR
(* Code *)
END_FUNCTION_BLOCK
4.3.3.139 S5037
Too many indices within the braces [....] of an array-access.
Example:
PROGRAM main
TYPE
ArrayType : Array[1..5, 1..20] of INT;
(* Other type definitions *)
END_TYPE
VAR
ArrayVar : ArrayType;
IntVar : INT;
(* Other variable definitions *)
END_VAR
LD ArrayVar[1, 2, 3] (* Error: Variables of type ArrayType have only 2
dimensions *)
ST IntVar
(* Code *)
END_PROGRAM
4.3.3.140 S5038
Directly represented variables are only allowed as parameters in prototypes.
Example:
FUNCTION_BLOCK SetOutput
VAR_EXTERNAL
OutputLocation : BOOL;
END_VAR
VAR_INPUT
Value : BOOL;
END_VAR
LD Value
ST OutputLocation
END_FUNCTION_BLOCK
PROGRAM main
VAR_GLOBAL
OutputLocation AT%Q0.0 : BOOL;
END_VAR
VAR
Switch : SetOutput;
CurrentValue : BOOL;
END_VAR
LD CurrentValue
NOT
CAL Switch(Value := CurrentValue)
END_PROGRAM.
4.3.3.141 S5039
'&x' is only allowed if x is a direct variable.
Tips:
Make sure that the name is spelled correctly.
Make sure that the variable is a directly represented variable.
4.3.3.142 S5040
Too few indices within the braces [....] of an array access.
Example:
PROGRAM main
TYPE
ArrayType : Array[1..5, 1..10, 1..20] of INT;
(* Other type definitions *)
END_TYPE
VAR
ArrayVar : ArrayType;
IntVar : INT;
(* Other variable definitions *)
END_VAR
LD ArrayVar[1, 2] (* Error: Variables of type ArrayType have 3 dimensions *)
ST IntVar
(* Code *)
END_PROGRAM
4.3.3.143 S5041
Values of type INT24 or REAL48 are invalid in this context.
4.3.3.144 S5042
Function block instances may not be 'RETAIN'.
4.3.3.145 S5043
Variables, constants and parameters are not allowed as initialization values in
declarations. Please use a literal or enumeration value.
4.3.3.146 S6002
No prototype.
Tips
Make sure that a type a function or function block with this name is
declared in the context of the active project.
Make sure the name of the type, function or function block is spelled
correctly.
Recompile the whole project.
4.3.3.147 S6004
Recursion (i.e., direct or indirect self-reference) detected.
4.3.3.148 S6005
Too many types and function blocks. For the maximum number of type
definitions please consult your hardware documentation.
This error occurs, if too many types functions or function blocks have been
used in the calling hierarchy of a program organization unit. For the
maximum number of types, functions and function blocks supported see the
Table D.1: Implementation-dependent parameters
4.3.4.1 L10001
Variable declared twice: <Variable name>.
The variable with the specified name has been declared twice.
Tips:
If the variable is declared in a PROGRAM POU, check if a resource global
variable with the same name has been declared.
If the variable is a resource global variable check if a global variable with the
same name has been declared in a PROGRAM POU of the resource.
If one of the above cases is true, change the name of one of the variables or
move the variable declaration in the PROGRAM POU in a VAR_EXTERNAL
section. Attention: if you move the variable into the external section, every
access to the external variable accesses the resource-global variable with the
same name.
4.3.4.2 L10004
Unresolved external: <Variable name>.
Either a global variable with the specified name has not been found, or a
function block type with the specified name has not been found.
Tips:
Make sure that the variable name is spelled correctly.
If the variable is not a function block instance, make sure that a variable with
this name is declared in the VAR_GLOBAL section of the calling program or
in a file with resource-global variable declarations.
If the variable is a function block instance, make sure that the function block
has been compiled successfully, i.e. an object file for this function block
exists.
4.3.4.3 L10026
Unsupported address: <AddressDescription>.
Tips:
Check if the address is spelled correctly.
Check if the syntax of the address description is correct. The syntax of the
address description is hardware dependent, but must be a string formed of
the percent sign "%" followed by a location prefix, a size prefix and one or
more unsigned integers, separated by periods (.). The size prefix may be
empty. For valid location and size prefixes consult your hardware
documentation.
4.3.4.4 L10027
Invalid hardware description: %1..
The hardware description file for the hardware with name <hardware name>
has not been found.
Tips:
Check if the resource specification contains a valid hardware module name.
Reinstall OpenPCS. If this doesn’t remove your error, consult your hardware documentation or refer
to your hardware manufacturer.
4.3.4.5 L10029
Hardware configuration error.
4.3.4.6 L10030
Invalid type for variable: %1.
4.3.4.7 L10031
Initializations of directly represented variables are not allowed.
4.3.4.8 L10032
Address <AddressDescription> invalid in this context.
The address with the specified description is a valid address but not allowed
in this context (Task, POU, Resource, Configuration).
4.3.4.9 L10033
Attribute RETAIN not supported for directly represented variables.
A directly represented variable with RETAIN attribute has been found. This is
not supported by the hardware. Please move the variable declaration in
another section or remove the attribute from the section.
4.3.4.10 L10034
Attribute CONST not supported for directly represented variables.
A directly represented variable with CONST attribute has been found. This is
not supported by the hardware. Please move the variable declaration in
another section or remove the attribute from the section.
4.3.4.11 L10035
Instance limit for function block <FunctionBlockName> reached.
4.3.4.12 L10036
Invalid process image description. Please contact your manufacturer.
4.3.4.13 L10063
An error occurred while opening a file: %1.
4.3.4.14 L10105
Internal error while loading function or DLL: <DLL/Function-Name>.
The specified DLL or function could not be loaded. Either your OpenPCS
directory does not contain a DLL with the specified name, or your DLL has
an invalid version. Please reinstall your system or consult your hardware
description.
4.3.4.15 L10106
Native code compiler needed for selected optimization. Please choose another
optimization or install a native code compiler.
code compiler is installed. If you do not have a native code compiler please
select another optimization in the "Edit Resource Specifications" dialog. For a
native code compiler for your hardware please refer to your manufacturer.
4.3.4.16 L12001
Type conflict. Type of external the variable doesn't match with type of the global
variable with the same name.
A global variable with the same name as the external variable has been
found, but the types of the global and the external variable are different.
Tips:
Make sure that the external variable name is spelled correctly.
Make sure that the type of the external variable is spelled correctly.
Make sure that the global variable is the requested variable.
Change the type of the external or the global variable.
4.3.4.17 L12002
Readable access to this variable is not allowed: <Variable name>.
A read access to a variable that has only write access has been attempted.
Tips:
Make sure that the specified variable name is spelled correctly.
The specified variable is an output location. A read access to output
locations is not allowed.
4.3.4.18 L12003
Writable access to this variable is not allowed: <Variable name>.
A write access to a variable that has only read access has been attempted.
Tips:
Make sure that the specified variable name is spelled correctly
The specified variable is a constant. Write access to a constant variable is not
allowed. Check if the CONSTANT attribute can be removed from the
variable.
The specified variable is an input location. A write access to input locations is
not allowed.
4.3.4.19 L12005
Internal linker error no.: <errorno>. Please contact your manufacturer.
4.3.4.20 L12006
Memory allocation failure. Not enough memory to perform operation.
4.3.4.21 L12007
No object information found for task <TaskName>. Please rebuild all.
The object file (<TaskName>.crd) for the specified task has not been found.
Please rebuild the whole resource.
4.3.4.22 L12008
Interpreter stack overflow in task <TaskName>.
4.3.4.23 L12064
Error exporting OPC variables to OPC server configuration. Error code: %1.
4.3.4.24 L12065
Error initializing ConfOPC.DLL. Please contact your manufacturer.
The DLL could not be initialized. Please ask the hardware manufacturer.
4.3.4.25 L12066
Incorrect alignment for address <address>: variable must be placed at an
alignment border."
4.3.4.26 L12996
Unknown command: <Command>.
4.3.4.27 L12997
Unknown object kind: <ObjectKindSpecification>.
An invalid object file has been found. Please rebuild the whole resource.
4.3.4.28 L12998
Invalid object kind. Kind found/requested: <ObjectKind>.
An invalid object file has been found. Please rebuild the whole resource.
4.3.4.29 L12999
Invalid object version found. Object version found/expected: <ObjectVersion>.
The object file version and the compiler object version are different. The
object file has been created with a different compiler version. Please
recompile the whole resource.
4.3.4.30 L13000
Load of resource global variable information failed.
The object file with the resource global information has not been found.
Please rebuild the whole resource.
4.3.4.31 L13001
No object information found for pou <pouname>
The object file (<pouname>.obj) for the specified POU has not been found.
Please rebuild the whole resource.
4.3.4.32 L14009
Resource size exceeds size of PLC memory.
The size of the resource exceeds the PLC memory limit. Calculation can differ
from real size.
4.3.4.33 L14010
Resource size warning limit reached. Used X of Y bytes.
The size of the resource has reached the configured warning limit. Set the size
within the browser options dialog.
4.3.4.34 L15001
An undefined task type has been used or no task type has been defined for task %1.
Check the configuration parameters of the properties of the task type. You may
also ask your hardware manufacturer.
4.3.4.35 L20012
Persistency file creation disabled due to online linking
If your hardware uses online linking the creation of the persistency file is
disabled.
4.3.5.1 C10006
Data type 'REAL' is not supported.
Data type ‚REAL’ is not supported by the active hardware. For a list of data
types supported by OpenPCS see the IEC 1131-3 Compliance statement
Please consult your hardware documentation for a list of data types
supported by your hardware.
4.3.5.2 C10007
Data type 'DATE' is not supported.
Data type ‚DATE’ is not supported. For a list of data types supported by
OpenPCS see IEC 1131-3 Compliance statement. Please consult your
hardware documentation for a list of data types supported by your
hardware.
4.3.5.3 C10008
Data type 'TIME_OF_DAY' is not supported.
4.3.5.4 C10009
Data type 'STRING' is not supported.
Data type ‚STRING’ is not supported by the active hardware. For a list of
data types supported by OpenPCS see the IEC 1131-3 Compliance
statement. Please consult your hardware documentation for a list of data
types supported by your hardware.
4.3.5.5 C10010
Data type 'DATE_AND_TIME' is not supported.
4.3.5.6 C10012
Data type 'TIME' is not supported.
Data type ‚TIME’ is not supported by the active hardware. For a list of data
types supported by OpenPCS see the IEC 1131-3 Compliance statement.
4.3.5.7 C10017
The sections 'VAR_INPUT', 'VAR_OUTPUT' and 'VAR_IN_OUT' are not supported
in programs.
4.3.5.8 C10019
Directly represented variables are not allowed in this POU.
4.3.5.9 C10020
Bit access not allowed for this variable/parameter.
4.3.5.10 C10021
Constant must not be negative.
A negative constant has been found where an unsigned operand has been
expected. Please change the constant value or the variable type (if possible).
4.3.5.11 C10024
Constant is out of range.
The constant at the given position is not in the range of the associated data
type.
4.3.5.12 C10025
IN/OUT parameters must always be supplied with actual parameters.
A formal in/out parameter has been declared in a function block, but not
supplied with an actual parameter in the CAL statement of an instance.
In/out parameters are references and must be supplied with an actual
parameter.
4.3.5.13 C10026
Unsupported address.
The address at the given position is not supported by the active hardware.
Please consult your hardware documentation for a list of addresses
supported by the hardware.
4.3.5.14 C10028
Inout-parameters of type struct are not supported.
4.3.5.15 C10031
RETAIN-variables are not supported by this hardware.
4.3.5.16 C10034
Invalid command for this hardware.
The command at the given position is not supported by this hardware. For a
list of unsupported commands p consult your hardware documentation. For
a list of commands not supported by OpenPCS see the IEC 1131-3
Compliance statement.
4.3.5.17 C10035
The operand/parameter must be of type 'UINT'.
Example:
VAR
StringVariable : STRING;
Length : INT := 32;
END_VAR
LD ‘EXAMPLE’
LEFT length (* Error: this parameter must be of type UINT *)
ST StringVariable
4.3.5.18 C10036
Structs and arrays of complex data types are not supported by this hardware.
Example:
TYPE
DayOfWeek : STRUCT
Name : STRING;
DayNumber : UINT;
END_STRUCT;
Presence : STRUCT
Name : STRING;
OursPerDay : ARRAY[1..31] OF UINT; (* Error: ARRAY is a complex data
type.
Structs of complex data types are not supported by the hardware *)
END_STRUCT;
4.3.5.19 C10038
Couldn't detect the type of the constant.
The type of a constant could not be determined. Please initialize a variable
of the desired type with this constant and use the variable instead of the
constant.
4.3.5.20 C10043
Implementation code is not allowed.
Implementation code has been found in a file with resource global variable
declarations. This is not allowed. Please declare the requested variable in
another program organization unit as an external variable and move the
code in the respective file.
4.3.5.21 C10045
Function blocks instances are not allowed in this section.
4.3.5.22 C10046
'VAR_GLOBAL' is not allowed.
4.3.5.23 C10047
Only 'VAR_GLOBAL' allowed.
4.3.5.24 C10049
String too long.
A string has been declared with a length specification, which exceeds the
maximum string length supported by the hardware.
For the maximum string length supported by OpenPCS see the IEC 1131-3
Compliance statement. However, the hardware-manufacturer can restrict
the maximum string length by changing the value of the "MaxStringLength"
entry in the [MODULE] section of the hardware description file.
4.3.5.25 C10055
This variable cannot be initialized.
4.3.5.26 C10057
Data type is not supported.
The data type at the given position is not supported. For a list of data types
supported by OpenPCS see the IEC 1131-3 Compliance statement. For a list
of data types supported by your hardware, please consult your hardware
documentation.
4.3.5.27 C10060
LD/ST of function block instances is not allowed.
A LD or ST instruction with a function block instance as an operand has
been found. This is not allowed.
4.3.5.28 C10063
An error occurred while opening a file.
4.3.5.29 C10064
Internal Compiler Error No. %1. Please contact your manufacturer.
4.3.5.30 C10067
Struct declarations are not supported.
4.3.5.31 C10068
Array declarations are not supported.
4.3.5.32 C10069
Enumerated data type declarations are not supported.
A enumerated data type declaration has been detected, but is not supported
by the hardware. Enumerated data type declarations are supported by
OpenPCS. The hardware manufacturer however, can forbid this declarations
by setting the value of the "EnumAllowed" entry in the [MODULE] section of
the hardware description file to 0. consult your hardware documentation to
find out if enumerated data type declarations are supported by your
hardware.
4.3.5.33 C10075
Invalid array index. It has to range between -32767 and 32767.
4.3.5.34 C10076
Lower array bound exceeds minimum array bound limit (dimension #).
4.3.5.35 C10078
Invalid type of a global or directly represented variable.
4.3.5.36 C10083
Only directly represented variables are allowed in this POU.
Resource global variables are separated in two kind of files. Files which
contain only symbolic variables and files which contain the directly
represented variables. In these files symbolic and directly represented
variables must not be mixed up.
4.3.5.37 C10084
Global structs are not supported.
Please declare this variable in a local section and use input and output
parameters, if the value should be changed by a function or function block.
The type declaration for the desired structure must be done on project level.
Example:
FUNCTION_BLOCK AdjustDayName
VAR_INPUT
DayIn : DayOfWeek;
END_VAR
VAR_OUTPUT
DayOut : DayOfWeek;
END_VAR
LD DayIn
ST DayOut
LD DayIn.DayNumber
EQ 1
LD ‘MONDAY’
ST DayOut.Name
LD DayIn.DayNumber
EQ 2
LD ‘TUESDAY’
ST DayOut.Name
END_FUNCTION_BLOCK
PROGRAM main
VAR
Day : DayOfWeek;
DayNumber : UINT;
END_VAR
LD DayNumber
ST Day.DayNumber
CAL AdjustDayName(DayIn := Day | Day := DayOut)
END_PROGRAM
4.3.5.38 C10092
Memory allocation failure.
4.3.5.39 C10093
Data Segment Out Of Memory
To much data (e.g. variables) for program or function block so the data doesn’t
fit into a 64 kB segment. Segments are restricted to 64 kB.
Remark:
If this error occurs, try to restruct the program/function block and put some
variables into other function blocks (FBs can be used as data containers) or use
resource global variables.
4.3.5.40 C10094
Initial Data Segment Out Of Memory
To much data (e.g. variables) for program or function block so the data doesn’t
fit into a 64 kB segment. Segments are restricted to 64 kB.
Remark:
If this error occurs, try to restruct the program/function block and put some
variables into other function blocks (FBs can be used as data containers) or use
resource global variables.
4.3.5.41 C10095
Code Segment Memory Allocation Failure
This error occurs if the program code (UCode/Native Code) doesn’t fit into a 64
kB segment. The size for a segment is restricted to 64 kB.
Remark:
If this error occurs, it is possible to restruct the program (e.g. putting some
parts of the code into Function Blocks) so that the program decreases down to
64 kB.
4.3.5.42 C10096
Data Segment size warning limit reached. Used X of Y bytes.
The size of the corresponding data segment has reached the configured
warning limit. Set the size within the browser options dialog.
4.3.5.43 C10097
Initial Data Segment size warning limit reached. Used X of Y bytes.
The size of the corresponding initial data segment has reached the configured
warning limit. Set the size within the browser options dialog.
4.3.5.44 C10098
Code Segment size warning limit reached. Used X of Y bytes.
The size of the corresponding code segment has reached the configured
warning limit. Set the size within the browser options dialog.
4.3.5.45 C10100
Invalid expression for parameter.
4.3.5.46 C10108
Constant of type TIME is out of range.
For the range of TIME constants supported by OpenPCS see the IEC 1131-3
Compliance statement.
4.3.5.47 C10109
Invalid data type for this operation. Integer or real type expected.
The operation at the given position is only supported for integer and real
operands.
4.3.5.48 C10110
Nested functions are not supported.
4.3.5.49 C10112
Type conflict.
Either the current result is incompatible with the expected data type or the
type of an actual parameter is incompatible with the type of the respective
formal parameter.
4.3.5.50 C10113
Operation not supported for this data type.
The data type of an operand is not allowed for the operation at the given
position. For more information about allowed data types for this operation
see IEC 61131-3 and the IEC 1131-3 Compliance statement.
4.3.5.51 C10114
Parameter expressions are not supported for this operation.
4.3.5.52 C10115
Retain attribute for FB instances forbidden.
RETAIN function block instances are not supported. Please remove the
attribute or move the instance declaration out of this section.
4.3.5.53 C10777
Upper array bound exceeds maximum array bound limit (dimension #).
4.3.5.54 C11001
Can't determine unambiguously the type of constant -> take %1.
4.3.5.55 C11007
Function has no input parameter. Is this intended?
4.3.6.1 M21004
4.4 Shortcuts
Edit Submenu
CTRL+Z: Undo
CTRL+Y: Redo
CTRL+X/SHIFT+DEL: Cut
CTRL+C/CTRL+INS: Copy
CTRL+V/SHIFT+INS: Paste
DEL: Delete
F4: Next Error
SHIFT+F4: Previous Error
CTRL+F: Find
CTRL+H: Replace
CTRL+G: Goto IL Line (SFC)
CTRL+A: Select All
ALT+RETURN: Properties
PLC Submenu
F7: Build Active Resource
Window Submenu
F6: Next Pane
ALT+1: Project
ALT+2: Document
ALT+3: Test and Comissioning
ALT+4: Output
Ctrl+Enter: Fullscreen
Insert->Variable Submenu
ALT+SHIFT+V: All Variables
ALT+SHIFT+I: Input Variables
ALT+SHIFT+O: Output Variables
ALT+SHIFT+N: In/Out Variables
ALT+SHIFT+L: Local Variables
ALT+SHIFT+G: Global Variables
ALT+SHIFT+E: External Variables
ALT+SHIFT+F: FB-Instance Variables
LADDER Editor
F12: Insert Network
CTRL+ALT+F: Insert Function
CTRL+ALT+B: Insert Functionblock
SHIFT+RETURN: Insert New Line in Comment
SFC Editor
CTLR+ALT+S: Insert Step/Transition
CTLR+ALT+L: Insert Step/Transition left
CTLR+ALT+R: Insert Step/Transition right
CTLR+ALT+J: Insert Jump
CTLR+ALT+B: Insert Functionblock
CTLR+ALT+F: Insert Function
CFC/FBD Editor
CTRL+B: Insert Connection
5 Index
Adding Hardware Support 22
Adding input or output to compound block 74
) Adjusting order of cyclic tasks 110
Alias names 64
) (Right-paranthesis-operator) 166 AND 169
AND_BOOL_EN 169
AND_BOOL_FBD 169
* AND_BYTE_FBD 169
AND_DWORD_EN 169
*_TO_** 167, 220 AND_DWORD_FBD 169
*_to_bool 167 AND_WORD_EN 169
*_TO_STRING 167 AND_WORD_FBD 169
ANDN 169
ANDN_BOOL_FBD 169
A ANDN_BYTE_FBD 169
ANDN_DWORD_FBD 169
ANDN_WORD_FBD 169
About OPC 33
ANY 169
About OPC Server 98
ANY_BIT 169
About this manual 24
ANY_DATE 169
ABS 167
ANY_INT 169
ABS_DINT 167
ANY_NUM 170
ABS_DINT_FBD 167
ANY_REAL 170
ABS_INT 167
ARRAY 170
ABS_INT_FBD 167
ASIN 171
ABS_REAL 167
ASIN_REAL 171
ABS_REAL_FBD 167
ASIN_REAL_FBD 171
ABS_SINT 167
Assignment 171
ABS_SINT_FBD 167
Assignment Editor Introduction 48
ABS_UDINT_FBD 167
AT 171
ABS_UINT_FBD 167
ATAN 172
ABS_USINT_FBD 167
ATAN_REAL 172
ACOS 168
ATAN_REAL_FBD 172
ACOS_REAL 168
AutoComplete 53
ACOS_REAL_FBD 168
AutoDeclare 53
ACTION 168
Automatic positioning of the caret 67
Active Document Server 117
Active Resource 33
ADD 168
ADD (time) 168
B
Add files 37
Add Task 33 Block specific help 62
ADD_DINT 168 Block Type Program Function Function Block
ADD_DINT_FBD 168 132
ADD_INT 168 BOOL 172
ADD_INT_FBD 168 Bool_to_* 172
ADD_REAL 168 BOOL_TO_BYTE 172
ADD_REAL_FBD 168 BOOL_TO_BYTE_EN 172
ADD_SINT 168 BOOL_TO_dint 172
ADD_SINT_FBD 168 BOOL_TO_DINT_EN 172
ADD_TIME 168 BOOL_TO_DWORD 172
ADD_TIME_FBD 168 BOOL_TO_DWORD_EN 172
ADD_UDINT 168 BOOL_TO_int 172
ADD_UDINT_FBD 168 BOOL_TO_INT_EN 172
ADD_UINT 168 BOOL_TO_REAL 172
ADD_UINT_FBD 168 BOOL_TO_REAL_EN 172
ADD_USINT 168 BOOL_TO_sint 172
ADD_USINT_FBD 168 BOOL_TO_SINT_EN 172
AddHW 103 BOOL_TO_STRING_EN 167, 172
Adding a Library to a project 119 BOOL_TO_TIME_EN 172
BOOL_TO_udint 172
MIN_DWORD 204 N
MIN_INT 204
MIN_INT_FBD 204
N (Action Qualifier) 205
MIN_REAL 204
Native Code 111
MIN_REAL_FBD 204
NCC 206
MIN_SINT 204
NCC ARM ARM Mode 113
MIN_SINT_FBD 204
NCC ARM THUMB Mode 113
MIN_STRING 204
NCC Hitachi H8/300H 113
MIN_TIME 204
NCC Infineon C16x (huge model) 113
MIN_UDINT 204
NCC Intel Protected Mode 113
MIN_UDINT_FBD 204
NCC Intel Real Mode 113
MIN_UINT_FBD 204
NCC Motorola 68K 113
MIN_USINT 204
NCC Motorola DSP563xx 113
MIN_USINT_FBD 204
NCC Motorola PowerPC 8x 113
MIN_WORD 204
NE 206
MOD 205
NE_BOOL_FBD 206
MOD_DINT 205
NE_BYTE_FBD 206
MOD_DINT_FBD 205
NE_DINT_FBD 206
MOD_INT 205
NE_DWORD_FBD 206
MOD_INT_FBD 205
NE_INT_FBD 206
MOD_SINT 205
NE_REAL_FBD 206
MOD_SINT_FBD 205
NE_SINT_FBD 206
MOD_UDINT 205
NE_STRING_FBD 206
MOD_UDINT_FBD 205
NE_TIME_FBD 206
MOD_UINT 205
NE_UINT_FBD 206
MOD_UINT_FBD 205
NE_USINT_FBD 206
MOD_USINT 205
NE_WORD_FBD 206
MOD_USINT_FBD 205
NEG 206
Monitoring code 18
Nested Comments 132
More Information 24
Network 53
MOVE 205
NewTopic 1 88
MOVE_DINT 205
NOT 206
MOVE_INT 205
NOT_BOOL_FBD 206
MOVE_REAL 205
NOT_BYTE_FBD 206
MOVE_SINT 205
NOT_DWORD_FBD 206
MOVE_UDINT 205
NOT_WORD_FBD 206
MOVE_UINT 205
MOVE_USINT 205
Moving/copying blocks and margin connectors
by keyboard 72
O
MUL 205
MUL (time) 205 OF 206
MUL_DINT 205 On 206
MUL_DINT_FBD 205 Online Change 158
MUL_INT 205 Online connections introduction 100
MUL_INT_FBD 205 Online Edit 20, 160
MUL_REAL 205 Online Server Overview 100
MUL_REAL_FBD 205 OPC 206
MUL_SINT 205 OPC - I/O Introduction 33
MUL_SINT_FBD 205 OPC - I/O-Pane 27
MUL_UDINT 205 Open Project 30
MUL_UDINT_FBD 205 OpenPCS Framework Introduction 25
MUL_UINT 205 OpenPCS Function Blocks 162
MUL_UINT_FBD 205 OpenPCS Samples 13
MUL_USINT 205 Operators 54
MUL_USINT_FBD 205 Optimisation Settings 109
Multiple Connections 61 OR 206
Multiple Resources 109 OR_BOOL 206
Multitasking 108 OR_BOOL_FBD 206
MUX 203 OR_BYTE 206
OR_BYTE_FBD 206
OR_DWORD 206
OR_DWORD_FBD 206
OR_WORD 206
Table 15 Location and size prefix features for Table D.1 Implementation-dependent
directly represented variables 137 parameters 153
Table 16 Variable keywords for variable Table E.1 Error conditions 156
declaration 137 TAN 220
Table 17 Variable type assignement features TAN_REAL 220
138 TAN_REAL_FBD 220
Table 18 Variable initial value assignement Task 220
features 138 Templates 23
Table 19 Graphical negation of Boolean signals Test and Commissioning Introduction 93
139 Text Block 60
Table 2 Identifier features 133 THEN 220
Table 20 Use EN input an ENO output 139 TIME 220
Table 21 Typed and overloaded functions 139 TIME_OF_DAY 220
Table 22 Type conversion function features 139 TIME_TO_BOOL_EN 220
Table 23 Standard functions of one numeric TIME_TO_BYTE_EN 220
variable 140 TIME_TO_DINT_EN 220
Table 24 Arithmetic standard functions 140 TIME_TO_DWORD_EN 220
Table 25 Standard bit shift functions 141 TIME_TO_INT_EN 220
Table 26 Standard bitwise Boolean functions TIME_TO_REAL_EN 220
141 TIME_TO_SINT_EN 220
Table 27 Standard selection functions 141 TIME_TO_STRING_EN 167, 220
Table 28 Standard comparison functions 141 TIME_TO_UDINT_EN 220
Table 29 Standard character string functions TIME_TO_UINT_EN 220
142 TIME_TO_USINT_EN 220
Table 3 Comment features 134 TIME_TO_WORD_EN 220
Table 30 Functions of time data types 142 TO 194, 221
Table 31 Functions of enumerated data types TO_STRING 139
143 TOD 221
Table 33 Function block declaration features TOF 221
143 TON 222
Table 34 Standard bistable function blocks 144 Tooltips for structs and elements of structs 52
Table 35 Standard edge detection function TP 222
blocks 144 Transition 223
Table 36 Standard counter function blocks 144 Transitions 78
Table 37 Standard timer function blocks 144 Trend View 20, 95
Table 39 Program declaration features 144 Trigger 96
Table 4 Numeric Literals 134 TRUE 223
Table 40 Step features 146 TRUNC 223
Table 41 Transitions and Transition conditions TYPE 223
146 Type definitions 37
Table 42 Declaration of actions 147
Table 43 Step/action association 147
Table 44 Action block features 147 U
Table 45 Action qualifiers 147
Table 46 Sequence evolution 148 UCODE 111
Table 5 Character string literal features 134 UDINT 223
Table 52 Instruction list (IL) operators 148 udint_TO_BOOL 167, 223
Table 53 Function block invocation features for UDINT_TO_BOOL_EN 167, 223
IL language 149 udint_TO_BYTE 223
Table 55 Operators of the ST language 149 UDINT_TO_BYTE_EN 223
Table 56 ST language statements 150 udint_TO_dint 223
Table 57 Representation of lines and block 150 UDINT_TO_DINT_EN 223
Table 58 Graphic execution control elements udint_TO_DWORD 223
151 UDINT_TO_DWORD_EN 223
Table 59 Power rails 152 udint_TO_int 223
Table 6 Two character combinations in character UDINT_TO_INT_EN 223
strings 135 udint_TO_REAL 223
Table 60 Link Elements 152 UDINT_TO_REAL_EN 223
Table 61 Contacts 152 udint_TO_sint 223
Table 62 Coils 152 UDINT_TO_SINT_EN 223
Table 63 Reserved Names 153 UDINT_TO_STRING_EN 167, 223
Table 7 Duration literal features 135 UDINT_TO_TIME_EN 223
Table 8 Date and time of day literals 135 udint_TO_uint 223
UDINT_TO_UINT_EN 223 V
udint_TO_usint 223
UDINT_TO_USINT_EN 223
VAR 224
udint_TO_WORD 223
VAR_ACCESS 224
UDINT_TO_WORD_EN 223
VAR_EXTERNAL 225
UINT 224
VAR_GLOBAL 225
uint_TO_BOOL 167, 224
VAR_IN_OUT 225
UINT_TO_BOOL_EN 167, 224
VAR_INPUT 224
uint_TO_BYTE 224
VAR_OUTPUT 224
UINT_TO_BYTE_EN 224
Variable Address 110
uint_TO_dint 224
Variablecatalog 40
UINT_TO_DINT_EN 224
Variablegrid 40
uint_TO_DWORD 224
Variabletable 40
UINT_TO_DWORD_EN 224
VARINFO 225
uint_TO_int 224
UINT_TO_INT_EN 224
uint_TO_REAL 224
UINT_TO_REAL_EN 224
W
uint_TO_sint 224
UINT_TO_SINT_EN 224 Watch variables 93
UINT_TO_STRING_EN 167, 224 Watching variables 34
UINT_TO_TIME_EN 224 Watchlist 94
uint_TO_udint 224 WHILE 225
UINT_TO_UDINT_EN 224 Wiring 84
uint_TO_usint 224 WITH 226
UINT_TO_USINT_EN 224 WORD 226
uint_TO_WORD 224 WORD_TO_BOOL 167, 226
UINT_TO_WORD_EN 224 WORD_TO_BOOL_EN 167, 226
ULINT 224 WORD_TO_BYTE 226
Uninstall Library 120 WORD_TO_BYTE_EN 226
Unknown instructions 112 WORD_TO_dint 226
UNTIL 224 WORD_TO_DINT_EN 226
Upload 36 WORD_TO_DWORD 226
Usage without License Key 107 WORD_TO_DWORD_EN 226
Using constants as inputs 60 WORD_TO_int 226
Using languages other than IL 82 WORD_TO_INT_EN 226
USINT 224 WORD_TO_REAL 226
usint_TO_BOOL 167, 224 WORD_TO_REAL_EN 226
USINT_TO_BOOL_EN 167, 224 WORD_TO_sint 226
usint_TO_BYTE 224 WORD_TO_SINT_EN 167, 226
USINT_TO_BYTE_EN 224 WORD_TO_STRING_EN 167, 226
usint_TO_dint 224 WORD_TO_TIME_EN 226
USINT_TO_DINT_EN 224 WORD_TO_udint 226
usint_TO_DWORD 224 WORD_TO_UDINT_EN 226
USINT_TO_DWORD_EN 224 WORD_TO_uint 226
usint_TO_int 224 WORD_TO_UINT_EN 226
USINT_TO_INT_EN 224 WORD_TO_usint 226
usint_TO_REAL 224 WORD_TO_USINT_EN 226
USINT_TO_REAL_EN 224 Working with Blocks 58, 83
usint_TO_sint 224 Working with Networks 86
USINT_TO_SINT_EN 224 Working with watchlists 94
USINT_TO_STRING_EN 167, 224 WSTRING 226
USINT_TO_TIME_EN 224
usint_TO_udint 224
USINT_TO_UDINT_EN 224 X
usint_TO_uint 224
USINT_TO_UINT_EN 224 XML-Import/Export 23
usint_TO_WORD 224 XOR 226
USINT_TO_WORD_EN 224 XOR_BOOL_EN 226
XOR_BOOL_FBD 226
XOR_BYTE_EN 226
XOR_BYTE_FBD 226
XOR_DWORD_EN 226
Printed 19.05.2011
299