Sicam Pas PLC Ui
Sicam Pas PLC Ui
Sicam Pas PLC Ui
User Manual
1 A Quick Tour through SICAM PAS PLC UI
Contents
1 A Quick Tour through SICAM PAS PLC UI 14
3 Advanced Topics 37
4 Reference 67
5 Index 144
2.4.3 Expressions in ST 25
2.4.4 Comments in ST 26
2.4.5 ST Editor Online 26
2.5 CFC Editor 26
2.5.1 Introduction CFC Editor 26
2.5.2 Working with Blocks 27
2.5.3 Connections 27
2.5.4 Margin Bars 27
2.5.5 CFC Editor Online 28
2.5.6 Advanced CFC topics 28
2.5.6.1 Text Block 28
2.5.6.2 Printing CFC charts 28
2.5.6.3 Using constants as inputs 28
2.5.6.4 Execution Order 28
2.5.6.5 The Connection Tool 29
2.5.6.6 Finding Errors in CFC 29
2.5.7 Compound Blocks 29
2.5.7.1 Compound Blocks: Introduction 29
2.5.7.2 Create compound block 30
2.5.7.3 Adding input or output to compound block 30
2.6 Test and Commissioning 31
2.6.1 Test and Commissioning: Introduction 31
2.6.2 Start and Stop 31
2.6.3 Watch variables 31
2.6.4 Set variables 31
2.6.5 Force Variables 31
2.7 Online Server 32
2.7.1 Online Server: Overview 32
2.8 Online Server Setup 32
2.8.1 Online connections: introduction 32
2.8.2 Create new connection 32
2.8.3 Delete Connection 33
2.8.4 Edit connection properties 34
2.8.5 Select Connection 34
2.9 Compiler 34
2.9.1 Compiler: Overview 34
2.9.2 Instruction List Compiler 34
2.9.2.1 Compiler Command Line 34
2.9.3 Linker 35
2.9.3.1 Linker Command Line 35
2.9.4 Make 36
2.9.4.1 Make Command Line 36
3 Advanced Topics 37
3.1 Runtime issues 37
3.1.1 Optimisation Settings 37
3.1.2 Breakpoints 37
3.1.3 Performance 37
3.2 Native Code Compiler 37
3.2.1 Native Code 37
3.2.2 Direct Calls 38
3.2.3 Exception Handling in native code 38
4 Reference 67
4.1 Keywords (by category) 67
4.1.1 IEC1131 Standard Function Blocks 67
4.1.2 IEC61131-3 Standard Functions 67
4.1.3 IEC61131-3 operations 68
4.1.4 SICAM PAS PLC UI Functions and Function Blocks 68
4.1.5 Data Types 68
4.1.6 Declaration Keywords 69
4.1.7 Instruction List Instructions 69
4.1.8 Structured Text Keywords 69
4.2 Keywords (A..Z) 70
4.2.1 ABS 70
4.2.2 ACOS 70
4.2.3 ADD 70
4.2.4 ADD (time) 70
4.2.5 AND 71
4.2.6 ANDN 71
4.2.7 ARRAY 71
4.2.8 ASIN 71
4.2.9 Assignment 72
4.2.10 AT 72
4.2.11 ATAN 72
4.2.12 BOOL 72
4.2.13 BY 72
4.2.14 BYTE 73
4.2.15 CAL 73
4.2.16 CALC 73
4.2.17 CALCN 73
4.2.18 CASE 73
4.2.19 CONCAT 74
4.2.20 CONSTANT 74
4.2.21 COS 74
4.2.22 CR 74
4.2.23 CTD 74
4.2.24 CTU 75
4.2.25 CTUD 75
4.2.26 DATE 76
4.2.27 DATE_AND_TIME 76
4.2.28 DINT 76
4.2.29 DIV 76
4.2.30 DIV (time) 77
4.2.31 DO 77
4.2.32 DELETE 77
4.2.33 DWORD 77
4.2.34 ELSE 77
4.2.35 ELSIF 77
4.2.36 END_CASE 77
4.2.37 END_FOR 77
4.2.38 END_FUNCTION 77
4.2.39 END_FUNCTION_BLOCK 77
4.2.40 END_IF 78
4.2.41 END_PROGRAM 78
4.2.42 END_REPEAT 78
4.2.43 END_TYPE 78
4.2.44 END_VAR 78
4.2.45 END_WHILE 78
4.2.46 EQ 78
4.2.47 EXIT 78
4.2.48 EXP 79
4.2.49 F_TRIG 79
4.2.50 FALSE 79
4.2.51 FBD 79
4.2.52 FIND 79
4.2.53 FOR 80
4.2.54 Function 81
4.2.55 FUNCTION BLOCK 81
4.2.56 GE 81
4.2.57 GetTaskInfo 81
4.2.58 GetTime 81
4.2.59 GetTimeCS 82
4.2.60 GT 82
4.2.61 IF 83
4.2.62 IL 84
4.2.63 INSERT 84
4.2.64 INT 84
4.2.65 JMP 84
4.2.66 JMPC 84
4.2.67 JMPCN 84
4.2.68 LD 85
4.2.69 LD (Ladder Diagram) 85
4.2.70 LDN 85
4.2.71 LEFT 85
4.2.72 LE 85
4.2.73 LEN 85
4.2.74 LIMIT 86
4.2.75 LN 86
4.2.76 LOG 86
4.2.77 LT 86
4.2.78 MUX 86
4.2.79 MAX 86
4.2.80 MID 87
4.2.81 MIN 87
4.2.82 MOD 87
4.2.83 MOVE 87
4.2.84 MUL 88
4.2.85 MUL (time) 88
4.2.86 NCC 88
4.2.87 NE 88
4.2.88 NEG 88
4.2.89 NOT 89
4.2.90 OF 89
4.2.91 OR 89
4.2.92 ORN 89
4.2.93 POU 89
4.2.94 PROGRAM 89
4.2.95 R(eset) 89
4.2.96 R_TRIG 90
4.2.97 REAL 90
4.2.98 REAL_TO_* 90
4.2.99 REPEAT 90
4.2.100 REPLACE 91
4.2.101 RET 91
4.2.102 RETAIN 91
4.2.103 RETC 91
4.2.104 RETCN 92
4.2.105 RETURN 92
4.2.106 RIGHT 92
4.2.107 ROL 92
4.2.108 ROR 93
4.2.109 RS 93
4.2.110 S(et) 93
4.2.111 SFC 93
4.2.112 SHL 93
4.2.113 SHR 94
4.2.114 SIN 94
4.2.115 SINT 94
4.2.116 SQRT 94
4.2.117 SR 94
4.2.118 ST 95
4.2.119 ST (Structured Text) 95
4.2.120 STN 95
4.2.121 STRING 95
4.2.122 STRUCT 95
4.2.123 SUB 95
4.2.124 SUB (time) 96
4.2.125 THEN 96
4.2.126 TIME 96
4.2.127 TIME_OF_DAY 96
4.2.128 TIME_TO_* 96
4.2.129 TOF 97
4.2.130 TON 97
4.2.131 TP 98
4.2.132 TRUE 98
4.2.133 TRUNC 99
4.2.134 TYPE 99
4.2.135 UDINT 99
4.2.136 UINT 99
4.2.137 UNTIL 99
4.2.138 VAR 99
4.2.139 VAR_INPUT 99
4.2.140 VAR_OUTPUT 100
4.2.141 VAR_IN_OUT 100
4.2.142 VAR_GLOBAL 100
4.2.143 VAR_EXTERNAL 100
4.2.144 VARINFO 100
4.2.145 WHILE 100
4.2.146 WORD 101
4.2.147 XOR 101
4.2.148 XORN 101
4.3 Errors and Warnings 102
4.3.1 Syntax Errors 102
4.3.1.1 S1000 102
4.3.1.2 S1001 102
4.3.1.3 S1002 102
4.3.1.4 S1003 102
4.3.1.5 S1004 102
4.3.1.6 S1005 102
4.3.1.7 S1006 102
4.3.1.8 S1008 102
4.3.1.9 S1009 102
4.3.1.10 S1010 103
4.3.1.11 S1011 103
4.3.1.12 S1012 103
4.3.1.13 S1013 103
4.3.1.14 S1014 103
4.3.1.15 S1015 103
4.3.1.16 S1016 104
4.3.1.17 S1017 104
4.3.1.18 S1018 104
4.3.1.19 S1019 104
4.3.1.20 S1020 104
4.3.1.21 S1021 104
4.3.1.22 S1022 104
4.3.1.23 S1023 105
4.3.1.24 S1024 105
4.3.1.25 S1025 105
4.3.1.26 S1026 105
4.3.1.27 S1027 105
4.3.1.28 S1028 106
4.3.1.29 S1029 106
4.3.1.30 S1030 106
4.3.1.31 S1031 106
4.3.1.32 S1032 106
4.3.1.33 S3000 106
4.3.1.34 S3001 107
4.3.1.35 S3002 107
4.3.1.36 S3003 107
4.3.1.37 S3004 107
4.3.1.38 S3005 107
4.3.1.39 S3006 108
5 Index 144
1.1 Quicktour
For further information please refer to SICAM PAS, Manual Automation Blocks, chapter 1.
The project is shown in the Project-Browser on the left side. The editor-pane is located in the
center. 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 Editor 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. These are the files that you write yourself, with one of the editors of SICAM PAS PLC UI,
or with different applications. All directories and files under the current project-path are shown.
2.2.2.2 Resource-Pane
The Resource-Pane contains the instance tree, named Configuration. It shows your controllers as
resources, the tasks running in these controllers, the instances of functions and function blocks
available within these, and all variables defined in these.The active resource is shown with a green
Button.
In the instance tree, there are only links to files and objects defined in the File-Pane: Tasks are
referencing POUs of type PROGRAM, global variables are referencing global declaration files etc.
You can use a library in a project by selecting it and choosing FileLibraryUse in current
project. The libraries that are currently used in the project are shown with a red symbol.
2.2.3 Files
Having created files, you can launch the editor for any of these by simply double-clicking it from
within the File-Pane.
Check Enable Upload to pack the sources of your application onto the target. This is helpful if at
the end of debugging you want to save the project on the controller for later use by other service
personnel. This is not supported with SICAM PAS.
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 SICAM PAS PLC UI (GetVarAddr) need
this feature to be enabled, so you better do not disable it without good reason. Not relevant to
SICAM PAS.
For a description of optimisation settings, see Optimisation Settings in Advanced Topics.
Note that the task name depends on the program name, and cant be changed. To complete the task
definition, you must specify the information, how the task can be executed: Cyclic , Timer
controlled , Interrupt controlled. Task type, priority and time control the execution of this task and
in co-operation with other tasks. To do this, right-click on the task and choose "Properties". For
more information, see Multitasking. In SICAM PAS only CYCLIC is supported
2.2.4 Compiler
2.2.5 Online
To create a new file with resource global variables, select File New Others Global
Variables. Edit these files, and link them to the resources you want to use them with.
VAR_GLOBAL: A variable should be declared as global variable in the POU program if this
vari able should be valid in this POU and in the function blocks called by this POU. This variable
must be declared as external variable (VAR_EXTERNAL) in all function blocks which intend to
use this variable.
VAR_EXTERNAL: If a declared global variable will be used inside a function block, this
variable must be declared as external variable inside this function block.
VAR: A local variable is only valid inside the POU in which it was declared. The declaration of
local variables can be supplemented by the attributes RETAIN or CONSTANT, or by an
address.
TYPE : The keyword TYPE is used for declaration of user defined (derived) data types with
local scope in the POU-types program and function block, or with global scope in the type
definitions.
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
SICAM PAS PLC UI does not implement the following data types defined by IEC61131-3:
DATE: Day, Month, Year (only)
TIME_OF_DAY: Time of day (only)
DATE_AND_TIME: Date and Time
VAR
PreValvePressure: Pressure;
END_VAR
PROGRAM feld
TYPE
Arr_5_INT:ARRAY [1..5] OF INT;
END_TYPE
VAR
Arr1 : Arr_5_INT;
END_VAR
.
END_PROGRAM
StopCar: BOOL;
END_VAR
In the instruction part of that POU, the defined enumerated values can be used:
Example: ST
MAINROAD:= red;
if MAINROAD = red THEN
stopcar = TRUE;
end-if;
2.4 ST Editor
The ST Editor supports bookmarks (for marking lines of interest while editing a file) and
Breakpoints.
2.4.2 Instructions in ST
Code written in ST is a sequence of ST-instructions. ST-instructions are terminated with a semi
colon.
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.4.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 con
structed 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 OR XOR
boolean OR OR
2.4.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
*)
2.5.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
InsertConnection.
To add many connections, you may use the connection tool.
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.
When you start CFC Editor in online mode, it will automatically start displaying live values of
contacts, coils, function and function block inputs and outputs as far as possible.
Compound blocks will be executed as a whole at that moment in the execution order where the
compound block is located. The contents of the compound block will be executed in itself
following the same rules. This is very similar to subroutines in moder programming languages.
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.
On screen, double-click the Compound Block to see its contents. Use `ViewLevel up` or in the
toolbar to get back to the location where the Compound Block is being invoked.
Compound Blocks can be nested, i.e. inside a Compound Block you can define, or use, other com
pound 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 con
nector, 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.
Whenever you run out of space on a chart, or think readability would be increased by more hierar
chically grouping, you can collapse some of your already wired blocks into a Compound Block:
Notes:
Currently there is no support for reverting the process of converting a group of blocks to a
compound block.
Top-Down:
1. Any Compound Block has one very last connector which is shorter than the others.
This is always the last connector, one on the left side as an input, one on the right
side as an output.
2. Wire this last input or output
3. As soon as you use this last connector, it will be shown in full length, and another
shorter connector will be added to the end.
Bottom-Up:
menu.
Mark the items CFC-Connector and Compound block connector name it and
close the dialog box by clicking OK.
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.
In the column Force of the Test&Comissioning-Window, SICAM PAS PLC UI will display if a
variable is currently forced or not.
The action performed when pressing OK depends on which of the three buttons set, enable
force and disable force is selected:
if the variable is currently not forced, set will once set the variable to the value specified. If the
variable is modified by the application, this might have a very short effect only. enable force will
force the variable to the value specified, i.e. set the variable to the specified value at the end of
each cycle, disable force will have no effect
if the variable is currently forced, set will disable forcing for this variable and set the variable
once to the value specified, enable force will continue to force the variable, but with the value
specified now, disable force will not set the variable, but only disable forcing for the variable
Please note
forcing only resets the variable at the end of each cycle. Modifications during one cycle are
possible and not prevented.
forcing is not restricted to directly represented variables (AT %)
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 Drivers 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.
To select the current connection, click the button next to the Network Connection from the Edit
Resource Specifications windows, the Select Connection window opens.
Select the desired connection by clicking its name and then click OK.
Back in the Edit Resource Specifications window, click OK to apply the modified settings.
2.9 Compiler
2.9.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 informations
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.
2.9.4 Make
3 Advanced Topics
3.1.2 Breakpoints
SICAM PAS PLC UI supports Breakpoints in textual languages ST and IL. Breakpoints are
currently not supported in Native Code, so set optimsation 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 SICAM PAS PLC UI 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 for intuitivity.
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
guarantuee damage to be avoided.
3.1.3 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 ovbious 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 (optimisation
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.
Native Code is optional, but available for most platforms. While UCODE is optimised for
portability between platforms, fast task switches and small memory footprint, NATIVE CODE is
optimised for execution speed on one particular platform. On application level, the programmer
can select which code to use via the Optimsation Settings on resource or task level.
Some debugging features of SICAM PAS PLC UI are available with UCODE only, so if you intent
to use one of these, be sure to set optimsation to "size": this includes Breakpoints and online
display in Ladder Diagram as well as the POU Editor, Online Change.
The SICAM PAS PLC UI RunTime System typically allows for task switches to be triggered after
each and every UCODE instructions, i.e. quite frequently even within small loops. This is not
possible with native code. If no direct calls are being used, the run-time checks for task switches at
each call/return. With direct calls, it checks for task switches only after one task has completely
finished.
Execution of native code typically is faster than execution of UCODE, with the speed-up factor
depending on the processor, the implementation of the run-time system and the native code
compiler, the C-compiler used to compile the run-time system, the application, the memory
architecture, e.g.: if not using "direct calls", calling a function block with native code may be
slower than calling the function block with UCODE, due to calling convention conversion. Hence,
if your application uses plenty of tiny blocks, speed-up may be below expectation. With complex
instructions (e.g. sine or real-divide), UCODE overhead may be comparably small, hence the
speed-up gained with native code may be small as well.
The virtual UCODE machine within the run-time system will do some checks while executing the
UCODE. In native code, most of this checking is omitted because it would add significant run-time
overhead and the ultimate reason to use native code is speed improvement. It is strongly
recommend that you carefully test and debug your application with UCODE first before using
native code. If you need a native code compiler containing checking, contact SIEMENS. Checks
not available with native code include array subscript overflow/underflow and string length
checking
3.3 Documentation
The SICAM PAS PLC UI standard cross-reference is of limited use to CFC programmers, as most
symbols listed in that cross-reference will be symbols which names have been created
automatically by the CFC Editor and have no meaning to the programmer.
To create the CFC cross-reference, select File --> Crossreference, or print the chart to see the
cross-reference on paper. The cross-reference stored in file is less legible, but better suited to
automatic post-processing with third party tools (like grep, awk).
The CFC cross reference is listed in the form
source: name [chart]
destination1: name [chart]
destination2: name [chart]
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 legt 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.
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.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 `File ProjectNew...
Create a function block named `det_edge` (for edge detection): `File 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
Invoke a syntax check with FileSyntaxcheck . The own construction of libraries is not
supported by SICAM PAS.
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 `File
ProjectNew...`. If you received the libary on a disk, this can be something beginning with `A:\`.
During installation, the library project will be copied into a sub-directory of
<SICAM PAS>\PlcUI\ini\lib.
Example:
Create a new project in the Browser using File ProjectNew.... Name that new project `TEST`.
Select FileLibrary Install New....
Now use the browse-button to locate the MyLib-project you created just before and press `Ok`.
Example:
Mark the Library "MyLib" in the Library-Pane and select FileLibraryUse in current project .
Create a new POU of type PROGRAM, named `main`. Select Insert Functionblocks.... to see
your library functions. To use your function block DET_EDGE, implement program `main` as
shown below:
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:
3.5 IEC61131-3
3.5.1.2 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 datatypes require a special
prefix
Constant Datatype Example Meaning
INT -13 Integer -13
45165 or 45_165 Integer 45165 (both)
+125 Integer 125
REAL -13.12 Real 13,12
Note: DATE, TIME_OF_DAY and DATE_AND_TIME are currently not supported by SICAM
PAS PLC UI.
See also Elementary Data Types
SICAM PAS PLC UI 5.0 complies with the requirements of IEC1131-3, for the following language
features:
3.5.2.14 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
7 COS x
8 TAN x
9 ASIN x
10 ACOS x
11 ATAN x
13 DATE_AND_TIME_TO_TIME_OF_DAY x
14 DATE_AND_TIME_TO_DATE x
[Note: this chapter is empty because the corresponding chapter in IEC1131-3 does not list any
features to be referenced here].
Pre-emptive or non-pre-emptive
scheduling
3.3.1 Maximum length of expressions unlimited
Partial evaluation of Boolean expressions no
3.3.2 Maximum length of statements unlimited
3.3.2.3 Maximum number of CASE selections unlimited
4.1.1 Graphic/semigraphic representation graphic
note 1: SICAM PAS PLC UI is highly configurable, so this parameter may vary depending on your
hardware. If in doubt, consult the documentation of your hardware.
Division by 0
4 Reference
SHR
SQRT
TIME_TO_*
TRUNC
XOR
RIGHT
ADD
ADD (time)
DIV
DIV (time)
MUL
MUL (time)
SUB
SUB (time)
The following data types are defined by SICAM PAS PLC UI in addition to IEC1131-3:
VARINFO
END_TYPE
END_VAR
RETAIN
TYPE
VAR_GLOBAL
VAR_IN_OUT
VAR_INPUT
VAR_OUTPUT
VAR
LD ANY
LDN ANY_BIT
ST ANY
STN ANY_BIT
S BOOL
R BOOL
JMP Label
JMPC Label
JMPCN Label
CAL Instance name
CALC Instance name I
CALCN Instance name
RET -
RETC -
RETCN -
AND
ANDN
OR
ORN
XOR
XORN
ADD
SUB
MUL
DIV
GT
GE
EQ
NE
LE
LT
SICAM PAS PLC UI uses the following keywords in Programming Language Structured Text:
:= (Assignment)
BY
CASE
DO
ELSE
ELSIF
END_CASE
END_FOR
END_IF
END_REPEAT
END_WHILE
EXIT
FOR
IF
OF
REPEAT
RETURN
UNTIL
WHILE
4.2.1 ABS
Input
In: ANY_NUM
Returns
ANY_NUM
4.2.2 ACOS
Input
In: REAL
Returns
REAL: arcus cosine of input
4.2.3 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:
Standardisation: this is an operation defined by IEC61131-3
Notes:
Standardisation: this is an operation defined by IEC61131-3
4.2.5 AND
Inputs
IN1: ANY_BIT Input 1
IN2: ANY_BIT Input 2
Returns
ANY_BIT logical, bitwise AND of Input 1 and Input 2
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.6 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:
Standardisation: this function is defined by IEC61131-3
4.2.7 ARRAY
ARRAY is the keyword to declare arrays of elements, see Derived Data Types
Note: SICAM PAS PLC UI uses 16bit integers to represent array subscripts for performance
reasons. Arrays should not be declared in a way to use subscripts exceeding 16bit address limits, as
this would lead to undefined behaviour.
4.2.8 ASIN
Input
In: REAL
Returns
REAL: arcus sine of input
4.2.9 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.10 AT
AT is the keyword to define the memory location where SICAM PAS PLC UI should allocate
memory for a given variable.
4.2.11 ATAN
Input
In: REAL
Returns
REAL: arcus tangens of input
4.2.12 BOOL
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.13 BY
See FOR
4.2.14 BYTE
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.15 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
4.2.16 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.17 CALCN
If the CR holds the value FALSE, 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.18 CASE
Though IF instructions may be nested, checking for one of many conditions can look quite compli
cated using IF. CASE, instead, can check for more than one value with one instruction. The ex
pression of the CASE-instruction is of type INT, and only the instruction will be executed that
corresponds to this INT-value. After that the first instruction behind END_CASE will be executed.
IF the expression does not match any of the case-values, the first instruction (block) behind the
ELSE will be executed. This partial instruction is optional.
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;
In this example, the value of number will be determined, and if it is equal to 10, amount will be
incremented, if it is equal to 11, amount will be decreased. In any other case, amount will be
set to equal number.
Notes:
This is a keyword only for language ST
This is defined by IEC61131-3
4.2.19 CONCAT
Inputs
In1: STRING First String
In2: STRING Second String
Returns
STRING Concatenation of both StringsPosition of first occurrence
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.
4.2.20 CONSTANT
CONSTANT is the keyword to declare variables that should not be modified by the application
code. The SICAM PAS PLC UI 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.21 COS
Input
In: REAL
Returns
REAL: cosine of input
4.2.22 CR
CR is the abbreviation of Current Result, the virtual accumulator used in IEC61131-3
programming languages.
4.2.23 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 preset value
Outputs
Q: bool signal when zero reached
CV: int counter value
Notes:
Standardisation: this function block is defined by IEC61131-3
4.2.24 CTU
The function block "CTD" serves for counting up impulses received from the input operand "CD".
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 "CD" 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
PV: int counter upper limit
Oututs
Q: bool signals if counter has reached upper limit
CV: int current counter value
Notes:
Standardisation: this function block is defined by IEC61131-3
4.2.25 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 "CD". will increase the
counter by "1", while every falling 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 "Q" will have the boolean value "0". If the counter
value reaches or passes the margin, the output "Q" 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 wheter counter state has reached PV
QD: bool signals whether counter state has reached "0"
CV: int counter state
Notes:
Standardisation: this function block is defined by IEC61131-3
4.2.26 DATE
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.27 DATE_AND_TIME
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.28 DINT
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.29 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:
Standardisation: this is an operation defined by IEC61131-3
Notes:
Standardisation: this is an operation defined by IEC61131-3
4.2.31 DO
4.2.32 DELETE
SICAM PAS PLC UI does not implement the DELETE function.
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.33 DWORD
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.34 ELSE
4.2.35 ELSIF
See IF
4.2.36 END_CASE
See CASE
4.2.37 END_FOR
See FOR
4.2.38 END_FUNCTION
See Function.
4.2.39 END_FUNCTION_BLOCK
See Function Block.
4.2.40 END_IF
See IF
4.2.41 END_PROGRAM
See PROGRAM
4.2.42 END_REPEAT
See REPEAT
4.2.43 END_TYPE
4.2.44 END_VAR
Notes:
This is a keyword only for declaration parts of POUs
This is defined by IEC61131-3
4.2.45 END_WHILE
See WHILE
4.2.46 EQ
Inputs
IN1: ANY Input 1
IN2: ANY Input 2
Returns
BOOL TRUE if Input 1 is equal to Input 2
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.47 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
Notes:
This is a keyword only for language ST
This is defined by IEC61131-3
4.2.48 EXP
Input
In: REAL
Returns
REAL: e ** In
4.2.49 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 rising edge is indicated.
Notes:
Standardisation: this function block is defined by IEC61131-3
4.2.50 FALSE
Constant value of type BOOL.
4.2.51 FBD
FBD is the abbreviation of Function Block Diagram, one of the programming languages of
IEC61131-3.
4.2.52 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 occurence
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.
Invocation of the FIND function in the program search
PROGRAM search
VAR
Basic_Text : STRING := 'StartupCondition';
Search_Text : STRING := 'Switch';
Position : INT;
END_VAR
LD Basic_Text
FIND Search_Text
ST Position (* Position: 4 *)
END_PROGRAM
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.53 FOR
With the FOR loop, a loop control variable will be set to a specified starting value, then incre
mented (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
4.2.54 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. SICAM PAS PLC UI 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 SICAM PAS
PLC UI, 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.2.56 GE
Inputs
IN1: ANY Input 1
IN2: ANY Input 2
Returns
BOOL TRUE if Input 1 is greater or equal than Input 2
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.57 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*)
Status: 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.58 GetTime
Input
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.59 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 multi
ple 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.60 GT
Inputs
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.61 IF
If the expression after IF evaluates to true, the instructions given after THEN will be executed. If
the expression after IF evaluates to false, the instructions after ELSE will be executed or the
ELSEIF-condition will be checked. In any case, execution will then continue with the next instruc
tion after END_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:
4.2.62 IL
LD is the abbreviation of Instruction List, one of the programming languages of IEC61131-3.
4.2.63 INSERT
SICAM PAS PLC UI does not implement the INSERT function.
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.64 INT
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.65 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.
Thus, this instruction is to be viewed as a sequence consisting of one instruction.
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.66 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.67 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 "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.68 LD
The value of the operand is evaluated and loaded into the current result. This overwrites data
stored in CR. The operand is not modi fied. 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.70 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.71 LEFT
Inputs
In: STRING character string
L: ANY_INT 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.72 LE
Inputs
IN1: ANY Input 1
IN2: ANY Input 2
Returns
BOOL TRUE if Input 1 is less or equal than Input 2
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.73 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.74 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:
Standardisation: this function is defined by IEC61131-3
4.2.75 LN
Input
In: REAL
Returns
REAL: logarithm to the base of e
4.2.76 LOG
Input
In: REAL
Returns
REAL: logarithm to the base of 10
4.2.77 LT
Inputs
IN1: ANY Input 1
IN2: ANY Input 2
Returns
BOOL TRUE if Input 1 is less than Input 2
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.78 MUX
SICAM PAS PLC UI does not implement the MUX function.
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.79 MAX
Inputs
In1: Any_Num Input Value1
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.80 MID
SICAM PAS PLC UI does not implement the MID function.
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.81 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:
Standardisation: this function is defined by IEC61131-3
4.2.82 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.83 MOVE
Inputs
In: ANY
Outputs
Out: ANY
The function "MOVE" is an arithmetic function that serves for assigning a value.
In the Ladder Diagram, DIVs are available for the data type Integer and UInteger.
Functions must have a EN input and an ENO output controlling the execution of the function. If
"EN" is FALSE, the function is not executed and "ENO" will be set to FALSE. "ENO" may also
be used as the error state of the function. These two parameters must be connected directly or via a
sub-network with the currency rails.
4.2.84 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:
Standardisation: this is an operation defined by IEC61131-3
Notes:
Standardisation: this is an operation defined by IEC61131-3
4.2.86 NCC
NCC is an acronym for native code compiler.
4.2.87 NE
Inputs
IN1: ANY Input 1
IN2: ANY Input 2
Returns
BOOL TRUE if Input 1 is not equal to Input 2
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.88 NEG
Input
In: ANY_NUM
Returns
ANY_NUM: negated numeric value of input
4.2.89 NOT
Inputs
IN1: ANYBIT Input
Returns
ANYBIT logical negation (1-complement) of Input
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.90 OF
See CASE
4.2.91 OR
Inputs
IN1: ANY_BIT Input 1
IN2: ANY_BIT Input 2
Returns
ANY_BIT logical, bitwise OR of Input 1 and Input 2
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.92 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:
Standardisation: this function is defined by IEC61131-3
4.2.93 POU
POU is the abbreciation of Program Organisation Unit, meaning a Program, Function or Function
Block written in one of the programming languages of IEC61131-3.
4.2.94 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 unvisible within SICAM PAS PLC
UI, as they are maintained by the Editors internally.
4.2.95 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:
4.2.96 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:
Standardisation: this function block is defined by IEC61131-3
4.2.97 REAL
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.98 REAL_TO_*
Inputs
In: REAL
Returns
converted data type "*"
Converts the supplied REAL to a different data type "*", which can be one of
BOOL
BYTE
DINT
DWORD
INT
SINT
STRING
TIME
UDINT
UINT
USINT
WORD
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.99 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.100 REPLACE
SICAM PAS PLC UI does not implement the REPLACE function.
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.101 RET
The "RET" instruction causes an unconditioned return jump to the calling POU if this POU is the
program POU, a return jump to the system program. When jumping back, the calling POU is
resumed at the point of interruption. Delayed operations will be executed.
Notes:
This is a keyword in language Instruction List
This is defined by IEC61131-3
4.2.102 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.103 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:
4.2.104 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.105 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 arent 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.106 RIGHT
Inputs
In: STRING character string
L: ANY_INT 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.107 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:
4.2.108 ROR
Inputs
IN: ANY_BIT Bit Pattern
N: UINT Number of bits to shift
Returns
ANY_BIT IN, rotated right N bits
The rightmost bits will be rotated in from left.
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.109 RS
Inputs
Set: bool Set condition
Reset1: bool Reset condition
Outputs
Q1: bool Output state of the bistable element
The characteristic feature of the RS function module is to statically set a data element - the output
Q1 - to the Boolean status 1 or 0. Depending on the Boolean input operands Set1 and
ReSet1 it is changed between the two states.
The output Q1 is initialised with the value 0 when starting the process. The first processing of
the function block with the value 1 of the operand Set causes the output Q1 to be set to 1. A
change of the value of Set no longer then effects the output Q1. The value 1 of the input
operand ReSet1 sets the output Q1 to 0 - the output is reset.
If both input operands have the value 1, the fulfilled set condition is dominant, i.e. Q1 is reset
with priority.
Notes:
Standardisation: this function block is defined by IEC61131-3
4.2.110 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.111 SFC
LD is the abbreviation of Sequential Function Chart, one of the programming languages of
IEC61131-3.
4.2.112 SHL
Inputs
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.113 SHR
Inputs
IN: ANY_BIT Bit Pattern
N: UINT Number of bits to shift
Returns
ANY_BIT IN, shifted right N bits
Rightmost bits will be filled with zeros
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.114 SIN
Input
In: REAL
Returns
REAL: sine of input
4.2.115 SINT
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.116 SQRT
Input
In: REAL
Returns
REAL: square root of inpit
SQRT will compute the square root of the input
4.2.117 SR
Inputs
Set1: bool Set condition
Reset: bool Reset condition
Outputs
Q1: bool Output state of the bistable element
The characteristic feature of the SR function module is to statically set a data element - the output
Q1 - to the Boolean status 1 or 0.
Depending on the Boolean input operands Set1 and ReSet it is changed between the two states.
The output Q1 is initialised with the value 0 when starting the process. The first processing of
the function block with the value 1 of the operand Set1 causes the output Q1 to be set to 1. A
change of the value of Set1 no longer then effects the output Q1. The value 1 at the input
operand ReSet sets the output Q to 0 - the output is reset.
Notes:
Standardisation: this function block is defined by IEC61131-3
4.2.118 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.120 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.121 STRING
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.122 STRUCT
STRUCT is the keyword to define structured data types, see and Derived Data Types
4.2.123 SUB
Inputs
In1: ANY_NUM
In2: ANY_NUM
Returns
ANY_NUM Difference In1-In2
Subtraction of two numbers.
Notes:
Standardisation: this is an operation defined by IEC61131-3
Notes:
Standardisation: this is an operation defined by IEC61131-3
4.2.125 THEN
See IF
4.2.126 TIME
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.127 TIME_OF_DAY
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.128 TIME_TO_*
Inputs
In: TIME
Returns
converted data type "*"
Converts the TIME value to a different data type "*", which can be:
BOOL
BYTE
DINT
DWORD
INT
REAL
SINT
STRING
UDINT
UINT
USINT
WORD
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.129 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"
If the timer is running, a change of state at the input "IN" to "0" will have no implications. 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 "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 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
Q: bool binary state of the timer
ET: time current time value
Notes:
Standardisation: this function block is defined by IEC61131-3
4.2.130 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:
Standardisation: this function block is defined by IEC61131-3
4.2.131 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 implications on the procedure.
If the "PT" value changes after the start, this will not have any implications 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 occuring while the timer is not running will cause am impuls 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:
Standardisation: this function block is defined by IEC61131-3
4.2.132 TRUE
Constant value of type BOOL.
4.2.133 TRUNC
Inputs
In: REAL
Returns
ANY_INT
Returns the integer part of the supplied real value.
Notes:
Standardisation: this function is defined by IEC61131-3
4.2.134 TYPE
4.2.135 UDINT
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.136 UINT
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.137 UNTIL
See REPEAT
4.2.138 VAR
Notes:
This is a keyword only for declaration parts of POUs
This is defined by IEC61131-3
4.2.139 VAR_INPUT
4.2.140 VAR_OUTPUT
4.2.141 VAR_IN_OUT
4.2.142 VAR_GLOBAL
4.2.143 VAR_EXTERNAL
4.2.144 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.145 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. Some time 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.146 WORD
See Elementary Data Types
Notes:
Standardisation: this is a data type defined by IEC61131-3
4.2.147 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:
Standardisation: this function is defined by IEC61131-3
4.2.148 XORN
Inputs
IN1: ANY_BIT Input 1
IN2: ANY_BIT Input 2
Returns
ANY_BIT logical, bitwise XOR of Input 1 and inverted Input 2
Notes:
Standardisation: this function is defined by IEC61131-3
4.3.1.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.1.2 S1001
Invalid character.
An unsupported character was used. See also Table 1: Character set features
4.3.1.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.1.4 S1003
Reserved keyword.
4.3.1.5 S1004
Invalid value for hour.
The numeric value for the hour unit of a TIME_OF_DAY or a DATE_AND_TIME literal must be
an integer in the range [0, 23].
4.3.1.6 S1005
Invalid value for minute.
The numeric value for the minute unit of a TIME_OF_DAY or a DATE_AND_TIME literal must
be an integer in the range [0, 59].
4.3.1.7 S1006
Invalid value for second.
The numeric value for the seconds unit of a TIME_OF_DAY or a DATE_AND_TIME literal must
be a fixed point number in the range [0, 60).
4.3.1.8 S1008
Invalid value for month.
The numeric value for the month unit of a TIME_OF_DAY or a DATE_AND_TIME literal must
be an integer in the range [1, 12].
4.3.1.9 S1009
Invalid day range.
The numeric value for the day unit of a TIME_OF_DAY or a DATE_AND_TIME literal must be
an integer in the range [1, 31], giving the 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.1.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 integer in the range [307, 308].
4.3.1.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 refer to your manufacturer
to determine the maximum value for each field in the address hierarchy.
4.3.1.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.1.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.1.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.
T#5h_75m is not allowed. The correct representation of this duration literal is: T#6h_15m.
4.3.1.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.1.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.1.17 S1017
Direct address too complex.
The maximum number of location fields in the address hierarchy of a directly represented variable
is hardware dependent but must not exceed 8. Please refer to your manufacturer to determine the
maximum depth of the address hierarchy.
4.3.1.18 S1018
Integer constant too large/small.
A constants 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.1.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.1.20 S1020
Numeric value too large/small.
A constants 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.1.21 S1021
Error while processing a floating-point function of the math library.
4.3.1.22 S1022
Invalid string constant.
The given string constant contains an invalid character. A character string literal is a sequence of
zero or more characters prefixed and terminated by the single quote character (). Valid characters
are any printable character except $. The three-character combination of the dollar sign ($)
followed by two hexadecimal digits shall be interpreted as an hexadecimal representation of the
eight bit character code as shown in table Character string literal feature.
Additionally, two-character combinations beginning with the dollar sign shall be interpreted as
shown in table Two-character combinations in character strings when they occur in character
strings.
4.3.1.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.1.24 S1024
Invalid constant.
For a list of valid constant representations see Table 53: Function block invocation features for IL
language.
4.3.1.25 S1025
Invalid direct address.
The manufacturer shall specify the correspondence between the direct representation of a variable
and the physical or logical location of the addressed item in memory, input or output. When a
direct representation is extended with additional integer fields separated by periods, it shall be
interpreted as a hierarchical physical or logical address with the leftmost field representing the
highest level of the hierarchy, with successively lower levels appearing to the right. For instance,
the variable %IW2.5.7.1 may represent the first "channel" (word) of the seventh "module" in the
fifth "rack" of the second "I/O bus" of a programmable controller system.
The use of directly represented variables is only permitted in programs. The maximum number of
levels of hierarchical addressing is hardware dependend and must not exceed 8.
Please refer to your manufacturer to determine the maximum levels of hierarchical addressing.
4.3.1.26 S1026
Invalid identifier (name, variable, parameter,...)
4.3.1.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 preceeding the PROGRAM, FUNCTION or
FUNCTION_BLOCK keyword. If this error occurs more often, please contact your manufacturer.
4.3.1.28 S1028
This identifier is too long (> 64 characters).
The length of an identifier is greater than the maximum supported length. In this implementation
only identifiers up to 64 characters are supported.
4.3.1.29 S1029
This word (identifier, constant literal, string, comment) is too long (> 1024 characters).
A token (identifier, constant literal, string, comment) exceeds 1024 characters. In this
implementation only tokens up to 1024 characters are supported.
4.3.1.30 S1030
Too many identifiers.
The maximum number of identifiers has been exceeded. Maximum 65535 identifiers are supported.
4.3.1.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 FALSE when the function or function block is invoked the operations defined
by the function/function block shall not be executed. If the Boolean output parameter ENO has
been defined too than the value of ENO is reset to FALSE.
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.1.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 FALSE when the function or function block is invoked the operations defined
by the function/function block shall not be executed and the output parameter ENO is reset to
FALSE.
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.1.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.1.34 S3001
Function not present.
A function must be declared before it can be used. The parameters that a function uses must be
specified in a declaration, or prototype, before the function can be used.
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.1.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.1.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.1.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.1.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.1.39 S3006
This is not a struct variable or a function block instance.
An access to a member of a struct or function block variable has been attempted, but the variable
specified by the identifier is not a function block or a struct.
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.1.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.1.41 S3008
No structure element or block parameter.
An access to a member of a struct or function block variable has been attempted, but the member
specified by the identifier is not a parameter of the accessed function block or struct instance.
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.1.42 S3009
No jump label.
The identifier used in the JMP/JMPC/JMPCN-statement at the given position has been found but is
not a label name.
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.1.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.1.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.1.45 S3012
Variable name or constant expected.
This error occurs, if an identifier, which is not a variable name or an enum constant, is used where
a variable name or a constant is expected.
Example:
TYPE
Colours : (red, yellow, blue) := red;
END_TYPE
VAR
Colour : Colours := Colours; (* Error: Enum constant expected.
EnumType is a type name *)
END_VAR
4.3.1.46 S3014
Numeric data type expected.
Operator and operand type are incompatible. An operand of an ANYNUM type has been expected.
4.3.1.47 S3016
Bit data type expected.
Operator and operand type are incompatible. An operand of an ANYBIT type has been expected.
4.3.1.48 S3017
Boolean value expected.
Operator and operand type are incompatible. An operand of type BOOL has been expected.
4.3.1.49 S3018
Numeric data type expected.
Anmerkung: Dieser Link sollte auf Tabelle 11 der IEC 61131-3 zeigen.
4.3.1.50 S3019
Operators of type incompatible.
4.3.1.51 S3020
Operand types incompatible.
This error occurs if an unallowed 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.1.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.1.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.1.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.1.55 S3025
Boolean result required.
4.3.1.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 organisation unit.
Example:
TYPE
Colours : (red, yellow, blue) := red;
END_TYPE
VAR
Colour : Colours := green; (* Error: green has not been declared as an enum constant *)
END_VAR
4.3.1.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.1.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.1.59 S3032
Self-referencing (i.e., recursive) declarations are not allowed.
Recursion detected. A function can not 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.1.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.1.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.1.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.1.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.1.64 S3037
The lower bound of the subrange must not be greater than the upper bound.
The value of the upper bound in the subrange declaration on the specified position is lower than the
value of the lower bound. A subrange 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.1.65 S3038
Initialisation is out of bounds of subrange (Data type is a subrange type).
A variable of a subrange type has been initialized with a value that is out of the range of this
subrange type. A subrange 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.1.66 S3039
Index is out of bounds.
An access to a variable of an array type has been attempted with an index whose value is out of the
range specified in the type or variable declaration.
4.3.1.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.1.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 unallowed type or with the RETAIN qualifier.
4.3.1.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.1.70 S3044
Data missing. You either need a load or an expression.
The current result is undefined. Either a LD instruction or an expression must precede the
instruction on the current position. This error occurs as a consequence of error Syntax Error S
5010. Please move the instruction out of the parenthesis.
4.3.1.71 S3046
Type names can not be used as an instance names.
A type name or the name of a program organisation unit has been used in a declaration as a
variable name. Program organisation units and types defined on project level are known in the
whole project scope and their names can not 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.1.72 S4000
'AT%': Simultaneous declaration of several direct variables is invalid.
A list of identifiers has been used in a located variable declaration. Direct representations can only
be associated to a single identifier.
Example:
The following declaration is not allowed:
VAR
dirVar1, dirVar2, dirVar3 : at%I0.0;
END_VAR
4.3.1.73 S4001
Too many variables (identifiers). Maximum is 60 identifiers.
Too many identifiers in the identifier list of a variable declaration. Identifier lists with maximum
60 identifiers are supported.
4.3.1.74 S4003
Array too big.
The element count of a dimension in an array declaration exceeds the maximum number of
elements supported by SICAM PAS PLC UI. The maximum element count is determinated by the
supported index range.
4.3.1.75 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.1.76 S4006
Syntax error. [Hint: In some cases, the actual error is located in a previous line (';' missing etc.)].
4.3.1.77 S4007
Self-referencing (i.e., recursive) declarations are invalid.
Recursion detected. A function can not 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.1.78 S4008
Too many attributes 'RETAIN' or 'CONSTANT'. You may use only one.
4.3.1.79 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.1.80 S4010
Simultaneous type declarations are not allowed.
The type declaration on the specified position contains a list of identifiers. This is not allowed.
Please write a declaration for any new type.
Example:
Not allowed:
TYPE
MyInt1, MyInt2, MyInt3 : int;
END_TYPE
Allowed:
TYPE
MyInt1 : int;
MyInt2 : int;
MyInt3 : int;
END_TYPE
4.3.1.81 S4011
Valid only in PROGRAMs and there within VAR- und VAR_GLOBAL-Sections.
A directly represented variable has been declared in a program organization unit or a variable
declaration part in which it is not supported. Located variable declarations are supported only in
VAR- or VAR_GLOBAL-declaration-parts of PROGRAMs.
4.3.1.82 S4012
Valid only in PROGRAMs, FUNCTION_BLOCKs, and in FUNCTIONs.
A variable declaration part (VAR <declarations> END_VAR) was found in a unit where it is not
supported. Variable declaration parts are allowed in programs, functions and function blocks.
4.3.1.83 S4013
Valid only in PROGRAMs, FUNCTION_BLOCKs, and in FUNCTIONs.
4.3.1.84 S4014
Valid only in PROGRAMs and in FUNCTION_BLOCKs.
4.3.1.85 S4015
Valid only in PROGRAMs and in FUNCTION_BLOCKs.
4.3.1.86 S4016
Valid only in PROGRAMs and in FUNCTION_BLOCKs (Was: VAR_EXTERNAL).
4.3.1.87 S4017
Valid only in PROGRAMs.
4.3.1.88 S4018
Valid only in VAR- and in VAR_GLOBAL-Sections.
The qualifier CONSTANT has been used in a variable declaration part in which it is not
supported.
4.3.1.89 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.1.90 S4020
Valid only in PROGRAMs or in FUNCTION_BLOCKs and there within VAR_INPUT-Sections
with Type 'BOOL' without Initialisation.
A variable has been declared with an edge qualifier in a program organization unit or variable
declaration part where this is not supported.
4.3.1.91 S4021
Valid only within VAR_INPUT, VAR_OUTPUT, and VAR_IN_OUT-Sections (WarS 'ADDRESS'-
Type).
A variable has been declared with the ADDRESS qualifier in a program organization unit or
variable declaration part where this is not supported.
4.3.1.92 S4022
Valid only in FUNCTION_BLOCKs or FUNCTIONs and there within VAR..END_VAR-Sections
without CONSTANT/RETAIN-Modifiers.
A variable has been declared with the ATTRIBUTES qualifier in a program organization unit or
variable declaration part where this is not supported. This attribute is supported only in VAR-
Sections without CONSTANT or RETAIN qualifiers of FUNCTIONs and FUNCTION_BLOCKs.
4.3.1.93 S4023
Valid only in TYPE..END_TYPE-Sections.
A struct declaration was found in a declaration part where this is not supported. Struct declarations
are supported only in TYPE declaration parts.
4.3.1.94 S4024
Valid not within VAR_EXTERNAL-Sections (Was: Initial Value Specification).
A variable has been declared in an EXTERNAL declaration section with an initial value. This is
not allowed. Please assign the initial value in the respective GLOBAL variable declaration.
Example:
VAR_EXTERNAL
A : INT := 5;
END_VAR
VAR_EXTERNAL
A : INT;
END_VAR
VAR_GLOBAL
A : INT := 5
END_VAR
4.3.1.95 S4033
Multiple initialisation.
A member of a struct variable has been initialzed more than once. This error occurs when both an
explicit struct initialisation and a per element initialisation are made.
Example:
or
TYPE
StructType : Struct
Member1 : int := 5;
Member2 : bool := true;
END_STRUCT;
END_TYPE
4.3.1.96 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.1.97 S4035
Invalid type for function.
The function type must be a predefined type or an idententifer. This error occurs most commonly,
when a reserved keyword, a IEC61131-3 character string or a number is used as a function type or
if no function type has been defined.
4.3.1.98 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.1.99 S5000
Wrong parameter type.
The type of an actual parameter of a function or a function block instance is incompatible with the
type of the formal parameter it has been assigned to.
4.3.1.100 S5001
Array expected. This is not an array.
Example:
PROGRAM
VAR
x : INT;
y : INT;
END_VAR
END_VAR
4.3.1.101 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.1.102 S5003
Function block instances may not be 'CONSTANT'.
An instance of a function block has been defined in a variable section with CONSTANT attribute.
This is not allowed. Please remove the attribute or move the instance declaration in another
variable section, which has no CONSTANT attribute.
4.3.1.103 S5004
Function blocks instances are invalid in 'FUNCTION'-POUs, STRUCTs, and in ARRAYs.
An instance of a function block has been defined in a variable section of a function or as a member
of a STRUCT or an ARRAY type. IEC61131-3 doesnt allow declarations of function block
instances in functions. Function block instances as members of STRUCT and ARRAY types are
not supported by SICAM PAS PLC UI.
4.3.1.104 S5005
Function block instances as function results are not supported.
Function block instances as result type of a function are not supported in SICAM PAS PLC UI.
4.3.1.105 S5006
Function block instances as parameters are not supported.
Parameters of a function block type are not supported in SICAM PAS PLC UI.
4.3.1.106 S5008
Expected an integer or an enum. Invalid array index.
The type variable or constant used as an index in an indexed variable access is invalid. An index
must be of type INT or of an enumeration type.
4.3.1.107 S5009
Invalid sequence beginning. Current result is empty. Use 'LD' to initialise current result.
This error occurs when a sequence of statements starts with an instruction that uses the current
result. The first instruction usually is a load statement. This error can also occur, if the current
result is used in the first instruction after a CAL, a JMP or a label.
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.1.108 S5010
Invalid instruction within a parentheses computation.
The instruction at the given position is not allowed between parentheses. Please replace the
instruction or move it out of the parentheses.
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.1.109 S5011
ARRAYs of function block instances are invalid.
4.3.1.110 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.1.111 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.1.112 S5014
Wrong number of parameters.
4.3.1.113 S5015
Invalid type for direct address.
A located variable has been declared with an unsupported type. Only located variables of type
ANY_NUM oder ANY_BIT are supported.
4.3.1.114 S5016
Variable is read-only. Write-access invalid.
A write access has been attempted to a variable, that has only read access.
4.3.1.115 S5017
Variable is not a STRUCTure.
A initialization value for a structure has been assigned to a variable which is not of a structured
type.
Example.
VAR
4.3.1.116 S5018
Variable is no array.
An array initialization has been assigned to a variable which is not of an array type.
Example.
VAR
A : INT := [4]; (* not allowed *)
END_VAR
4.3.1.117 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.1.118 S5020
Too many initialisation 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 initialisation
values,
array has only 5 elements *)
END_VAR
4.3.1.119 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 inout parameter.
4.3.1.120 S5022
Multiple assignments to a parmameter in a call of a function block instance.
This error occurs, when in a call of a function block instance a parameter is initialized twice.
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.1.121 S5023
Too much initialisation data.
This error occurs, when a member of a struct type or instance is initialized twice in an explicit
structure intialization.
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.1.122 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.1.123 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 ANY_INT *)
ST X
4.3.1.124 S5026
Invalid formal parameter type.
The name of an input or an inout parameter has been expected. The identifier has been found in the
current scope but is neither the name of an input nor of an output parameter.
Tips:
Check if the name is spelled correctly.
Make sure that the identifier is not an output parameter.
4.3.1.125 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.1.126 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.1.127 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.1.128 S5030
Variable is write-only. Read-access invalid.
A read access has been attempted to a variable, that has only write access.
4.3.1.129 S5031
Bit access allowed only on bit data types.
This error occurs if a bit selection is attempted on a variable that is not of a bit data type or of type
BOOL.
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.1.130 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;
4.3.1.131 S5033
IN_OUT parameter missing. Please supply every formal IN_OUT parameter with a an actual
parameter.
This error occurs, if at least one of the IN_OUT parameters of a function block is not supplied with
an actual parameter, when calling an instance of the respective function block. IN_OUT parameters
are references and have to be supplied with an actual parameter in every call of a function block
instance.
Example:
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.1.132 S5034
Invalid IN_OUT parameter. IN_OUT parameters must not be expressions or constants.
This error occurs, if an IN_OUT parameter is supplied with an expression or a constant value. This
is not allowed because IN_OUT parameters are references.
Example:
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.1.133 S5035
Generic data types are not allowed.
This error occurs, if an ANY data type is used in a variable or parameter declaration. The use of
generic data types is allowed only for function overloading and type conversion in standard
function or functions provided by the manufacturer.
Example:
FUNCTION IntegerToString : STRING
VAR_INPUT
InVar : ANY_INT; (* Error: User-defined functions cannot be overloaded *)
END_VAR
(* Code *)
END_FUNCTION
4.3.1.134 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
POUs *)
(* 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
POUs *)
(* Other external declarations *)
END_VAR
VAR_INPUT
InVar : StructType; (* Not allowed because StructType is not known in other POUs *)
(* Other input declarations *)
END_VAR
(* Code *)
END_FUNCTION_BLOCK
4.3.1.135 S5037
Too many indices within the braces [....] of an array-access.
This error occurs, if an access to an array element is attempted with more indices as dimensions
provided in the type definition of the elements data type.
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.1.136 S5038
Directly represented variables are only allowed as parameters in prototypes.
If you want to access a directly represented variable from a function block, declare the variable
with a symbolic name in the VAR_GLOBAL section of a program and use this symbolic name in a
declaration in the VAR_EXTERNAL section of the function block.
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.1.137 S5039
'&x' is only allowed if x is a direct variable.
The identifier preceeded by the &-operator is not the name of a directly represented variable.
Tips:
Make sure that the name is spelled correctly.
Make sure that the variable is a directly represented variable.
4.3.1.138 S5040
Too few indices within the braces [....] of an array access.
This error occurs, if an access to an array element is attempted with less indices as dimensions
provided in the type definition of the elements data type.
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.1.139 S5041
Values of type INT24 or REAL48 are invalid in this context.
4.3.1.140 S5042
Function block instances may not be 'RETAIN'.
An instance of a function block has been defined in a variable section with RETAIN attribute. This
is not supported. Please remove the attribute or move the instance declaration in another variable
section, which has no RETAIN attribute.
4.3.1.141 S6002
No prototype.
An unknown type name has been used in a variable declaration or a function call.
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.
Please refer to your manufacturer if none of the above actions eliminates the problem.
4.3.1.142 S6004
Recursion (i.e., direct or indirect self-reference) detected.
Recursion detected. A function can not 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
already used in the calling hierarchy).
4.3.1.143 S6005
Too many types and function blocks. For the maximum number of type definitions please refer to
your manufacturer.
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.2.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.2.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.2.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 ask your hardware manufacturer.
4.3.2.4 L10027
Invalid hardware description: %1..
The hardware description file for the hardware with name <hardware name> has not been found.
Tips:
4.3.2.5 L10029
Hardware configuration error.
An error occurred while getting firmware information. Please check if the hardware configuration
file is correct or if the DLL for the specified firmware is installed in your SICAM PAS PLC UI
directory.
4.3.2.6 L10030
Invalid type for variable: %1.
A directly represented variable of a complex type (array, struct, string) has been found. This is not
supported by the hardware.
4.3.2.7 L10031
Initializations of directly represented variables are not allowed.
An initialization of a directly represented variable has been found. This is not supported by the
hardware. Please remove the initialization.
4.3.2.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.2.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.2.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.2.11 L10035
Instance limit for function block <FunctionBlockName> reached.
The maximum number of instances of the specified function block has already been exceed. The
maximum number of instances of a firmware function block is hardware dependent and can be
changed by the hardware manufacturer by setting or changing the "MaxInstances" entry in the
specification section of the function block in the hardware description file. Please ask your
manufacturer, for the maximum number of instances of a firmware function block.
4.3.2.12 L10036
Invalid process image description. Please contact your manufacturer.
The description of the process image in the hardware configuration file is invalid. Please check if
the sizes for the input, output and marker sections are correct and if all size entries are of the same
unit. They should be specified either in bits or bytes.
ATTENTION: This file should be altered only by the manufacturer.
4.3.2.13 L10063
An error occured while opening a file: %1.
4.3.2.14 L10105
Internal error while loading function or DLL: <DLL/Function-Name>.
The specified DLL or function could not be loaded. Either your SICAM PAS PLC UI directory
does not contain a DLL with the specified name, or your DLL has an invalid version. Please
reinstall your system or refer to your hardware manufacturer.
4.3.2.15 L10106
Native code compiler needed for selected optimization. Please choose another optimization or
install a native code compiler.
"Speed only" optimisation is activated but no native code compiler is defined for this hardware.
"Speed only" optimisation is only valid, if a native code compiler is installed. If you do not have a
native code compiler please select another optimisation in the "Edit Resource Specifications"
dialog. For a native code compiler for your hardware please refer to your manufacturer.
4.3.2.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.2.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.2.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.2.19 L12005
Internal linker error no.: <errorno>. Please contact your manufacturer.
4.3.2.20 L12006
Memory allocation failure. Not enough memory to perform operation.
4.3.2.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.2.22 L12008
Interpreter stack overflow in task <TaskName>.
Interpreter call-stack-overflow. Please reduce the depth of the calling hierarchy of <TaskName>.
4.3.2.23 L12996
Unknown command: <Command>.
4.3.2.24 L12997
Unkown object kind: <ObjectKindSpecification>.
An invalid object file has been found. Please rebuild the whole resource.
4.3.2.25 L12998
Invalid object kind. Kind found/requested: <ObjectKind>.
An invalid object file has been found. Please rebuild the whole resource.
4.3.2.26 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.2.27 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.2.28 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.3.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
SICAM PAS PLC UI see the IEC 1131-3 Compliance statement Please ask your manufacturer for
a list of data types supported by your hardware.
4.3.3.2 C10007
Data type 'DATE' is not supported.
Data type DATE is not supported. For a list of data types supported by SICAM PAS PLC UI see
IEC 1131-3 Compliance statement. Please ask your manufacturer for a list of data types supported
by your hardware.
4.3.3.3 C10008
Data type 'TIME_OF_DAY' is not supported.
Data type TIME_OF_DAY is not supported. For a list of data types supported by SICAM PAS
PLC UI see IEC 1131-3 Compliance statement. Please ask your manufacturer for a list of data
types supported by your hardware.
4.3.3.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
SICAM PAS PLC UI see the IEC 1131-3 Compliance statement. Please ask your manufacturer for
a list of data types supported by your hardware.
4.3.3.5 C10010
Data type 'DATE_AND_TIME' is not supported.
Data type DATE_AND_TIME is not supported. For a list of data types supported by SICAM
PAS PLC UI see the IEC 1131-3 Compliance statementPlease ask your manufacturer for a list of
data types supported by your hardware.
4.3.3.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
SICAM PAS PLC UI see the IEC 1131-3 Compliance statement. Please ask your manufacturer for
a list of data types supported by your hardware.
4.3.3.7 C10017
The sections 'VAR_INPUT', 'VAR_OUTPUT' and 'VAR_IN_OUT' are not supported in programs.
VAR_INPUT, VAR_OUTPUT and VAR_IN_OUT sections in programs are not supported. For
more information about supported variable types see the IEC 1131-3 Compliance statement.
4.3.3.8 C10019
Directly represented variables are not allowed in this POU.
Either the program organisation unit is a function or a function block or a file with global symbolic
variable definitions. Directly represented variables are not allowed in functions or function blocks.
If you want to access a directly represented variable from a function block, declare the variable
with a symbolic name in the VAR_GLOBAL section of a program and use this symbolic name in a
declaration in the VAR_EXTERNAL section of the function block. Functions cannot access
directly represented variables.
4.3.3.9 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.3.10 C10024
Constant is out of range.
The constant at the given position is not in the range of the associated data type.
4.3.3.11 C10025
IN/OUT parameters must always be supplied with actual parameters.
A formal inout parameter has been declared in a function block, but not supplied with an actual
parameter in the CAL statement of an instance. Inout parameters are references and must be
supplied with an actual parameter.
4.3.3.12 C10026
Unsupported address.
The address at the given position is not supported by the active hardware. Please ask your
manufacturer for a list of addresses supported by the hardware.
4.3.3.13 C10028
Inout-parameters of type struct are not supported.
Structured inout-parametes are not supported. Please define an input parameter and an output
parameter of this kind.
4.3.3.14 C10031
RETAIN-variables are not supported by this hardware.
Your hardware doesnt support RETAIN variables. Please remove the attribute. For a list of
supported variable types ask your manufacturer.
4.3.3.15 C10034
Invalid command for this hardware.
The command at the given position is not supported by this hardware. For a list of unsupported
commands please refer to your hardware manufacturer. For a list of commands not supported by
SICAM PAS PLC UI see the IEC 1131-3 Compliance statement.
4.3.3.16 C10035
Operand of type 'UINT' expected.
An actual parameter of type UINT has been expected in a function call (operation), but the actual
parameter is not of this type.
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.3.17 C10036
Structs and arrays of complex data types are not supported by this hardware.
An array of a structured type, an array of an array type, a structure with a structured member or a
structure with an array member has been declared. This is not supported by the hardware. For more
information about supported data types for your hardware, please refer to your manufacturer.
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.3.18 C10038
Couldn't detect the type of the constant.
The type of a constant could not be determined. Please initalize a variable of the desired type with
this constant and use the variable instead of the constant.
4.3.3.19 C10043
Implemention 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 organisation unit as an external
variable and move the code in the respective file.
4.3.3.20 C10045
Function blocks instances are not allowed in this section.
An instance declaration of a function block has been found in a section where this is not allowed.
Please move the declaration in a section, where function block instances are supported.
4.3.3.21 C10046
'VAR_GLOBAL' is not allowed.
A VAR_GLOBAL section has been found in a program organisation unit where this section kind is
not supported. Please change the section kind or move the variable declaration in a file, where
global variables are supported.
According to the IEC 61131-3 VAR_GLOBAL sections are supported only in PROGRAMs.
However the hardware manufacturer may restrict the declaration of global variables to resource
global variable files. I. e. global variables are allowed only in specific files which contain only
global variable declarations.
4.3.3.22 C10047
Only 'VAR_GLOBAL' allowed.
A variable declaration section, which is not a VAR_GLOBAL section, has been found in a file for
resource global variable declaration. This is not allowed. Please change the section kind or move
the variable declaration in another file, where this kind of declarations are supported.
4.3.3.23 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 SICAM PAS PLC UI 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.3.24 C10055
This variable can not be initialized.
Either an initialisation of a directly represented variable has been found or the hardware doesnt
support variable initializations. The initialisation of directly represented variables is not supported
by SICAM PAS PLC UI. The initialisation of symbolic variables can be forbidden by the
manufacturer by changing the value for the "InitVariables" entry in the [MODULE] section of the
hardware description file to 0. Please refer to your manufacturer to find out, if variable initalization
is supported by your hardware.
4.3.3.25 C10057
Data type is not supported.
The data type at the given position is not supported. For a list of data types supported by SICAM
PAS PLC UI see the IEC 1131-3 Compliance statement. For a list of data types supported by your
hardware, please refer to your manufacturer.
4.3.3.26 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.3.27 C10063
An error occured while opening a file.
4.3.3.28 C10064
Internal Compiler Error No. %1. Please contact your manufacturer.
4.3.3.29 C10067
Struct declarations are not supported.
A struct declaration has been detected, but is not supported by the hardware. Struct declarations are
supported by SICAM PAS PLC UI. The hardware manufacturer however, can forbid struct
declarations by setting the value of the "StructAllowed" entry in the [MODULE] section of the
hardware description file to 0. Please refer to your hardware manufacturer to find out if struct
declarations are supported by your hardware.
4.3.3.30 C10068
Array declarations are not supported.
An array declaration has been detected, but is not supported by the hardware. Array declarations
are supported by SICAM PAS PLC UI. The hardware manufacturer however, can forbid array
declarations by setting the value of the "ArrayAllowed" entry in the [MODULE] section of the
hardware description file to 0. Please refer to your hardware manufacturer to find out if array
declarations are supported by your hardware.
4.3.3.31 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 SICAM PAS PLC UI. 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. Please refer to your hardware
manufacturer to find out if enumerated data type declarations are supported by your hardware.
4.3.3.32 C10075
Invalid array index. It has to range between -32767 and 32767.
4.3.3.33 C10078
Invalid type of a global or directly represented variable.
A directly represented variable of a complex or an user defined type has been declared. This is not
supported. Global variable of structured types are also not supported.
4.3.3.34 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.3.35 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.3.36 C10092
Memory allocation failure.
4.3.3.37 C10100
Invalid expression for parameter.
An invalid expression has been passed as an actual parameter in a call of a function or a function
block instance.
4.3.3.38 C10108
Constant of type TIME is out of range.
For the range of TIME constants supported by SICAM PAS PLC UI see the IEC 1131-3
Compliance statement
4.3.3.39 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.3.40 C10110
Nested functions are not supported.
A function call has been passed as an actual parameter in the call of a function or a function block
instance. This is not supported. Please save the return value of the function in a variable and pass
this variable as an actual parameter to the called program organisation unit.
4.3.3.41 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.3.42 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.3.43 C10114
Parameter expressions are not supported for this operation.
An expression has been used as an actual parameter. This is not supported. Please store the result
of the expression in a variable and pass this variable to the called function or function block.
4.3.3.44 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.3.45 C11001
Can't determine unambigously the type of constant -> take %1.
The type of a numeric constant couldnt be determined unambiguously. In this case usually the
biggest supported data type of the expected data type class (ANY_INT, ANY_REAL, ANY_BIT)
is presumed.
4.3.3.46 C11007
Function has no input parameter. Is this intended?
A function call to a function which has no parameters has been detected. Was this the intend?
Functions do not contain internal state information and can be supplied only with input parameters.
Generally the return value is computed by using the input parameters. Because of this reasons a
function without input parameters usually doesnt make sense. Please check if the called function
makes sense.
4.3.4.1 M21004
5 Index
C10055 142
C10057 142
A C10060 142
C10063 142
About this manual 14 C10064 142
ABS 72 C10067 142
ACOS 72 C10068 143
ADD 72 C10069 143
ADD (time) 72 C10075 143
Add files 21 C10078 143
Add Task 19 C10083 143
Adding a Library to a project 44 C10084 143
Adding input or output to compound block 31 C10092 144
AND 73 C10100 144
ANDN 73 C10108 144
ARRAY 73 C10109 144
ASIN 73 C10110 145
Assignment 73, 74 C10112 145
AT 74 C10113 145
ATAN 74 C10114 145
C10115 145
C11001 145
B C11007 145
CAL 75
CALC 75
Block Type Program Function Function CALCN 75
Block 47 CASE 75, 76
BOOL 74 CFC Crossreference 40
Breakpoints 38 CFC Editor Online 28
Browser Introduction 15 Character String Literals 45
Browser Options 21 Comments in ST 26
Build active resource 19 Compiler Overview 35
BY 74 Compiler Command Line 35
BYTE 74 Compliance Statement 47
Compound Blocks Introduction 30
CONCAT 76
C Connections 27
CONSTANT 76
C10006 138 Constants 45
C10007 138 ControlX Framework Introduction 15
C10008 139 COS 76
C10009 139 CR 76
C10010 139 Create a Library 43
C10012 139 Create compound block 30
C10017 139 Create new connection 33
C10019 139 Creating new files 18
C10021 139 CTD 76
C10024 140 CTU 77
C10025 140 CTUD 77
C10026 140 Custom Tools 21
C10028 140
C10031 140
C10034 140 D
C10035 140
C10036 141 Data Types 70
C10038 141 DATE 78
C10043 141 DATE_AND_TIME 78
C10045 141 Declaration Editor introduction 21
C10046 141 Declaration Keywords 70
C10047 142 Declaration of array datatypes 24
C10049 142
LEN 88 REAL 92
Lib-Pane 18 REAL_TO_* 92
Library Overview 43 Rebuild active resource 19
Library-Pane 18 Rebuild all resources 19
LIMIT 88 REPEAT 93
Linker Command Line 36 REPLACE 93
LN 88 Resource global variables 21
LOG 88 Resource information 20
LT 88 Resource-Pane 17
RET 93
RETAIN 93
M RETC 93
RETCN 94
M21004 145 RETURN 94
Make Command Line 37 RIGHT 94
Margin Bars 27 ROL 94
MAX 89 ROR 95
MID 89 RS 95
MIN 89
MOD 89
MOVE 89 S
MUL 90
MUL (time) 90 S(et) 95
MUX 88 S1000 104
S1001 104
S1002 104
N S1003 104
S1004 104
Native Code 39 S1005 104
NCC 90 S1006 104
NCC Intel Protected Mode 40 S1008 105
NE 90 S1009 105
NEG 90 S1010 105
Nested Comments 47 S1011 105
NOT 91 S1012 105
S1013 105
S1014 105
O S1015 106
S1016 106
S1017 106
OF 91 S1018 106
Online connections introduction 33 S1019 106
Online Server Overview 32 S1020 106
Optimisation Settings 38 S1021 107
OR 91 S1022 107
ORN 91 S1023 107
Output Window 15 S1024 107
S1025 107
S1026 107
P S1027 108
S1028 108
Passing Output Parameters 47 S1029 108
performance 38 S1030 108
POU 91 S1031 108
Print IEC61131 Configuration 40 S1032 108
Printing CFC charts 29 S3000 109
PROGRAM 91 S3001 109
S3002 109
S3003 109
R S3004 110
S3005 110
R(eset) 91 S3006 110
R_TRIG 92 S3007 110
X XOR 103
XORN 104