0% found this document useful (0 votes)
24 views1,158 pages

R911403764 08 PLC Engineering, ApplicationManual en

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

R911403764 08 PLC Engineering, ApplicationManual en

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

Application Manual

ctrlX PLC Engineering

PLC Programming System 01VRS

R911403764, Edition 08
Copyright
All rights reserved, also regarding any disposal, exploitation, reproduction, editing, distribution, as well as in the
event of applications for industrial property rights.

Disclaimer
The data specified above only serve to describe the product. As our products are constantly being further devel-
oped, no statements concerning a certain condition or suitability for a certain application can be derived from our
information. The information given does not release the user from the obligation of own judgment and verification.
It must be remembered that our products are subject to a natural process of wear and aging.

DOK-XPLC**-ENGINEERING-AP08-EN-P DC-AE/EPI5 (MN/PiaSt)

f94aabf82401d4b20a347e88332cfb34, 2, en_US
ctrlX PLC Engineering 3 / 1158

Table of contents
1 About this documentation 33
1.1 Licensing notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2 Important directions on use 35
2.1 Intended use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.1.2 Areas of use and application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.2 Unintended use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3 Safety instructions 37
4 Introduction 39
5 Installation 41
6 Logging in and logging off to/from the control 43
7 Configuring the PLC Engineering 47
7.1 Setting PLC Engineering Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.2 Customizing the user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.2.1 Customizing Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
7.2.2 Customizing Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.2.3 Customize Command Icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.2.4 Customizing Keyboard Shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.2.5 Changing the Window Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.2.6 Resizing Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.2.7 Auto-Hiding Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.2.8 Switching Between Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
8 Creating and configuring a project 53
8.1 What is a project? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
8.2 Creating a new project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
8.2.1 Creating a project on the basis of a template for ctrlX CORE Creating
devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
8.2.2 Project on basis ctrlX CORE Virtual Creating an axis/kin interface . . 55
8.2.3 Creating a standard project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
8.2.4 Creating an empty project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
8.3 Configuring project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
8.3.1 Retrieving and editing project information . . . . . . . . . . . . . . . . . . . . 58
8.3.2 Selecting project settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.3.3 Creating a standard project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.3.4 Adding objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
8.3.5 Project on basis ctrlX CORE Virtual Creating an axis/kin interface . . 62
8.3.6 Changing the compiler version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
8.4 Retrieving and editing project information . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
9 Exporting and importing projects 67
9.1 Basic information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
9.2 Exporting and Importing Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
9.3 Transferring projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

R911403764, Edition 08 Bosch Rexroth AG


4 / 1158 ctrlX PLC Engineering

10 Comparing Projects 71
10.1 Compare project – Basic information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
10.2 Open detailed compare view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
10.3 Creating compare views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
11 Protecting and saving the project 75
11.1 Write and access protection – Basic information . . . . . . . . . . . . . . . . . . . . . . . 75
11.2 Project encryption with certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
11.3 User administration and password manager . . . . . . . . . . . . . . . . . . . . . . . . . . 76
11.4 Rights management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
11.5 Project repository – Saving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
11.6 Setting up write protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
11.7 Assigning passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
11.8 Protecting projects using a dongle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
11.9 Setting up the user administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
11.10 Protecting Objects in the Project by Access Rights . . . . . . . . . . . . . . . . . . . . . 81
11.11 Logging in via user account and password manager . . . . . . . . . . . . . . . . . . . . 82
11.12 Encrypting the project with a certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
11.13 Saving the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
11.14 Saving/sending the project archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
11.15 Linking a project to the source control system . . . . . . . . . . . . . . . . . . . . . . . . 88
12 Logging in and logging off to/from the control 89
13 Connection to the ctrlX real-time data system 93
13.1 Configuring DataLayerOwner nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
13.2 Creating a GVL twin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
13.3 Consistency checks and error messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
13.4 PLC program download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
14 Project synchronization 97
14.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
14.2 Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
14.3 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
14.4 Synchronization – Online behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
15 Creating and managing templates 101
15.1 Template – CheckFunctions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
15.2 Template – Motion interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
15.3 Integrating customized templates in ctrlX PLC Engineering . . . . . . . . . . . . . . 102
16 Localizing Projects 107
17 Configuring the I/O connection 111
17.1 Basic information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
17.2 Device tree and device editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
17.3 Mapping the hardware structure in the device tree . . . . . . . . . . . . . . . . . . . . . 115
17.4 Configuring Devices and I/O Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
18 Programming the application 129
18.1 Program application – General information . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
18.2 Designating Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
18.3 Configuring the Memory Reserve for an Online Change . . . . . . . . . . . . . . . . . 129
18.4 Function Block — Calling Functions or Methods with External Implementation 130

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 5 / 1158

18.5 Using the input assistance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131


18.6 Using pragmas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
18.7 Using library function blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
18.8 Managing Text in Text Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
18.8.1 Managing Static Text in Global Text Lists . . . . . . . . . . . . . . . . . . . . . 140
18.8.2 Managing Dynamic Text in Text Lists . . . . . . . . . . . . . . . . . . . . . . . . . 143
18.9 Using Image Pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
18.10 Integrating C Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
18.11 Searching and Replacing in the Entire Project . . . . . . . . . . . . . . . . . . . . . . . . . 149
18.12 Refactoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
18.13 Encrypting the application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
18.14 Unit Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
18.15 Using function blocks for implicit checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
18.16 Declaring variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
18.16.1 Variable declaration where and how . . . . . . . . . . . . . . . . . . . . . . . . . 160
18.16.2 Variable initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
18.16.3 Using the Declaration Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
18.16.4 Using the 'Declare variable' dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
18.16.5 Declaring Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
18.16.6 Declaring Global Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
18.16.7 Using Task-Local Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
18.17 Creating source code in IEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
18.17.1 Creating source code in IEC – General information . . . . . . . . . . . . . . 173
18.17.2 FBD/LD/IL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
FBD/LD/IL – General information . . . . . . . . . . . . . . . . . . 173
Function block diagram (FBD) . . . . . . . . . . . . . . . . . . . . 173
Programming in a function block diagram (FBD) . . . . . . 174
Ladder diagram (LD) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Programming Ladder Diagrams (LD) . . . . . . . . . . . . . . . 176
Instruction list (IL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Programming in Instruction List (IL) . . . . . . . . . . . . . . . . 178
18.17.3 Continuous Function Chart (CFC) . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
CFC programming – Basics . . . . . . . . . . . . . . . . . . . . . . . 179
CFC programming – Page-oriented . . . . . . . . . . . . . . . . . 180
Automatic execution order according to data flow . . . . . 180
Programming in the CFC editor . . . . . . . . . . . . . . . . . . . 184
18.17.4 Structured Text (ST), Extended Structured Text (ExST) . . . . . . . . . . 192
Structured text (ST)– General information . . . . . . . . . . . 192
ExST - Extended Structured Text . . . . . . . . . . . . . . . . . . 192
Programming in Structured Text (ST) . . . . . . . . . . . . . . . 193
18.17.5 Sequence language (AS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Programming the Sequential Function Chart (SFC) –
General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Programming in SFC . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

R911403764, Edition 08 Bosch Rexroth AG


6 / 1158 ctrlX PLC Engineering

18.18 Programmatic access to I/Os . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198


18.18.1 Programmatic access to I/Os – General information . . . . . . . . . . . . . 198
18.18.2 Variables Configuration - VAR_CONFIG . . . . . . . . . . . . . . . . . . . . . . . 198
18.18.3 AT Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
18.19 Checking the syntax and analyzing code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
18.19.1 Checking the syntax and analyzing code – General information . . . . 202
18.19.2 Checking Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
18.19.3 Analyzing Code Statically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
18.20 Orientation and navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
18.20.1 Using the Cross-Reference List to Find Occurrences . . . . . . . . . . . . 204
18.20.2 Finding Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
18.20.3 Setting and Using Bookmarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
18.21 Task configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
18.21.1 Creating a task configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
18.21.2 Creating a Task Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
18.21.3 Definitions of jitter, latency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
18.21.4 Multicore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
18.22 Data persistence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
18.22.1 Data persistence – General information . . . . . . . . . . . . . . . . . . . . . . 211
18.22.2
Mechanisms in comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
18.22.3
Lifespan of variables when calling online commands . . . . . . . . . . . . 214
18.22.4
Lifespan of variables when downloading a boot project . . . . . . . . . . 214
18.22.5
Preserving Data with Persistent Variables . . . . . . . . . . . . . . . . . . . . . 214
18.22.6
Preserving Data with Retain Variables . . . . . . . . . . . . . . . . . . . . . . . . 217
18.22.7
Preserving Data with Recipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
18.22.8
Declaring VAR PERSISTENT Variables . . . . . . . . . . . . . . . . . . . . . . . . 218
18.22.9
Saving the values of a persistent variable list in a recipe . . . . . . . . . 219
18.23 Alarm management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
18.24 Object-oriented programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
18.24.1 Object-oriented programming – General information . . . . . . . . . . . . 219
18.24.2
Extension of Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
18.24.3
Implementing Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
18.24.4
Extending Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
18.24.5
Calling Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
19 Working with control networks 229
19.1 Working with control networks – General information . . . . . . . . . . . . . . . . . . 229
19.2 Symbol Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
19.3 Subordinate Safety Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
19.4 Network and addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
19.4.1 Network and addressing – General information . . . . . . . . . . . . . . . . 233
19.4.2 Network Topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
19.4.3 Addressing and Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
19.4.4 Address Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
19.5 Network variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
19.5.1 Network variables – General information . . . . . . . . . . . . . . . . . . . . . . 238
19.5.2 Configuring a Network Variable Exchange . . . . . . . . . . . . . . . . . . . . . 239

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 7 / 1158

19.6 Data connection with data sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241


19.6.1 Data Source Manager – General information . . . . . . . . . . . . . . . . . . . 241
19.6.2
Data source type PLC Engineering ApplicationV3 . . . . . . . . . . . . . . . 241
19.6.3
Data source type PLC Engineering Symbolic . . . . . . . . . . . . . . . . . . . 242
19.6.4
Data transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
19.6.5
Initially Adding a Data Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
19.6.6
Editing data source variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
19.6.7
Editing Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
19.6.8
Updating Data Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
19.6.9
Using Remote Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
19.6.10
Establishing an Encrypted Connection of a Data Source OPC UA
Client to an OPC UA Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
20 Transferring the application to the PLC 257
20.1 Transferring the application to the PLC – General information . . . . . . . . . . . . 257
20.2 Configuring the connection to the PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
20.3 Encrypting Communication, Changing Security Settings . . . . . . . . . . . . . . . . . 258
20.4 Handling of Device User Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
20.5 Generating Application Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
20.6 Downloading the Application Code, Logging in, and Starting the PLC . . . . . . 267
20.7 Generating Boot Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
21 Testing and debugging 271
21.1 Testing and troubleshooting – General information . . . . . . . . . . . . . . . . . . . . . 271
21.2Testing in Simulation Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
21.3Using Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
21.4Stepping Through a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
21.5Forcing and writing of variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
21.6Resetting applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
21.7Sequential control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
21.8Determining the Current Processing Position with the Call Stack . . . . . . . . . . 284
21.9Checking the Task Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
22 Application at runtime 287
22.1 Application at runtime – General information . . . . . . . . . . . . . . . . . . . . . . . . . 287
22.2 Changing values with recipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
22.3 Monitoring values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
22.3.1 Monitoring of values – General information . . . . . . . . . . . . . . . . . . . . 291
22.3.2
Calling of Monitoring in Programming Objects . . . . . . . . . . . . . . . . . 291
22.3.3
Using Watch Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
22.4 Data recording with "Trace" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
22.4.1 Data recording with 'Trace' – General information . . . . . . . . . . . . . . . 298
22.4.2 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
22.4.3 Creating Trace Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
22.4.4 Operating the Data Recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
22.4.5 Navigating into Trace Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
22.4.6 Managing Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
22.4.7 Showing Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305

R911403764, Edition 08 Bosch Rexroth AG


8 / 1158 ctrlX PLC Engineering

22.5 Data recording with "Trend" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305


22.5.1 Data recording with 'Trend' – General information . . . . . . . . . . . . . . 305
22.5.2 Getting Started with Trend Recording . . . . . . . . . . . . . . . . . . . . . . . . 306
22.5.3 Configuring the trend recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
22.5.4 Monitoring Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
22.5.5 Reading the PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
22.5.6 Analysing Errors with Core Dump . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
22.5.7 Using PLC Shell for requesting Information . . . . . . . . . . . . . . . . . . . . 311
22.5.8 Backup and Restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
23 Updating the application on the PLC 315
23.1 Updating the application on the PLC – General information . . . . . . . . . . . . . . 315
23.2 Executing the Online Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
23.3 Execution of a Download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
24 Copying Files to/from PLC 319
25 Using the command line interface 321
26 API for ctrlX PLC Engineering 327
27 Using libraries 329
27.1 Library repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
27.2 Library manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
27.3 Information for library developers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
27.4 Adding a Library to the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
27.5 Adding a Library to the Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
27.6 Exporting Library Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
28 Managing Devices 333
28.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
28.2 Installing Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
29 Managing packages and licenses 335
29.1 Licensing additional projects (plugins) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
29.2 Installing/uninstalling add-ons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
29.3 Licensing products . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
30 Using scripts 341
30.1 Using scripts– Basic information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
30.2 Executing scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
30.2.1 Executing a script - Basic information . . . . . . . . . . . . . . . . . . . . . . . . 342
30.2.2 Calling scripts from menu commands . . . . . . . . . . . . . . . . . . . . . . . . 342
30.2.3 Starting scripts from the command line . . . . . . . . . . . . . . . . . . . . . . 343
30.2.4 Calling scripts from toolbar icons . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
30.3 Creating a python script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
30.3.1 Python script – Basic information . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
30.3.2 Getting Started with Python for PLC Engineering . . . . . . . . . . . . . . . 349
30.3.3 Tips for Python Programmers about .NET API Documentation . . . . . 349
30.3.4 Basic Syntax of Python (with Examples) . . . . . . . . . . . . . . . . . . . . . . 350
30.3.5 Python Control Structures (with Examples) . . . . . . . . . . . . . . . . . . . 358
30.3.6 Accessing PLC Engineering functionalities with a script . . . . . . . . . . 362
30.3.7 Transitioning from Python 2 to Python 3 . . . . . . . . . . . . . . . . . . . . . . 371
30.3.8 Comparison of IronPython and cPython . . . . . . . . . . . . . . . . . . . . . . 371

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 9 / 1158

31 Security 373
31.1 Security – Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
31.2General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
31.3Security for the development system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
31.4Security for the Runtime System / PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
31.5Security for CODESYS WebVisu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
32 Reference, programming 377
32.1 Programming languages and their editors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
32.1.1 Programming languages and their editors – General information . . . 377
32.1.2 Declaration Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
32.1.3 Common Functions in Graphical Editors . . . . . . . . . . . . . . . . . . . . . . 378
32.1.4 Structured text and Extended Structured text (ExST) . . . . . . . . . . . . 379
ST Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
ST editor in online mode . . . . . . . . . . . . . . . . . . . . . . . . . 380
ST expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Assignments (ST) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Instructions (ST) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
32.1.5 Sequence language (AS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
SFC (sequential function chart) editor . . . . . . . . . . . . . . 391
SFC Editor in Online Mode . . . . . . . . . . . . . . . . . . . . . . . 391
Processing Order in SFC . . . . . . . . . . . . . . . . . . . . . . . . . 392
Qualifiers for Actions in SFC . . . . . . . . . . . . . . . . . . . . . . 394
Implicit Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
SFC Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Library "Analyzation" . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
Elements (AS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
32.1.6 Continuous function chart/ladder diagram/instruction list
(FUP/LD/IL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
FBD/LD/IL Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
FBD/LD/IL Editor in Online Mode . . . . . . . . . . . . . . . . . . 414
Modifiers and operators in IL . . . . . . . . . . . . . . . . . . . . . 415
Elements (FUP/LD/IL) . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
32.1.7 Continuous Function Chart (CFC) and page-oriented CFC . . . . . . . . 425
Continuous Function Chart – General information . . . . . 425
Continuous Function Chart – Page-oriented . . . . . . . . . . 425
CFC editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
CFC editor, page-oriented . . . . . . . . . . . . . . . . . . . . . . . . 428
Keyboard Shortcuts in the CFC Editors . . . . . . . . . . . . . 429
CFC Editor in Online Mode . . . . . . . . . . . . . . . . . . . . . . . 430
Elements (CFC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
32.2 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
32.2.1 Variables – General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
32.2.2 Local variables - VAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
32.2.3 Input Variables - VAR_INPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
32.2.4 Output Variables - VAR_OUTPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
32.2.5 Input/Output Variable (VAR_IN_OUT) . . . . . . . . . . . . . . . . . . . . . . . . . 439
32.2.6 Global Variables - VAR_GLOBAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444

R911403764, Edition 08 Bosch Rexroth AG


10 / 1158 ctrlX PLC Engineering

32.2.7 Temporary Variable - VAR_TEMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444


32.2.8 Static variables - VAR_STAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
32.2.9 External Variables - VAR_EXTERNAL . . . . . . . . . . . . . . . . . . . . . . . . . . 445
32.2.10 Instance Variables - VAR_INST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
32.2.11 Configuration Variables - VAR_CONFIG . . . . . . . . . . . . . . . . . . . . . . . 446
32.2.12 Constant variables - 'CONSTANT' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
32.2.13 Persistent Variable - PERSISTENT . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
32.2.14 Retain variable - RETAIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
32.2.15 SUPER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
32.2.16 THIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
32.2.17 Data type: Implicit enumeration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
32.3 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
32.3.1 Operators – General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
32.3.2 Operators – Overflow/underflow in data type . . . . . . . . . . . . . . . . . . 455
32.3.3 Arithmetic operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
32.3.4 Bit string operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
32.3.5 Bit shift operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
32.3.6 Selection operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
32.3.7 Comparison operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
32.3.8 Address operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
32.3.9 Call operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
32.3.10 Type conversion operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
32.3.11 Numerical operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
32.3.12 Namespace operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
32.3.13 Multicore operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
32.3.14 More operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
32.3.15 Operator 'ADD' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
32.3.16 Operator 'MUL' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
32.3.17 Operator 'SUB' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
32.3.18 Operator 'DIV' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
32.3.19 Operator 'MOD' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
32.3.20 Operator 'MOVE' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
32.3.21 Operator 'INDEXOF' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
32.3.22 Operator 'SIZEOF' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
32.3.23 Operator 'XSIZEOF' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
32.3.24 Operator 'NOT' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
32.3.25 Operator 'AND' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
32.3.26 Operator 'OR' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
32.3.27 Operator 'XOR' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
32.3.28 Operator 'AND_THEN' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
32.3.29 Operator 'OR_ELSE' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
32.3.30 Operator 'SHL' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
32.3.31 Operator 'SHR' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
32.3.32 Operator 'ROL' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
32.3.33 Operator 'ROR' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
32.3.34 Operator 'SEL' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 11 / 1158

32.3.35 Operator 'MAX' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470


32.3.36 Operator 'MIN' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
32.3.37 Operator 'LIMIT' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
32.3.38 Operator 'MUX' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
32.3.39 Operator 'GT' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
32.3.40 Operator 'LT' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
32.3.41 Operator 'LE' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
32.3.42 Operator 'GE' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
32.3.43 Operator 'EQ' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
32.3.44 Operator 'NE' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
32.3.45 Operator 'ADR' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
32.3.46 Operator 'Content Operator' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
32.3.47 Operator 'BITADR' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
32.3.48 Operator 'CAL' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
32.3.49 Overload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
32.3.50 Boolean conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
32.3.51 Integer conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
32.3.52 Floating point number conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
32.3.53 String conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
32.3.54 Time conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
32.3.55 Date and time conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
32.3.56 Operator 'TRUNC' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
32.3.57 Operator 'TRUNC_INT' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
32.3.58 Operator 'ABS' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
32.3.59 Operator 'SQRT' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
32.3.60 Operator 'LN' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
32.3.61 Operator 'LOG' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
32.3.62 Operator 'EXP' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
32.3.63 Operator 'EXPT' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
32.3.64 Operator 'SIN' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520
32.3.65 Operator 'COS' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520
32.3.66 Operator 'TAN' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
32.3.67 Operator 'ASIN' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
32.3.68 Operator 'ACOS' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
32.3.69 Operator 'ATAN' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
32.3.70 Operator '__DELETE' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
32.3.71 Operator '__ISVALIDREF' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
32.3.72 Operator '__NEW' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
32.3.73 Operator '__QUERYINTERFACE' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527
32.3.74 Operator '__QUERYPOINTER' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
32.3.75 Operators '__TRY', '__CATCH', '__FINALLY', '__ENDTRY' . . . . . . . . . . . . 529
32.3.76 Operator '__VARINFO' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
32.3.77 Operator '__CURRENTTASK' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
32.3.78 Operator '__COMPARE_AND_SWAP . . . . . . . . . . . . . . . . . . . . . . . . . . 534
32.3.79 Operator '__XADD' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535
32.3.80 Operator '__POSITION' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536

R911403764, Edition 08 Bosch Rexroth AG


12 / 1158 ctrlX PLC Engineering

32.3.81 Operator '__POUNAME' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536


32.3.82 Operator 'TEST_AND_SET' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
32.3.83 Operator - Global Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
32.3.84 Operator - Namespace for Global Variables Lists . . . . . . . . . . . . . . . 538
32.3.85 Operator - Library Namespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538
32.3.86 Operator - Enumeration Namespace . . . . . . . . . . . . . . . . . . . . . . . . . 538
32.3.87 Operator '__POOL' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
32.3.88 'INI’ operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
32.4 Operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
32.4.1 Operands – General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540
32.4.2 Operands – Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
32.4.3 Operands – Other . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
32.4.4
BOOL Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
32.4.5 Numerical constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542
32.4.6 REAL/LREAL Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542
32.4.7 String Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
32.4.8 TIME/LTIME Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
32.4.9 Date and Time Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
32.4.10 Typed Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
32.4.11 Access to Variables in Arrays, Structures, and Blocks . . . . . . . . . . . . 550
32.4.12 Bit Access in Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
32.4.13 Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
32.4.14 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554
32.5 Data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555
32.5.1 Data types – General information . . . . . . . . . . . . . . . . . . . . . . . . . . . 555
32.5.2 Standard data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555
32.5.3 Data types – Extensions to the IEC 61131-3 standard . . . . . . . . . . . . 556
32.5.4 User-defined data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
32.5.5 Data Type 'BOOL' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
32.5.6 Integer Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
32.5.7 Data Type 'REAL' / 'LREAL' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557
32.5.8 “STRING” data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558
32.5.9 Data Type 'TIME' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
32.5.10 Data Type 'LTIME' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
32.5.11 Date and Time Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
32.5.12 Data Type 'ANY' and 'ANY_<type>' . . . . . . . . . . . . . . . . . . . . . . . . . . . 561
32.5.13 “WSTRING” data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
32.5.14 Data Type 'BIT' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
32.5.15 Special Data Types '__UXINT', __XINT, and '__XWORD' . . . . . . . . . . . . 565
32.5.16 Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566
32.5.17 Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
32.5.18 Data Type 'ARRAY' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
32.5.19 Data Type '__VECTOR' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
32.5.20 Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
32.5.21 Enumerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586
32.5.22 Alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 13 / 1158

32.5.23 Data Type 'UNION' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592


32.5.24 Subrange Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592
32.5.25 Redundancy Area Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593
32.5.26 Redundancy State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594
32.6 Pragmas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
32.6.1 Pragmas – General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
32.6.2 Message Pragmas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
32.6.3 Conditional pragmas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
32.6.4 Region Pragma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
32.6.5 Attribute pragmas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
Attribute pragmas – General information . . . . . . . . . . . . 605
User-defined attributes . . . . . . . . . . . . . . . . . . . . . . . . . . 605
Attribute 'call_after_global_init_slot' . . . . . . . . . . . . . . . . 606
Attribute 'call_after_init' . . . . . . . . . . . . . . . . . . . . . . . . . 606
Attribute 'call_after_online_change_slot' . . . . . . . . . . . . . 607
Attribute 'call_before_global_exit_slot' . . . . . . . . . . . . . . 608
Attribute 'call_on_type_change' . . . . . . . . . . . . . . . . . . . . 608
Attribute 'conditionalshow' . . . . . . . . . . . . . . . . . . . . . . . 609
Attribute 'conditionalshow_all_locals' . . . . . . . . . . . . . . . 610
Attribute 'const_replaced', Attribute 'const_non_replaced'
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
Attribute 'dataflow' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
Attribute 'displaymode' . . . . . . . . . . . . . . . . . . . . . . . . . . 613
Attribute 'enable_dynamic_creation' . . . . . . . . . . . . . . . . 614
Attribute 'estimated-stack-usage' . . . . . . . . . . . . . . . . . . 614
Attribute 'ExpandFully' . . . . . . . . . . . . . . . . . . . . . . . . . . 618
Attribute 'global_init_slot' . . . . . . . . . . . . . . . . . . . . . . . . 618
Attribute 'hide' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620
Attribute 'hide_all_locals' . . . . . . . . . . . . . . . . . . . . . . . . . 622
Attribute 'initialize_on_call' . . . . . . . . . . . . . . . . . . . . . . . 623
Attribute 'init_namespace' . . . . . . . . . . . . . . . . . . . . . . . . 624
Attribute "init_on_onlchange" . . . . . . . . . . . . . . . . . . . . . 625
Attribute 'instance-path' . . . . . . . . . . . . . . . . . . . . . . . . . 625
Attribute 'io_function_block', 'io_function_block_mapping'
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626
Attribute 'is_connected' . . . . . . . . . . . . . . . . . . . . . . . . . 627
Attribute 'linkalways' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628
Attribute 'monitoring' . . . . . . . . . . . . . . . . . . . . . . . . . . . 629
Attribute 'monitoring_display' . . . . . . . . . . . . . . . . . . . . . 630
Attribute 'monitoring_encoding' . . . . . . . . . . . . . . . . . . . 631
Attribute 'no_assign', Attribute 'no_assign_warning' . . . . 632
Attribute 'no_check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
Attribute 'no_copy' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634
Attribute 'no-exit' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634
Attribute 'noinit' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 634
Attribute 'no_instance_in_retain' . . . . . . . . . . . . . . . . . . . 635
Attribute 'no_virtual_actions' . . . . . . . . . . . . . . . . . . . . . . 635

R911403764, Edition 08 Bosch Rexroth AG


14 / 1158 ctrlX PLC Engineering

Attribute 'pingroup' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637


Attribute 'pin_presentation_order_inputs/outputs' . . . . . 638
Attribute 'obsolete' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
Attribute 'pack_mode' . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
Attribute 'ProcessValue' . . . . . . . . . . . . . . . . . . . . . . . . . 645
Attribute 'qualified_only' . . . . . . . . . . . . . . . . . . . . . . . . . 645
Attribute 'reflection' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645
Attribute 'subsequent' . . . . . . . . . . . . . . . . . . . . . . . . . . . 646
Attribute 'symbol' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 646
Attribute 'to_string' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647
Attribute 'warning disable', attribute 'warning restore' . . 647
Effects of Pragmas on Symbols . . . . . . . . . . . . . . . . . . . 648
32.7 Identifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651
32.8 Shadowing rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656
32.9 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
32.10 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660
32.10.1 Methods 'FB_Init', 'FB_Reinit', and 'FB_Exit' . . . . . . . . . . . . . . . . . . . . 660
32.11 Errors and warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664
32.11.1 Compiler error C0001 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
32.11.2 Compiler error C0002 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
32.11.3 Compiler error C0003 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
32.11.4 Compiler Error C0004 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
32.11.5 Compiler error C0005 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
32.11.6 Compiler error C0006 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
32.11.7 Compiler error C0007 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
32.11.8 Compiler error C0008 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
32.11.9 Compiler error C0009 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
32.11.10Compiler error C0010 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
32.11.11Compiler error C0011 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
32.11.12Compiler error C0013 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
32.11.13Compiler error C0016 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
32.11.14Compiler error C0018 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
32.11.15Compiler Error C0020 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
32.11.16Compiler Error C0022 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
32.11.17Compiler Error C0023 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
32.11.18Compiler Error C0026 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
32.11.19Compiler Error C0027 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
32.11.20Compiler Error C0030 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
32.11.21Compiler Error C0031 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676
32.11.22Compiler error C0032 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676
32.11.23Compiler Error C0033 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
32.11.24Compiler Error C0035 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
32.11.25Compiler Error C0036 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
32.11.26Compiler Error C0037 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
32.11.27Compiler Error C0038 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
32.11.28Compiler Error C0039 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 15 / 1158

32.11.29Compiler Error C0040 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679


32.11.30Compiler Error C0041 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680
32.11.31Compiler Error C0042 (Compiler Version <= 3.4.10) . . . . . . . . . . . . . 680
32.11.32Compiler Error C0043 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681
32.11.33Compiler Error C0044 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681
32.11.34Compiler error C0045 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
32.11.35Compiler Error C0046 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
32.11.36Compiler Error C0047 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
32.11.37Compiler Error C0048 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
32.11.38Compiler Error C0049 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
32.11.39Compiler Error C0050 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
32.11.40Compiler Error C0051 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
32.11.41Compiler Error C0053 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
32.11.42Compiler Error C0061 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
32.11.43Compiler Error C0062 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
32.11.44Compiler Error C0064 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
32.11.45Compiler Error C0065 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
32.11.46Compiler Error C0066 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
32.11.47Compiler Error C0068 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
32.11.48Compiler Error C0069 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
32.11.49Compiler Error C0070 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
32.11.50Compiler Error C0072 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688
32.11.51Compiler Error C0074 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688
32.11.52Compiler Error C0075 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
32.11.53Compiler Error C0076 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
32.11.54Compiler Error C0077 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
32.11.55Compiler Error C0078 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690
32.11.56Compiler Error C0080 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690
32.11.57Compiler Error C0081 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691
32.11.58Compiler Error C0082 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691
32.11.59Compiler Error C0084 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691
32.11.60Compiler Error C0085 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692
32.11.61Compiler Error C0086 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692
32.11.62Compiler Error C0087 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693
32.11.63Compiler Error C0089 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693
32.11.64Compiler Error C0090 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694
32.11.65Compiler Error C0091 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694
32.11.66Compiler Error C0094 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695
32.11.67Compiler Error C0096 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695
32.11.68Compiler Error C0097 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696
32.11.69Compiler Error C0098 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696
32.11.70Compiler Error C0099 (Compiler Version < 3.5.7.0) . . . . . . . . . . . . . 696
32.11.71Compiler Error C0101 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
32.11.72Compiler Error C0102 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
32.11.73Compiler Error C0104 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
32.11.74Compiler error C0106 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698

R911403764, Edition 08 Bosch Rexroth AG


16 / 1158 ctrlX PLC Engineering

32.11.75Compiler Error C0114 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698


32.11.76Compiler Error C0115 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698
32.11.77Compiler Error C0116 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698
32.11.78Compiler Error C0117 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699
32.11.79Compiler Error C0118 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699
32.11.80Compiler Error C0119 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699
32.11.81Compiler Error C0120 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700
32.11.82Compiler Error C0122 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700
32.11.83Compiler Error C0124 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701
32.11.84Compiler Error C0125 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701
32.11.85Compiler Error C0126 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701
32.11.86Compiler Error C0130 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702
32.11.87Compiler Error C0131 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702
32.11.88Compiler Error C0132 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
32.11.89Compiler Error C0136 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
32.11.90Compiler Error C0138 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
32.11.91Compiler Error C0139 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704
32.11.92Compiler Error C0140 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704
32.11.93Compiler Error C0141 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704
32.11.94Compiler Error C0142 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705
32.11.95Compiler Error C0143 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705
32.11.96Compiler Error C0144 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706
32.11.97Compiler Error C0145 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706
32.11.98Compiler Error C0149 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706
32.11.99Compiler Error C0161 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707
32.11.10
0 Compiler Error C0162 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707
32.11.10
1 Compiler Error C0164 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708
32.11.10
2 Compiler Error C0165 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708
32.11.10
3 Compiler Error C0168 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709
32.11.10
4 Compiler Error C0169 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709
32.11.10
5 Compiler Error C0173 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710
32.11.10
6 Compiler Error C0174 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710
32.11.10
7 Compiler Error C0175 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
32.11.10
8 Compiler Error C0177 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
32.11.10
9 Compiler Error C0178 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
32.11.11
0 Compiler Error C0179 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712
32.11.11
1 Compiler Error C0180 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 17 / 1158

32.11.11
2 Compiler Error C0182 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713
32.11.11
3 Compiler Error C0183 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713
32.11.11
4 Compiler Error C0185 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713
32.11.11
5 Compiler Error C0186 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
32.11.11
6 Compiler Error C0188 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715
32.11.11
7 Compiler Error C0189 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715
32.11.11
8 Compiler Error C0190 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715
32.11.11
9 Compiler Error C0191 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
32.11.12
0 Compiler Error C0195 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
32.11.12
1 Compiler Error C0196 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
32.11.12
2 Compiler Error C0197 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
32.11.12
3 Compiler Error C0198 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717
32.11.12
4 Compiler Error C0199 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717
32.11.12
5 Compiler Error C0201 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718
32.11.12
6 Compiler Error C0203 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718
32.11.12
7 Compiler Error C0204 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718
32.11.12
8 Compiler Error C0205 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
32.11.12
9 Compiler Error C0206 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
32.11.13
0 Compiler Error C0207 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
32.11.13
1 Compiler Error C0208 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720
32.11.13
2 Compiler Error C0209 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720
32.11.13
3 Compiler Error C0211 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720
32.11.13
4 Compiler Error C0212 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721
32.11.13
5 Compiler Error C0215 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721
32.11.13
6 Compiler Error C0216 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721
32.11.13
7 Compiler Error C0217 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722

R911403764, Edition 08 Bosch Rexroth AG


18 / 1158 ctrlX PLC Engineering

32.11.13
8 Compiler Error C0218 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722
32.11.13
9 Compiler Error C0219 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722
32.11.14
0 Compiler Error C0221 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
32.11.14
1 Compiler Error C0222 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
32.11.14
2 Compiler Error C0224 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724
32.11.14
3 Compiler Error C0225 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724
32.11.14
4 Compiler Error C0227 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
32.11.14
5 Compiler Error C0228 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
32.11.14
6 Compiler Error C0230 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
32.11.14
7 Compiler Error C0232 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726
32.11.14
8 Compiler Error C0233 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726
32.11.14
9 Compiler Error C0234 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727
32.11.15
0 Compiler Error C0235 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727
32.11.15
1 Compiler Error C0236 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728
32.11.15
2 Compiler Error C0237 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728
32.11.15
3 Compiler Error C0238 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729
32.11.15
4 Compiler Error C0239 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729
32.11.15
5 Compiler Error C0240 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729
32.11.15
6 Compiler Error C0241 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730
32.11.15
7 Compiler Error C0242 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730
32.11.15
8 Compiler Error C0243 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
32.11.15
9 Compiler Error C0380 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
32.11.16
0 Compiler Error C0509 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732
32.11.16
1 Compiler Error C0511 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
32.11.16
2 Compiler Error C0542 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
32.11.16
3 Compiler Error C0543 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 19 / 1158

33 User interface 735


33.1 Generic Device Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
33.1.1 Tab “Communication” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735
33.1.2 Generic Device Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
33.1.3 ‘Status’ tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
33.1.4 'Information' tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
33.1.5 Tab “DataLayerNode I/O Image” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737
33.1.6 Tab 'Symbol Rights' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737
33.1.7 Tab 'Licensed Software Metrics' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737
33.1.8 Tab '<device name> IEC Objects' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738
33.1.9 Tab '<Device name> I/O mapping' . . . . . . . . . . . . . . . . . . . . . . . . . . . 739
33.1.10 Tab 'Access Rights' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
33.1.11 Tab 'Applications' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 748
33.1.12 Tab 'Backup and Restore' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749
33.1.13 Tab 'Files' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750
33.1.14 "Log” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751
33.1.15 Tab 'Task deployment' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753
33.1.16 "Users and groups” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754
33.1.17 “PLC shell” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 756
33.1.18 Tab 'PLC Settings' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 758
33.1.19 'Parameters' tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760
33.1.20 Tab “Status” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761
33.2 Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761
33.2.1 Objects – General information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761
33.2.2 ‘Project settings’ object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 761
33.2.3 Object “device (ctrlX CORE)” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762
33.2.4 Object “DataLayer_Realtime” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763
33.2.5 Object “ethercat_master_instances_ethercatmaster” . . . . . . . . . . . . 763
33.2.6 “Application” object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763
33.2.7 Object 'POU Locations' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764
33.2.8 Object 'Alarm Configuration' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765
33.2.9 Object 'Alarm Class' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766
33.2.10 Object 'Alarm Group' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 768
33.2.11 Object 'Alarm Storage' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772
33.2.12 Object ‘Remote Alarms’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774
33.2.13 Object 'Data Sources Manager' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775
33.2.14 Object 'GlobalTextList' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 776
33.2.15 Object 'GVL' - Global Variable List . . . . . . . . . . . . . . . . . . . . . . . . . . . 777
33.2.16 Object 'GVL' - Global Variable List (task-local) . . . . . . . . . . . . . . . . . 778
33.2.17 Object 'Persistent variable list' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778
33.2.18 "Image pool” object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 779
33.2.19 "Library manager” object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780
33.2.20 Object 'Network Variable List (Sender)' . . . . . . . . . . . . . . . . . . . . . . 783
33.2.21 Object 'Network Variable List (Receiver)' . . . . . . . . . . . . . . . . . . . . . 783
33.2.22 Object 'Recipe Manager' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784
33.2.23 Object 'Recipe Definition' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787

R911403764, Edition 08 Bosch Rexroth AG


20 / 1158 ctrlX PLC Engineering

33.2.24 Object 'Text List' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788


33.2.25 "Symbol configuration” object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 788
33.2.26 Object 'Trace' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
33.2.27 Object 'Unit Conversion' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
33.2.28 "Data source" object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805
Object 'Data source' – General information . . . . . . . . . . 805
Tab 'Variables' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 805
Tab 'Type Mappings' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807
Tab 'Communication' via PLC Engineering Symbolic . . . 808
Tab 'Communication' via PLC Engineering ApplicationV3 812
Tab 'General and Diagnosis' . . . . . . . . . . . . . . . . . . . . . . 815
Object 'DUT' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815
Object 'External File' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818
Object 'C Code File' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819
Object 'C Implemented Library' . . . . . . . . . . . . . . . . . . . 819
33.2.29 "POU” object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 820
"POU” object – General information . . . . . . . . . . . . . . . . 820
'Adding the POU' dialog . . . . . . . . . . . . . . . . . . . . . . . . . 821
'Program’ object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822
‘Function block’ object . . . . . . . . . . . . . . . . . . . . . . . . . . 823
Object 'Function' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825
Object 'Interface' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827
'Method’ object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829
Object 'Interface Method' . . . . . . . . . . . . . . . . . . . . . . . . 835
Object 'Interface Property' . . . . . . . . . . . . . . . . . . . . . . . 836
Object 'Property' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839
Object 'Action' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843
Object 'Transition' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845
33.2.30 "POUs for implicit checks” object . . . . . . . . . . . . . . . . . . . . . . . . . . . 846
'POUs for implicit checks' – General information . . . . . . 846
POU 'CheckBounds' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848
POU 'CheckDivInt' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851
POU 'CheckDivLInt' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851
POU 'CheckDivReal' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 852
POU 'CheckDivLReal' . . . . . . . . . . . . . . . . . . . . . . . . . . . 853
POU 'CheckRangeSigned' . . . . . . . . . . . . . . . . . . . . . . . . 854
POU 'CheckLRangeSigned' . . . . . . . . . . . . . . . . . . . . . . . 856
POU 'CheckRangeUnsigned' . . . . . . . . . . . . . . . . . . . . . . 857
POU 'CheckLRangeUnsigned' . . . . . . . . . . . . . . . . . . . . . 858
POU 'CheckPointer' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 859
33.2.31 "Task configuration" object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 860
Object 'Task configuration' – General information . . . . . 860
Tab 'Properties' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861
Tab 'System Events' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861
Tab 'Monitor' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863
'Variable use' tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 864

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 21 / 1158

‘Task group’ tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865


Tab 'CPU Load' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865
33.2.32 "Task" object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865
'Task’ object – General information . . . . . . . . . . . . . . . . . 865
“Configuration” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865
33.3 Menu commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868
33.3.1 Menu commands – General information . . . . . . . . . . . . . . . . . . . . . . 868
33.3.2 Menu “File” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868
Command 'New Project’ . . . . . . . . . . . . . . . . . . . . . . . . . 868
'Open project’ command . . . . . . . . . . . . . . . . . . . . . . . . . 869
Command “Open project from ctrlX CORE...” . . . . . . . . 869
Command 'Close project' . . . . . . . . . . . . . . . . . . . . . . . . 870
Command 'Save project' . . . . . . . . . . . . . . . . . . . . . . . . . 870
Command 'Save project as' . . . . . . . . . . . . . . . . . . . . . . . 871
Command 'Save/Send Archive' . . . . . . . . . . . . . . . . . . . . 872
Command 'Extract archive' . . . . . . . . . . . . . . . . . . . . . . . 873
Command 'Print' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 874
Command 'Print Preview' . . . . . . . . . . . . . . . . . . . . . . . . 874
Command 'Page Setup' . . . . . . . . . . . . . . . . . . . . . . . . . . 874
Command 'Last used projects' . . . . . . . . . . . . . . . . . . . . 874
Command 'Exit' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875
Command 'Save Project and Install into Library Reposi-
tory' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875
Command 'Save Project as Compiled Library' . . . . . . . . 875
Command 'Source Upload' . . . . . . . . . . . . . . . . . . . . . . . 876
Command 'Source Download' . . . . . . . . . . . . . . . . . . . . . 877
33.3.3 Menu “Edit” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877
Standard Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 877
Command ‘Replace’. 'Replace in project’ . . . . . . . . . . . . 877
Command ‘Search', 'Search in project . . . . . . . . . . . . . . 878
Command ‘Find next’ . . . . . . . . . . . . . . . . . . . . . . . . . . . 879
Command 'Find next (selection)' . . . . . . . . . . . . . . . . . . 879
Command 'Search previous’ . . . . . . . . . . . . . . . . . . . . . . 879
Command 'Search previous (selection)' . . . . . . . . . . . . . 880
Command 'Next Message' . . . . . . . . . . . . . . . . . . . . . . . . 880
Command 'Previous Message' . . . . . . . . . . . . . . . . . . . . . 880
Command “Selectively from ctrlX CORE..” . . . . . . . . . . . 880
Command “PLC real-time data” . . . . . . . . . . . . . . . . . . . 881
Command “Selectively from file..” . . . . . . . . . . . . . . . . . 881
Command “All data from ctrlX CORE..” . . . . . . . . . . . . . 881
Command “PLC Realtime data input” . . . . . . . . . . . . . . . 882
Command “PLC Realtime data output” . . . . . . . . . . . . . 882
Command “Use as Plc Realtime data (input)” . . . . . . . . 883
Command “Use as Plc Realtime data (Output)” . . . . . . . 883
Command “Show status” . . . . . . . . . . . . . . . . . . . . . . . . 884
Command 'Insert File as Text' . . . . . . . . . . . . . . . . . . . . . 884
Command 'Overwrite Mode' . . . . . . . . . . . . . . . . . . . . . . 884

R911403764, Edition 08 Bosch Rexroth AG


22 / 1158 ctrlX PLC Engineering

Command 'View Whitespace' . . . . . . . . . . . . . . . . . . . . . 884


Command 'View Indentation Guides' . . . . . . . . . . . . . . . 885
Command 'Go to Line' . . . . . . . . . . . . . . . . . . . . . . . . . . . 885
Command 'Make Uppercase' . . . . . . . . . . . . . . . . . . . . . . 885
Command 'Make Lowercase' . . . . . . . . . . . . . . . . . . . . . . 885
Command 'Go to Matching Bracket' . . . . . . . . . . . . . . . . 885
Command 'Select to Matching Bracket' . . . . . . . . . . . . . 886
Command 'Expand All Folds' . . . . . . . . . . . . . . . . . . . . . . 886
Command 'Collapse All Folds' . . . . . . . . . . . . . . . . . . . . . 886
Command 'Comment Out Selected Lines' . . . . . . . . . . . 886
Command 'Uncomment Selected Lines' . . . . . . . . . . . . . 887
'Enable inline monitoring' command . . . . . . . . . . . . . . . . 887
Command 'Toggle Bookmark' . . . . . . . . . . . . . . . . . . . . . 887
Command 'Next Bookmark (Active Editor)' . . . . . . . . . . . 887
Command 'Next Bookmark' . . . . . . . . . . . . . . . . . . . . . . . 887
Command 'Previous Bookmark (Active Editor)' . . . . . . . 888
Command 'Previous Bookmark' . . . . . . . . . . . . . . . . . . . 888
Command 'Clear All Bookmarks (Active Editor)' . . . . . . . 888
Command 'Clear All Bookmarks' . . . . . . . . . . . . . . . . . . . 888
Command 'Browse Cross References' . . . . . . . . . . . . . . 889
Command 'Browse Global Cross References' . . . . . . . . . 889
Command 'Browse Call Tree' . . . . . . . . . . . . . . . . . . . . . 889
Command 'AutoDeclare' . . . . . . . . . . . . . . . . . . . . . . . . . 889
Command 'Input Assistant' . . . . . . . . . . . . . . . . . . . . . . . 892
Command 'Go to Source Position' . . . . . . . . . . . . . . . . . 893
Command 'Go to Definition' . . . . . . . . . . . . . . . . . . . . . . 893
Command 'Go To Reference' . . . . . . . . . . . . . . . . . . . . . . 893
Command 'Go to Instance' . . . . . . . . . . . . . . . . . . . . . . . 893
Command 'Refactoring' - 'Rename <...>' . . . . . . . . . . . . . 894
Command 'Refactoring' - 'Update Referenced Pins' . . . . 895
Command 'Refactoring' - 'Add Variable' . . . . . . . . . . . . . 895
Command 'Refactoring' - 'Remove <variable>' . . . . . . . . 896
Command 'Refactoring' - 'Reorder Variables' . . . . . . . . . 897
Command 'Advanced' - 'Format Document' . . . . . . . . . . 897
33.3.4 Menu “View” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898
Command 'Devices' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898
'Messages’ command . . . . . . . . . . . . . . . . . . . . . . . . . . . 898
Command 'Start Page' . . . . . . . . . . . . . . . . . . . . . . . . . . 899
Command 'Full Screen' . . . . . . . . . . . . . . . . . . . . . . . . . . 899
Command 'Properties' . . . . . . . . . . . . . . . . . . . . . . . . . . 899
Standard Menu in View 'Devices', 'POUs', 'Modules' . . . . 899
Command ‘POUs’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900
Command 'Element properties' . . . . . . . . . . . . . . . . . . . 900
Command 'ToolBox' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900
Command 'Watch' - 'Watch <n>' . . . . . . . . . . . . . . . . . . . 900
Command 'Watch' - 'Watch All Forces' . . . . . . . . . . . . . . 900

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 23 / 1158

Command 'Add All Forces to Watchlist' . . . . . . . . . . . . . 901


Command 'Bookmarks' . . . . . . . . . . . . . . . . . . . . . . . . . . 901
Command 'Breakpoints' . . . . . . . . . . . . . . . . . . . . . . . . . 902
Command 'Cross Reference List' . . . . . . . . . . . . . . . . . . 903
Command 'Browse Cross References in Classic View' . . 905
Command 'Call Stack' . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
Command 'Call tree' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
Command 'Memory' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908
Command 'Security Screen' . . . . . . . . . . . . . . . . . . . . . . 908
Command 'Settings of Memory Reserve for Online
Change' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 911
33.3.5 Menu “Project” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912
Command “Logging in device user...” . . . . . . . . . . . . . . . 912
Command “Log out current device user” . . . . . . . . . . . . 913
Command 'Attach device' . . . . . . . . . . . . . . . . . . . . . . . . 913
Command 'Update device' . . . . . . . . . . . . . . . . . . . . . . . 914
Command 'Edit Object' . . . . . . . . . . . . . . . . . . . . . . . . . . 915
Command 'Edit Object with' . . . . . . . . . . . . . . . . . . . . . . 915
Command 'Project settings' . . . . . . . . . . . . . . . . . . . . . . 915
Command “Communication settings...” . . . . . . . . . . . . . 915
Command “Project synchronisation...” . . . . . . . . . . . . . . 915
Command “Equalize project PC <-> ctrlX CORE” . . . . . . 916
Command “Synchronization cache...” . . . . . . . . . . . . . . . 916
Command 'Document' . . . . . . . . . . . . . . . . . . . . . . . . . . . 917
'Compare’ command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917
Command 'Commit Accepted Changes' . . . . . . . . . . . . . 922
Command 'Export' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922
'Import...’ command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922
Command 'Export PLCopenXML' . . . . . . . . . . . . . . . . . . 923
Command 'Import PLCopenXML' . . . . . . . . . . . . . . . . . . 923
Command 'Generate Sercos SCI XML' . . . . . . . . . . . . . . 924
Command 'Generate EtherCAT XML' . . . . . . . . . . . . . . . . 924
Command 'User management' – 'Log in User' . . . . . . . . . 924
Command 'User management' - 'Logout user' . . . . . . . . . 925
Command 'User management' – 'Rights…' . . . . . . . . . . . 925
Command 'Adding SoftMotion SoE axis' . . . . . . . . . . . . . 925
Command 'Adding SoftMotion CoE axis' . . . . . . . . . . . . 926
Command “Insert templates...” . . . . . . . . . . . . . . . . . . . 926
Command 'Acknowledge Diagnosis', 'Acknowledge Diag-
nosis for Subtree' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 926
"Edit I/O mapping" command . . . . . . . . . . . . . . . . . . . . . 927
Command 'Project Localization' - 'Toggle Localization' . . 927
Command 'Project Localization' - 'Manage Localizations' 928
Command 'Project Localization' - 'Create Localization
Template' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928
Command 'Import Mappings from CSV' . . . . . . . . . . . . . 929
Command 'Edit Object (Offline)' . . . . . . . . . . . . . . . . . . 929

R911403764, Edition 08 Bosch Rexroth AG


24 / 1158 ctrlX PLC Engineering

Command 'Online Config Mode' . . . . . . . . . . . . . . . . . . . 930


Command 'Read PLC Parameter File to Configuration' . 931
Command 'Export Mappings to CSV' . . . . . . . . . . . . . . . 931
Command 'Project Environment' . . . . . . . . . . . . . . . . . . . 931
Command 'Set Active Application' . . . . . . . . . . . . . . . . . 931
Command ‘Add Folder’ . . . . . . . . . . . . . . . . . . . . . . . . . . 932
Command 'Add Object' . . . . . . . . . . . . . . . . . . . . . . . . . . 932
33.3.6 Menu “Build” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .932
Command 'Generate Code' . . . . . . . . . . . . . . . . . . . . . . . 932
Command 'Clean' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 932
Command 'Clean All' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 933
Command 'Build' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 933
Command 'Rebuild' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 933
Command 'Generate Runtime System Files' . . . . . . . . . . 933
Command 'Check all Pool Objects' . . . . . . . . . . . . . . . . . 935
Command 'Generate Code for Active Application' . . . . . 935
Command 'Check All Application Objects' . . . . . . . . . . . 935
Command 'Check Library Compatibility' . . . . . . . . . . . . . 936
Command 'C Integration' - 'Update C Sources' . . . . . . . . 936
Command 'C Integration – Open in IDE' . . . . . . . . . . . . . 936
Command 'C Integration' - 'Export C sSurces' . . . . . . . . 937
Command 'C Integration – Create Stub Implementation
in C' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 937
Command 'Create IEC Interface' . . . . . . . . . . . . . . . . . . . 937
Command 'Generate Disassembly File' . . . . . . . . . . . . . . 937
33.3.7 Menu “Online” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 938
Command “Compare project with ctrlX” . . . . . . . . . . . . 938
Command 'Choose Active Application' . . . . . . . . . . . . . . 938
Command 'Login' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939
Command 'Logout' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 942
Command 'Create Boot Application' . . . . . . . . . . . . . . . . 942
Command 'Load' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 942
"Online change" command . . . . . . . . . . . . . . . . . . . . . . . 943
Command 'Source Download to Connected Device' . . . . 946
'Multiple download’ command . . . . . . . . . . . . . . . . . . . . 946
Command 'Reset Cold' . . . . . . . . . . . . . . . . . . . . . . . . . . 948
Command 'Reset Warm' . . . . . . . . . . . . . . . . . . . . . . . . . 949
Command 'Reset Origin' . . . . . . . . . . . . . . . . . . . . . . . . . 949
Command 'Reset Origin Device' . . . . . . . . . . . . . . . . . . . 950
Command 'Logoff Current Device User' . . . . . . . . . . . . . 951
Command 'Add Device User' . . . . . . . . . . . . . . . . . . . . . . 951
Command 'Remove Device User' . . . . . . . . . . . . . . . . . . . 952
Command 'Change Password Device User' . . . . . . . . . . . 952
Command 'Stop Execution on Handled Exceptions' . . . . 952
Command 'Wink' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 953
Command 'Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 953
Command 'Operating Mode' . . . . . . . . . . . . . . . . . . . . . . 955

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 25 / 1158

33.3.8 "Debug" menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


956
Command 'Start' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 956
Command 'Stop' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 956
Command 'Single Cycle' . . . . . . . . . . . . . . . . . . . . . . . . . 956
Command 'New Breakpoint' . . . . . . . . . . . . . . . . . . . . . . 956
Command 'New Data Breakpoint' . . . . . . . . . . . . . . . . . . 956
Command 'Edit Breakpoint' . . . . . . . . . . . . . . . . . . . . . . 957
Command 'Enable Breakpoint' . . . . . . . . . . . . . . . . . . . . 957
Command 'Disable Breakpoint' . . . . . . . . . . . . . . . . . . . . 957
Command 'Toggle Breakpoint' . . . . . . . . . . . . . . . . . . . . 957
Command 'Step Over' . . . . . . . . . . . . . . . . . . . . . . . . . . . 957
Command 'Step Into' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 958
Command 'Step Out' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 958
Command 'Run to Cursor' . . . . . . . . . . . . . . . . . . . . . . . . 958
Command 'Set Next Statement' . . . . . . . . . . . . . . . . . . . 959
Command 'Show Next Statement' . . . . . . . . . . . . . . . . . 959
Command 'Force Values' . . . . . . . . . . . . . . . . . . . . . . . . . 959
Command 'Write Values' . . . . . . . . . . . . . . . . . . . . . . . . . 960
Command 'Unforce Values' . . . . . . . . . . . . . . . . . . . . . . . 960
Command 'Flow Control' . . . . . . . . . . . . . . . . . . . . . . . . . 961
Command 'Display Mode' - 'Binary', 'Decimal', 'Hexadeci-
mal' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 961
"Core Dump" menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 961
33.3.9 Menu “Tools” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 963
Command 'Add-on Installer' . . . . . . . . . . . . . . . . . . . . . . 963
Command 'Device Repository' . . . . . . . . . . . . . . . . . . . . 963
Command 'Scripting' - 'Run script file' . . . . . . . . . . . . . . 964
Command 'Scripting' - 'Enable script tracing' . . . . . . . . . 965
‘Scripting’ command - 'Scripts . . . . . . . . . . . . . . . . . . . . 965
Command 'Customize' . . . . . . . . . . . . . . . . . . . . . . . . . . 965
Command 'Options' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 965
Command 'Import and Export Options' . . . . . . . . . . . . . 966
'License Manager’ command . . . . . . . . . . . . . . . . . . . . . . 966
Command 'Library Repository' . . . . . . . . . . . . . . . . . . . . 969
'OPC UA information model repository' command . . . . . 971
Command 'Device Reader' . . . . . . . . . . . . . . . . . . . . . . . 972
33.3.10 Menu “Window” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 972
Command 'Next Editor' . . . . . . . . . . . . . . . . . . . . . . . . . . 972
Command 'Previous Editor' . . . . . . . . . . . . . . . . . . . . . . . 972
Command 'Close all editors' . . . . . . . . . . . . . . . . . . . . . . 973
Command 'Close all editors of inactive applications' . . . 973
Command 'Reset Window Layout' . . . . . . . . . . . . . . . . . . 973
Command 'New Horizontal Tab Group' . . . . . . . . . . . . . . 973
Command 'New Vertical Tab Group' . . . . . . . . . . . . . . . . 973
Command 'Float' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 973
Command 'Dock' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 974
Command 'Auto Hide' . . . . . . . . . . . . . . . . . . . . . . . . . . . 974

R911403764, Edition 08 Bosch Rexroth AG


26 / 1158 ctrlX PLC Engineering

Command 'Next Pane' . . . . . . . . . . . . . . . . . . . . . . . . . . . 974


Command 'Previous Pane' . . . . . . . . . . . . . . . . . . . . . . . . 974
Command 'Windows' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 974
Commands of the Submenu 'Window' . . . . . . . . . . . . . . 975
Command 'Toggle First Pane' . . . . . . . . . . . . . . . . . . . . . 975
Command 'Toggle Second Pane' . . . . . . . . . . . . . . . . . . . 975
Command 'Close All Editors But This' . . . . . . . . . . . . . . . 975
Command 'Select Object in Navigator' . . . . . . . . . . . . . . 976
Command 'Select Parent Object in Navigator' . . . . . . . . 976
33.3.11 Menu “Help” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 976
Command '3S Homepage' . . . . . . . . . . . . . . . . . . . . . . . . 976
Command 'Find' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 976
Command 'Index' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 976
Command 'Contents' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 977
Command 'About' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 977
33.3.12 “SFC” menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 977
Command 'Init Step' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 977
Command 'Insert Step' . . . . . . . . . . . . . . . . . . . . . . . . . . 978
Command 'Insert Step After' . . . . . . . . . . . . . . . . . . . . . . 978
Command 'Insert Transition After' . . . . . . . . . . . . . . . . . 978
Command 'Insert Transition' . . . . . . . . . . . . . . . . . . . . . . 978
Command 'Insert Step-Transition' . . . . . . . . . . . . . . . . . . 978
Command 'Insert Step-Transition After' . . . . . . . . . . . . . 979
Command 'Add Entry Action' . . . . . . . . . . . . . . . . . . . . . 979
Command 'Add Exit Action' . . . . . . . . . . . . . . . . . . . . . . . 980
Command 'Parallel' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980
Command 'Alternative' . . . . . . . . . . . . . . . . . . . . . . . . . . 980
Command 'Insert Branch' . . . . . . . . . . . . . . . . . . . . . . . . 980
Command 'Insert Branch Right' . . . . . . . . . . . . . . . . . . . 981
Command 'Insert Action Association' . . . . . . . . . . . . . . . 982
Command 'Insert Action Association After' . . . . . . . . . . . 983
Command 'Insert Jump' . . . . . . . . . . . . . . . . . . . . . . . . . 983
Command 'Insert Jump After' . . . . . . . . . . . . . . . . . . . . . 983
Command 'Insert Macro' . . . . . . . . . . . . . . . . . . . . . . . . . 983
Command 'Insert Macro After' . . . . . . . . . . . . . . . . . . . . 984
Command 'Zoom Into Macro' . . . . . . . . . . . . . . . . . . . . . 984
Command 'Zoom Out of Macro' . . . . . . . . . . . . . . . . . . . 984
Command 'Paste After' . . . . . . . . . . . . . . . . . . . . . . . . . . 984
Command 'Change Duplication' - 'Set' . . . . . . . . . . . . . . 984
Command 'Change Duplication' - 'Remove' . . . . . . . . . . . 985
Command 'Do Not Display Embedded Objects' . . . . . . . 985
33.3.13 "CFC" menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985
Command 'Edit Worksheet' . . . . . . . . . . . . . . . . . . . . . . . 985
Command 'Edit Page Size’ . . . . . . . . . . . . . . . . . . . . . . . 985
Command 'Negate' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986
Command 'EN/ENO' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 27 / 1158

Command 'None' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986


Command 'R (Reset)' . . . . . . . . . . . . . . . . . . . . . . . . . . . 986
Command 'S (Set)' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 987
Command 'REF= (Reference Assignment)' . . . . . . . . . . . 987
Command 'Display Execution Order' . . . . . . . . . . . . . . . . 987
Command 'Set Start of Feedback' . . . . . . . . . . . . . . . . . 988
Command 'Send to Front' . . . . . . . . . . . . . . . . . . . . . . . . 988
Command 'Send to Back' . . . . . . . . . . . . . . . . . . . . . . . . 988
Command 'Move Up' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 989
Command 'Move Down' . . . . . . . . . . . . . . . . . . . . . . . . . 989
Command 'Set Execution Order' . . . . . . . . . . . . . . . . . . . 990
Command 'Order by Data Flow' . . . . . . . . . . . . . . . . . . . 990
Command 'Order by Topology' . . . . . . . . . . . . . . . . . . . . 991
Command 'Edit Parameters' . . . . . . . . . . . . . . . . . . . . . . 991
Command 'Save Prepared Parameters to Project' . . . . . 992
Command 'Connect Selected Pins' . . . . . . . . . . . . . . . . . 992
Command 'Unlock Connection' . . . . . . . . . . . . . . . . . . . . 992
Command 'Show Next Collision' . . . . . . . . . . . . . . . . . . . 993
Command 'Select Connected Pins' . . . . . . . . . . . . . . . . . 993
Command 'Reset Pins' . . . . . . . . . . . . . . . . . . . . . . . . . . 993
Command 'Remove Unused Pins' . . . . . . . . . . . . . . . . . . 993
Command 'Add Input Pin' . . . . . . . . . . . . . . . . . . . . . . . . 994
Command 'Add Output Pin' . . . . . . . . . . . . . . . . . . . . . . 994
Command 'Route All Connections' . . . . . . . . . . . . . . . . . 994
Command 'Remove Control Point' . . . . . . . . . . . . . . . . . 994
Command 'Create Control Point' . . . . . . . . . . . . . . . . . . 994
Command 'Connection Mark' . . . . . . . . . . . . . . . . . . . . . 995
Command 'Create group' . . . . . . . . . . . . . . . . . . . . . . . . 995
Command 'Ungroup' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 995
Command 'Prepare Box for Forcing' . . . . . . . . . . . . . . . . 995
Command 'Force Function Block Input' . . . . . . . . . . . . . 996
Command 'Use Attributed Member as Input' . . . . . . . . . 996
33.3.14 “FBD/LD/IL” menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 997
Command 'Insert Network' . . . . . . . . . . . . . . . . . . . . . . . 997
Command 'Insert Network (Below)' . . . . . . . . . . . . . . . . 997
Command 'Toggle Network Comment State' . . . . . . . . . 998
Command 'Insert Assignment' . . . . . . . . . . . . . . . . . . . . 998
Command 'Insert Box' . . . . . . . . . . . . . . . . . . . . . . . . . . . 998
Command 'Insert Box with EN/ENO' . . . . . . . . . . . . . . . . 998
Command 'Insert Empty Box' . . . . . . . . . . . . . . . . . . . . . 999
Command 'Insert Empty Box with EN/ENO' . . . . . . . . . . 999
Command 'Insert Box Parallel (Below)' . . . . . . . . . . . . . 999
Command 'Insert Jump' . . . . . . . . . . . . . . . . . . . . . . . . . 999
Command 'Insert Label' . . . . . . . . . . . . . . . . . . . . . . . . . 999
Command 'Insert Return' . . . . . . . . . . . . . . . . . . . . . . . . 1000
Command 'Insert Input' . . . . . . . . . . . . . . . . . . . . . . . . . 1000

R911403764, Edition 08 Bosch Rexroth AG


28 / 1158 ctrlX PLC Engineering

Command 'Insert Coil' . . . . . . . . . . . . . . . . . . . . . . . . . . 1000


Command 'Insert Set Coil' . . . . . . . . . . . . . . . . . . . . . . . 1000
"Insert reset coil" command . . . . . . . . . . . . . . . . . . . . . . 1000
Command 'Insert Contact' . . . . . . . . . . . . . . . . . . . . . . . 1001
Command 'Insert Contact (Right)' . . . . . . . . . . . . . . . . . 1001
Command 'Insert Contact in Parallel (Below)' . . . . . . . . 1001
Command 'Insert Contact in Parallel (Above)' . . . . . . . . 1001
Command 'Toggle Parallel Mode' . . . . . . . . . . . . . . . . . . 1002
Command 'Insert Negated Contact' . . . . . . . . . . . . . . . . 1002
Command 'Insert Negated Contact Parallel (Below)' . . . 1002
Command 'Paste Contacts: Paste Below' . . . . . . . . . . . . 1002
Command 'Paste Contacts: Paste Above' . . . . . . . . . . . . 1003
Command 'Paste Contacts: Paste Right (After)' . . . . . . . 1003
Command 'Insert IL Line Below' . . . . . . . . . . . . . . . . . . . 1003
Command 'Delete IL Line' . . . . . . . . . . . . . . . . . . . . . . . . 1003
Command 'Negation' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1003
Command 'Edge Detection' . . . . . . . . . . . . . . . . . . . . . . . 1004
Command 'Set/Reset' . . . . . . . . . . . . . . . . . . . . . . . . . . . 1004
Command 'Set Output Connection' . . . . . . . . . . . . . . . . 1004
Command 'Insert Branch' . . . . . . . . . . . . . . . . . . . . . . . . 1004
Command 'Insert Branch Above' . . . . . . . . . . . . . . . . . . . 1004
Command 'Insert Branch Below' . . . . . . . . . . . . . . . . . . . 1005
Command 'Set Branch Start Point' . . . . . . . . . . . . . . . . . 1005
Command 'Set Branch End Point' . . . . . . . . . . . . . . . . . . 1005
Command 'Update Parameters' . . . . . . . . . . . . . . . . . . . . 1005
Command 'Remove Unused FB Call Parameters' . . . . . . 1005
Command 'Repair POU' . . . . . . . . . . . . . . . . . . . . . . . . . . 1006
Command 'View as Function Block Diagram' . . . . . . . . . 1006
Command 'View as Ladder Logic' . . . . . . . . . . . . . . . . . . 1006
Command 'View as Instruction List' . . . . . . . . . . . . . . . . 1006
Command 'Go to' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1007
33.3.15 "Library" menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1007
Command 'Add Library' . . . . . . . . . . . . . . . . . . . . . . . . . . 1007
Command 'Try to Reload Library' . . . . . . . . . . . . . . . . . . 1008
Command 'Properties' . . . . . . . . . . . . . . . . . . . . . . . . . . 1008
'Placeholder' command . . . . . . . . . . . . . . . . . . . . . . . . . . 1010
Command 'Export Library' . . . . . . . . . . . . . . . . . . . . . . . 1011
33.3.16 "Image collection" menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1011
Command 'Insert Image' . . . . . . . . . . . . . . . . . . . . . . . . . 1011
33.3.17 “Declarations” menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1012
Command 'Insert' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1012
“Edit declaration header” command . . . . . . . . . . . . . . . . 1012
Command 'Move Down' . . . . . . . . . . . . . . . . . . . . . . . . . 1012
Command 'Move Up' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1013

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 29 / 1158

33.3.18 "Declarations" menu (persistence) . . . . . . . . . . . . . . . . . . . . . . . . . . 1013


"Rearrange list and clean gaps” command . . . . . . . . . . . 1013
"Save current values to recipe" command . . . . . . . . . . . 1013
"Restore values from recipe” command . . . . . . . . . . . . . 1014
Command 'Add all instance paths' . . . . . . . . . . . . . . . . . 1014
33.3.19 "Device communication" menu (gateway) . . . . . . . . . . . . . . . . . . . . . 1014
'Add new gateway' command . . . . . . . . . . . . . . . . . . . . . 1014
'Configure local gateway’ commad . . . . . . . . . . . . . . . . . 1015
33.3.20 “Recipes” menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1017
Command ‘Insert Variable' . . . . . . . . . . . . . . . . . . . . . . . 1017
Command ‘Insert recipe' . . . . . . . . . . . . . . . . . . . . . . . . . 1017
'Remove recipe' command . . . . . . . . . . . . . . . . . . . . . . . 1018
“Load Recipe” command . . . . . . . . . . . . . . . . . . . . . . . . 1018
'Save recipe' command . . . . . . . . . . . . . . . . . . . . . . . . . . 1018
'Read recipe’ command . . . . . . . . . . . . . . . . . . . . . . . . . . 1019
Command ‘Write recipe' . . . . . . . . . . . . . . . . . . . . . . . . . 1019
'Load and write recipe' command . . . . . . . . . . . . . . . . . . 1019
'Read and save recipe' command . . . . . . . . . . . . . . . . . . 1020
'Remove variables' command . . . . . . . . . . . . . . . . . . . . . 1020
Command 'Load Recipes from Device' . . . . . . . . . . . . . . 1020
'Update structured variables' command . . . . . . . . . . . . . 1021
33.3.21 "Text list" menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1021
Command 'Add Language' . . . . . . . . . . . . . . . . . . . . . . . . 1021
Command 'Create Global Text List' . . . . . . . . . . . . . . . . . 1021
Command 'Export Everything as Text' . . . . . . . . . . . . . . . 1021
Command 'Export All Unicode .txt Text List Files' . . . . . 1022
Command 'Insert Text' . . . . . . . . . . . . . . . . . . . . . . . . . . 1022
Command 'Import/Export Text Lists' . . . . . . . . . . . . . . . 1022
Command 'Remove Language' . . . . . . . . . . . . . . . . . . . . 1023
Command 'Rename Language' . . . . . . . . . . . . . . . . . . . . 1024
Command 'Remove Unused Text List Entries' . . . . . . . . . 1024
Command 'Check Visualization Text IDs' . . . . . . . . . . . . . 1024
Command 'Update Visualization Text IDs' . . . . . . . . . . . . 1024
Command 'Add Text List Support' . . . . . . . . . . . . . . . . . 1025
Command 'Remove Text List Support' . . . . . . . . . . . . . . 1025
33.3.22 "Trace" menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1025
Command 'Add Variable' . . . . . . . . . . . . . . . . . . . . . . . . . 1025
Command 'AutoFit' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1025
Command 'Compress' . . . . . . . . . . . . . . . . . . . . . . . . . . . 1026
Command 'Configuration' . . . . . . . . . . . . . . . . . . . . . . . . 1026
Command 'Cursor' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1026
Command 'Download Trace' . . . . . . . . . . . . . . . . . . . . . . 1027
Command 'Export Symbolic Trace Config' . . . . . . . . . . . 1027
Command 'Load Trace' . . . . . . . . . . . . . . . . . . . . . . . . . . 1029
Command 'Mouse Zooming' . . . . . . . . . . . . . . . . . . . . . . 1029
Command 'Convert to Multi-Channel' . . . . . . . . . . . . . . . 1030

R911403764, Edition 08 Bosch Rexroth AG


30 / 1158 ctrlX PLC Engineering

Command 'Convert to Single-Channel' . . . . . . . . . . . . . . 1030


Command 'Reset Trigger' . . . . . . . . . . . . . . . . . . . . . . . . 1031
Command 'Reset View' . . . . . . . . . . . . . . . . . . . . . . . . . . 1031
Command 'Save Trace' . . . . . . . . . . . . . . . . . . . . . . . . . . 1032
Command 'Start Trace' . . . . . . . . . . . . . . . . . . . . . . . . . . 1032
Command 'Stop Trace' . . . . . . . . . . . . . . . . . . . . . . . . . . 1032
Command 'Stretch' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1033
'Statistics' command . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1033
33.3.23 "Miscellaneous" menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1034
'Add to watch list' command . . . . . . . . . . . . . . . . . . . . . . 1034
Command 'Implement Interfaces' . . . . . . . . . . . . . . . . . . 1034
Command 'Limit Results to Current Declaration' . . . . . . 1034
33.4 Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1035
33.4.1 'Import Wizard' dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1035
33.4.2 Dialog 'Permissions' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1035
33.4.3 Dialog “Login - [Control IP address]” . . . . . . . . . . . . . . . . . . . . . . . . 1037
33.4.4 'Add-on installer' dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1037
33.4.5 Dialog 'Library Parameters' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1038
33.4.6 Dialog 'Library Reference Conversion' . . . . . . . . . . . . . . . . . . . . . . . . 1039
33.4.7 Dialog 'Select Function Block' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1039
33.4.8 Dialog 'Device Conversion' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1040
33.4.9 Dialog 'Breakpoint Properties' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1040
33.4.10 Dialog 'Prepare Value' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1041
33.4.11 Dialog 'New Breakpoint' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1041
33.4.12 Dialog 'Monitoring Range' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1043
33.4.13 Dialog 'Trend Storage' . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1043
33.4.14 Dialog 'Advanced Trend Settings' . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1044
33.4.15 Dialog “Selecting real-time data online from ctrlX CORE” . . . . . . . . . 1044
33.4.16 Dialog “New Project” ctrlX CORE . . . . . . . . . . . . . . . . . . . . . . . . . . . 1045
33.4.17 Dialog “Selecting real-time data online from ctrlX CORE” . . . . . . . . . 1045
33.4.18 Dialog “Insert templates” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046
33.4.19 'Certificate selection' dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1046
33.4.20 Dialog “Tranfer plc project data source from PC to ctrlX” . . . . . . . . . 1047
33.4.21 Dialog “Tranfer plc project data source from ctrlX to PC” . . . . . . . . . 1047
33.4.22 “Properties” dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1047
'Properties' dialog – General information . . . . . . . . . . . . 1047
Dialog 'Properties' - 'Common' . . . . . . . . . . . . . . . . . . . . 1048
'Properties' dialog - 'Build' . . . . . . . . . . . . . . . . . . . . . . . 1048
Dialog 'Properties' - 'Access Control' . . . . . . . . . . . . . . . 1049
Dialog 'Properties' - 'Boot Application' . . . . . . . . . . . . . . 1049
Dialog 'Properties' - 'Encryption' . . . . . . . . . . . . . . . . . . . 1049
Dialog 'Properties' – 'Build' (C-integration) . . . . . . . . . . 1051
'Properties’ dialog - 'External File' . . . . . . . . . . . . . . . . . . 1051
Dialog 'Properties' - 'Bitmap' . . . . . . . . . . . . . . . . . . . . . . 1052
Dialog 'Properties - Application Build Options' . . . . . . . . 1053
Dialog 'Properties' - 'Target memory settings' . . . . . . . . . 1053

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 31 / 1158

“Properties”- “Network variables” dialog . . . . . . . . . . . . 1054


Dialog 'Properties' - 'Network Settings' . . . . . . . . . . . . . 1055
Dialog 'Properties' - 'CFC Execution Order' . . . . . . . . . . 1055
Dialog 'Properties' - 'SFC Settings' . . . . . . . . . . . . . . . . . 1056
Dialog 'Properties' – 'Link to File' . . . . . . . . . . . . . . . . . . 1057
Dialog 'Properties' - 'Cam' . . . . . . . . . . . . . . . . . . . . . . . . 1057
Dialog 'Properties' - 'Image Pool' . . . . . . . . . . . . . . . . . . 1058
Dialog 'Properties' - 'TextList' . . . . . . . . . . . . . . . . . . . . . 1059
“Properties” - “Options” dialog . . . . . . . . . . . . . . . . . . . 1059
Dialog 'Properties' - 'Monitoring' . . . . . . . . . . . . . . . . . . . 1060
33.4.23 “Project settings" dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1060
“Project settings" dialog - General information . . . . . . . 1060
'Project settings' dialog - 'Users and groups' . . . . . . . . . 1061
'Project settings' dialog - 'Compiler options' . . . . . . . . . . 1062
'Project settings’ dialog - 'Compiler warnings' . . . . . . . . 1062
'Project settings’ dialog - 'Download source code' . . . . . 1063
Dialog 'Project Settings' - 'Page Setup' . . . . . . . . . . . . . . 1063
'Project settings' dialog - 'Security' . . . . . . . . . . . . . . . . . 1064
Dialog 'Project Settings' - 'SFC' . . . . . . . . . . . . . . . . . . . . 1065
Dialog 'Project Settings' - 'Static Analysis Light' . . . . . . . 1066
Dialog 'Project Settings' - 'Visualization Profile' . . . . . . . 1069
Dialog 'Project Settings' - 'Visualization' . . . . . . . . . . . . . 1069
33.4.24 "Project environment" dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1070
Dialog 'Project environment' – General information . . . . 1070
Dialog 'Project Environment' – 'Library Versions' . . . . . . 1070
Dialog 'Project Environment' - 'Compiler Version' . . . . . . 1070
Dialog 'Project Environment' - 'Device Versions' . . . . . . . 1071
Dialog 'Project Environment' – 'Visualization Profile' . . . 1071
Dialog 'Project Environment' – 'Visualization Styles' . . . . 1071
Dialog 'Project Environment' – 'C Code Modules' . . . . . . 1072
Dialog 'Project Environment' – 'Visualization Symbols' . . 1072
33.4.25 “Project synchronization" dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1073
Dialog “New Project” . . . . . . . . . . . . . . . . . . . . . . . . . . . 1073
Dialog “Project data comparison” . . . . . . . . . . . . . . . . . . 1074
Dialog “Project synchronization” . . . . . . . . . . . . . . . . . . 1075
Dialog “Project synchronization” (Synchronization cache...) . . . . 1076
Dialog “Open project in ctrlX CORE” . . . . . . . . . . . . . . . 1076
Dialog “Project synchronization” (PC > ctrlX) . . . . . . . . . . . . 1078
Dialog “Project synchronization” (ctrlX > PC) . . . . . . . . . . . . 1078
Dialog “Conflict: Project synchronization at login” . . . . . 1078
Dialog “Conflict: Project synchronization at open” . . . . . 1079
Dialog “Conflict: Project synchronization at close” . . . . 1079
Dialog “Conflict: Project synchronization at save” . . . . . 1079
Dialog “Conflict: Project synchronization at equalize
project data” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1079
Dialog “Conflict: Project synchronization at open” (IP
address conflict . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1080

R911403764, Edition 08 Bosch Rexroth AG


32 / 1158 ctrlX PLC Engineering

33.4.26 'Options' dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1080


'Options' dialog - General information . . . . . . . . . . . . . . 1080
'Options' dialog - 'Libraries' . . . . . . . . . . . . . . . . . . . . . . 1080
‘Options’ dialog - ‘Declaration editor' . . . . . . . . . . . . . . . 1081
'Options' dialog - 'Download device descriptions' . . . . . 1081
'Options' dialog - 'Device editor' . . . . . . . . . . . . . . . . . . . 1082
'Options' dialog - 'Intelligent coding' . . . . . . . . . . . . . . . . 1082
Dialog 'Options' – 'International Settings' . . . . . . . . . . . . 1084
‘Options’ dialog - ‘Load and save' . . . . . . . . . . . . . . . . . . 1084
Dialog 'Options' - 'PLCopenXML' . . . . . . . . . . . . . . . . . . . 1085
'Options' dialog - 'Proxy settings' . . . . . . . . . . . . . . . . . . 1085
'Options' dialog - 'Refactoring' . . . . . . . . . . . . . . . . . . . . 1086
'Options' dialog - 'Text editor' . . . . . . . . . . . . . . . . . . . . . 1087
“Options” - “SFC editor” dialog . . . . . . . . . . . . . . . . . . . 1089
“Options” - “CFC editor” dialog . . . . . . . . . . . . . . . . . . . 1091
“Options” - “FBD, LD and IL” dialog . . . . . . . . . . . . . . . . 1091
Dialog 'Options' – 'Library Download' . . . . . . . . . . . . . . . 1093
33.4.27 “Customize” dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1093
Dialog 'Customize' - General information . . . . . . . . . . . . 1093
Dialog 'Customize' - 'Menu' . . . . . . . . . . . . . . . . . . . . . . . 1094
Dialog 'Customize' - 'Command Icons' . . . . . . . . . . . . . . 1094
Dialog 'Customize' - 'Toolbars' . . . . . . . . . . . . . . . . . . . . . 1094
Dialog 'Customize' - 'Keyboard' . . . . . . . . . . . . . . . . . . . . 1095
33.4.28 "Trace configuration" dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1095
Dialog 'Advanced Trace Settings' . . . . . . . . . . . . . . . . . . 1095
“Trace configuration” dialog . . . . . . . . . . . . . . . . . . . . . . 1096
34 Software add-ons/documentation 1103
35 Field bus support 1105
35.1 Fieldbus Devices and I/O Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1105
35.2 Bus Cycle Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1107
36 OPC UA server / client 1109
37 Libraries 1111
37.1 Guidelines for Creating Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1111
38 Related documentation 1113
38.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1113
38.2 ctrlX AUTOMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1113
38.3 ctrlX WORKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1113
38.4 ctrlX CORE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1114
38.5 ctrlX CORE Apps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1114
39 Service and support 1119
40 Index 1121

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 33 / 1158

1 About this documentation


Editions of this documentation
Edition Release Note
date
01 2020-04 First edition for version WRK-V-0102 / WRK-V-0104
02 2021-03 Edition for version WRK-V-0106
03 2021-06 Edition for version WRK-V-0108
04 2022-06 Edition for version WRK-V-0110 / WRK-V-0112 (update

About this documentation


to Service Pack 17)
05 2022-07 Edition for version WRK-V-0114
06 2022-12 Edition for version WRK-V-0116
07 2023-06 Edition for version WRK-V-0118 (compiler version
3.5.18.0)
08 2023-09 Edition for version WRK-V-0120 (compiler version
3.5.19.0)
New contents:
● ⮫ Data type: Implicit enumeration
● ⮫ Attribute 'monitoring_display'
● ⮫ Attribute 'monitoring_encoding'
● ⮫ Dialog 'Library Parameters'
● ⮫ Tab “Communication”
● ⮫ Command 'Adding SoftMotion SoE axis'
● ⮫ Command 'Adding SoftMotion CoE axis'
Revised contents:
● ⮫ Transferring projects
● ⮫ Compare project – Basic information
● ⮫ Open detailed compare view
● ⮫ Encrypting the application
● ⮫ Subordinate Safety Controller
● ⮫ Handling of Device User Management
● ⮫ Reading the PLC
● ⮫ Declaration Editor
● ⮫ ST Editor
● ⮫ Chapter ST instruction “RETURN” on page 388
● ⮫ Operator 'SIZEOF'
● ⮫ Operator 'XSIZEOF'
● ⮫ “STRING” data type
● ⮫ “WSTRING” data type
● ⮫ Enumerations
● ⮫ Alias
● ⮫ Attribute "init_on_onlchange"
● ⮫ Conditional pragmas
● ⮫ Shadowing rules
● ⮫ Errors and warnings
● ⮫ "Library manager” object
● ⮫ "Image pool” object
● ⮫ Tab '<Device name> I/O mapping'
● ⮫ Object “DataLayer_Realtime”
● ⮫ 'Method’ object

R911403764, Edition 08 Bosch Rexroth AG


34 / 1158 ctrlX PLC Engineering
Licensing notes

Edition Release Note


date
● ⮫ Command “Communication settings...”
● ⮫ Command “All data from ctrlX CORE..”
● ⮫ Command “Selectively from ctrlX CORE..”
● ⮫ Command “Selectively from file..”
● ⮫ 'Messages’ command
● ⮫ 'Compare’ command
● ⮫ 'Import...’ command
● ⮫ Command 'Import PLCopenXML'
● ⮫ "Online change" command
● ⮫ 'Placeholder' command
● ⮫ Command 'AutoFit'
● ⮫ Dialog “Selecting real-time data online from ctrlX
CORE”
● ⮫ Dialog 'Properties' - 'Encryption'
● ⮫ 'Properties’ dialog - 'External File'

1.1 Licensing notes


Open Source Components
A list of the open source components is available in ctrlX WORKS and in the
ctrlX CORE interface in the side navigation in the menu item “About” below the
button “Open Source Components”, see web documentations:
⮫ Window – About
⮫ Window – Open Source Components

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 35 / 1158
Intended use

2 Important directions on use


2.1 Intended use
2.1.1 Introduction
Rexroth products are developed and manufactured to the state-of-the-art.
The products are tested prior to delivery to ensure operational safety and relia-
bility.

Important directions on use


Personal injury and damage to property due to incorrect
WARNING
use of products!
The products may only be used as intended.
Failure to use the products as intended may cause situa-
tions resulting in property damage and personal injury.
Damages resulting from unintended use
NOTICE
Rexroth As the manufacturer does not assume any
warranty, liability or compensatory claims for damages
resulting from unintended use of the products. The user
alone shall bear the risks of an unintended use of the
products.
Before using Rexroth products, make sure that all the
prerequisites for an intended use of the products are
met:
− Personnel that in any way, shape or form uses
Rexroth products must first read and understand the
relevant safety instructions and be familiar with their
intended use
− Leave hardware products in their original state, i.e.,
do not make any structural modifications. It its not
permitted to decompile software products or alter
source codes
− Do not install damaged or defective products or com-
mission them
− It has to be ensured that the products have been
installed as described in the relevant documentation

2.1.2 Areas of use and application


Products of the ctrlX series are suitable for Motion/Logic applications.
Products of the ctrlX series may only be used with
NOTICE
the accessories, mounting parts, and other components
specified in this documentation. Components that are
not expressly mentioned must neither be attached nor
connected. The same applies to cables and lines.
Only to be operated with the hardware component con-
figurations and combinations expressly specified and
with the software and firmware specified in the corre-
sponding documentations and functional descriptions.
Products of the ctrlX series are suitable for single-axis as well as for multi-axis
drive and control tasks. Device types with different equipment and interfaces
are available for using the system in specific applications.

R911403764, Edition 08 Bosch Rexroth AG


36 / 1158 ctrlX PLC Engineering
Unintended use

Typical areas of application:


● Building automation
● IoT and Security Gateway or Device
● Handling & Robotic
Controls of the ctrlX CORE series may only be operated under the mounting
and installation conditions, in the position of normal use and under the
ambient conditions (temperature, degree of protection, humidity, EMC, etc.)
specified in the related documentations.

2.2 Unintended use


"Unintended use" refers to using the ctrlX products outside of the above-men-
tioned areas of application or under operating conditions and technical data
other than described and specified in the documentation.
ctrlX products must not be used if they are exposed to following conditions:
● Operating conditions that do not meet the specified ambient conditions.
Operation under water, under extreme temperature fluctuations or under
extreme maximum temperatures is prohibited
● Applications that have not been expressly authorized by Rexroth

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 37 / 1158

3 Safety instructions
The Safety instructions contained in the available application documentation
feature specific signal words (DANGER, WARNING, CAUTION or NOTICE) and,
where required, a safety alert symbol (in accordance with ANSI Z535.6-2006).
The signal word is meant to draw the reader's attention to the safety instruc-
tion and identifies the hazard severity.
The safety alert symbol (a triangle with an exclamation point), which precedes
the signal words DANGER, WARNING and CAUTION, is used to alert the reader
to personal injury hazards.
The Safety instructions in this documentation are designed as follows:

Safety instructions
In case of non-compliance with this safety instruction,
DANGER
death or serious injury will occur.
In case of non-compliance with this safety instruction,
WARNING
death or serious injury could occur.
In case of non-compliance with this safety instruction,
CAUTION
minor or moderate injury could occur.
In case of non-compliance with this safety instruction,
NOTICE
property damage could occur.

R911403764, Edition 08 Bosch Rexroth AG


38 / 1158 ctrlX PLC Engineering

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 39 / 1158

4 Introduction
ctrlX PLC Engineering is an application program for creating PLC projects for
ctrlX devices.
ctrlX PLC Engineering is intended for use on an Engineering PC and is part of
the ctrlX WORKS installation package, see: ⮫ Installation
The installation and use of ctrlX PLC Engineering is free of charge and does not
require a license.

Note to the source software


ctrlX PLC Engineering is based on the configurators of the CODESYS develop-
ment system of the CODESYS GmbH.

Introduction
Additionally, ctrlX CORE-specific extensions have been added.
Parts of the following documentation refer to CODESYS products, CODESYS
descriptions and documentations.

Starting ctrlX PLC Engineering


ctrlX PLC Engineering can be started via the following calls:
● Via the Windows Start menu of the Engineering PC
● Via the web interface of the ctrlX device
● About the icon in ctrlX WORKS
The type of call has a decisive impact on the behavior of the programming
system in the following areas:
● Project handling
● Establishing a connection to the target device
● Project synchronization

The differences in detail:


● Call via the Windows start menu: Tile ctrlX PLC Engineering )
Upon the start via the start menu, ctrlX PLC Engineering is started in stand-
alone mode.
In this mode, there is no connection to a ctrlX device after the start.
You can create a project based on device-specific ctrlX project templates
and transfer it to the target device at a later time.
– Free project creation using device-specific ctrlX project templates
– Offline project planning possible
● Call via the web interface of the ctrlX device: See ⮫ Web documentation
Upon start via the web interface of the ctrlX device, the ctrlX device
and ctrlX PLC Engineering are synchronized. For ctrlX devices in factory
state, the appropriate basic project is automatically created in ctrlX PLC
Engineering. For already configured ctrlX devices, a synchronization of the
project files on the ctrlX device and the Engineering PC is performed auto-
matically.
More advantages:
– Option to “read out” the current PLC project from the ctrlX device
– Directly transferring the PLC project to the ctrlX device
– Display and switching option of the PLC operating state
– Display of diagnostics, messages and warnings

R911403764, Edition 08 Bosch Rexroth AG


40 / 1158 ctrlX PLC Engineering

Supported functions
Topics Documentation
Project configuration with the help of wiz- ⮫ Chapter 8.2 Creating a new
ards project on page 53
Customization options of the interface ⮫ Configuring the PLC Engineering
Creating professional control applications ⮫ Reference, programming
according to IEC 61131-3 with many
standard functions
● Programming in all IEC 61131-3 lan- ⮫ Programming languages and their
guages editors
● Editors for FBD, LD, IL, ST, AS, CFC
and extended CFC
Input assistance for entering and config- ⮫ Chapter 18.5 Using the input
uring different data. assistance on page 131
● Object-oriented programming ⮫ Object-oriented programming
according to IEC 61131-3rd edition in
all IEC 61131-3 languages
● Inheritance of program modules to sim-
ilar application parts to reduce devel-
opment time and errors
Library concept for easy reuse of applica- ⮫ Using libraries
tion code
Debugging and online features to optimize ⮫ Checking the syntax and ana-
application code and speed up testing and lyzing code
commissioning
Security features to secure the source ⮫ Security
code and the operation of the control

Language setting of the of the user interface


In the “Options 🠂 International settings ” dialog, you can set the national lan-
guage in which the interface of the development system should appear upon
the next start. You can set the national language of the help separately.
When calling PLC Engineering via the command line, you can specify the lan-
guage of the interface via a parameter.
Also refer to
● ⮫ Chapter Dialog 'Options' – 'International Settings' on page 1084

Copyrights and trademarks


The rights of all mentioned companies and company names as well as goods
and product names in this documentation belong to the respective companies.
Subject to technical changes. This help or parts of it may only be copied or
used further in agreement with Bosch Rexroth AG.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 41 / 1158

5 Installation
ctrlX PLC Engineering is part of the ctrlX WORKS installation package, which is
available in the ctrlX Store, see:
⮫ ctrlX WORKS download in ctrlX Store
The installation and use of ctrlX PLC Engineering is free of charge and royalty
free. Registration is only required for the download.

For further information on the installation, please refer to ctrlX WORKS Applica-
tion Manual, see: ⮫ Web documentation

Installation

R911403764, Edition 08 Bosch Rexroth AG


42 / 1158 ctrlX PLC Engineering

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 43 / 1158

6 Logging in and logging off to/from the con-


trol
Each access to the control requires that the user is logged in to the control.

Logging in and logging off to/from the control


Login via context menu
The login command is contained in the context menu of the control node in the
device tree.

Fig. 1: Command - Logging in device user...


The command opens the “Login - [Control IP address]” dialog by entering the
login data for the control (user name & password).

Fig. 2: Dialog - Login - [Control IP address]


The Engineering system “remembers” the entered login data until the next
restart. Consequently, the login dialog is not displayed each time the user
wants to log in.
When enabling the checkbox “Save login data for this device”, the login data
in the Windows Credential Manager and are available after a restart of the
Engineering system.
Confirm the settings with “OK”.
The Engineering system connects to the control.

R911403764, Edition 08 Bosch Rexroth AG


44 / 1158 ctrlX PLC Engineering

The logged in device user is displayed in the status bar.

Login via status bar


The status bar indicates whether or not a device user is logged in to the ctrlX
device.
If a device user is logged in, the user name is displayed in the status bar.
In the following example, the "boschrexroth" device user is logged in to the
ctrlX device.

Fig. 3: Status bar - with logged in user "boschrexroth"


If no user is logged in, double-click on the “Device user” field to open the login
dialog (see above).

Fig. 4: Status bar - without logged in user

Automatic logoff by function call


Each time a command requiring a login is executed, it is verified if a device user
is logged in. If not, a login dialog, see above.

Logoff via context menu


If a device user is logged in, the user can be logged off using the “Log out
current device user” command in the context menu of the control node, see
⮫ Chapter Command “Log out current device user” on page 913.
Please note that logging off might also cause a logoff
NOTICE
from the control!

Fig. 5: Command - Log out current device user

Logoff via status bar


If a device user is logged in to the control, a prompt is displayed when double-
clicking on the “Device user” field, asking the user if the device user should be
logged off.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 45 / 1158

Logoff by exiting
When exiting the Engineering system, a logged in device user is automatically
logged off from the control.
Upon a new login, the login data has to be entered again unless the user has
enabled th option to save the login data, see ⮫ Chapter 33.4.3 Dialog “Login -
[Control IP address]” on page 1037.

Logging in and logging off to/from the control


Further information:
● ⮫ Chapter Command “Logging in device user...” on page 912
● ⮫ Chapter Command “Log out current device user” on page 913
● ⮫ Chapter 33.4.3 Dialog “Login - [Control IP address]” on page 1037

R911403764, Edition 08 Bosch Rexroth AG


46 / 1158 ctrlX PLC Engineering

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 47 / 1158
Customizing the user interface

7 Configuring the PLC Engineering


You can customize the behavior, appearance, menu composition and window
arrangement of ctrlX I/O Engineering System. In the “Tools” menu, there are
dialogs for customizing the interface and for setting the PLC Engineering
options.
Also refer to:
● ⮫ Dialog 'Customize' - 'Command Icons'
● ⮫ Dialog 'Customize' - 'Keyboard'

Configuring the PLC Engineering


● ⮫ Dialog 'Customize' - 'Menu'
● ⮫ Dialog 'Customize' - 'Toolbars'

7.1 Setting PLC Engineering Options


You can configure the behavior and appearance of the ctrlX I/O Engineering
System in the different tabs of the “Options” dialog. The dialog opens
after selecting the “Tools 🠂 Options” command. Here you can configure the
default settings for different editors and functionalities. These settings apply
throughout PLC Engineering.
The settings are stored in your current user profile on your local system. For
use on other systems, option settings, either user-specific or machine-specific
(computer), can be exported to an XML file.
PLC Engineering checks if an older version is already installed when the devel-
opment system is started for the first time. If this is the case, then the “Import
Assistant” dialog opens for transferring the PLC Engineering options set with
the older version.
Also refer to
● ⮫ Chapter Command 'Options' on page 965
● ⮫ Chapter Command 'Import and Export Options' on page 966
● ⮫ Chapter 33.4.1 'Import Wizard' dialog on page 1035
● ⮫ Chapter 7.2.1 Customizing Menus on page 47
● ⮫ Chapter 7.2.4 Customizing Keyboard Shortcuts on page 50
● ⮫ Chapter 7.2.2 Customizing Toolbars on page 48

7.2 Customizing the user interface


In PLC Engineering, you can customize the user interface by changing the
window layout as well as the appearance of menus and commands according to
your requirements.

7.2.1 Customizing Menus


You can customize the menu commands of the PLC Engineering user interface.
In a configuration dialog, you can add or remove menus.

Removing menus and commands


1. Choose the command “Tools 🠂 Customize”.
🡆 The “Customize” dialog box opens. The “Menu” tab is visible.
2. Select a menu in the menu tree or a command in a menu.
3. Click “Delete”.
🡆 The menu or command is deleted from the menu tree.
4. Click “OK”.
🡆 The dialog box closes and the menu is customized.

R911403764, Edition 08 Bosch Rexroth AG


48 / 1158 ctrlX PLC Engineering
Customizing the user interface

Adding menus
1. Choose the command “Tools 🠂 Customize”.
🡆 The “Customize” dialog box opens. The “Menu” tab is visible.
2. Scroll to the end of the menu tree.
3. Select the blank symbol ( ).
4. Click “Add Popup Menu”.
🡆 The “Add Popup Menu” dialog box opens.
5. Type a name for the new menu in the “Default text” field.
If localization is unnecessary, then skip to step 9.
6. Click “Add Language”.
🡆 A drop-down list opens with available languages.
7. Choose the required language.
🡆 The language is added to the list of languages.
8. Click into the “Text” field and type the language-specific text.
9. Click “OK”.
🡆 The new menu is added at the bottom of the menu tree.
10. Change the menu order by clicking “Move up” and “Move down”. Click
“OK” to close the “Customize” dialog box.
The new menu is displayed only when it contains a command.

Adding commands
1. Choose the command “Tools 🠂 Customize”.
🡆 The “Customize” dialog box opens. The “Menu” tab is visible.
2. Expand the branch of the menu where the new command should be
added.
3. Select the blank symbol ( ).
4. Click “Add Command”.
🡆 The “Add Command” opens dialog box.
The dialog box lists all commands grouped by category.
5. Select the command to be added. Click “OK”.
🡆 The new command is added to the menu tree.
6. Change the menu order by clicking “Move up” and “Move down”. Click
“Add separator” to add a border between commands. Click OK to close
the “Customize” dialog box.
🡆 The new command is now available in the menu.
See also
● ⮫ Chapter Dialog 'Customize' - 'Menu' on page 1094
● ⮫ Chapter 7.2.2 Customizing Toolbars on page 48

7.2.2 Customizing Toolbars


You can customize the toolbars of the PLC Engineering user interface. In a
configuration dialog, you can add or remove toolbars.

Removing toolbars and commands


1. Choose the command “Tools 🠂 Customize”.
🡆 The “Customize” dialog box opens.
2. Choose the “Toolbars” tab.
3. Select a toolbar or a command from a toolbar tree.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 49 / 1158
Customizing the user interface

4. Click “Delete”.
🡆 The toolbar or command is deleted.
5. Click “OK”.
🡆 The dialog box closes and the toolbar or command is removed.

Adding toolbars
1. Choose the command “Tools 🠂 Customize”.
🡆 The “Customize” dialog box opens.

Configuring the PLC Engineering


2. Choose the “Toolbars” tab.
3. Select the blank toolbar.
4. Click “Add Toolbar”.
🡆 The cursor blinks in the new toolbar.
5. Type a name.
6. Change the toolbar order by clicking “Move up” and “Move down”. Click
“OK” to close the “Customize” dialog box.
PLC Engineering displays the new toolbar only when it contains a com-
mand.

Adding commands
1. Choose the command “Tools 🠂 Customize”.
🡆 The “Customize” dialog box opens.
2. Choose the “Toolbars” tab.
3. Expand the tree of the toolbar where the new command should be added.
4. Select the blank symbol ( ).
5. Click “Add Command”.
🡆 The “Add Command” dialog box opens.
The dialog box lists all commands grouped by category.
6. Select the command to be added. Click “OK”.
🡆 The new command is added to the toolbar tree.
7. Change the toolbar order by clicking “Move up” and “Move down”. Click
“Add separator” to add a border between commands. Click “OK” to close
the “Customize” dialog box.
🡆 The new command is available in the toolbar.
See also
● ⮫ Chapter Dialog 'Customize' - 'Toolbars' on page 1094
● ⮫ Chapter 7.2.1 Customizing Menus on page 47

7.2.3 Customize Command Icon


PLC Engineering provides the capability of assigning customized icons to com-
mands.

1. Select the command “Tools 🠂 Customize”.


🡆 The “Customize” dialog box opens.
2. Click the “Command icons” tab.
3. Select the category “Help” from the list on the left.
🡆 All commands in this category are listed on the right.
4. Select the command “Information”.
5. Click “Assign”.
🡆 A dialog box opens for selecting the icon file (*.ico).

R911403764, Edition 08 Bosch Rexroth AG


50 / 1158 ctrlX PLC Engineering
Customizing the user interface

6. Select an icon file.


7. Click the “Open” button.
🡆 The icon is assigned to the selected command.
8. Click “OK”.
See also
● ⮫ Chapter Dialog 'Customize' - 'Command Icons' on page 1094

7.2.4 Customizing Keyboard Shortcuts


PLC Engineering provides the capability of executing commands directly via
keyboard shortcuts. You can customize or extend predefined keyboard short-
cuts.

1. Choose the command “Tools 🠂 Customize”.


🡆 The “Customize” dialog box opens.
2. Choose the “Keyboard” tab.
3. Select the category “Help” from the list on the left.
🡆 All commands in this category are listed on the right.
4. Select the command “Search”.
5. Click into the field “Press Shortcut Keys”.
6. Press [Ctrl]+[Shift]+[S].
🡆 PLC Engineering adds the key combination to the field.
7. Click “Assign”.
🡆 The keyboard shortcut is assigned to the command.
8. Click “OK”.
🡆 You can call the “Search” command by pressing [Ctrl]+[Shift]+[S].
See also
● ⮫ Chapter Dialog 'Customize' - 'Keyboard' on page 1095

7.2.5 Changing the Window Layout


In PLC Engineering, you can easily customize the layout of different views to
your individual needs.
1. Drag the view by the caption bar or by the tab.
🡆 Arrows are shown to mark possible destinations. Example:
2. Drag the view to one of the arrows.
🡆 The destination is displayed as a blue-shaded area.
3. Release the left mouse button.
🡆 The window is inserted into the selected destination.
The window can also be placed outside of the PLC Engineering programming
interface.
See also
● ⮫ Chapter 7.2.6 Resizing Windows on page 50
● ⮫ Chapter 7.2.7 Auto-Hiding Windows on page 51
● ⮫ Chapter 7.2.8 Switching Between Windows on page 51

7.2.6 Resizing Windows


1. Move the mouse pointer over the border between two windows or views.
🡆 The cursor becomes a left-right arrow.
2. Drag the border to another position.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 51 / 1158
Customizing the user interface

You can resize detached views by moving the frame lines.

See also
● ⮫ Chapter 7.2.5 Changing the Window Layout on page 50
● ⮫ Chapter 7.2.7 Auto-Hiding Windows on page 51
● ⮫ Chapter 7.2.8 Switching Between Windows on page 51

7.2.7 Auto-Hiding Windows

Configuring the PLC Engineering


Hiding windows
When you hide a view, it is minimized to a tab in the frame of the user inter-
face. When you move the pointer over the tab, the window is shown automati-
cally.
1. Click into the window to be hidden.
2. Click “Window 🠂 Auto Hide”.
Or click the pin symbol ( ) in the upper right corner of the view.
🡆 The window is hidden and only visible by a small tab on the edge of the
main window.
3. Move the mouse pointer over the tab.
🡆 The window is shown as long as the mouse pointer hovers over the tab.

Showing windows
1. Click the tab of the hidden window.
2. Clear the check box “Window 🠂 Auto Hide”.
Or click the pin symbol ( ) in the upper right corner of the view.
🡆 The window is permanently shown.
See also
● ⮫ Chapter 7.2.5 Changing the Window Layout on page 50
● ⮫ Chapter 7.2.6 Resizing Windows on page 50
● ⮫ Chapter 7.2.8 Switching Between Windows on page 51

7.2.8 Switching Between Windows


It is possible to switch directly between the currently opened views and the
editor windows.
1. Press the keystroke combination [Ctrl]+[Tab]. Continue pressing the [Ctrl]
key.
🡆 An overview opens with all active views and editors.
2. Continue pressing the [Ctrl] key and select a window using the arrow
keys.
3. Release the [Ctrl] key.
🡆 The selected view or editor is activated.
See also
● ⮫ Chapter 7.2.5 Changing the Window Layout on page 50
● ⮫ Chapter 7.2.6 Resizing Windows on page 50
● ⮫ Chapter 7.2.7 Auto-Hiding Windows on page 51

R911403764, Edition 08 Bosch Rexroth AG


52 / 1158 ctrlX PLC Engineering
Customizing the user interface

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 53 / 1158
Creating a new project

8 Creating and configuring a project


8.1 What is a project?
A project contains objects and properties that are required a control program
or a control configuration.
Templates
To create projects, templates are provided, containing pre-defined objects,

Creating and configuring a project


depending on the target device. These templates can be selected when cre-
ating a new project.
A project is stored as file in the file system. Optionally, the project can be
bundled together with other project-relevant files and information as file via a
project archive.

Which objects are available?


The objects can be classified as follows:
● Device and application-specific objects are managed in the “devices” view
via the “Device tree".
● Project-comprehensively available objects, e.g. PLC blocks are managed in
the “POUs”.

Project properties
Apart from the objects, take the following properties into account:
● In den “Project settings” and “Project information”, the basic configuration
and information about the project is contained.
● Each project contains information which PLC Engineering version has been
used to create the project. When opening the project with a different
version, PLC Engineeringprovides information about potential or required
updates with regard to memory format, device and library versions, etc.

Working with projects


Take the following into account when working with projects:
● Projects can be compared, exported, imported and a corresponding docu-
mentation can be generated.
● A project can be protected against modifications and against reading out of
data.
● Use a user management to specifically access the projects as well as indi-
vidual objects in the project.

8.2 Creating a new project


PLC Engineering provides a wizard to create projects.

Start the wizard to create a project:


1. Open PLC Engineering and start the wizard to create a project via the
menu “File 🠂 New Project...”
🡆 The “New Project” dialog opens.

R911403764, Edition 08 Bosch Rexroth AG


54 / 1158 ctrlX PLC Engineering
Creating a new project

2. In the dialog, select the project properties. The following sections are
available in the dialog:
“Categories” Available Categories:
● “Libraries”:
Category to create a library. A library can be
used in other projects.
● “Projects”:
Category to configure a target device.
“Templates” Select a template for implementation. The tem-
plates depend on the category and provide pre-
configured elements.
“Name” Project name
“Location” Directory in the file system in which the project is
stored
Select the category, the template and the file system directory in which
the project is stored.
Assign a name to the project.
Confirm the dialog with “OK”
🡆 Depending on the selected template, the dialog for more project set-
tings is opened.

Related documentation
● ⮫ Chapter 8.3.4 Adding objects on page 61
● ⮫ Chapter 18.7 Using library function blocks on page 136

8.2.1 Creating a project on the basis of a template for ctrlX CORE Cre-
ating devices
PLC Engineering provides released project templates for ctrlX CORE target
devices.
The following example guides through the different steps to create a new
project for the “ctrlX CORE” target system.

Steps to create a project for the target system “ctrlX CORE”:


1. Open PLC Engineering and start the wizard to create a project via the
menu “File 🠂 New Project...”
2. In the “New Project” dialog, select the template “ctrlX CORE” of
(“Categories 🠂 Projects 🠂 Templates”).
🡆 The “New Project” dialog opens
3. In the “New Project” dialog, configure the control to be configured, select
the project synchronization settings and confirm the dialog with “OK”.
🡆 ctrlX PLC Engineering now automatically creates the project with the
control node in the device tree. The control node contains all the
objects you need to create a control program.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 55 / 1158
Creating a new project

Creating and configuring a project


4. Start to create a control program by adding program code to the
“PLC_PRG (PRG)” POU, to load it to the control and to execute it.

Related documentation
● ⮫ Chapter 8.3.4 Adding objects on page 61

8.2.2 Project on basis ctrlX CORE Virtual Creating an axis/kin interface


In connection with the Motion App, ctrlX PLC Engineering provides a released
project template based on a ctrlX CORE Virtual control.
The project template features mechanisms for complete access to axes and
kinematics, managed via the Motion App.
If the project template should be operated on a real ctrlX CORE control, the
target system has to be adjusted after the project has been created, see
⮫ Assigning a new target device on page 56
Steps to create a project on the basis of the ctrlX CORE Virtual axis/kin inter-
face:
1. Open ctrlX PLC Engineering and start the wizard to create a project via
the menu “File 🠂 New Project...”
2. In the “Categories 🠂 Projects” dialog, select the “ctrlX CORE Axis-/Kin-
Interface” project template.
3. Enter a project name in the dialog as well as the storage dialog in the file
system.
4. Click OK to confirm the dialog.
🡆 ctrlX PLC Engineering automatically creates the project with the
required project nodes in the device tree

R911403764, Edition 08 Bosch Rexroth AG


56 / 1158 ctrlX PLC Engineering
Creating a new project

In this state, the project cannot be compiled as the referenced target


device is not available.
The following handling instruction describes how to adjust the target
device.
Assigning a new target device
1. To assign a new target device, select the existing control node (device) in
the device tree and open the context menu by right-click.
2. Execute the “Update Device” command
🡆 The “Update Device” dialog opens
3. In the dialog, select the ctrlX CORE target system and confirm the dialog
via “Update Device”
🡆 The target system is updated and the red highlighting below the node
in the device tree are removed.
The project can now be compiled successfully.

Further detailed documentation


● ⮫ Chapter 8.3.4 Adding objects on page 61

8.2.3 Creating a standard project


There is the option to operate CODESYS targets in ctrlX PLC Engineering.
To be able to use CODESYS targets in ctrlX PLC Engineering, the relevant target
device description files and libraries in the Device Repository of ctrlX PLC Engi-
neering have to be installed, see ⮫ Chapter 28.2 Installing Devices on page 333.
To create a project, please use the project template “Standard project”.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 57 / 1158
Creating a new project

Steps to create a standard project:


1. Open ctrlX PLC Engineering and start the wizard to create a project via
the menu “File 🠂 New Project...”
2. In the “New Project” dialog, select the “Standard project” template.
Enter a project name, e.g. myProject as well as the storage location in
the file system.
Confirm the dialog with “OK”.
🡆 The “Standard project” dialog opens.

Creating and configuring a project


3. In the “Device” field, select the target system from the list.
In the “PLC_PRG in” field, specify the programming language for the POU,
e.g. “structured text (ST)”.
Confirm the dialog with “OK”.
🡆 ctrlX PLC Engineering automatically creates the project with the project
node in the device tree:

Depending on the selected device, additional device nodes are created,


if required.
If a device with PLC functionality is created, the “PLC Logic” subnode is
created implicitly.
In the “Standard project”, the “PLC Logic node contains the ” following
subnodes:
● Library Manager
The library manager automatically receives the libraries, the selected
device requires.
● PLC_PRG (PRG)
Standard POU
If a correct code is added to the “PLC_PRG”, the POU can be loaded
to the control and executed on the control without requiring other
programming objects.
● Task Configuration
The task configuration defines the main task Main Task for proc-
essing of the standard POU “PLC_PRG”
– Main Task
– PLC_PRG

Further detailed documentation


● ⮫ Chapter 8.3.4 Adding objects on page 61

R911403764, Edition 08 Bosch Rexroth AG


58 / 1158 ctrlX PLC Engineering
Configuring project

8.2.4 Creating an empty project


To create an empty project, use the “Empty project” project template..

Steps to create an “empty” project:


1. Open PLC Engineering and start the wizard to create a project via the
menu “File 🠂 New Project...”
2. Select the “Empty project” template.
Confirm the dialog with “OK”.
🡆 PLC Engineering automatically creates an empty project.
Add and configure your elements via the context menu of the project.

Related documentation
● ⮫ Chapter 17.2 Device tree and device editor on page 111
● ⮫ Chapter 8.3.4 Adding objects on page 61
● ⮫ Chapter 18.7 Using library function blocks on page 136
● ⮫ Chapter 'Project settings' dialog - 'Security' on page 1064

8.3 Configuring project


8.3.1 Retrieving and editing project information
You can use the “Project information” object to retrieve information about your
project and the relevant file, and edit certain information.
The object contains information on
● File attributes
● Meta information, such as manufacturer, title, or author
● Properties with key
● Statistics
● Licensing
PLC Engineering saves the project information as an object within the project.
When transferring a project to another system, the “Project information” object
is also transferred. A project archive is not required.
By using property keys, the project information is externally accessed via func-
tion blocks. For a library project, additional information about licensing can be
queried.

Editing meta information


1. Select “Project 🠂 Project information”.
🡆 The “Project information” dialog opens.
2. Select the “Summary” tab.
3. Specify your data in the input fields (example: 0.0.0.1 in the “Version”
input field).
🡆 PLC Engineering creates a property with a key for each given value and
manages them on the “Properties” tab. For a library project, PLC Engi-
neering continues to use the properties and sorts the library repository
for the properties.
When selecting the option for PLC Engineering to create a function
block for these properties, access to properties is executed program-
matically.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 59 / 1158
Configuring project

Creating functions for access to properties


1. Select “Project 🠂 Project information”.
🡆 The “Project information” dialog opens.
2. Select the “Automatically generate 'Project information' POUs” option.

Example
Prerequisite: The following property is defined.

Creating and configuring a project


Schlüssel = nProp1
Typ= Zahl
Wert= 333
1. Select the “Automatically generate 'Project information' POUs” option.
2. Declare a variable of the type DINT, e.g. showprop : DINT;
3. Call the function GetNumberProperty: showprop :=
GetNumberProperty("nProp1");
🡆 You are granted access to the value in the application.

Note: The function generated with the “Automatically generate 'Project


Information' POUs” option can only be used if the runtime system supports
the WSTRING data type! If this is not the case, use the “Automatically generate
'Library Information' POUs” option: The functions generated for this can be
used in the application for accessing the properties. These functions are not
registered in the runtime system.

Licensing library project


If the project is a library project, library licensing can be enabled upon use. A
"Codesys Security Key" is used as dongle.
Prerequisite: The project is a library project.
1. Select “Project 🠂 Project information”.
🡆 The “Project information” dialog opens.
2. Select the “Licensing” tab.
3. Select the “Activate dongle licensing” option.
4. Enter the dongle data in the “Firm code”, “Product code”, “Activation
URL” and “Activation mail”.
🡆 The library is licensed.

Outdated: Signing a library project - Only available for version compatibility


with PLC Engineering < SP15 - From version PLC EngineeringV3SP17 only for
existing libraries with the obsolete signing created in the “Project information”
- “Sign” dialog
From PLC EngineeringV3 SP15, library signing is always certificate-based. To
perform such a signing, refer to the help page for the “Save Project as
translated library” command. In contrast to outdated signing via the setting
in the “Project information” - “Signing” dialog, the entire library is signed using
the certificate.
If a library project needs to be signed for a PLC Engineering version < V3 V3
SP15, due to compatibility reasons, proceed as follows:
Prerequisite: A private key file with a token is available. In the project informa-
tion of the library project, a library compatibility to a PLC Engineering version <
V3 V3 SP15 is selected in the “Summary” tab.
1. Select “Project 🠂 Project information”.
🡆 The “Project information” dialog opens.

R911403764, Edition 08 Bosch Rexroth AG


60 / 1158 ctrlX PLC Engineering
Configuring project

2. Select the “Signing” tab.


3. Select the option “Activate signing”.
4. Enter the storage location of your private key file.
🡆 PLC Engineering enters the token automatically in “Public key token”
(example: 427A5701DA3CF3CF).
5. Click “File 🠂 Save project as compiled library”.
🡆 The library project is saved as a files with the extension *.library.
The token is contained in the library repository or the Library Manager
in the library details and can be compared to the library provider’s pub-
lished token. Thus, it is verified whether the library actually originates
from the provider.
Also refer to
● ⮫ Chapter Command 'Save Project as Compiled Library' on page 875

8.3.2 Selecting project settings


Configure the settings affecting the behavior of PLC Engineering and the
behavior of some editors in the“Project settings” object. The settings are valid
across the project and are immediately applied to active editors. You can also
access the dialogs of the object with the “Project 🠂 Project settings” com-
mand.
PLC Engineering directly saves the project settings as object in the project.
When transferring a project to another system, the “Project settings” object is
also transferred. A project archive is not required.
Also refer to
● ⮫ Chapter 8.3.6 Changing the compiler version on page 63
● ⮫ Chapter 18.19.3 Analyzing Code Statically on page 202
● ⮫ Chapter Command 'Project settings' on page 915
● ⮫ Chapter Dialog 'Project Settings' - 'SFC' on page 1065
● ⮫ Chapter 'Project settings' dialog - 'Users and groups' on page 1061
● ⮫ Chapter 'Project settings' dialog - 'Compiler options' on page 1062
● ⮫ Chapter 'Project settings’ dialog - 'Compiler warnings' on page 1062
● ⮫ Chapter Dialog 'Project Settings' - 'Page Setup' on page 1063
● ⮫ Chapter 'Project settings' dialog - 'Security' on page 1064
● ⮫ Chapter Dialog 'Project Settings' - 'Visualization' on page 1069
● ⮫ Chapter Dialog 'Project Settings' - 'Visualization Profile' on page 1069

8.3.3 Creating a standard project


There is the option to operate CODESYS targets in ctrlX PLC Engineering.
To be able to use CODESYS targets in ctrlX PLC Engineering, the relevant target
device description files and libraries in the Device Repository of ctrlX PLC Engi-
neering have to be installed, see ⮫ Chapter 28.2 Installing Devices on page 333.
To create a project, please use the project template “Standard project”.

Steps to create a standard project:


1. Open ctrlX PLC Engineering and start the wizard to create a project via
the menu “File 🠂 New Project...”
2. In the “New Project” dialog, select the “Standard project” template.
Enter a project name, e.g. myProject as well as the storage location in
the file system.
Confirm the dialog with “OK”.
🡆 The “Standard project” dialog opens.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 61 / 1158
Configuring project

3. In the “Device” field, select the target system from the list.
In the “PLC_PRG in” field, specify the programming language for the POU,
e.g. “structured text (ST)”.
Confirm the dialog with “OK”.
🡆 ctrlX PLC Engineering automatically creates the project with the project
node in the device tree:

Creating and configuring a project


Depending on the selected device, additional device nodes are created,
if required.
If a device with PLC functionality is created, the “PLC Logic” subnode is
created implicitly.
In the “Standard project”, the “PLC Logic node contains the ” following
subnodes:
● Library Manager
The library manager automatically receives the libraries, the selected
device requires.
● PLC_PRG (PRG)
Standard POU
If a correct code is added to the “PLC_PRG”, the POU can be loaded
to the control and executed on the control without requiring other
programming objects.
● Task Configuration
The task configuration defines the main task Main Task for proc-
essing of the standard POU “PLC_PRG”
– Main Task
– PLC_PRG

Further detailed documentation


● ⮫ Chapter 8.3.4 Adding objects on page 61

8.3.4 Adding objects


Prerequisite: A project is open At least the top node “<Project name>” exists in
the “Devices” view ("Device tree") and in the “POUs” view.
The following instructions show some options when creating objects in the
project.
1. Select an entry in the device tree or in the POUs tree, for example the
“Application” object.
2. Select the command “Project 🠂 Add object”.
🡆 Depending on the selected entry in the tree provides the PLC Engi-
neering matching objects for selection.

R911403764, Edition 08 Bosch Rexroth AG


62 / 1158 ctrlX PLC Engineering
Configuring project

3. For example, select the “POU” object and in the subsequent dialog
“Add POU”, select the “Program” type with implementation language
“structured text (ST)” and the "prog“ name.
🡆 After clicking on “Add”, PLC Engineering inserts a program object
“prog” in the device tree below the “Application”.
4. Select an object in the tree and select the “Properties” command in the
context menu.
🡆 The “Properties” dialog is displayed with the object-relevant categories.
If you are using a user management, you could, for example, restrict
access to the object here.
5. Select an entry in the tree below which you want to create a folder to
collect specific objects in it. Note: You cannot structure the arrangement
of device nodes and device objects by creating folders yourself.
6. In the context menu select the command “Add folder” and define a name
for the new folder in the dialog that is displayed. Click on “OK”.
🡆 The folder is displayed in the tree.
7. Select an object in the tree and drag it to another position within the tree
(e.g. to the folder) using the mouse.
8. Do not select an object in the device tree. Position the focus on an
available position in the PLC Engineering interface. Select the command
“Project 🠂 Add object” and then subsequently the “text list” object.
🡆 The “Text list” object is inserted in the “POUs” view!
Also refer to
● ⮫ Chapter 8.2.3 Creating a standard project on page 56
● ⮫ Chapter Command ‘Add Folder’ on page 932
● ⮫ Chapter Command 'Properties' on page 899

8.3.5 Project on basis ctrlX CORE Virtual Creating an axis/kin interface


In connection with the Motion App, ctrlX PLC Engineering provides a released
project template based on a ctrlX CORE Virtual control.
The project template features mechanisms for complete access to axes and
kinematics, managed via the Motion App.
If the project template should be operated on a real ctrlX CORE control, the
target system has to be adjusted after the project has been created, see
⮫ Assigning a new target device on page 56
Steps to create a project on the basis of the ctrlX CORE Virtual axis/kin inter-
face:
1. Open ctrlX PLC Engineering and start the wizard to create a project via
the menu “File 🠂 New Project...”
2. In the “Categories 🠂 Projects” dialog, select the “ctrlX CORE Axis-/Kin-
Interface” project template.
3. Enter a project name in the dialog as well as the storage dialog in the file
system.
4. Click OK to confirm the dialog.
🡆 ctrlX PLC Engineering automatically creates the project with the
required project nodes in the device tree

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 63 / 1158
Configuring project

Creating and configuring a project


In this state, the project cannot be compiled as the referenced target
device is not available.
The following handling instruction describes how to adjust the target
device.
Assigning a new target device
1. To assign a new target device, select the existing control node (device) in
the device tree and open the context menu by right-click.
2. Execute the “Update Device” command
🡆 The “Update Device” dialog opens
3. In the dialog, select the ctrlX CORE target system and confirm the dialog
via “Update Device”
🡆 The target system is updated and the red highlighting below the node
in the device tree are removed.
The project can now be compiled successfully.

Further detailed documentation


● ⮫ Chapter 8.3.4 Adding objects on page 61

8.3.6 Changing the compiler version


The compiler version used to generate the current project code for use on the
target device is defined in the project settings.
The compiler version depends on the PLC Engineering version. Thus, if the
selected PLC compiler version is identical, a constant application code is gen-
erated from the source code. This is also the case if different PLC Engineering
versions are used.

R911403764, Edition 08 Bosch Rexroth AG


64 / 1158 ctrlX PLC Engineering
Retrieving and editing project information

Refer to the setting “Do not update” in the “Compiler


NOTICE
version” tab of the “Project environment” dialog: If the
project environment is enabled and when opening an
older project for which compiler version “Latest” is
selected, PLC Engineering continues to use the compiler
version used in the old project. This also applies if the
another “current” version is defined in the new environ-
ment!
If you open a project that does not have the latest compiler version set, the
“Project environment” dialog is displayed with a corresponding note and the
option to update directly.
Prerequisite: A project is open
1. Select the “Project 🠂 Project settings” command and subsequently the
“Compiler options” tab.
2. Select the desired “Fixed version” element and click on “OK”.
🡆 The change is applied immediately.
Also refer to
● ⮫ Chapter 20.5 Generating Application Code on page 265
● ⮫ Chapter 'Project settings' dialog - 'Compiler options' on page 1062
● ⮫ Chapter Dialog 'Project Environment' - 'Compiler Version' on page 1070

8.4 Retrieving and editing project information


You can use the “Project information” object to retrieve information about your
project and the relevant file, and edit certain information.
The object contains information on
● File attributes
● Meta information, such as manufacturer, title, or author
● Properties with key
● Statistics
● Licensing
PLC Engineering saves the project information as an object within the project.
When transferring a project to another system, the “Project information” object
is also transferred. A project archive is not required.
By using property keys, the project information is externally accessed via func-
tion blocks. For a library project, additional information about licensing can be
queried.

Editing meta information


1. Select “Project 🠂 Project information”.
🡆 The “Project information” dialog opens.
2. Select the “Summary” tab.
3. Specify your data in the input fields (example: 0.0.0.1 in the “Version”
input field).
🡆 PLC Engineering creates a property with a key for each given value and
manages them on the “Properties” tab. For a library project, PLC Engi-
neering continues to use the properties and sorts the library repository
for the properties.
When selecting the option for PLC Engineering to create a function
block for these properties, access to properties is executed program-
matically.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 65 / 1158
Retrieving and editing project information

Creating functions for access to properties


1. Select “Project 🠂 Project information”.
🡆 The “Project information” dialog opens.
2. Select the “Automatically generate 'Project information' POUs” option.

Example
Prerequisite: The following property is defined.

Creating and configuring a project


Schlüssel = nProp1
Typ= Zahl
Wert= 333
1. Select the “Automatically generate 'Project information' POUs” option.
2. Declare a variable of the type DINT, e.g. showprop : DINT;
3. Call the function GetNumberProperty: showprop :=
GetNumberProperty("nProp1");
🡆 You are granted access to the value in the application.

Note: The function generated with the “Automatically generate 'Project


Information' POUs” option can only be used if the runtime system supports
the WSTRING data type! If this is not the case, use the “Automatically generate
'Library Information' POUs” option: The functions generated for this can be
used in the application for accessing the properties. These functions are not
registered in the runtime system.

Licensing library project


If the project is a library project, library licensing can be enabled upon use. A
"Codesys Security Key" is used as dongle.
Prerequisite: The project is a library project.
1. Select “Project 🠂 Project information”.
🡆 The “Project information” dialog opens.
2. Select the “Licensing” tab.
3. Select the “Activate dongle licensing” option.
4. Enter the dongle data in the “Firm code”, “Product code”, “Activation
URL” and “Activation mail”.
🡆 The library is licensed.

Outdated: Signing a library project - Only available for version compatibility


with PLC Engineering < SP15 - From version PLC EngineeringV3SP17 only for
existing libraries with the obsolete signing created in the “Project information”
- “Sign” dialog
From PLC EngineeringV3 SP15, library signing is always certificate-based. To
perform such a signing, refer to the help page for the “Save Project as
translated library” command. In contrast to outdated signing via the setting
in the “Project information” - “Signing” dialog, the entire library is signed using
the certificate.
If a library project needs to be signed for a PLC Engineering version < V3 V3
SP15, due to compatibility reasons, proceed as follows:
Prerequisite: A private key file with a token is available. In the project informa-
tion of the library project, a library compatibility to a PLC Engineering version <
V3 V3 SP15 is selected in the “Summary” tab.
1. Select “Project 🠂 Project information”.
🡆 The “Project information” dialog opens.

R911403764, Edition 08 Bosch Rexroth AG


66 / 1158 ctrlX PLC Engineering
Retrieving and editing project information

2. Select the “Signing” tab.


3. Select the option “Activate signing”.
4. Enter the storage location of your private key file.
🡆 PLC Engineering enters the token automatically in “Public key token”
(example: 427A5701DA3CF3CF).
5. Click “File 🠂 Save project as compiled library”.
🡆 The library project is saved as a files with the extension *.library.
The token is contained in the library repository or the Library Manager
in the library details and can be compared to the library provider’s pub-
lished token. Thus, it is verified whether the library actually originates
from the provider.
Also refer to
● ⮫ Chapter Command 'Save Project as Compiled Library' on page 875

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 67 / 1158
Exporting and Importing Projects

9 Exporting and importing projects


9.1 Basic information
Export and import functions are available for exchanging data from PLC Engi-
neering projects with other programs.
An exchange of PLC Engineering projects between other PLC Engineering devel-
opment systems is done by a copy of the project file (*.project) or the project
archive (*.projectarchive).

Exporting and importing projects


Also refer to
● ⮫ Exporting and Importing Projects
● ⮫ Transferring projects

9.2 Exporting and Importing Projects


PLC Engineering provides commands for exporting and importing objects from
and to a file. There are two ways to do this:
● Export to and import from a PLC Engineering XML file (*.export)
This format is fully compatible with the PLC Engineering project format. The
objects are stored in a machine-parsable XML format.
● Export to and import from an XML file in PLCopen format (*.xml)
You can use this format for exchanging information between programs, for
example program editors or documentation tools. PLCopen XML defined a
subset of elements that PLC Engineering recognizes. Therefore, 100% com-
patibility cannot be guaranteed.

Exporting Projects
Prerequisite: A project is opened in PLC Engineering.
1. Click “Project 🠂 Export” or “Project 🠂 Export PLCopenXML”.
2. Select the export objects in the “Export” dialog or “Export PLCopenXML”
dialog.
3. Click on “OK”.
4. Specify the file name and location and click on“Save”.

Importing Projects
Prerequisite: A project is opened in PLC Engineering.
1. Click “Project 🠂 Import” or “Project 🠂 Import PLCopenXML”.
2. Select the import objects in the “Import” dialog or “Import PLCopenXML”
dialog.
🡆 A dialog opens and displays a tree structure of objects that can be
inserted in this position.
3. Select the object in the object tree under which the objects to be
imported are to be inserted.
4. Select the objects and click “OK”.
🡆 The objects are added to the existing object tree.

Also refer to
● ⮫ Chapter Command 'Export' on page 922
● ⮫ Chapter 'Import...’ command on page 922
● ⮫ Chapter Command 'Import PLCopenXML' on page 923
● ⮫ Chapter Command 'Export PLCopenXML' on page 923
● ⮫ Chapter Dialog 'Options' - 'PLCopenXML' on page 1085

R911403764, Edition 08 Bosch Rexroth AG


68 / 1158 ctrlX PLC Engineering
Transferring projects

9.3 Transferring projects


If you want to transfer a project to another computer and connect from there
to the same PLC without requiring an online change or download, note the
following points.
● Make sure that the project contains only fixed versions of libraries (excep-
tion: interface libraries), visualization profile and compiler required
● Make sure that the boot application is up to date.
Create a repository that you unpack on the other computer.

Transferring a project to another system


Prerequisite: A project is open on computer "PC1", which you transfer to
another computer "PC2" and from there connect again to the same control.
1. Make sure that only libraries with fixed versions are included in the
project, except for interface libraries. Open the “Library manager” and
check all entries that have a "*" instead of a fixed version number.

NOTICE Remark: As of compiler version 3.5.18.0, the library


profile is ignored in favor of the placeholder resolution. The libraries
contained in the profile automatically become available placeholders. The
option to include the library profile in the repository is not available any-
more.
2. Make sure that a fixed compiler version is set in the project settings.
To check, select “Project 🠂 Project settings” and the “Compiler option”
category.
3. Make sure that a fixed visualization profile is defined in the project set-
tings. To check, select “Project 🠂 Project settings” and the “Visualization
profile” category.
4. Make sure that the application that is currently open is the same as the
one that is currently used on the PLC. This means that the "boot applica-
tion" has to be identical to the project in the programming system. To do
this, check the project name in the title bar of the programming system
window: If an asterisk appears after the name, the project has been modi-
fied but has not yet been saved. The application and boot application may
not match!
In this case, first create a (new) boot application. It depends on the PLC
and the application properties whether this happens automatically when
loading (downloading) the application. For explicit generation select the
command“Online 🠂 Create boot application”. Perform a download using
the commands “Online 🠂 Log in” and “Online 🠂 Download”.
Start the program with the command “Debug 🠂 Start” to start the appli-
cation on the control.
🡆 Now the desired application is running on the PLC to which you want to
connect again later on PC2 from the same project.
5. Create a repository: Select “File 🠂 Project Archive 🠂 Save/Send Archive”.
In the “Project repository” dialog select the following information:
● “Download information files”
● “Library profile”
● “Referenced devices”
● “Referenced libraries”
● “Visualization profile”
Save the repository in a location accessible from PC2.
6. Log out of the control: Click “Online 🠂 Logout”. You can stop and restart
the PLC before reconnecting from PC2.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 69 / 1158
Transferring projects

7. Extract the repository to PC2: Select “File 🠂 Repository 🠂 Extract


archive” and open the archive saved above. In the “Extract repository”
dialog, activate the same information as described above when creating
the archive.
8. Open the project and log back in to PLC "xy".
🡆 PLC Engineering does not require an online change or download, the
project is running.

Also refer to

Exporting and importing projects


● ⮫ Chapter 'Project settings' dialog - 'Compiler options' on page 1062
● ⮫ Chapter Command 'Create Boot Application' on page 942
● ⮫ Chapter Command 'Save/Send Archive' on page 872

R911403764, Edition 08 Bosch Rexroth AG


70 / 1158 ctrlX PLC Engineering
Transferring projects

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 71 / 1158
Open detailed compare view

10 Comparing Projects
10.1 Compare project – Basic information
You can compare the currently open project with another project – a reference
project. The differences in contents, properties, or access rights are detected
and shown in a comparison view.
With the command “Project 🠂 Compare” opens the “Project Compare” dialog
where you can configure and start the comparison. Subsequently, the result is
displayed in the compare view “Compare view - Differences”, where the objects
are lined up side by side in a tree structure. Objects that indicate differences

Comparing Projects
from the respective reference object are identified by colors and symbols. This
is how to detect whether or not the contents, properties, or access rights are
different.
In case of differences in content, you can additionally open the detailed com-
pare view “Project comparison - <Object name> Differences” to zoom into the
object. In the detail compare view, the source code of the object is compared
to that of the reference object. Identified differences are marked. Previously
opened views are not closed. Besides the project compare view, any number of
compare views can be open and read at the object level.
To resolve the determined differences, decide whether the state from the ref-
erence project should be applied to the current project. Applying from the
current project to the reference project is not possible. Enable the transfer in
the active compare view, for example, different lines or blocks of code using
either the , or the command. These positions are highlighted in yellow.
Make sure that any other open compare views are inactive (write-protected,
read-only). therefore, you can activate differences to be accepted in exactly
one comparison view only. If supported by the editor, you can add a third
compare view. This third view shows the result of the resolution actions for the
differences.
When exiting the active compare view, if you confirm that the differences that
are activated for acceptance are actually accepted into the current project, then
the current project is modified.
In order to exit the project comparison completely, close the project compar-
ison view.
Also refer to
● ⮫ Chapter 'Compare’ command on page 917

10.2 Open detailed compare view


The following description refers to a project comparison in the context of PLC
programming, but is also applicable to the comparison of device configurations
or fieldbus configurations.
Prerequisite: For example, a user changed the code in a POU of the current
project. You have performed the project comparison by clicking on“Project
🠂 Compare”. The project compare view shows this POU highlighted in red in
the opposing project trees.
1. Double-click the line of the aligned POU versions.
🡆 The compare view switches to the detailed compare view of the POU.
The modified code lines are highlighted in gray and written in red.
2. Click on .
🡆 Code lines with changes (red) are extended by two lines: an line with
insert (left, green) and a line with delete (right, blue).

R911403764, Edition 08 Bosch Rexroth AG


72 / 1158 ctrlX PLC Engineering
Creating compare views

3. Click again.
🡆 The code line is marked again as modified.
4. Move the mouse pointer to the code line marked as modified and click
“Accept single”.
🡆 The code line from the reference project is activated for acceptance
into the current project.
5. If available, click on to add a third pane.
🡆 Below the two panes that contrast the code of the current object and
the reference object, a third pane is shown. It shows the result of
the actions you have to make to resolve the differences between the
current object and the reference object. For these actions, additional
buttons are available in the taskbar of the detailed compare view. For
further information, see:
⮫ 'Compare’ command
6. Click on .
🡆 The project compare view of the entire project is displayed. It is write-
protected (read-only) to prevent you from activating differences for
acceptance. The link highlighted in yellow above the tree view also
indicates this.
7. Click on the link “The project compare view is read-only because there are
unconfirmed changes in another view. Click here to switch to the modified
view.”.
🡆 The detailed compare view opens again. The unconfirmed changes are
highlighted in yellow.
8. In the view tab, click and confirm that the changes are to be saved.
🡆 The detail project view is closed and the POU is overwritten. Now it
corresponds to the POU of the reference project. The project view is
active again, so you can continue working in the project comparison.
If you do not click on the link and instead close the editor of the project com-
pare view by clicking on , you can also confirm the transfer of the changes to
the current project. The detailed changes are applied and the project compar-
ison is closed.
Also refer to
● ⮫ 'Compare’ command
● ⮫ Creating compare views

10.3 Creating compare views


Prerequisite: You have made changes in your current project and want to com-
pare it with the last saved version, for example. In the meantime, you have,
for example, added more programming blocks, removed a POU, changed some
code lines in function blocks or the object properties.
1. Click on “Project 🠂 Compare”.
🡆 The “Project comparison” dialog is displayed.
2. Specify the path of the reference project, for example, the path of the last
saved version of your current project.
3. The comparison option “Ignore spaces” is to remain enabled.
4. Click on “OK”.
🡆 PLC Engineering opens the comparison view. Title: “Project comparison
- Differences” The device trees of the current project and the reference
project are compared and the changed objects are highlighted.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 73 / 1158
Creating compare views

5. Select an object highlighted in blue in the reference project tree (right).


This object is no longer included in the current project.
Click on “Accept single”.
🡆 PLC Engineering adds the object in the tree of the current project
(left). The line is highlighted in yellow. The symbol appears in the
middle column.
6. Select an object marked in green in the tree of the current project (left).
This object is not included in the reference project.
Click on “Accept single”.
🡆 PLC Engineering removes the object from the tree of the current
project again (left). The line is highlighted in yellow. The symbol

Comparing Projects
appears in the middle column.
7. If PLC Engineering has detected changes in the content for an object that
is included in the current project and in the reference project, this is
indicated by red text. Double-click on the object to switch to the detailed
comparison view of the object.
8. Close the comparison view and select whether or not to save the changes
with“Yes”.
🡆 The changes are implemented in the project.
Also refer to
● ⮫ Chapter 'Compare’ command on page 917
● ⮫ Chapter 10.2 Open detailed compare view on page 71

R911403764, Edition 08 Bosch Rexroth AG


74 / 1158 ctrlX PLC Engineering
Creating compare views

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 75 / 1158
Project encryption with certificates

11 Protecting and saving the project


11.1 Write and access protection – Basic information
You can protect a project from accidental modification via access and write
protection. You can additionally provide it with a read protection (know-how
protection).
Write protection:
To apply simple write protection to the entire project, there are the following

Protecting and saving the project


options:
● When opening the project, select the “Open read-only” option.
● In the “Project information”, set the “Released” status.
● Activate the “read-only" option in the properties of the project file in the
local file system.
To protect only certain objects in a project from modifications, or to grant
access only to certain users, use user and access rights management (see
below). Some target devices also support user and rights management. Thus,
access from PLC Engineering to objects and files on the target device might be
restricted.
However, write protection and access protection do not serve as know-how
protection of the function blocks! Both PLC Engineering, Automation platform
plug-ins, and persons with knowledge of the project file format can view or
modify blocks created with PLC Engineering.
Know-how protection:
A project is know-how-protected by encrypting the project file. Either by using
a project password or a Codesys security key (dongle) or with the help of a
certificate. Protection via the key or certificate is recommended as in this case
there is no need to share sensible data between authorized users. The desired
type of project encryption is activated in the project settings.
Know-how protection of a library is achieved by providing it as a target
system-independent "protected library"(*.compiled-library, *.compiled-
library-v3). In this format, the library file no longer contains source code,
but only encrypted precompile context. The compiler is still able to interpret
this data. Whether access is still possible by other components or additional
plug-ins depends on their functionality and has to be taken into consideration
on a case-by-case basis. The protection can be further increased by signing.

Related topics
⮫ Chapter 11.3 User administration and password manager on page 76
⮫ Chapter 11.8 Protecting projects using a dongle on page 80
⮫ Chapter 11.7 Assigning passwords on page 79
⮫ Chapter 11.10 Protecting Objects in the Project by Access Rights
on page 81

11.2 Project encryption with certificates


In PLC Engineering, projects and applications can be encrypted with certifi-
cates and signed in order to protect them from unauthorized access.
To do this, you can configure specific security settings for each individual user
profile. These settings are always used automatically when the user works with
PLC Engineering projects. Therefore, they do not have to be redone for each
project. The general configuration of the security features for a user profile
is done in the “Security screen” view of PLC Engineering. See the individual
instructions below.

R911403764, Edition 08 Bosch Rexroth AG


76 / 1158 ctrlX PLC Engineering
User administration and password manager

You can also encrypt a project file or an application for download or online
change directly with a certificate:
● User-independent encryption for the current project is configured in the
“Security” category of the “Project settings” dialog.
● User-independent encryption of the application is configured in the
“Properties” dialog of the application object.
When you encrypt a project, an application, or online
NOTICE
code with a certificate, you will always require the certif-
icate with a private key in order to open the object again.
If the add-on product CODESYS Security Agent is installed, the “Security
screen” view provides an additional “Devices” tab. It allows the configuration of
certificates for encrypted communication with controls.
Certificates, Windows Certificate Store
All available certificates are located in the Windows Certificate Store
(“certmgr”) on your computer. There are two types of keys:
● Certificates with private keys
– for file decryption
– for digital signatures
● Certificates with public keys
– for file encryption
– for verifying digital signatures
Usually, the local Windows Certificate Store is filled with certificates by the
computer's IT administrator. Certificates are either created using special tools
or requested from a trusted certification authority (CA).
If you receive a certificate file that you need to install yourself in the Windows
Certificate Store, then double-click the file in the store directory. Depending
on the type (certificate with private or public key only), the appropriate import
wizard will appear.
Also refer to
● ⮫ Chapter 31.2 General information on page 373
● ⮫ Chapter 11.12 Encrypting the project with a certificate on page 84

11.3 User administration and password manager


User accounts with different rights can be managed in PLC Engineering. For
each account you can define the actions with which the user can access a
project object.
You configure the user administration in the “project settings” in the category
“Users and groups”.
Before creating users and groups, please note the following:
● Rights can only be assigned to user groups. Therefore, you must assign each
user to a group.
● There is automatically always a group Everyone and by default every user
and every other group is initially a member of this group. Thus each user
account is automatically equipped with at least the defined standard rights.
You cannot delete the group Everyone, you can only rename it, and you
cannot remove members from this group.
Caution: By default, not everyone has the right to change the current user,
group and rights configuration!
● Automatically there is always a group Owner, which contains a user Owner.
As of V3.5, in a new project initially only the owner has the right to change
the current user, group and rights configuration! Hence, only Owner can
assign this right to another group.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 77 / 1158
User administration and password manager

Initially, the owner can log in with the user name owner and a blank pass-
word.
You can add further users to the group Owner or remove users from it, but
at least one member must be retained. Like Everyone, you cannot delete
the group Owner and it always possesses all access rights. This prevents
a project from being rendered unusable by denying all access rights to all
groups.
You can rename both the group Owner and the user Owner.
● If the programming system or a project is restarted, no user is initially

Protecting and saving the project


logged in to the project. However, the user can then login via a certain user
account with user name and password in order to obtain the access rights
defined for the account.
● Each project has its own user management! For example, to be assigned
certain access rights to a library included in the project, the user has to
explicitly log in to the library project.
Users and groups defined in different projects are not the same, even if they
have the same names.
● A user management in a project only recommended if it is connected to
the corresponding rights assignment for the access to project and objects.
The general rights management for a project is realized in the “Rights”
dialog of the “User administration”. You can also change the access rights
to an individual project object on the “Access control” tab of the object's
“properties”.
● For logging in and logging out to/from a project as a defined user, there
are standard menu commands under “Project 🠂 User administration”. A
password manager permits the management of the access data on your
computer.
As of V3.5, initially only the owner has the right to change the current user,
group and rights configuration in a new project! Hence, only Owner can assign
this right to another group.
PLC Engineering stores the user passwords inaccessibly.
NOTICE
If you forget a password, the user account becomes
unusable. If you forget the owner password, the whole
project may become unusable!
Password manager
The password manager allows you to save the access records that you enter
during the access data for projects. It is accessible via a button in the login
dialog and offers fast access to the access data currently required. This can be
useful for example when working simultaneously with multiple library projects
protected by different passwords.
The password manager itself is protected by an individual master password.
If you want to use the password manager for the first time, PLC Engineering
prompts you to define this password in the password manager configuration
dialog. PLC Engineering remembers the master password until you end the
current PLC Engineering session. You will need to enter the password whenever
you want to log into the password manager for the first time during a new
session or after you have changed it.

Related topics
⮫ Chapter 11.10 Protecting Objects in the Project by Access Rights
on page 81
⮫ Chapter 11.11 Logging in via user account and password manager
on page 82

R911403764, Edition 08 Bosch Rexroth AG


78 / 1158 ctrlX PLC Engineering
Setting up write protection

11.4 Rights management


Rights management for access to a project and objects in a project is necessary
in order to make a user management meaningful.
Configure the general rights management for a project in the “Rights” editor of
the “User management”. The access rights to an individual project object can
also be changed on the “Access control” tab of the “Properties” dialog of the
object.
Before assigning rights, please observe the following:
● In a new project, PLC Engineering sets all rights to perform actions to
objects with the default value "allowed" (default right). The only exception is
the right to change the current configurations for users, groups and rights.
Initially only the 'Owner' group has this right.
● If you are member of a group that is permitted to change rights, you can do
this at any time for each right when working further on a project. You change
a right by switching between 'allowed' and 'forbidden' or by resetting to the
default.
Also refer to
● ⮫ Chapter 11.9 Setting up the user administration on page 80
● ⮫ Chapter 11.10 Protecting Objects in the Project by Access Rights
on page 81

11.5 Project repository – Saving


Provide the project file with the desired protection before saving it in the file
system; see above. For a read-only project file you are given various options so
that you can still save the file, depending on the type of write protection.
If the project is to be opened later in an older PLC Engineering version, it
makes sense to save the project for exactly this version (file type), since PLC
Engineering also informs you immediately about any data loss in the course of
this storage action.
If you want to save library projects, follow the rules for creating libraries. Also
consider installing a library directly into a library repository.
If you want to continue using a project on another computer, it is recom-
mended to save not only the project file, but to create a project archive from all
relevant additional files.
You can make a setting so that a backup copy of this project is created each
time the project is saved. In addition you can configure so that projects are
generally automatically saved at certain time intervals.
If you want to keep projects in a source code management, consider the
corresponding add-ons for PLC Engineering. For example, the link to SVN is
supported.

Related topics
⮫ Chapter ‘Options’ dialog - ‘Load and save' on page 1084
⮫ Chapter 11.13 Saving the project on page 85
⮫ Chapter 11.13 Saving the project on page 85
⮫ Chapter 11.14 Saving/sending the project archive on page 87
⮫ Chapter 11.15 Linking a project to the source control system on page 88

11.6 Setting up write protection


A project can be protected against inadvertent changes by means of access
and write protection. In addition, however, it can also be provided with read
protection (know-how protection). You have the following options.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 79 / 1158
Assigning passwords

Open the project with write protection


Prerequisite: a project is not opened.
1. Click on “File 🠂 Open Project”.
🡆 The “Open Project” dialog opens.
2. Select the project.
3. At “Open” button, click the arrow button and select “Open read-only”
from the menu.
🡆 PLC Engineering opens the project. At the top right in the main window

Protecting and saving the project


a line appears “'The project cannot not be saved…'”. Now choose one
of the provided options if you want to save the project file.

Providing projects with the attribute 'Released'


Prerequisite: Project is open.
1. Select “Project 🠂 Project information” then the“Summary” tab.
2. Activate the option “Released”, confirm with “OK”.
3. Save the project, for example with [Ctrl]+[S].
4. Open the project again by clicking on“File 🠂 Open Project”.
🡆 PLC Engineering opens the project. At the top right in the main window
a line appears “'The project cannot not be saved…'”. You can now use
the option offered to remove the “Released” status again directly if you
want to save the project file.

Providing a project in the file system with the property 'Read-only'


Provide the project file in its local file system with the property attribute
'Read-only'.
🡆 If you had already opened the project and you now attempt to save
it under the same name, a dialog appears informing you about the
existent write protection. This dialog provides you with the following
options:
The “Save as...” button allows to save the project under a different
name or path.
You can deliberately save the project under the same name and path
and thus overwrite the existing version in the file system using the
button “Overwrite”.
You can abort the saving procedure using the “Cancel” button, for
example to remove the write protection on the disk.
When opening the project again, the line The project cannot not
be saved… is displayed in the upper right of the main window.

Also refer to
● ⮫ Chapter 11.1 Write and access protection – Basic information on page 75

11.7 Assigning passwords


Prerequisite: The project is open.
1. Select “Project 🠂 Project settings” then “Security” category.
🡆 “Project setting/security” dialog opens.
2. Select the “Encryption” option.
🡆 The option fields “Password”, “Dongle”, and “Certificates” are select-
able.

R911403764, Edition 08 Bosch Rexroth AG


80 / 1158 ctrlX PLC Engineering
Setting up the user administration

3. Select the “Password” option.


🡆 The input fields for the encryption password appear.
4. Enter the encryption password in the “New Password” input field.
5. Enter the encryption password for confirmation in the input field “Confirm
new password”.
6. Click on “OK”.
🡆 PLC Engineering saves the encryption password for the project.
If you no longer know the encryption password, you can
CAUTION
no longer open or restore the project!
Also refer to
● ⮫ Chapter 'Project settings' dialog - 'Security' on page 1064

11.8 Protecting projects using a dongle


Prerequisite: The project is open and a Codesys Security Key (dongle) is con-
nected to your computer.
1. Select “Project 🠂 Project settings”, then the “Security” category.
🡆 The “Project settings/security” dialog opens.
2. Select the “Encryption” option.
🡆 The option fields “Password”, “Dongle”, and “Certificates” are select-
able.
3. Select the “Dongle” option.
🡆 The dialog with the selection list “Registered dongles” and the buttons
“Add”,“Remove”,“Comment”,“Blink” opens.
4. Click on “Add”.
🡆 The “Add registered dongle” dialog opens.
5. Select the Codesys security key (dongle) from the “Dongle” selection list
and optionally enter a comment.
6. Click on “OK”.
🡆 The added dongle is listed in the list “Registered dongles”.
7. Click on “OK”.
🡆 The dongle is now registered for the project.
If the Codesys security key registered for the project is
NOTICE
lost, it is not possible to open the project or to restore it.
Also refer to
● ⮫ Chapter 'Project settings' dialog - 'Security' on page 1064

11.9 Setting up the user administration


This is about user administration for a PLC Engineering project file. Visualiza-
tions and devices can have their own user management.
The following guide describes how you can adapt the user administration for
the first time in a project. It deals with the definition of a user and a group to
which he belongs.
Prerequisite: the project for which the user administration is to be set up is
opened. There is no adapted user configuration yet.
1. Select “Project settings 🠂 Users and groups”, “Users” tab. The user Owner
is already created by default.
2. Click on “Add”.
🡆 The “Add user” dialog is displayed.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 81 / 1158
Protecting Objects in the Project by Access Rights

3. Enter a login name, for example 'Dev1', and a password. Leave the option
“Activated” activated. Click on “OK”.
🡆 Upon the first creation of a group, PLC Engineering now prompts you to
authenticate yourself as authorized for this action.
In this case, enter 'Owner' as the “current user”. Do not enter a
“password”, just click “OK”.
The user Dev1 appears in the list and is automatically a member of
the group 'Everyone'.

Protecting and saving the project


4. Change to the tab “Groups”, in order to add the user to a new group.
🡆 The groups Everyone and Owner have already been created.
5. Click on “Add” to access the “Add group” dialog.
6. Specify at least one name for the new group, for example 'Developers'. In
the “Members” field, check the “User 'Dev1'” entry. Click on “OK”.
🡆 The group “Developers” now appears with has user member 'Dev1'.
7. Switch to the “Users” tab.
🡆 The user “Dev1” now appears as a member of the groups 'Everyone'
and 'Developers'.
Use the “Export/import functionality” in the “Project settings” dialog in the
“Users and groups” category, to apply the user administration from another
project.
Also refer to
● ⮫ Chapter 11.3 User administration and password manager on page 76
● ⮫ Chapter 'Project settings' dialog - 'Users and groups' on page 1061
● ⮫ Chapter 'Project settings' dialog - 'Users and groups' on page 1061

11.10 Protecting Objects in the Project by Access Rights


Protection of individual objects by setting access rights in the “Rights” editor
1. Select “Project 🠂 User Management 🠂 Rights”
🡆 The window of the “Rights” editor opens. On the left you can see the
action categories, on the right the currently existing user groups.
2. Expand the relevant action category and below it the action for which you
wish to change a right.
3. Select the goal of the action in the “Actions” window. In the “Rights”
window, select the group for which you would like to change the right.
Multiple selection is possible.
🡆 The buttons in the symbol bar are active.
4. Click on the appropriate button in order to change the right of the group
for the action on the target object.
🡆 PLC Engineering updates the symbol in front of the group according to
the new right. The right is immediately effective.
See also
● ⮫ Chapter 33.4.2 Dialog 'Permissions' on page 1035

Protection of individual objects by setting access rights in the object properties


Here you can configure whether the members of a group have the right to view,
edit or remove the object and to add/remove child objects to/from the object.
1. Select the object in the navigator tree.
2. In the context menu, select the command “Properties” and in the dialog
box select the category “Access Control”.

R911403764, Edition 08 Bosch Rexroth AG


82 / 1158 ctrlX PLC Engineering
Logging in via user account and password manager

3. In the table under “Groups, Actions and Permissions”, double-click on the


symbol of the right that you wish to change.
🡆 A selection list of the possible rights appears: “Grant”, “Deny”, “Clear”.
4. Select the desired right and click on “Accept” or “OK”.
🡆 The right is immediately effective for the action and group. The symbol
changes accordingly.
See also
● ⮫ Chapter Dialog 'Properties' - 'Access Control' on page 1049

11.11 Logging in via user account and password manager


Logging in to a project without using the password manager functions

Prerequisites
● A project is opened
● You have the necessary access data for the project

The following action instruction describes how to log in to a project as a


defined user in order to edit it.
1. Select “Project 🠂 User administration 🠂 Log in user...”.
🡆 The dialog “Login” opens.
2. Select the project file from “Project/library” and enter the required access
data “User name” and “Password”.
3. Login with “OK”.
🡆 If another user is already logged in, this user will automatically be
logged out by the new login.

Setting a master password for the password manager


Prerequisite: A project is opened. You have opened the “Log In” dialog to log in
to a project as a defined user. You want to use the password manager to save
the access data.
1. Select “Project 🠂 User administration 🠂 Log in user...”.
2. In the “Login” dialog, click on .
🡆 If you are working for the first time with the password manager, the
dialog “Password manager configuration” opens.
3. Enter a character string as the future master password. Confirm it in the
second line and click “OK”.
🡆 PLC Engineering remembers the master password until you end the
current PLC Engineering session. You will need to enter this password
whenever you want to log into the password manager for the first time
during a new session or after you have changed it.
If you have forgotten your master password, you no
NOTICE
longer have any possibility to access the access data
already saved! In this case you can only reset the pass-
word manager. After that you must start again to save
passwords in the manager!

Saving credentials in the password manager


Prerequisites
● A project is opened
● You have the necessary access data for the project
● The access data are not yet stored in the password manager

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 83 / 1158
Logging in via user account and password manager

1. Select “Project 🠂 User administration 🠂 Log in user...” to get the “Login”


dialog.
2. Select the project file from “Project/library”.
3. Enter the user name and password for the project.
4. Click on the button.
🡆 If you are working for the first time with the password manager, you
will be requested to define a master password. Refer to the "Set master
password for password manager" tutorial above.

Protecting and saving the project


Upon entering the password manager in this PLC Engineering session
for the first time, you are prompted to enter the master password.
5. Enter the master password when requested to do so.
🡆 The password manager menu appears.
6. Select the option “Save access data locally on this computer”.
🡆 The login takes place. The data are saved in the password manager.

Getting the credentials from the password manager


Prerequisites
● A project is opened
● You have the necessary access data for the project
● The access data are already stored in the password manager
1. Select the command “Project 🠂 User administration 🠂 Log in user...” to
get the “Login” dialog.
2. Click on the button.
🡆 If you are working for the first time with the password manager, you
will be requested to define a master password. Refer to the "Set master
password for password manager" tutorial above.
Upon entering the password manager in this PLC Engineering session
for the first time, you are prompted to enter the master password.
3. Enter the master password when requested to do so.
🡆 The password manager menu appears.
4. Select the appropriate entry “Use saved access data for <user name>”.
🡆 The login takes place automatically with the data read from the pass-
word manager.

Opening the password manager, changing the master password


Prerequisite: A project is opened. You want to open the password manager to
view the entries, edit them or change the master password. You have already
logged in once with the master password.
1. Select “Project 🠂 User administration 🠂 Log in user...” to get the “Login”
dialog.
2. Click on .
Select “Open password manager”.
🡆 The password manager window opens.
3. Click “Change Master Password” and make the change.

Logging out from the project


Prerequisite: A project is opened. A user is logged in, which is recognizable by a
name entry in the field “Current user” in the status bar.

R911403764, Edition 08 Bosch Rexroth AG


84 / 1158 ctrlX PLC Engineering
Encrypting the project with a certificate

Select “Project 🠂 User management 🠂 Logout user...”. Alternatively,


double-click on the field “Current user” in the status bar.
🡆 If the user is logged in to only one project, he will now be logged out
without further interaction. “(nobody)” is displayed again in the field
“Current user” in the status bar
If the user is logged in to several projects, the dialog “Logout” opens.
Specifically select the project for which the user is to be logged off.

Also refer to
● ⮫ Chapter 11.3 User administration and password manager on page 76
● ⮫ Chapter Command 'User management' – 'Log in User' on page 924
● ⮫ Chapter 11.9 Setting up the user administration on page 80

11.12 Encrypting the project with a certificate


Configuring a certificate for project file decryption for a user profile
If a project is encrypted with a certificate, this certificate is required for
decryption in order to open the project. You can assign such a certificate to
specific user profiles. Select the certificate from the Windows Certificate Store
on the “Users” tab of the “Security screen”.
1. Double-click on in the status bar or select the command “View
🠂 Security screen”.
🡆 The “Security screen” view opens.
2. In the “Users” tab, select the user profile whose communication is to be
encrypted. By default, the user profile you used to log in to Windows
on your computer is specified. However, you can also create a new user
profile via .
3. In the “Project file decryption” section, click on the button.
🡆 The “Certificate selection” dialog opens.
4. In the “Available certificates” listing in the local Windows Certificate
Store, select a certificate with a private key. Certificates with a private
key are marked with the symbol .
5. Click on the button
6. The certificate will be added in the upper window of the dialog.
7. Click on “OK” to confirm the entries.
🡆 The selected certificate is displayed in the “Security screen” in the
“Project file decryption” section.

Encrypting the project with a certificate


A project encrypted with a certificate in connection with a user administration
allows for a targeted restricted access to the project.
1. Select the command “Project 🠂 Project settings” and then “Security”cate-
gory.
🡆 The “Project settings/security” dialog opens.
2. Select the “Encryption” option.
🡆 The “Password”, “Dongle” and “Certificates ” radio buttons are avail-
able.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 85 / 1158
Saving the project

3. Select the “Certificates” option.


🡆 The list of certificates available for the project encryption appears in
the lower part of the dialog. If no certificate has been entered yet,
select a suitable certificate in the “Certificate selection” dialog after
clicking on and return to the “Project settings” dialog. The certificate
is now registered for encryption. Now the project can be edited only on
computers of users who also have the file decryption certificate.

Deleting the certificate in user profile

Protecting and saving the project


You delete the certificate in the “Security screen” view, either directly on the
“Users” tab or in the “Certificate selection” dialog. In the other dialog, the
certificate is also deleted.
● “Security screen” dialog, “User” tab, “Digital signature” or “Project data
decryption”: Select a certificate and click on
● “Certificate selection” dialog: In the “Security screen” dialog, “Users” tab,
click on . In the “Certificate selection” dialog, select the certificate to be
deleted in the upper field and click on .

Configuring a certificate for digital signature for a user profile


To ensure that the project is not only encrypted with a certificate, but that its
authorship and integrity can be verified, add a signature to the project:
1. Double-click on in the status bar or select the command “View
🠂 Security screen”.
🡆 The “Security screen” view opens.
2. On the “Users” tab, select the user profile for which you want to create
the digital signature. By default, the user profile you used to log in to
Windows on your computer is specified. However, you can also create a
new user profile via .
3. In the “Digital Signature” section, click on the button .
🡆 The “Certificate selection” dialog opens.
4. In the “Available certificates” listing in the local Windows Certificate
Store, select a certificate with a private key. Certificates with a private
key are marked with the symbol .
5. Click on the button.
🡆 The certificate will be added in the upper window of the dialog.
6. Click on “OK” to confirm the entries.
🡆 The selected certificate is displayed in the “Security screen” in the
“Digital signature” section.

Also refer to
● ⮫ Chapter 11.2 Project encryption with certificates on page 75
● ⮫ Chapter 33.4.19 'Certificate selection' dialog on page 1046
● ⮫ Chapter 'Project settings' dialog - 'Security' on page 1064
● ⮫ Chapter 18.13 Encrypting the application on page 153

11.13 Saving the project


Saving a project under the same name
Prerequisite: The project is open. The project file is not write-protected.

R911403764, Edition 08 Bosch Rexroth AG


86 / 1158 ctrlX PLC Engineering
Saving the project

Select “File 🠂 Save”.


🡆 PLC Engineering saves the project file with the current project name,
which appears in the title bar of the main window. If the project has
been changed since it was last saved, then the project name is pro-
vided with an asterisk. A backup copy is created if it is set in the PLC
Engineering options in the “Load and Save” category.

Saving a project under a different name or format


Prerequisite: The project is open.
1. Select “File 🠂 Save as...”.
🡆 The “Save project” dialog is displayed.
2. Select a storage location in the file system and the desired “file type” and
storage version. If you want to open the project later in an older version,
then it makes sense to save for precisely this version, as you will then be
informed immediately in the message view about possible data loss.
🡆 If the project file is not write protected, then PLC Engineering saves it
in the selected path. Otherwise you will be informed how to proceed.
3. If the current project contains add-ons that are not included in the desired
memory version, the “Extend profile” dialog opens.
4. Select the add-ons to extend the memory profile in order for the add-on
data to be saved.
5. If you want to save the storage profile permanently click on“Save profile”
and enter the desired name in the “Enter profile name” dialog.
6. In the “Expand profile” dialog, select the “Use saved profile” option and
confirm the dialog with “Yes”.
🡆 PLC Engineering saves the project with the saved profile.

Saving a read-only project


Prerequisite: A read-only project is opened.
Select “File 🠂 Save”.
If the write protection was assigned in PLC Engineering, then it will be dis-
played by a line in the top right corner of the main window. Depending on the
current situation you will be offered one or more of the following actions so
that you can still save the project:
● “Save project under a different file name on the disk”: Is always displays and
leads to the “Save file” dialog as with the “Save file as...” command.
● “Exit read-only mode”: Is displayed if the option“Open read-only” was
selected when opening the project.
● “Remove the write-protect attribute from the project on disk”: Is displayed if
the project file was write-protected in the local file system at the time it was
opened.
● “Remove the "Released" flag in the project information”: Is only displayed if
this attribute is currently set.
If the write protection was assigned outside of PLC Engineering in the prop-
erties of the project file in the file system, you will be offered the following
options when you attempt to save under the same name and path:
● “Save as...”: By using the “save project as...” command, you can save the
project under a different name.
● “Overwrite”: The write protection is removed from the project file and it is
saved under the existing name.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 87 / 1158
Saving/sending the project archive

1. Click the line in the top right corner of the main window that indicates the
write protection.
🡆 The current options with which you can still save the project appear in
a selection menu.
2. Select one of the options offered and perform any necessary actions.
3. Select the command “File 🠂 Save” or “File 🠂 Save as...”
🡆 The project can be saved.

Protecting and saving the project


Saving of the project automatically; creating a backup copy
Prerequisite: The project is open.
1. Select “Tools 🠂 Options”, “Load and save” category.
🡆 The “Load and Save” dialog opens.
2. Activate the “Create backup copy” option.
3. Enable the option “Save automatically every ... minute(s)” and select a
time interval.
4. Click on “OK” to close the “Options” dialog.
🡆 Upon each time the project is saved, PLC Engineering a backup copy
<Project name>.backup is additionally created.
PLC Engineering automatically saves the project at the specified time
interval to a file <Project name>.autosave in the project directory.
If you open the project again after the development system was closed
irregularly, then this file will be offered to you as an alternative to the
file last saved by the user.

Also refer to
● ⮫ Chapter ‘Options’ dialog - ‘Load and save' on page 1084

11.14 Saving/sending the project archive


You can configure a project archive and then save it in the file system or send it
directly in an e-mail.
To send, follow the guide below as far as point 9. Click on the “Send” button
instead of on“Save to” to open the default email program directly. Automati-
cally, a new e-mail attached with the project archive file is created.
Prerequisite: a project is opened.
1. Select “File 🠂 Project Archive 🠂 Save/Send Archive”.
🡆 The “project archive” dialog is displayed.
2. Add a check in the checkbox of each object that should be saved to the
archive.
Libraries that are unprotected, i.e. not available as "compiled libraries",
are not automatically included in the repository by PLC Engineering due
to the know-how protection. If you explicitly select this kind of library in
the list of information to be included, then you will receive a respective
warning.
3. If you want to add more files to the archive, click on“Additional files”.
🡆 The “Additional files” dialog opens.
4. Click on “Add”.
5. Select the files and click “Open”.
🡆 The files are added to the list of additional files.
6. Click on “OK”.

R911403764, Edition 08 Bosch Rexroth AG


88 / 1158 ctrlX PLC Engineering
Linking a project to the source control system

7. Click on “Comment”.
🡆 The dialog “Comment” opens.
8. Enter a comment and click “OK”.
9. Click the “Save” button.
10. Select a location and a file name and click “Save”.
🡆 The project archive is saved in the file directory.
Also refer to
● ⮫ Chapter Command 'Save project' on page 870
● ⮫ Chapter Command 'Save project as' on page 871

11.15 Linking a project to the source control system


To link your PLC Engineering projects to a source control system, check the
following option:
The CODESYS SVN add-on provides the capability of directly linking to an SVN
database. You can get the package at the CODESYS Store and install it with the
help of the Package Manager.
Refer to the corresponding help when using CODESYS SVN.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 89 / 1158

12 Logging in and logging off to/from the con-


trol
Each access to the control requires that the user is logged in to the control.

Logging in and logging off to/from the control


Login via context menu
The login command is contained in the context menu of the control node in the
device tree.

Fig. 6: Command - Logging in device user...


The command opens the “Login - [Control IP address]” dialog by entering the
login data for the control (user name & password).

Fig. 7: Dialog - Login - [Control IP address]


The Engineering system “remembers” the entered login data until the next
restart. Consequently, the login dialog is not displayed each time the user
wants to log in.
When enabling the checkbox “Save login data for this device”, the login data
in the Windows Credential Manager and are available after a restart of the
Engineering system.
Confirm the settings with “OK”.
The Engineering system connects to the control.

R911403764, Edition 08 Bosch Rexroth AG


90 / 1158 ctrlX PLC Engineering

The logged in device user is displayed in the status bar.

Login via status bar


The status bar indicates whether or not a device user is logged in to the ctrlX
device.
If a device user is logged in, the user name is displayed in the status bar.
In the following example, the "boschrexroth" device user is logged in to the
ctrlX device.

Fig. 8: Status bar - with logged in user "boschrexroth"


If no user is logged in, double-click on the “Device user” field to open the login
dialog (see above).

Fig. 9: Status bar - without logged in user

Automatic logoff by function call


Each time a command requiring a login is executed, it is verified if a device user
is logged in. If not, a login dialog, see above.

Logoff via context menu


If a device user is logged in, the user can be logged off using the “Log out
current device user” command in the context menu of the control node, see
⮫ Chapter Command “Log out current device user” on page 913.
Please note that logging off might also cause a logoff
NOTICE
from the control!

Fig. 10: Command - Log out current device user

Logoff via status bar


If a device user is logged in to the control, a prompt is displayed when double-
clicking on the “Device user” field, asking the user if the device user should be
logged off.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 91 / 1158

Logoff by exiting
When exiting the Engineering system, a logged in device user is automatically
logged off from the control.
Upon a new login, the login data has to be entered again unless the user has
enabled th option to save the login data, see ⮫ Chapter 33.4.3 Dialog “Login -
[Control IP address]” on page 1037.

Logging in and logging off to/from the control


Further information:
● ⮫ Chapter Command “Logging in device user...” on page 912
● ⮫ Chapter Command “Log out current device user” on page 913
● ⮫ Chapter 33.4.3 Dialog “Login - [Control IP address]” on page 1037

R911403764, Edition 08 Bosch Rexroth AG


92 / 1158 ctrlX PLC Engineering

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 93 / 1158
Creating a GVL twin

13 Connection to the ctrlX real-time data


system
The Data Layer on ctrlX devices facilitates the exchange of real-time data. Here,
among other things, the data from EtherCAT I/O or the PROFINET device are
mapped. The real-time data is used by ctrlX PLC Engineering to include I/O

Connection to the ctrlX real-time data system


points in the PLC project. Additionally enables ctrlX PLC Engineering to publish
individual data areas on the Data Layer to publish in real time.

Functional principle
The integration of PLC-specific data as real-time data into the PLC project
is realized via Global Variable Lists (GVL), which contain the data to be
exchanged. From these GVLs, GVL twins are created as I/O nodes below a
so-called DataLayerOwner node is created. The data from the GVL is mapped
as I/O variable.
● If PLC data is to be made known on the Data Layer real-time, the data is to
be mapped to output values (%Q)
● If data from the Data Layer real-time is to be processed in the PLC, they have
to be mapped as input values (%I).

When using multiple applications, the following has to be complied with


Since real-time data is exchanged via I/Os, the selection of the application
for I/O exchange plays a decisive role. Only GVLs that are located below the
application node responsible for the I/O exchange can be used.
If the application for the I/O exchange is subsequently changed, the complete
DataLayerOwner node with all GVL twins is removed and a new DataLayer-
Owner node is created. The new DataLayerOwner node is assigned the name of
the parent application that is responsible for the I/O exchange.

13.1 Configuring DataLayerOwner nodes


At the DataLayerOwner node, GVL twins can be created and managed. GVL
twins are required for mapping the real-time I/O data.
To create a DataLayerOwner node in the project, proceed as follows:

1. Open the context menu of the node “DataLayer_Realtime” in the ctrlX PLC
Engineering device tree
2. Click on “Add 🠂 PLC real-time data”
🡆 The DataLayerOwner node is created below the “DataLayer_Realtime”
node

13.2 Creating a GVL twin


Prerequisite
To create a GVL twin, a compatible GVL has to be available in the project or has
to be created, see ⮫ Object 'GVL' - Global Variable List.

Since a GVL twin can be either of type output or of type input, this should be
taken into account when assigning the GVL name, since this name is also used
in the Data Layer and the OPC UA Pub/Sub browser, for example for the type
output, the name GVL_RtOut
There are two ways to generate GVL twins. Either via the GVL node below
the application, or via the DataLayerOwner node, in each case via the context
menus in the device tree.

R911403764, Edition 08 Bosch Rexroth AG


94 / 1158 ctrlX PLC Engineering
Creating a GVL twin

Creating a GVL twin via the GVL node

Crating a GVL twin via the DataLayerOwner node

Result
Under the DataLayerOwner node, the GVL twin is created and the source GVL
is assigned the attribute:'Plc2RealtimeDatalayer'
The attribute has a function and determines the direction of data exchange:
● 'Plc2RealtimeDatalayer' = data is transferred from the PLC to the Data
Layer real-time
● 'RealtimeDatalayer2Plc' = data is transferred from the Data Layerreal-
time to the PLC

Example: GVL twin of type "Output"

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 95 / 1158
PLC program download

Note
● If a GVL with a GVL twin attribute is imported, the corresponding GVL twin
is automatically created in the project
● If no variable of the GVL is used in the PLC program, no data exchange takes
place via the I/O exchange

13.3 Consistency checks and error messages

Connection to the ctrlX real-time data system


Consistency checks are performed automatically when adding, deleting and
modifying GVLs and GVL twins according to the following rules:
● When a GVL is deleted, an existing GVL twin is also deleted
● If the real-time attribute is deleted in a GVL, the associated GVL twin is also
deleted
● When a GVL twin is deleted, the real-time attribute is also removed in the
GVL
● A GVL that has a GVL twin cannot be renamed
● If a GVL contains data types that are invalid for GVL twins, this is reported
when a GVL twin is to be created. In this case, no GVL twin is created.
● If a variable with an invalid data type is added to a GVL that has a GVL twin,
this is reported and the GVL twin is removed

13.4 PLC program download


With the PLC program download, the data of all GVL twins is stored in the Data
Layer of the ctrlX device.
Below the [‚plc / app / Application‘] node, the new [‚realtime_data‘] node is
created.

Example

R911403764, Edition 08 Bosch Rexroth AG


96 / 1158 ctrlX PLC Engineering
PLC program download

Note
In the [‚info‘] node, information about the GVL twin is displayed. Here under
[type], the value ‚input‘ is specified as from the point of view of the Data Layer
the data originates from outside. For the PLC, it is an ‚output‘.
Before downloading, a final consistency check is performed, which issues a
message in case of discrepancies.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 97 / 1158
Options

14 Project synchronization
14.1 Introduction
The project synchronization is exclusively available for the ctrlX CORE or ctrlX
CORE Virtual target systems.

The “project synchronization” provides the option to save a project in the file
system of the engineering PC and to synchronize it with the project on the
control by means of definable synchronization settings. The project can also
be opened and edited without being connected to the control. As soon as the

Project synchronization
connection to the control is established again, the two project repositories are
compared.
Another advantage of “project synchronization” is that the project can be read
directly from the control. This is a useful function, in particular if you are not
the owner of the project sources. As the project is downloaded to the control,
you can connect to the current project on the control, edit the project and
upload it to the control again.
If the “project synchronization” is not configured, no project data is stored
on the control but only the data required for the control flow is stored. This
data can be viewed by opening “Manage app data” in the web interface of the
control. The app data is stored in the configuration data in the plc\run… folder.

Functional notes / limitations


If PLC Engineering is run in an VirtualBox environment and the project is saved
on a mounted host drive, project synchronization does not work due to the
special drive type.
Workaround 1: Use a local directory in the VirtualBox for the project repository.
Workaround 2: Do not mount the host drive in the VirtualBox directly, but share
a directory on the host and mount it as a regular network drive in the virtual
box.

Status display
In the ctrlX PLC Engineering status bar (lower right), the status of the project
synchronization is visualized via the following icons:
Icon Meaning
The synchronization is enabled
The synchronization is not enabled
Double-click on the icon to open the project synchronization setting dialog.

The project synchronization for the respective project can be enabled or disa-
bled at any time. If the synchronization is deselected and confirmed with “OK”,
a prompt is shown if the current synchronization data should be retained on
the control or if they are to be removed from the control repository.

14.2 Activation
The “Project synchronization” option can be activated via the “Project
synchronization” dialog, see:
⮫ Dialog “Project synchronization”

14.3 Options
In the “Project synchronization” dialog, options to store and synchronize
project data are available. The dialog is divided into the following sections:

R911403764, Edition 08 Bosch Rexroth AG


98 / 1158 ctrlX PLC Engineering
Synchronization – Online behavior

Project storage on PC
“Name” Project name
“Location” Filing of the project data in the file system of the Engi-
neering PC

Synchronization PC and ctrlX CORE Description


(default setting)
Synchronization of project storages Enabling/disabling the synchroni-
between PC and ctrlX CORE if: zation function.
If active, then under the following
subconditions:
the project is opened Is automatically enabled if the syn-
chronization is active
the project is saved on PC Synchronization when saving the
project
a download / OnlineChange is Synchronization when down-
carried out and thus the project is loading an application to the con-
saved trol
A boot application is created Synchronization occurs when the
and login data is synchronized command “Generate boot applica-
tion" is executed in the logged-in
state .
the project is closed Synchronization when closing the
project
Synchronize device description files and Device description files and libra-
libraries ries that are not part of the ctrlX
WORKS installation are also saved
on the control.
This option facilitates direct login
to the project, if active.

14.4 Synchronization – Online behavior


To synchronize the project, a connection between the Engineering software and
the control is established.
In the next step, the current project data on both sides is compared.
The synchronization cache is used for the comparison, see ⮫ Chapter Command
“Synchronization cache...” on page 916.
In case of differences between the project repositories, the data transfer is
stopped and the dialog “conflict: Project synchronization ...” is opened. In the
dialog, the identified differences are listed and options for conflict handling are
provided. The provided solutions depend on the conflict and can vary.
Table 1: Conflict handling options
Button Action
“Use project from ctrlX” The project currently opened on the Engi-
neering PC is closed.
The project data available on the control are
applied to a new project on the Engineering
PC.
“Use Project from PC” The project data available on the Engineering
PC are transferred to the current configuration
on the control.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 99 / 1158
Synchronization – Online behavior

Button Action
“Overwrite project on ctrlX” The project data currently loaded on the con-
trol are overwritten by the project data on the
Engineering PC.
“Apply ctrlX IP address” The IP address of the control is applied to the
project data on the Engineering PC.
“Open project comparison” Via the project comparison, the contents of the
project data can be compared and matched,
see: ⮫ Comparing Projects
“Cancel synchronization” The synchronization is canceled.

Project synchronization
The project data is not synchronized between
the Engineering PC and the control.
The existing data is retained.
“Continue whithout change” The suggested conflict solution is dismissed
(e.g. applying the IP address of the control).
The project data is not synchronized between
the Engineering PC and the control.
The existing data is retained.

If the addressed control is (temporarily) not available, the project data is saved
in a reserved cache ⮫ Chapter Dialog “Project synchronization” on page 1075
in case of enabled synchronization and is updated on the control once the
communication is available again.
If it is detected that the IP address in the project does not match the IP
address of the control when opening a synchronized project, the project
transfer is stopped and the dialog “Project synchronization” is started. Use the
dialog buttons to select whether to apply the IP address of the ctrlX device to
the project or whether to continue without change.

R911403764, Edition 08 Bosch Rexroth AG


100 / 1158 ctrlX PLC Engineering
Synchronization – Online behavior

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 101 / 1158
Template – CheckFunctions

15 Creating and managing templates


ctrlX PLC Engineering provides the option to create application-specific tem-
plates which can be integrated into the PLC project.
Template for POUs, variable lists, visualizations etc. are provided via a template.
These templates can be referenced for a user-friendly PLC project creation.
For example, a recurring program sequence can be provided as template via
a POU with visualization. The contents to be used can be specified via the
parameterization.

Creating and managing templates


Using templates has the following benefits:
● Fast program creation
● Standardization
● Reusability
● Less errors in the programming

Inserting templates in the PLC project


1. Open the ctrlX PLC Engineering project
2. In the device tree, open the context menu of the “Application” node
3. Execute the “Inserting templates...” command
🡆 The “Inserting templates” dialog is opened.
The dialog contains the tabs “CheckFunctions” and “Motion interface”.
4. Select the template and confirm the dialog with “Insert”
🡆 The selected template is inserted below the Application node in a sub-
ordinate folder.

15.1 Template – CheckFunctions


The provided functions are used to increase machine safety and check for
access violations in the PLC program during runtime. After inserting, the imple-
mented standard error reaction can be adjusted to the requirements of the
machine application.
The functions are implemented type-specifically and are thus integrated in the
following function groups:
● Array limits
Detecting unauthorized accesses outside the array limits
● Division by 0
Detecting divisions by 0
● Pointer access
Detecting unauthorized accesses via POINTER and REFERENCEvariables
● Range limits
Detecting unauthorized accesses outside the range limits

The individual function groups can be selected in the corresponding dialog. The
functions are created below the application in the “CheckFunctions” folder in
the project tree. Function groups already inserted in the project tree are grayed
out in the template dialog.
When creating a new ctrlX CORE project, all function groups are inserted in the
project by default.
Adding check functions results in an application down-
NOTICE
load. An online change is not possible anymore.

Removing check functions


Inserted functions can only be removed in the project tree:

R911403764, Edition 08 Bosch Rexroth AG


102 / 1158 ctrlX PLC Engineering
Integrating customized templates in ctrlX PLC Engineering

● Completely deleted by deleting the “CheckFunctions” folder


● Individually by deleting the relevant function
The declaration part of the relevant test function contains more information.

15.2 Template – Motion interface


The Motion interface template provides user-friendly access options to axes
and kinematics which are managed via the Motion app. Before the functionality
can be used, initialize Motion interface first, see ⮫ web documentation.

15.3 Integrating customized templates in ctrlX PLC Engi-


neering
Apart from the check functions and MotionInterface templates, it is possible to
provide individual templates in the “Inserting templates” dialog.
The PLCopenXML and CODESYS.export format are supported as template.

Save the customized templates in the following folder on the Engineering PC to


be able to select them in a dialog.
“PLC Engineering Installation directory 🠂 LinkToCommonAppData 🠂 \Studio\Templates”
A tab page is created for each folder in this repository. Define the templates as
groups.
Specifications:
● For each group, a *.conf.xml file with the group name is available
● Each group can be divided into up to four categories
● Each category corresponds to a checkbox in the group
● Each category can contain an unlimited number of templates
● Each template file (Codesys.export or PlcOpen.xml) has a *.conf.xml
description file with the template name
The corresponding descriptions and texts in the dialog are defined by the „Vor-
lagenGruppenName“.conf.xml in the same directory.
The description file contains five property entries to be filled in by the user.
Property entries:

Creating individual templates


Currently, only German and English text is supported.
English is the default language and has to be available.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 103 / 1158
Integrating customized templates in ctrlX PLC Engineering

Creating and managing templates


Fig. 11: Dialog - Inserting templates
① Name_DE
② Description_DE
③ GroupBoxHeader_DE
④ Note_DE
⑤ IsWarning
Beispiel einer *.conf.xml Datei für die Gruppeninformation (Deutsch / Eng-
lisch):

<?xml version="1.0" encoding="utf-8"?>


<GroupInformation>
<property name="Name_DE" type="string">Titel der
Registerkarte</property>
<property name="Name_EN" type="string">Title of the tab
page</property>

<property name="Description_DE" type="string">Beschreibung


der Vorlagengruppe</property>
<property name="Description_EN" type="string">Description
of this template group</property>

<property name="GroupBoxHeader_DE" type="string"></property>


<property name="GroupBoxHeader_EN" type="string"></property>

<property name="Note_DE" type="string">Hinweis oder Warnung


für diese Gruppe</property>
<property name="Note_EN" type="string">Note or warning for
this group</property>

R911403764, Edition 08 Bosch Rexroth AG


104 / 1158 ctrlX PLC Engineering
Integrating customized templates in ctrlX PLC Engineering

<!-- Icon should be shown in front of this note, warning or


info -->
<property name="IsWarning" type="bool">true or false</
property>
</GroupInformation>
Store all templates and their *.conf.xml files in the template group folder.
No other subfolders are supported.
Each description file contains:
● The template category
● The category description
● The template format (PLCopen.xml or CODESYS.export)
● Required template libraries (optional)
● A parent node (optional)
The description file contains five property entries to be filled in by the user.
Property entries:

Fig. 12: Dialog - Inserting templates


① Category_DE
② Description_DE
Currently, only German and English text is supported.
English is the default language and has to be available.
Enter only the placeholder for the required libraries. Multiple entries can exist.
It must be ensured that the corresponding libraries are also installed. The
template manager only takes care of the inclusion in the project, i.e. in the
library manager.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 105 / 1158
Integrating customized templates in ctrlX PLC Engineering

Beispiel einer *.conf.xml Datei für die Vorlageninformation (Deutsch / Eng-


lisch):

<?xml version="1.0" encoding="utf-8"?>


<TemplateInformation>
<property name="Category_DE" type="string">Arraygrenzen</
property>
<property name="Category_EN" type="string">Array boundarys</

Creating and managing templates


property>
<property name="Description_DE" type="string"></property>
<property name="Description_EN" type="string"></property>

<!-- Placeholder only without version. If there more


required libraries use this tag again -->
<property name="LibraryPlaceholder" type="string">CmpLog</
property>
<property name="LibraryPlaceholder" type="string">Standard</
property>

<property name="ParentNode" type="string">Folder or POU</


property>

<!-- Which export format is used? Codesys or PLCopenXML?-->


<!-- Possible values "true" or "false" if no tag default is
PlcOpenXML-->
<property name="CodesysImportFormat" type= "bool">true</
property>
</TemplateInformation>

R911403764, Edition 08 Bosch Rexroth AG


106 / 1158 ctrlX PLC Engineering
Integrating customized templates in ctrlX PLC Engineering

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 107 / 1158

16 Localizing Projects
You can display your project in different languages when you create and link
localization files. The localization files correspond to those of the GNU gettext
system. The format of the localization template files is *.pot (Portable Object
Template), from which localization files *.po (Portable Object) are generated
after translation.
The project can be localized in different languages. However, editing is possible
only in the original version.
You configure which categories of text information are localized in the project.
Then you export these texts into a translation template. This template is a file

Localizing Projects
in *.pot format (example: project_1.pot). You produce localization files in
the format *.po (example: de.po, en.po, or es.po), either automatically with
a corresponding external translation tool or manually with a neutral text editor.
You can import the *.po files back into PLC Engineering and use them for
localization.
The commands for using project localization are located in the menu “Project
🠂 Project localization”.
See also
● ⮫ Chapter Command 'Project Localization' - 'Create Localization Template'
on page 928

Generating localization templates


Requirement: A project is open.
1. Click “Project 🠂 Project Localization 🠂 Create Localization Template”.
🡆 The “Create Localization Template” dialog box opens.
2. Activate the categories of text information that should be included in the
localization template.
3. “Position information” can also be included in the template. For each text
to be translated, specify its location in the project. Select the positions to
be displayed in the translation template: only the first position found, all
positions found, or none.
4. Click the “Generate” button.
🡆 The dialog box opens for saving a *.pot file to the file system. Save
the localization template. Then you can process the file in a translation
tool and generate localization files <language>.po in the required lan-
guages.

Format of the localization template: file *.pot


In the first line, the text categories are specified that were selected for the
translation when generating the template:
Example: #: Content:Comments|Identifiers|Names|Strings: All four cat-
egories were selected.
Then each text to be translated is segmented in the form as in the following
example:

R911403764, Edition 08 Bosch Rexroth AG


108 / 1158 ctrlX PLC Engineering

Example
#: D:\Projects\p1.project\Project_Settings:1
msgid "Project Settings"
msgstr ""
Line 1: Position information displayed as source code reference. Displayed
only if this has been configured when generating the translation file.
Line 2: Untranslated text as entry msgid (example: msgid "Project
settings").
Line 3: Placeholder for the translation: msgstr "". Between the single
straight quotation marks, the translation in the *.po file must be inserted
in the respective language.

Format of the localization file: *-<language>.po


You can generate a *.po file with a translation tool or create one using a
neutral text editor based on the *.pot file. For this purpose, you could change
the file extension from *.pot to *.po and edit the according to *.po standard
format.
It is imperative to specify the language in the form of the usual culture abbre-
viation in the metadata of the file (example: "Language: de" for German.
Then you insert the translations of the individual texts between the straight
quotation marks for the msgstr "" entries.

Example
"Language: de\n"
#: Content:Names
#: D:\projects\p1.project\Project_Settings:1
msgid "Project Settings"
msgstr "Projekteinstellungen"

Importing localization files / Localizing projects


Requirement: For your project, localization files (<language>.po) were gener-
ated based on the translation template *.pot. The project is open.
1. Click “Project 🠂 Project Localization 🠂 Manage Localizations”.
2. Click on the “Add” button.
🡆 The “Open Localization File” dialog box appears for selecting a *.po
file from the file system.
3. Select one of the localization files (example: <project name>-de.po).
🡆 The dialog box closes and the affected texts appear in the project in
the respective language. For example, if you specify the translation
msgstr "Main program" for the POU name "PLC_PRG" in the English
localization file, then the object name "Main program" appears in the
device tree.
4. In the same way, you import the localization files for other language tar-
gets.

Switching localization, Adding and removing localization files


Requirement: All required language are stored in the project by importing the
corresponding *.po file. The project is open.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 109 / 1158

1. Click “Project 🠂 Project Localization 🠂 Manage Localization”.


🡆 The “Manage Localization” dialog box opens. All stored localization files
*-<language>.po appear in “Files”, as well as the entry “<original
version>”.
2. Select the desired language and click the “Switch Localization” button.
🡆 The project appears in the selected language. When you select
“<original version>”, the project is displayed in the original, unlocalized
version and it cannot be edited.
Optional: Defining a default localization, Toggling localizations
Select one of the available localizations and activate the “Default
Localization” option.

Localizing Projects
🡆 Click “Project 🠂 Project Localization 🠂 Toggle Localization” to toggle
the localization between the default localization and original version.
By default, this command is also available with the button on the
toolbar.
See also
● ⮫ Chapter Command 'Project Localization' - 'Manage Localizations'
on page 928
● ⮫ Chapter Command 'Project Localization' - 'Toggle Localization'
on page 927

R911403764, Edition 08 Bosch Rexroth AG


110 / 1158 ctrlX PLC Engineering

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 111 / 1158
Device tree and device editor

17 Configuring the I/O connection


17.1 Basic information
Use device objects to map hardware to be controlled in a tree structure in your
PLC Engineering project. This makes the linking of hardware and application
easy to handle.
In the configuration editors of the device objects you can make settings for the
communication between PLC Engineering and the controller, and above all for

Configuring the I/O connection


the I/O assignment. The I/O mapping is the linking of the inputs and outputs of
the controller with the variables of your application.
Access to control objects at runtime can be device-dependent via an "online
user administration". In addition, the communication with the control device
depends on the currently valid "Security settings".
Also refer to:
● ⮫ Device tree and device editor
● ⮫ Mapping the hardware structure in the device tree

17.2 Device tree and device editor


The following descriptions and figures are part of the PLC project engineering
in ctrlX PLC Engineering.
However, the general handling within the device tree is also applicable to the
configuration of devices, field buses and field bus devices in ctrlX I/O Engi-
neering.

Device tree
In the “Devices” view, also called "device tree", you can compile applications
based on target devices. Here, it is possible to map the hardware of one or
more control devices or field bus systems, configure the communication with it
and assign several applications to each of them.
The root node of the device tree is a symbolic node entry: “<project name>”
Below that, mount the device objects for one or more control devices, also
called "target systems". Each device object represents a specific hardware
such as a control device, field bus, bus coupler, drive, I/O module or monitor.
When inserting the object, an insertion wizard that always offers the matching
devices from your local device repository provides help.
If you are already connected to a control network, scan the hardware for
existing devices and add them to the current configuration in the device tree.
Certain rules (see below) apply to creating device objects in the device tree,
i.e. the mapping of the hardware environment to be controlled. The hierarchical
arrangement of application objects and device objects defines the scopes of
other objects.
There are programmable devices and purely parameterizable devices. The
device type defines the possible insertion position in the device tree and the
selection of objects you can insert below the device. Programmable devices
automatically receive an additional purely organizational node “PLC logic”
below the device object. Under this node, insert the objects that are needed
for programming the device, i.e. the application(s) and, for example, GVLs or
text lists.
Each device is defined by its device description and has to be installed on
the local system to be available for insertion in the device tree. The device
description file defines the properties of a device with regard to configurability,
programmability and possible connections to other devices.

R911403764, Edition 08 Bosch Rexroth AG


112 / 1158 ctrlX PLC Engineering
Device tree and device editor

The “POUs” view contains objects that you can use across the project. Pro-
gramming objects that are only intended for a specific application have to be
inserted below the application object in the “Devices” view (device tree).
Note the possibility of running the active application on a "simulation device",
which is automatically available by default within the programming system.
Currently, this simulation option exists for the target system ctrlX CORE. In sim-
ulation mode, you can also test the online behavior of the application without
hardware. Activate the simulation with the command “Online 🠂 Simulation”.
Furthermore, note the possibility of using the “Online configuration mode”
command for an application to connect to the device without having to load
this application there first. This is useful for initial commissioning of an I/O
system as it allows you to address and test the I/Os in the controller configura-
tion before you have programmed and loaded the actual application.
Example of a device tree:

(1) Programmable device (with applications)


(2) Symbolic device name
(3) Device name, defined in the device description
(4) Purely parameterizable device
A device entry in the device tree consists in each case of a symbol, of the
symbolic device name editable in the tree and of the device type (= device
name defined in the device description) behind it.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 113 / 1158
Device tree and device editor

The configuration of a device regarding communication, parameters, I/O image


is realized in the dialogs of the device editor. Double-click on the device object
to open the editor.
Also refer to
● ⮫ Chapter Command 'Online Config Mode' on page 930
● ⮫ Chapter "Edit I/O mapping" command on page 927
● ⮫ Objects
● ⮫ Chapter 33.2.6 “Application” object on page 763

Configuring the I/O connection


Rules and procedures for arranging and configuring objects in the device tree
● Insert objects: To insert a device object, use the “Insert device” or “Attach
device” command in the context menu of the device tree. For other objects,
use the “Add Object” command. PLC Engineering always provides the
objects matching at the currently selected position in the tree for selection.
Example: Modules for a PROFIBUS DP slave can only be mounted below a
corresponding slave object, applications only below programmable devices.
The selection of device objects additionally depends on which devices are
installed in the device repository.
● At the level directly below the root node “<project name>” you can only
mount device objects. When selecting a different object type such as a text
list, PLC Engineeringautomatically inserts it in the “POUs” view, i.e. in the
project pool!
● Insert applications:
You can only insert an “Application” object below the “PLC Logic” node, i.e.
below a programmable device. All applications have to be named uniquely
for each device. Below each application, more objects required for program-
ming, such as POUs, DUTs, GVLs or visualizations can be attached.
Below each application, you need to insert a task configuration and con-
figure in it the corresponding program calls from application-specific POUs
or POU "instances" (from the “POUs” view).
● Insert devices: PLC Engineering inserts a device object as a node in the tree.
If child nodes are defined in the device description, they are automatically
inserted as well. A child node can also represent a programmable device. To
order the device objects within the tree from top to bottom: For each level,
the programmable devices (PLC logic) are always arranged first, followed by
the remaining types, each sorted alphabetically.
● Update devices: A device already inserted in the device tree can be replaced
by another version of the same device or with a device of a different
type“(Update devices”). A configuration tree existing below the device is
retained as far as possible.
● Position objects differently or delete objects: You can handle the objects
with the standard “Cut”, “Copy”, “Paste”, “Delete” commands, or by drag-
ging a selected object with the mouse to another position. When copying
objects, the new object is assigned the same name, extended by a consecu-
tive number.
● Network scan of the current hardware: By default, creating the control con-
figuration in the device tree is supported by the device editors with a scan
functionality: The current hardware environment is searched and the mod-
ules found are displayed in a dialog. Subsequently, you can apply the devices
directly to the device tree. See the “Search devices” command.
Also refer to
● ⮫ Chapter 17.3 Mapping the hardware structure in the device tree
on page 115
● ⮫ Chapter Command 'Update device' on page 914

R911403764, Edition 08 Bosch Rexroth AG


114 / 1158 ctrlX PLC Engineering
Device tree and device editor

Device tree in online mode


In online mode, an icon in front of a device entry indicates the status of the
device.
: PLC is connected, application is running, device is in operation, data is
exchanged. The “Update I/Os” option in the “PLC settings” tab can be enabled
or disabled.
: PLC is connected and in stop (“STOP”), and the “Update I/Os in stop”
option in the “PLC settings” tab is disabled.
: Device does not exchange data; bus error, no configuration, or simulation
mode.
: Device runs in demo mode for 30 minutes. After this time, the demo mode
expires and the field bus terminates the data exchange.
: Device is configured but not fully operational. No data is exchanged.
Example situation: CANopen devices during start-up and in the preoperative
state.
: Redundancy mode is active. The field bus master is currently not sending
any data as another master is active.
: The device description could not be found in the device repository.
: The device itself is running, but a subordinate device is not running or has
a diagnostic message. The subordinate device is not visible due to a collapsed
device tree.
: Exclamation mark gray: The device itself is running, but a subordinate
device is not running or has a diagnostic message. A diagnostics was pending,
the cause of the error is no longer present. This symbol may appear in connec-
tion with various other symbols in this list.
: Exclamation mark red: The device is not running or a diagnostics is pending.
The cause of the error is still present. This symbol may appear in connection
with various other symbols in this list.
The names of all currently connected devices and applications are highlighted
in green:

The names of devices running in simulation mode are shown in italics:

Additional diagnostic information is provided by the “Status” tab of the respec-


tive device editor.
When logging in while the device description on the target device is newer than
the one in the project, a warning is output as well as the option to cancel the
operation.
Also refer to
● ⮫ Objects
● ⮫ Transferring the application to the PLC
● ⮫ Command 'Acknowledge Diagnosis', 'Acknowledge Diagnosis for Subtree'

Device editor
In the Device Editor tabs, select the settings for communication between PLC
Engineering and the target device. Double-click on the device object in the
device tree to open the editor. The editor contains generic and device-specific
tabs. The editor name corresponds to the device name.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 115 / 1158
Mapping the hardware structure in the device tree

Also refer to
● ⮫ Objects
● ⮫ Chapter 17.4 Configuring Devices and I/O Mapping on page 118

17.3 Mapping the hardware structure in the device tree


The following descriptions and figures are part of the PLC project engineering
in ctrlX PLC Engineering.
However, the general handling within the device tree is also applicable to the

Configuring the I/O connection


configuration of devices, field buses and field bus devices in ctrlX I/O Engi-
neering.

In the “Devices” view (device tree), you map the hardware that you control with
your application. To do this, insert device objects representing real devices
in the network into this tree structure until the hierarchy reflects the control
network. Device objects are for example a PLC object, a field bus object or a
logical device.

Mapping standard control with field bus in the device tree


In the following you map a hardware that contains a standard PLC and a
standard field bus.
1. Select command “File 🠂 New project”.
2. In the “New project” dialog, select the “Standard project” template.
3. In the “Standard project” dialog, select the device “ctrlX CORE”.

🡆 PLC Engineering inserts the Device object “ (ctrlX CORE”) in the


device tree under the root node, below, the “PLC Logic” node is
inserted. The node is always part of a programmable device object.
Below, the “Application” object is contained and below that, the
objects “Library manager”, “PLC_PRG” and “Task configuration” can be
found.
4. Select the Device entry and in the context menu choose the command
“Attach device”.
🡆 The “Attach device” dialog provides a selection of the devices installed
on your system. Installed on the system means that PLC Engineering
has received a device description for the respective hardware. Thus,
you can use the device object and the associated configuration editor
in the project.

R911403764, Edition 08 Bosch Rexroth AG


116 / 1158 ctrlX PLC Engineering
Mapping the hardware structure in the device tree

5. Select one of the provided control devices, for example “CAN bus”, and
click on the “Attach device” button.
🡆 The “CAN bus” object is displayed in the device tree under Device
“(ctrlX CORE”). The “Attach device” dialog remains open. If you now
select the new “CAN bus entry”, it automatically provides the objects
that can be inserted under it.
6. For example, select the“CANopen” device from the “Local Device” cate-
gory.
🡆 “CANopen_Device” is inserted indented under the“CAN bus” in the
device tree.
7. Do you want to mount a different device than the devices that has already
been mounted? Select the device entry and choose “Update device” from
the context menu.
🡆 The “Update device” dialog is displayed. It corresponds to the “Attach
device” dialog used previously. You can select another device, which is
inserted in the tree instead of the previous tree.
Also refer to
● ⮫ Chapter Command 'Attach device' on page 913
● ⮫ Chapter Command 'Update device' on page 914

Scanning the current hardware and transferring devices to the project


If you use field bus drivers via CODESYS AddOns, you can detect the devices in
the network of the hardware environment (scan) and transfer the found devices
into the device tree of your project. If the scan functionality is permanently
implemented in the PLC, you can perform the scan without any further prepara-
tions. PLC Engineering automatically establishes a temporary connection to the
control for this purpose.
If the scan functionality is provided in a library, the device that provides this
library has to be mounted in the device tree. Subsequently, login to the control.
Only then, the library is available on the control and scanning is possible.
Scanning is started with the “Find devices” command. It refers to the control
currently selected in the device tree and connected to the project. For example,
select an inserted PROFINET IO controller and use the command to determine
the I/O devices and I/O modules assigned to it.
Prerequisite: You have a project with a device configuration. The communica-
tion settings are correct. Gateways and hardware are running.
1. Select a control device object in the device tree.
2. Select the “Search devices” command in the context menu.
🡆 PLC Engineering establishes the connection to the hardware. The
“Search devices dialog” is displayed. Depending on the device type, the
dialog provides different functions. However, a table with the devices
detected in the hardware is always displayed: Device name, device
type, station name, etc.. Please refer to the help for the respective
device editor.
3. To show only found devices that are not yet part of the device configura-
tion of the project in the list, enable the option “Show differences to
project”.
4. To copy a device to the device tree of the project, select the entry in the
table and click on the “Copy to project” button. If no entry is selected, all
found devices are applied.
🡆 The corresponding entries are inserted in the device tree.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 117 / 1158
Mapping the hardware structure in the device tree

Checking the control configuration using the 'Online configuration operation'


command
You can use PLC Engineering to test the correct wiring of the I/Os and the
field bus of your target system without having to have previously developed
a real application for the control and without having loaded it to the control.
This is interesting for the initial commissioning phase. Use the "simple online
configuration mode" for this purpose. If there is already an application on the
control, you can optionally use the "extended online configuration mode" if it is
supported by the device. This allows to read device parameters without having

Configuring the I/O connection


to log in with the application from PLC Engineering.
Easy online configuration mode:
Using the command “Online configuration mode” in the context menu of the
PLC object in the device tree, an implicit application is generated. PLC Engi-
neering loads the application automatically on the PLC and nonrecurringly
initializes all I/Os automatically via the application. The application name
is“HiddenOnlineConfigModeApp.” It is displayed in the device editor of the PLC
in the “Applications” tab. Use it to operate the I/Os as in normal online mode
with the following functions:
● Reading I/Os
● Writing outputs
● Diagnostics (in the tree and on the status page)
● Scan (of the current hardware)
● Interactive online functions, if supported (for example, writing asynchronous
messages)
Writing and forcing in the I/O image
In online configuration mode, writing and forcing values in the “I/O image”
dialog works differently than in real online mode. PLC Engineering writes the
outputs immediately after inserting them into the I/O image table. There is
no “Prepared value” column, but you change the output values directly after
double-clicking on the “Current value” column.
Test I/O access using the simple online configuration mode:
Prerequisite: You have created a standard project with a device configuration in
which you have configured an I/O image. In a program function block, access
inputs or outputs of the hardware in read or write mode to check their wiring.
The connection to the PLC of the hardware is configured in the communication
settings. The PLC is running.
1. Select the PLC object in the device tree.
🡆 For example, the device ctrlX CORE is selected in the device tree.
2. Select the “Online configuration operation” command in the context
menu.
🡆 PLC Engineering connects to the control, the PLC object in the tree is
highlighted in green.
3. Double-click on the PLC object in the device tree to open the device
editor. Select the “Applications” tab.
4. Click on the “Update list” button.
🡆 The HiddenOnlineConfigModeApp application is displayed in the
“Applications on the control” window.
5. Start your program and check the behavior of the inputs and outputs.
Extended online configuration mode (parameter mode):
If there is already a "real" application on the control and the device sup-
ports the "extended online configuration mode", you can optionally select
the "parameter mode" after the “Online configuration” mode command. Subse-

R911403764, Edition 08 Bosch Rexroth AG


118 / 1158 ctrlX PLC Engineering
Configuring Devices and I/O Mapping

quently, you can read the parameters of the real application on the control
without the need of a standard login and - in case of missing translation infor-
mation - a new download of this application. You can see the parameters in
the “Configuration” tab of the device editor. The parameter mode prevents
accidental changing of data on the control, the applications are not changed.
Writing the parameters is only possible if the driver supports it.
Set up parameter mode for reading the device parameters:
Prerequisite: The target device already contains one or more applications. The
target device supports the extended online configuration mode. You opened
the project that contains these applications. You want to view the device
parameters without having to log in to the control. The connection to the PLC
of the hardware is configured in the communication settings. The PLC is run-
ning.
1. Select the PLC object in the device tree.
2. Select the “Online configuration operation” command in the context
menu.
🡆 PLC Engineering connects to the control, the PLC object in the tree is
highlighted in green. The “Select configuration mode” dialog displays
the application(s) on the PLC.
3. Select the desired application and click on the “Parameter mode” button.
🡆 PLC Engineering checks whether the application in the project matches
the application on the PLC.
4. If PLC Engineering does not report an error regarding the match of the
applications, open the “Configuration” tab of the PLC Device Editor.
🡆 You can read the device parameters.
Also refer to
● ⮫ Chapter Command 'Online Config Mode' on page 930
● ⮫ Chapter 33.1.19 'Parameters' tab on page 760

17.4 Configuring Devices and I/O Mapping


Configuring devices
You can configure the device objects inserted into the device tree in the asso-
ciated device editor. The possibilities depend on the device description. The
'generic device editor' provides tabs that are supplemented as necessary by
device-specific tabs.
Requirement: You have opened a standard project in whose device tree a
standard PLC and below that a fieldbus device object are inserted.
1. Double-click the device object of the standard PLC in the device tree of
your project.
🡆 The “<device name>” editor opens in the PLC Engineering main
window. The “Communication Settings” tab is in the foreground.
Change to the other tabs in order to make configuration settings for
the controller. See the help pages for the generic device editor.
2. Double-click the fieldbus device object in the device tree of your project.
🡆 The “<fieldbus device name>” editor opens in the PLC Engineering
main window. Specific tabs are available depending on the device.
For the configuration options, see the help pages for the respective
device editor. If the “Show generic device configuration views” option
is selected in “Tools 🠂 Options”, in the “Device Editor” category, then
see also the tabs contributed by the generic device editor.
See also
● ⮫ Chapter 33.1.2 Generic Device Editor on page 736

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 119 / 1158
Configuring Devices and I/O Mapping

Read PLC parameter file to configuration


If the configuration parameters of the PLC have been changed by another
device, for example via a visualization, a configuration file IoConfig.par is
created on the controller. Depending on the device, a button may be in the
parameter dialog of the device editor in online mode for writing the current
parameters to such a file. In order to update the changed parameters inside
your project as well, you can read in the parameter file in online mode.
Requirement: You have a standard project with a device tree in which the
hardware environment is mapped with a PLC and a parameterizable device in

Configuring the I/O connection


the device tree. On the controller there is a file IoConfig.par, in which the
device parameters were previously saved with the current values.
1. Add the “Read PLC Parameter File to Configuration” command to an inter-
face menu from the “Devices” category in the “Tools 🠂 Customize” dialog.
2. Select the PLC device object in the device tree and open the context
menu.
3. Click “Read PLC Parameter File to Configuration”.
🡆 PLC Engineering automatically establishes a connection to the con-
troller and reads in the parameters from the par-file. These are updated
accordingly on the tab with the device parameters.
See also
● ⮫ Chapter Command 'Read PLC Parameter File to Configuration'
on page 931
● ⮫ Chapter Dialog 'Customize' - 'Menu' on page 1094

General information about I/O mapping


Whether or not you can configure an I/O mapping to project variables or even
to the entire function blocks depends on the type of device. Configuring an I/O
map means linking input and output channels of the device with variables of
the project. We also use the term 'mapping' for this.
Pay attention in general to the following for the mapping of inputs and outputs
of a device to variables in PLC Engineering:
● You do not have write access to variables that are mapped to an input.
● You can map an existing variable to one input only.
● You can directly generate new global implicit variables in the I/O map and
map them to a device channel.
● The memory layout of structures is specified by the device.
● You can change addresses and fix values in the I/O map.
● For each variable that is assigned to an I/O channel in the “I/O Mapping”
dialog, you can cause 'force variables' to be generated during the compila-
tion of the application (see further below). Using these variables you can,
for example during the commissioning of a plant, force a value on the input
or output via a visualization/HMI.
● Changes in the I/O map can be transferred to the controller with an online
change.
● If a pointer to a device input is used, the access is considered to be a
write access, for example pTest := ADR(input);. This leads to a compiler
warning when the code is generated: "...invalid assignment target".
If you require a construct of this kind, you have to first copy the input value
input to a variable with write access.
● An I/O address can also be linked with a variable via the 'AT declaration' in
the IEC code. Since a device configuration often changes again, however, we
recommend that you make the assignments only in the device editor.

R911403764, Edition 08 Bosch Rexroth AG


120 / 1158 ctrlX PLC Engineering
Configuring Devices and I/O Mapping

If you use the AT declaration, note the following:


– An AT declaration is permissible only with local or global variables, not
with input or output variables of function blocks.
– Implicit 'force variables' for I/Os (see below) cannot be generated for AT
declarations.
– If you use an AT declaration with structure variables or function block
variables, all instances will access the same memory location. This then
corresponds to the use of 'static variables' in classic programming lan-
guages such as 'C'.
If a pointer to a device input is used, then the access
NOTICE
(for example, pTest := ADR(input);) applies as write
access. This leads to a compiler warning when the code
is generated: "...invalid assignment target".
If you require a construct of this kind, you have to first
copy the input value (input) to a variable with write
access.
As an alternative, you can assign a variable to an address in the programming
code using the AT declaration. In view of possible changes of the device config-
uration, however, we recommend that you make the assignments only in the
device editor.
You can export the I/O mapping configuration of a device to a csv file or import
it from such a file.
See also
● ⮫ Chapter 33.1.9 Tab '<Device name> I/O mapping' on page 739
● ⮫ Chapter Command 'Export Mappings to CSV' on page 931
● ⮫ Generating implicit variables for the forcing of I/Os on page 125

Linking a device input with an existing project variable ("mapping")


Requirement: A device that supports an I/O mapping configuration in PLC Engi-
neering is inserted in the device tree of your project. On the “I/O Mapping”
tab in the device editor you thus get a tabular display of the input and output
channels of the device with specification of the addresses and data types.
Mapping 'too large' data types
NOTICE
If a variable of a data type that is larger than a byte
is mapped to a byte address, the value of the variable
will be truncated to byte size there. For monitoring the
variable value in the “I/O Mapping” dialog, this means
that, in the root element of the address, the value is
displayed which the variable currently has in the project.
The current individual bit values of the byte are displayed
in succession in the bit elements below that, but this
may not be sufficient for the entire variable value.
If a UNION is represented by I/O channels in the mapping dialog, it depends on
the device whether mapping to the root element is also possible.
1. In a POU, declare, for example, a variable xBool4 of the type BOOL with
which you want to access an input of the target device from the applica-
tion.
2. To open the device editor, double-click the device object in the device
tree, and then the “<device name> I/O Mapping” tab.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 121 / 1158
Configuring Devices and I/O Mapping

3. Observe the “Variable” column with the display of the device input chan-
nels and device output channels , which can still be sorted by organ-
izational nodes , depending on the device. We assume that there is
a device input of the type BYTE. It is displayed with its individual bit
addresses (bit channels) below the BYTE node.
4. Note: When mapping structured variables, the editor prevents you from
entering both the structure variable (example: %QB0) and individual struc-
ture elements (example: %QB0.1 and QB0.2). Therefore, if there is a main
entry with a subtree of bit channel entries in the mapping table, then the

Configuring the I/O connection


following applies: Then you can specify a variable either into the line of
the main entry, or into the lines of the subelements (bit channels), but not
into both.
You can now occupy either the entire channel with a variable of a suitable
type OR its individual bit-channel addresses with suitable variables of
the type BOOL or BIT. First of all, double-click a bit input channel in the
“Variables” column.
🡆 An input field opens.
5. In order to place an existing variable on the channel, you have
to enter the desired project variable with the complete path. Press
to open the Input Assistant. Select, for example, the variable
Application.PLC_PRG.xBool4 declared in PLC_PRG.
🡆 The variable is inserted. The HMI symbol ( ) is displayed in the
“ Mapping” column. The address is now struck through. That does
not mean that the address is no longer available, because values of
existing variables are managed at another memory space. But: in order
to avoid ambiguities when writing the values, you should nevertheless
not occupy the address with a further variable, especially in the case of
outputs.
Note: For compiler version V3.5 SP11 and higher, the initialization value
of the variables is used automatically as the default value when map-
ping to an existing variable. You can edit the “Default value” field only
if you map to a new created variable or if no mapping is specified. In
older versions, users had to specify explicitly that the default value and
initialization value were identical.

6. Delete the variable assignment again. Click the root of the channel,
the BYTE node. Use the Input Assistant again to select the variable
Application.PLC_PRG.byte_gotodevice.
🡆 The variable is inserted, all bit addresses of the main channel are
struck through and you should not additionally occupy them.

R911403764, Edition 08 Bosch Rexroth AG


122 / 1158 ctrlX PLC Engineering
Configuring Devices and I/O Mapping

See also
● ⮫ Chapter 33.1.9 Tab '<Device name> I/O mapping' on page 739

Mapping a device input to a recently created project variable


In the following you will map a device output to a global implicit variable, which
you recently create for this purpose directly in the “I/O Mapping” dialog.
The “I/O Mapping” dialog is thus a further place for declaring a global variable.

Requirement: A device that supports an I/O mapping configuration in PLC Engi-


neering is inserted in the device tree of your project. On the “I/O Mapping” tab
in the device editor you will thus see a tabular display of the input and output
channels of the device with specification of the addresses and data types.
1. To open the device editor, double-click the device object in the device
tree, and then the “<device name> I/O Mapping” tab.
2. Click in the mapping table on a channel entry in the “Variable” column in
order to open an input field.
3. Enter a simple name (without '.') for a new variable (for example,
myBool).
🡆 PLC Engineering creates the variable as an implicit global variable in
the project and assigns it directly to the channel address. Therefore in
this case the address does not appear struck through as in the case of
mappings to existing variables .

Linking a device with a function block instance


If supported by the device, you can map entire function blocks to an input or
output channel. This allows you to count the frequency of signal changes or
scale a channel value for maintenance purposes, for example.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 123 / 1158
Configuring Devices and I/O Mapping

Here you will map a device output channel to a function block. In this example,
the block scales the channel output value.
Requirement: A device with a digital output that supports FB mapping is linked
in the project. There is a function block “Scale_Output_Int” with the following
implementation. The attributes of the function block itself and before the
output parameter with which the channel output is processed are important.
{attribute 'io_function_block'}
FUNCTION_BLOCK Scale_Output_Int
VAR_INPUT

Configuring the I/O connection


iInput : INT;
iNumerator : INT;
iDenominator : INT :=1;
iOffset : INT := 0;
END_VAR
VAR_OUTPUT
{attribute 'io_function_block_mapping'}
iOutput : INT;
END_VAR
VAR
END_VAR
IF iDenominator <> 0 THEN
iOutput := TO_INT(TO_DINT(iInput) * TO_DINT(iNumerator) /
TO_DINT(iDenominator)) + iOffset;
1. Open the “<device name> I/O Mapping” tab of the device editor. Double-
click the output that should be connected to the function block. Click the
button “Add FB for IO channel”.
🡆 The “Select Function Block” dialog opens. On the left side, you see
at least the function block “Scale_Output_int” below the “Application”
node. Libraries linked in the project that contain corresponding func-
tion blocks are also displayed for selection.
2. Select the POU myScaleOutputInt.
🡆 After clicking “OK”, the path of the function block param-
eter iOutput in the “Variable” is entered in the map-
ping dialog. The path comprises the application name, the
device channel name, and the selected FB output (example:
App1.Out_4_Int_myScale_Output_Int_1.iOutput).
3. Select the channel and click “Go to Instance”.
🡆 The focus switches to the “<device name> IEC Objects”
tab and the created entry for the new IEC object
Out_4_Int_myScale_Output_Int_1. In this view in online mode, you
see the current value of the parameter iOutput for the channel
Out_4_Int scaled by the FB. You can also write and force the value
as in other monitoring views.
See also
● ⮫ Chapter 33.4.7 Dialog 'Select Function Block' on page 1039
● ⮫ Chapter 33.1.9 Tab '<Device name> I/O mapping' on page 739
● ⮫ Chapter 33.1.8 Tab '<device name> IEC Objects' on page 738
● ⮫ Chapter Attribute 'io_function_block', 'io_function_block_mapping'
on page 626

Changing and fixing an address value in the I/O map


You can change the address value of an entire channel (but not that of an
individual subelement of the channel!) in the mapping table of the “<device
name> I/O Mapping” tab. This allows you to adapt the addressing to a specified

R911403764, Edition 08 Bosch Rexroth AG


124 / 1158 ctrlX PLC Engineering
Configuring Devices and I/O Mapping

machine configuration and to retain the address value even if the layout of
the modules changes. By default, a change of the layout leads to an automatic
adaptation of the address values.
Requirement: Your project has I/O mapping. See the corresponding sections of
the help page above.
1. To open the device editor, double-click the device object in the device
tree, and then the “<device name> I/O Mapping” tab.
2. Click in the mapping table on a channel entry in the “Address” column in
order to open an input field. This is only possible for the 'root' address of
a channel, not for a particular one of its subelements.
Therefore, change the top address entry of a channel in the table, for
example from QB0 to QB1. Exit the input field.
🡆 The address value is changed. The symbol is displayed before the
address. It indicates that the address is fixed. The addresses of the
subelements of the channel are also changed accordingly. If you now
change the position of the device object inside other device objects
with input/output channels in the device tree, PLC Engineering does
not adapt these addresses to the new order as would be the case
without fixing.

3. In order to undo the manual change or fixing, open the input field of the
address value again, delete the address entry and press the Enter key.
🡆 PLC Engineering resets the address and the subsequent addresses
concerned to the values they had before the change and removes the
symbol .
See also
● ⮫ Chapter 33.1.9 Tab '<Device name> I/O mapping' on page 739
● ⮫ Chapter 32.4.13 Addresses on page 552

Configuration of the I/O variable update


Depending on the device that you link in the project, PLC Engineering updates
the variables applied to its inputs and outputs in different ways. You can explic-
itly change the settings for this in the “I/O Mapping” dialog.
See also
● ⮫ Chapter 33.1.9 Tab '<Device name> I/O mapping' on page 739

Monitoring of variables in the I/O map in online mode


Requirement: You have compiled an application with a device configuration
containing I/O maps without error. The associated hardware and the bus
system are running. You have connected to the controller by means of the
“Online 🠂 Login” command and have loaded and started the application.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 125 / 1158
Configuring Devices and I/O Mapping

1. Open the “I/O Mapping” tab of the PLC in the device editor. To open the
editor, double-click the device object in the device tree.
🡆 The mapping table now additionally contains the “Current Value” and
“New Value” columns.
If a structure variable is mapped to the 'root' element of an address1,
PLC Engineering does not display a value in this line in online mode.
If, for example, a DWORD variable is mapped to the address, however,
the respective values are monitored both in the 'root' line and in the
indented bit-channel lines below it.

Configuring the I/O connection


As a matter of principle, the field in the 'root' line always remains empty
if the value would be composed of several subelements.
1'root' = top element of this address in the Mapping dialog
2. Enter a certain variable value for an entry in the column “New value” and
press [F7] to force or [Ctrl]+[F7] to write the value.
🡆 As in the case of monitoring in the declaration editor or in watch lists,
the forced variable value is displayed in the column “Current Value”
with a prefixed red F-symbol or the written value.
Inputs and outputs that the PLC code does NOT use
NOTICE
are not read by the PLC in online mode, as a result
of which the displayed value could be incorrect. The
“Current Value” of the variables concerned is displayed
with a gray background.

(1) Forced values on the controller


(2) Values not used on the controller, value shown in gray

Generating implicit variables for the forcing of I/Os


During the commissioning of a plant or machine it may be necessary to 'force'
the values applied at the inputs and outputs. If a device supports this you can
cause special 'force variables' to be generated for this purpose and use them,
for example, in an HMI visualization.
Requirement: The device supports the functionality. You have a project in which
an I/O map is configured for the device and which contains a program object
PLC_PRG.
1. Open the device editor, “PLC Settings” tab, by double-clicking the device
object in the device tree.
2. Activate the option “Generate force variables for IO mapping”.

R911403764, Edition 08 Bosch Rexroth AG


126 / 1158 ctrlX PLC Engineering
Configuring Devices and I/O Mapping

3. Press [F11] to compile the application.


🡆 Two variables are created for each I/O channel in accordance with the
following syntax, in the process of which spaces in the channel name
are replaced by underscores:
<device name>_<channel name>_<IEC address>_Force of type
BOOL for the activation and deactivation of forces.
<device name>_<channel name>_<IEC address>_Value of the data
type of the channel for defining the value that you want to force on the
channel.
These variables are available in the Input Assistant in the category
“Variables” / “IoConfig_Globals_Force_Variables.” You can use them
in PLC Engineering in programming objects, in visualizations, in the
symbol configuration, etc.
4. Open the function block “PLC_PRG”, set the focus in the implementation
part and press F2.
🡆 The Input Assistant opens. The variables are available in the category
“Variables” / “IoConfig_Globals_Force_Variables” as described above.
A rising edge at the 'Force variable' input activates the forcing of the
respective input or output with the value given by the 'Value variable'.
A falling edge deactivates the forcing. Deactivation by resetting the
'Force' variable to FALSE is the requirement for being able to force a
new value.
Take note of the following restrictions.
● Forcing via the implicit force variables is only possible for channels that are
mapped in the “I/O Mapping” of the device to an existing or recently created
variable.
● Forcing via the implicit force variables is not possible for unused inputs and
outputs or those that are mapped to a variable via an AT declaration in an
application program.
● I/O channels that you want to force via the mechanism have to be used by
PLC Engineering in at least one task.
● PLC Engineering identifies forced inputs in the monitoring by the red Force
symbol, but not forced input/outputs. The forced value is used only implic-
itly by the I/O driver for writing to the device.
See also
● ⮫ Chapter 33.1.18 Tab 'PLC Settings' on page 758
● ⮫ Chapter 21.5 Forcing and writing of variables on page 277

I/O mapping in one dialog for multiple devices


There is a table that displays the I/O map of a device plus the I/O maps of
all subelements inserted below it in the device tree. There you can edit the
I/O maps in exactly the same way as in the individual mapping tables of the
respective device editors.
Requirement: In the device tree of your project there are several PLCs inserted
that each enable an I/O mapping configuration.
1. Select the root node of the device tree and click “Edit I/O Mapping” in the
context menu .
🡆 The “Edit I/O Mapping” dialog opens, in which the I/O mapping config-
urations of all devices inserted in the project are displayed in a table.
You can edit the entries in the same way as in the “I/O Mapping” dialog
of the associated device editor.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 127 / 1158
Configuring Devices and I/O Mapping

2. Now select one of the control objects in the device tree and select the
“Edit I/O Mapping” command once again in the context menu.
🡆 The “Edit I/O Mapping” dialog now shows only the I/O table for the I/O
mapping configurations found in and under the selected object.
3. Set a desired “Filter” in the bar above the table or enter a variable name
in the “Search for variable” field in order to see the use of this variable in
the mapping.
🡆 The method of working in this window is the same as that described for
the “<device name> I/O Mapping” tab.

Configuring the I/O connection


See also
● ⮫ Chapter "Edit I/O mapping" command on page 927

R911403764, Edition 08 Bosch Rexroth AG


128 / 1158 ctrlX PLC Engineering
Configuring Devices and I/O Mapping

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 129 / 1158
Configuring the Memory Reserve for an Online Change

18 Programming the application


18.1 Program application – General information
To create an executable application program on the control, add declarations
and implementation code (source code) to the POUs and link the I/Os of the
control to the application variables and configure a task assignment. After
checking and debugging, the PLC Engineering compiler then creates the appli-
cation code that can be loaded onto the control.
The programming of the application modules (POUs) is supported by the pro-

Programming the application


gramming language editors and several other functionalities such as text lists,
image collections, alarm configuration, pragmas, refactoring and use of ready-
made modules from ctrlX I/O Engineering System or libraries.
There are options to verify the syntax and to analyze code, to generate data
persistence and to encrypt application code that is uploaded to the control.

18.2 Designating Identifiers


Identifiers are names of variables and programming objects (for example pro-
grams, function blocks, and methods) and names of other objects of the
application and project. There are rules that you must follow when assigning
identifiers. Furthermore, there are also recommendations to help you designate
uniform and expressive identifiers.
You designate variables identifiers in the variables declaration. These identifiers
can e changed in the declaration section of the programming object. You desig-
nate identifiers for programming objects and other objects in the dialog box
when adding the object. You can change the identifier of an existing object of
the application or of the project in the properties dialog of the object. However,
you cannot change the identifiers of objects that can be available only one time
per application or project (for example, the “Library Manager” and “ImagePool”
identifiers).
See also
● ⮫ Chapter 32.7 Identifier on page 651

18.3 Configuring the Memory Reserve for an Online Change


You can configure a function block with a memory reserve to prevent its func-
tion block instances from having to be copied to new memory locations during
an online change. This can happen when you make declaration changes for
example adding variables to the function block. With memory reserves, this
kind of online change runs faster and fewer problems occur. When the memory
reserve is depleted, a message is displayed before the online change is per-
formed.
The memory reserve for a function block is best con-
NOTICE
figured before downloading the application to the con-
troller for the first time. If the memory reserve is config-
ured when the application exists on the controller, then a
more complicated online change is necessary.

Configuring a memory reserve for the online change for a function


In the future, bigger changes are made to a function block of a project, which
could result in function block instances being copied to other memory loca-
tions in an online change.
Requirement: The open project is not located on the controller yet.

R911403764, Edition 08 Bosch Rexroth AG


130 / 1158 ctrlX PLC Engineering
Function Block — Calling Functions or Methods with External Implementation

1. Click “View 🠂 Online Change Memory Reserve Settings”.


🡆 The “Online Change Memory Reserve” view opens.
2. Select the application of the project from the list box.
3. Click “Build 🠂 Build”.
4. Click the “Scan Application” button.
5. Select the “All” entry in the “Function blocks” area.
🡆 All function blocks of the application are displayed in the view.
6. Select the corresponding function block for which you want to configure a
memory reserve.
🡆 If the application is not on the controller yet, then the “Memory
reserve” input field is editable.
7. If the application is already on the controller, then click the “Enabled”
button in the “Enable Editing” area.
Note that if you modify the memory reserve of an application that is
already on the controller, then the instances of all affected function blocks
have to be copied to the memory.
8. Specify the size of the memory reserve (in bytes) and click “Apply for
Selection”.
🡆 The given number of bytes is shown in the “Memory reserve” field in
the table.
9. Click “Build 🠂 Build” and then click “Scan Application”.
🡆 The following information is updated in the function block list for
the configured function block: “Size”, “Instance count”, “Additional
memory for all instances”, and “Remaining size of the memory
reserve”.
Now when you download the application to the controller, the function block
instances occupy the required memory and also the memory reserve. In
the future, bigger changes of the function block can be downloaded to the
controller with the online change without having to copy all function block
instances to memory.

See also
● ⮫ Chapter Command 'Settings of Memory Reserve for Online Change'
on page 911
● ⮫ Chapter "Online change" command on page 943

18.4 Function Block — Calling Functions or Methods with


External Implementation
A runtime system can include the implementation of a function block, function,
or method (for example, from a library). If you create a POU in your application
with the same name by using the “External implementation” without an imple-
mentation, then you can execute the existing implementation. Please make sure
that you declare local variables only in an external function block. External
functions and methods must not contain local variables.
When the application is downloading, PLC Engineering searches for and links
the associated implementation in the runtime system for each external POU.
Objects with the property “External implementation” are postfixed with (EXT)
after the object name in the “Devices” or “POUs” view.
See also
● ⮫ Chapter 'Properties' dialog - 'Build' on page 1048

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 131 / 1158
Using the input assistance

Creating POUs with external implementation


1. Click “Project 🠂 Add Object 🠂 POU”.
2. Activate “Function block”, Method, or “Function” and specify the name
of the associated implementation of the runtime system. Close the dialog
box by clicking “Add”.
🡆 The runtime system POU is created in the “POUs” view. The name is
postfixed with (EXT).
3. Right-click the POU and select “Properties”.
🡆 The dialog box opens.

Programming the application


4. Click the “Build” tab.
5. Select the “External implementation (Late link in the runtime system)”
check box.
🡆 The POU is declared and you can implement a POU call.

Creating methods with external implementation


1. Select a function block in the device tree or in the POUs view.
2. Select “Add Object 🠂 Method” and type the name of the associated
implementation of the runtime system. Click “Add” to close the dialog
box.
🡆 The method is created.
3. Right-click the method and select “Properties”.
🡆 The dialog box opens.
4. Click the “Build” tab.
5. Select the “External implementation (Late link in the runtime system)”
check box.
🡆 The method is declared and you can implement a method call. The
method name is postfixed with (EXT) in the “Devices” or “POUs” view.

18.5 Using the input assistance


PLC Engineering provides tools and features to help you code when creating
programs.

Input assistant
The dialog provides all programming elements that you can insert in the current
cursor position. Open the “Input assistance” dialog by clicking on “Edit 🠂 Input
assistance” or by pressing [F2].
Also refer to
● ⮫ Dialog 'Input Assistant' - Tab 'Categories' on page 892

'Declare variable' dialog


This dialog supports the declaration of variables.
Also refer to
● ⮫ Chapter Command 'AutoDeclare' on page 889

“List components”
The "List components" function is an input tool in textual editors to help you
input valid identifiers. Enable the function as follows: Select the command
“Tools 🠂 Options”, and then the “Intelligent coding”category. Enable the option
“List components after a dot (.) was entered”.

R911403764, Edition 08 Bosch Rexroth AG


132 / 1158 ctrlX PLC Engineering
Using the input assistance

● If you enter only a dot . instead of a global variable, a selection list with all
available global variables is displayed. By double-clicking on a variable of the
selection list or pressing the [Enter] key, insert the selected variable after
the dot.
● If you enter a dot instead of a global variable or after a function module
instance variable or a structure variable, PLC Engineering offers all global
variables, all input and output variables of the function module or all struc-
ture components in a selection list accordingly.
By double-clicking on a variable of the selection list or pressing the [Enter]
key, insert the selected variable after the dot.
Note: If you also want to retain the local variables of function block
instances, also enable the option “Show all variables of an instance in the
input help” in the PLC Engineering options for intelligent coding.
● If a component access (with dot) has already been made for a selection list,
the last selected entry is preselected for the next component access.
● When entering any string and then press [Ctrl] + [Space], a selection list
with all available POUs and global variables is displayed. The first element
in this list that starts with the sequence of characters is selected by default
and you can insert it by double-clicking it or by pressing [Enter].
Matches with the entered string are highlighted in yellow in the selection
list.
When the entered string is changed, the displayed selection list is updated.
● In the ST editor you can filter the displayed selection list by area of validity:
Depending on the displayed drop-down list, it can be switched between the
following drop-down lists using the [right arrow] and [left arrow] keys:
– “All items”
– “Keywords”
– “Global declarations”
– “Local declarations”
● PLC Engineering displays a tooltip if you type an opening parenthesis for a
POU parameter when calling a function block, a method, or a function. This
tooltip includes information about the parameters as they are declared in
the POU. The tooltip remains open until you click to close it or you change
the focus away from the current view. If you accidentally close the tooltip,
you can open it again with [Ctrl] + [Shift] + [Spacebar].
You can use the pragma attribute 'hide' for excluding variables from the "List
components" feature.

Examples
Typing structure variables:

list
Calling a function block:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 133 / 1158
Using the input assistance

Programming the application


Also refer to
● ⮫ Chapter 'Options' dialog - 'Intelligent coding' on page 1082
● ⮫ Chapter Attribute 'hide' on page 620

short form feature


The short form feature allows you to type abbreviated forms for variable dec-
larations in the declaration editor and in textual editors where variables dec-
larations are possible. Use this feature by pressing [Ctrl]+[Enter] to end a
declaration line.
PLC Engineering supports the following short forms:
● All identifiers become variable identifiers except the last identifier of a line.
● The data type of the declaration is determined by the last identifier of the
line. The following applies:
– B or BOOL yields BOOL
– I or INT yields INT
– R or BOOL yields BOOL
– S or STRING yields STRING
● If a data type is not defined using this rule, then the data type is automati-
cally BOOL, and the last identifier is not used as the data type (see Example
1).
● Depending on the type of declaration, every defined constant becomes an
initialization or string length definition (see Example 2 and 3).
● An address, such as %MD12, is automatically extended with the AT attribute
(see Example 4).
● Any text after a semicolon (;) is converted into a comment (see Example 3).
● All other characters in the line are ignored (see exclamation mark in Example
5).

Examples
Example Short Form Resulting declaration
1 A A: BOOL;
2 A B I 2 A, B: INT := 2;
3 ST S 2; A string ST:STRING(2); (* A string *)
4 X %MD12 R 5 Real Number X AT %MD12: REAL := 5.0;(*
Real Number *)
5 B ! B: BOOL;

Also refer to
● ⮫ Programming the application

R911403764, Edition 08 Bosch Rexroth AG


134 / 1158 ctrlX PLC Engineering
Using pragmas

Smart tag functions


Smart tags make it easier to write program code by suggest appropriate com-
mands directly at the programming element. When you place the cursor over
a programming element that has a smart tag function, the symbol appears.
When you click the symbol, the commands that you can choose from are
shown. Available smart tags:
● For undeclared variables in the implementation part in the ST editor, the
smart tag function provides the “Declare variable” command.
Also refer to
● ⮫ Chapter Command 'AutoDeclare' on page 889

18.6 Using pragmas


Pragmas in PLC Engineering
A pragma is text in the application source code that is enclosed in curly braces.
Pragmas are used to insert special instructions in the code that the compiler
can evaluate. This allows a pragma to affect the properties of one or more
variables with respect to precompilation or compilation (code generation).
Pragmas, which the compiler does not know, are skipped like a comment.
The statement string of a pragma can also be multiline. For syntax in detail
please see the descriptions of the individual PLC Engineeringpragmas.
There are pragmas for different effects: Initializing a variable, monitoring of
a variable, adding a variable to the symbol configuration, forcing message
outputs during the compilation process, behavior of a variable under certain
conditions, etc.
The upper/lower case has to be complied with.
NOTICE

Examples
{warning 'This is not allowed'}

{attribute 'obsolete' := 'datatype fb1 not valid!'}

{attribute 'Test':='TestValue1;
TestValue2;
TestValue3'}

Possible insertion points


Pragmas in PLC Engineering are not one-to-one imple-
NOTICE
mentations of C-preprocessor directives. Position a
pragma like a regular statement. You must not use a
pragma within an expression.
You can insert a pragma to be evaluated by the PLC Engineering compiler at the
following positions:
● In the declaration part of a programming function block:
– In the textual declaration editor, enter pragmas directly as line(s), either
at the beginning of the block or before a variable declaration.
– In the tabular editor, enter pragmas that should be above the first decla-
ration line in the “Edit declaration part” / “Attributes” dialog.
● In a global variable list

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 135 / 1158
Using pragmas

● In the implementation part of programming function block:


– The pragma has to be positioned in a "statement position", i.e. at the
beginning of a programming block in a separate line, or after a ";" or
END_IF, END_WHILE etc.
– FBD/LD/IL Editor: Pragmas in networks of the FBD/LD/IL editor are
entered like a jump label: Select the command “FBD/LD/IL 🠂 Insert jump
label”. Replace the standard text “Label:” in the text field of the marker
with the corresponding pragma statement. If you want to use a pragma in
addition to a jump label, enter the pragma first and then the label.

Programming the application


Incorrect and correct positioning of a conditional pragma
FALSCH:
{IF defined(abc)}
IF x = abc THEN
{ELSE}
IF x = 12 THEN
{END_IF}
y := {IF defined(cde)} 12; {ELSE} 13; {END_IF}
END_IF
RICHTIG:
{IF defined(abc)}
IF x = abc THEN
{IF defined(cde)}
y := 12;
{ELSE}
y := 13;
{END_IF}
END_IF
{ELSE}
IF x = 12 THEN
{IF defined(cde)}
y := 12;
{ELSE}
y := 13;
{END_IF}
END_IF
{END_IF}

In the “Properties” dialog, “Compile” category, you can specify defines that can
be queried in pragmas.
Scope:
Depending on the type and content of a pragma, a pragma acts on the fol-
lowing:
● the following declarations
● exactly to the following instruction
● on all subsequent instructions until it is canceled again with an appropriate
pragma
● on all subsequent statements until the same pragma is executed with dif-
ferent parameters, or the end of the code is reached. 'Code' in this context
means: Declaration part, implementation portion, global variable list, type
declaration. Thus, a pragma that stands alone in the first line of the declara-
tion part and is not superseded or overridden by another pragma affects the
entire object.

R911403764, Edition 08 Bosch Rexroth AG


136 / 1158 ctrlX PLC Engineering
Using library function blocks

Pragma categories in PLC Engineering


The PLC Engineering pragmas are divided into the following categories:
● Attribute pragmas: Influencing compilation and precompilation
● Message pragmas: Output of user-defined messages during the compilation
process
● Conditional pragmas: Influencing the coder generation
● User-defined pragmas

Also refer to
● ⮫ Chapter 18.16.4 Using the 'Declare variable' dialog on page 165
● ⮫ Chapter 32.6.2 Message Pragmas on page 596
● ⮫ Chapter 32.6.3 Conditional pragmas on page 597

18.7 Using library function blocks


Libraries are collections of objects that can be included in your application. You
can use the objects contained in libraries in the project in exactly the same way
as objects that have been defined directly in the project.
Libraries can contain the following objects:
● POUs such as function blocks or functions
● Interfaces and their methods and properties
● Data types such as enumerations, structures, aliases, unions
● Global variables, constants, parameter lists
● Text lists, image collections, visualizations, visualization elements
● External files (for example documentations)
● Cam tables
The management of libraries in a project is realized in the library manager. The
previous installation of the library on the system is realized using the library
repository dialog.
For "visibility" of library function blocks and namespaces of libraries, refer to
the library properties help page.
Also refer to
● ⮫ Chapter Command 'Properties' on page 1008
● ⮫ Chapter Command 'Properties' on page 1008

Using a library function block


The following instruction describes as an example how to insert the counter
function block CTUD from the Standard library into your program.
1. Open a POU in the editor and position the cursor in the declaration part.
2. Enter a name for the function module instance followed by a colon (for
example, iCounter1:).
3. Open the input help with [F2].
4. In the “Structured types” category, select the CTUD function module from
the Standard library (counter subfolder).
Enable the option “Insert with namespace prefix”.
5. Close the dialog with “OK”.
🡆 The function block is inserted into the declaration part with namespace
prefix: iCounter1:Standard.CTUD.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 137 / 1158
Managing Text in Text Lists

18.8 Managing Text in Text Lists


Text lists are used for preparing visualization texts is multiple languages. You
can specify the texts in Unicode format so that all languages and characters are
possible. You can export text lists and then translate the texts outside of the
current project.
PLC Engineering differentiates between static text (managed in the
“GlobalTextList” object) and dynamic text (managed in objects of type
“TextList”. Static texts exist in the visualization and can change only the dis-
played language while in runtime mode. The text ID stays the same. Dynamic

Programming the application


texts can be controlled by means of an IEC variable that contains the text ID.
In this way, you can display varying text in a visualization element in runtime
mode. For example, you can configure a text field so that is shows an error text
for an error number.
Both text list types include a table with text entries. An entry consists of an
ID for identification, the output text, and its translation. In a text list or global
text list, you can translate an output text in any number of languages. The
translations are the basis for the language selection and the language switch in
visualizations.

Adding a language and translating text


Requirement: A project is open with a text list or global text.
1. Double-click an object of type “TextList” or “GlobalTextList” in the device
tree or POUs view.
🡆 The “Textlist” menu is shown in the menu bar and the text list opens in
the editor.
2. Click “Textlist 🠂 Add Language”.
3. Specify a name for the language (example: en-US). Click “OK” to close the
dialog.
🡆 A column is displayed with the heading en-US.
4. Type in the translation of the source text into the column.
You can correct the name of a language in the table by means of the command
“Rename Language” in the context menu of the text list.

Exporting a text list


Requirement: A project is open with a text list or global text.
1. Double-click the object “GlobalTextList” or an object of type “TextList”.
🡆 The object opens.
2. Click “Textlist 🠂 Import/Export Text Lists”.
🡆 The “Import/Export” dialog opens.
3. At “Choose export file”, click for more ( ) and select the directory and
file name (example: Text_lists_exported).
4. Select the “Export” option.
5. Click “OK” to close the “Import/Export” dialog.
🡆 PLC Engineering exports to a file the text list entries of all text lists of
the project. The table contains a column with the text list names.

R911403764, Edition 08 Bosch Rexroth AG


138 / 1158 ctrlX PLC Engineering
Managing Text in Text Lists

Example
Contents of the file Text_lists_exported

TextList Id Default en_US


Text_list_A A Information A Infrrmation A_en
Text_list_A B Information B: OK Information B_en: OK
Text_list_A C Information C Information C_en
Text_list_A D Information D Information D_en
Text_list_A E Information E Information E_en
Text_list_A F Information F Information F_en
AlarmGroup 2 Warning 2
AlarmGroup 1 Warning 1
GlobalTextList Information B Information B_en
GlobalTextList Information A Information A_en
GlobalTextList Switch Switch
GlobalTextList Counter: %i Counter : %i

Preparing the exported file for input assistance


Requirement: A file is created (example : Text_lists_exported) by means of
the command “Import/Export Text Lists”. It contains the texts of the text lists
of the project.
1. Click “Tools 🠂 Options”, “Visualization” category, “File Options” tab.
2. Click in “Text file for textual "List components" ” and select a file
(example: Text_lists_exported). Click “OK” to close the dialog.
🡆 When you specify a static text in the “Texts” property for an element
in a visualization, PLC Engineering offers the source text of the file as
input assistance when typing in the first letter.

(1): “Texts”, “Text”


See also
● ⮫ “List components” on page 131

Importing files with text list entries


A file to be imported has the .csv format. The first line is a header (example:
TextList Id Default en_US). The other lines contain text list entries. You
get this kind of file by exporting the text lists of the project to a file. There
you can edit the text list entries and then import the file outside of PLC
Engineering. When importing, PLC Engineering handles the text list entries
differently for the GlobalTextList and for dynamic text lists.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 139 / 1158
Managing Text in Text Lists

GlobalTextList
● PLC Engineering does not create new text list entries for an unknown ID.
● PLC Engineering ignores changes that affect the ID or the source text.
● PLC Engineering accepts changes in the translations.
TextList
● For a new ID, PLC Engineering supplements the corresponding text list with
a text list entry.
● For an existing ID that does not agree in the source text, the source text of
the text list is overwritten with the source text of the file.

Programming the application


● PLC Engineering accepts changes in the translations.
Importing a file
Requirement: A project is open with a text list or global text.
1. Double-click the object “GlobalTextList” or an object of type “TextList”.
🡆 The object opens.
2. Click “Textlist 🠂 Import/Export Text Lists”.
🡆 The “Import/Export” dialog opens.
3. In the “Choose file to compare or to import” input field,
click for more ( ) and select the directory and file (example:
Text_lists_corrected.csv).
4. Select the “Import” option.
5. Click “OK” to close the dialog.
🡆 PLC Engineering imports the text list entries of the file into the respec-
tive text lists.

Example
Contents of the file Text_lists_corrected.csv

TextList Id Default en_US


Text_list_A A Information A Information A2_en
Text_list_A B Information B: OK Information B_en: OK
Text_list_A C Information C Information C_en
Text_list_A D Information D Information D_en
Text_list_A E Information E Information E_en
Text_list_A F Information F Information F_en
Text_list_A G Information G Information G_en
AlarmGroup 2 Warning 2
AlarmGroup 1 Warning 1
GlobalTextList Information B Information B_en
GlobalTextList Information A Information A_en
GlobalTextList Switch Switch
GlobalTextList Counter: %i Counter : %i
These contents are applied to the text lists with the same name in the project.

See also
● ⮫ Chapter Command 'Import/Export Text Lists' on page 1022

Comparing text lists with a file and exporting differences


Requirement: A project is open with a text list or global text.
1. Double-click the object “GlobalTextList” or an object of type “TextList”.
🡆 The object opens.
2. Click “Textlist 🠂 Import/Export Text Lists” in the context menu.
🡆 The “Import/Export” dialog opens.

R911403764, Edition 08 Bosch Rexroth AG


140 / 1158 ctrlX PLC Engineering
Managing Text in Text Lists

3. In the “Choose file to compare or to import” input field, click for more
( ) and select the directory and file name of the comparison file
(example: Text_lists_corrected.csv).
4. For “Choose export file”, click and select the directory and file that
contains the comparison result.
5. Select the “Export only text differences” option.
6. Click “OK” to close the dialog.
🡆 PLC Engineering reads the import file and compares the text list entries
that have the same ID. If they do not agree, then PLC Engineering
writes the text list entries of the text list to the export file.
For the global text list, PLC Engineering compares the translations of
the same source texts. If they do not agree, then PLC Engineering
writes the text list entries to the export file.

See also
● ⮫ Chapter Command 'Add Language' on page 1021
● ⮫ Chapter Command 'Import/Export Text Lists' on page 1022
● ⮫ Chapter Command 'Remove Language' on page 1023
● ⮫ Chapter 33.2.24 Object 'Text List' on page 788

18.8.1 Managing Static Text in Global Text Lists


The global text list is the central location for texts that are displayed in the
visualization.
When you configure a text for the first time in visualization element, PLC Engi-
neering creates the global text list. PLC Engineering fills in the table as you
create more texts. Therefore, the table includes all texts automatically that you
create in the project visualizations. PLC Engineering assigns incremental IDs as
integers, beginning at 0.
You can check, update, and compare the global text list with the static texts
of the visualization. You cannot edit the source text or the ID directly in the
table. However, you can replace a source text with another source text by
creating and importing a replacement file. Menu commands are provided for
this purpose.

Configuring visualization elements with static text


A text in a “GlobalTextList” can contain a format definition.
Requirement: A project is open with a visualization. The “GlobalTextList” object
contains the texts that are defined in the project visualizations.
1. Double-click the visualization.
🡆 The editor opens.
2. Select an element with the “Text” property (example: “Text field”).
3. Type in some text in the “Text” property (example: Static Information
A).
🡆 PLC Engineering adds the text to the global text list in the POU view.

Checking the global text list


Requirement: A project is open with a visualization. The “GlobalTextList” object
contains the texts that are defined in the project visualizations.
1. Double-click the “GlobalTextList” object in the POUs tree.
🡆 The table opens with the static texts.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 141 / 1158
Managing Text in Text Lists

2. Click “Text List 🠂 Check Visualization Text IDs”.


🡆 PLC Engineering reports when a source text of the text list does not
match the static text that is identified by the ID. The source text in the
global text list and the text in the visualization with the same ID do not
match.

Updating IDs of the global text list


Requirement: A project is open with a visualization. The “GlobalTextList” object
contains the texts that are defined in the project visualizations.

Programming the application


1. Double-click the “GlobalTextList” object in the POUs tree.
🡆 The list opens with the text list entries.
2. Click “Text List 🠂 Update Visualization Text IDs”.
🡆 PLC Engineering adds text to the global text list when a text in the
“Static Text” property does not match the source text in the project
visualizations.

Removing the global text list and creating current IDs again
Requirement: A project is open with a visualization. The “GlobalTextList” object
contains the texts that are defined in the project visualizations.
1. Right-click the “GlobalTextList” object in the POUs tree and select the
“Delete” command.
🡆 The object is removed.
2. Open a visualization.
3. Click “Visualization 🠂 Create Global Text List”.
🡆 In the POU view, a new “GlobalTextList” object is created. The global
text list contains the static text from the existing project visualizations.

Removing IDs from the global text list


Requirement: A project is open with a visualization. The “GlobalTextList” object
contains the texts that were defined in the project visualizations.
1. Double-click the “GlobalTextList” object in the POUs tree.
🡆 The table opens with the texts.
2. Click “Text List 🠂 Remove Unused Text List Entries”.
🡆 PLC Engineering removes the text list entries with IDs not referenced in
the project visualizations.

Updating the global text list with a replacement file


A replacement file has the CSV format. The first row is a header: defaultold
defaultnew REPLACE. The following rows contain the old source texts, the
new source texts, and then the REPLACE command. Tabs, commas, and semico-
lons are permitted separators. A combination of separator characters in a file is
not permitted.
Example (tab as separator character)
defaultold defaultnew REPLACE
Information A Information A1 REPLACE
When you import a replacement file, PLC Engineering processes the replace-
ment file row by row and performs the specified replacements in the
“GlobalTextList”. In addition, PLC Engineering replaces the previous text with
the replacement text in the visualizations. If the replacement text already exists
as static text, then PLC Engineering recognizes this and harmonizes the static
text and leaves only one text list entry.

R911403764, Edition 08 Bosch Rexroth AG


142 / 1158 ctrlX PLC Engineering
Managing Text in Text Lists

Requirement: A project is open with a text list or global text.


1. Double-click the “GlobalTextList” object.
🡆 The object opens.
2. Click “Text List 🠂 Import/Export Text Lists”.
🡆 The “Import/Export” dialog opens.
3. At the “Choose file to compare or to import” input field,
click for more ( ) and select the directory and file (example:
ReplaceGlobalTextList.csv).
4. Select the “Import replacement file” check box.
5. Click “OK” to close the dialog.
🡆 The texts in the text lists and the visualizations are replaced.

Example
The global text list contains the following source texts:

GlobalTextList Counter: %i
GlobalTextList Counter: %i
GlobalTextList Information A
GlobalTextList Information a
GlobalTextList Information Aa
GlobalTextList Switch
The replacement file contains the following replacements:

defaultold defaultnew REPLACE


Counter: %i Counter2: %i REPLACE
Counter: %i Counter2: %i REPLACE
Information A Information A2 REPLACE
Information a Information A2 REPLACE
Information Aa Information A2 REPLACE
Switch Switch2 REPLACE
PLC Engineering detects duplicate text list entries and removes them. After-
wards, the global text list contains the following source texts:

The texts in the visualization have been replaced.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 143 / 1158
Managing Text in Text Lists

Programming the application


See also
● ⮫ Chapter Command 'Create Global Text List' on page 1021
● ⮫ Chapter Command 'Check Visualization Text IDs' on page 1024
● ⮫ Chapter Command 'Update Visualization Text IDs' on page 1024
● ⮫ Chapter 33.2.14 Object 'GlobalTextList' on page 776

18.8.2 Managing Dynamic Text in Text Lists


You can create and translate texts in a text list for dynamic texts in order to
show them dynamically in a visualization or in the alarm management. The
object of type “Text list” can be located globally in the POUs view or below an
application in the device tree. It contains a table with text list entries that you
can edit and extend. A text list entry consists of an ID for identification, the
output text, and its translation. You can add new text list entries to a text list.
Menu commands are provided for this purpose.

Creating text lists for dynamic text output


Requirement: A project is open with a visualization.
1. Select an application in the POUs view or device tree and click “Project
🠂 Add Object”.
2. Select “Text list”.
3. Type a name (example: Textliste_A). Click “Add” to close the dialog.
🡆 An object of type “Text list” is created.
4. Click below the “Default” column and open the input field. Type a text
(example: Information).
🡆 The source text is created. It is used as a key in the table and as a
source text for translations.
5. Type any string in the “ID” column (example: A).
🡆 A text list entry is defined with source text and ID. If you configure the
“Dynamic texts” property of an element in a visualization, then you can
select the text list Textliste_A and assign the ID A.

R911403764, Edition 08 Bosch Rexroth AG


144 / 1158 ctrlX PLC Engineering
Using Image Pools

6. Double-click in the blank line at the end of the table below “Default” and
type in more text list entries.

Displaying text dynamically


In a visualization, you can configure the dynamic output of texts that were
created in a text list by configuring the “Dynamic texts” property of an element.
You can directly assign a text list and an ID, as well as IEC variables, where you
set the values programmatically.
Requirement: A project with visualization is open and a text list is in the device
tree.
1. Open the text list (example: Text_list_A).
2. Double-click the visualization.
🡆 The editor opens.
3. Drag an element to the visualization (example: a “Text field”).
4. Configure its “Dynamic texts” property by selecting one in the “Text list”
property (example: 'Text_list_A') and add an ID from the text list into
the “Text index” (example: 'A'). Pay attention to the single straight quota-
tion marks. You can also assign an IEC variable of type STRING for the text
list name and ID.
🡆 The IEC variables allow for programmatic access to the texts of the text
lists.
5. Build the application, download it to the controller, and start it.
🡆 The visualization shows the text from the text list in the text field :
Information A.

See also
● ⮫ Chapter 33.2.24 Object 'Text List' on page 788

18.9 Using Image Pools


An image pool is a table of image files. PLC Engineering references image files
for use in the project (for example, in a visualization) uniquely by the ID and
name of the image pool. A project can include several image pools. You can
create Image pools in the device tree below the application or in the POU pool.
In a library project, you can use the object properties of an image pool to turn
it into a symbol library for the visualization.
We recommend that you reduce the size of image files as much as possible
integrating them. This will optimize the loading time of the visualization in every
visualization type: TargetVisu, WebVisu and development system.
If you insert an image element into a visualization and enter an ID (“Static ID”)
in the element properties, then PLC Engineering automatically creates a global
image pool. PLC Engineering uses the default name “GlobalImagePool” for this.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 145 / 1158
Using Image Pools

Please note the following when the ID of an image file appears in several image
pools.
● Search order: If you selected an image managed in “GlobalImagePool”, then
you do not have to enter the name of the image pool. The search order for
image files is as follows:
– 1. GlobalImagePool
– 2. Image pools assigned to the currently active application
– 3. Image pools next to the GlobalImagePool in the POU window
– 4. Image pools in libraries

Programming the application


● Unique access: You can reference a selected image directly and uniquely
by appending the image ID to the name of the image pool in the following
syntax "<pool name>.<image ID>.
See also
● ⮫ Chapter 33.2.18 "Image pool” object on page 779
● ⮫ Chapter Dialog 'Properties' - 'Image Pool' on page 1058

Creating image pools


1. Select the “Application” object in the device tree.
Click “Project 🠂 Add Object 🠂 Image Pool”.
🡆 The “Add Image Pool” dialog box opens.
2. Type a name for the image pool (for example, "Images1") and click “Add”.
🡆 The image pool is added to the device tree.
3. Select the image pool object and open by choosing the command “Project
🠂 Edit Object”.
4. Double-click the field in the “ID” column and assign an appropriate ID (for
example, "Icon1").
You can also add new images to the list by clicking “Imagepool 🠂 Add
Image File”.
5. Double-click the field in the “File name” column. Click for more settings
( ).
🡆 The “Select Image” dialog box opens.
6. Click for more settings ( ) and select the image file.
🡆 A thumbnail of the image file is displayed in the field of the column
“Image”. The name of the file is displayed in the field of the column
“File name”.
The image file can be references only by the name Images1.Icon1.
See also
● ⮫ Chapter Command 'Insert Image' on page 1011

Using image files in the 'Image' visualization element


When you insert an image element into a visualization, you can define the
image type.
● Static image: Enter the image ID of the image file or the name of the image
pool plus the image ID into the element configuration (property “Static ID”).
Please note the comments for the search order and access.
● Dynamic image: Type the variable for defining the image file ID (for example,
PLC_PRG.imagevar) in the element configuration (“Bitmap ID variable”
property). You can exchange a dynamic element in online mode depending
on a variable.
See also
● ⮫ Visualization element 'Image'

R911403764, Edition 08 Bosch Rexroth AG


146 / 1158 ctrlX PLC Engineering
Integrating C Modules

Using image files for the visualization background


You can set an image in the background definition of a visualization. You can
define the image by the name of the image pool plus the filename, as described
above for a visualization element.
See also
● ⮫ Command 'Background'

18.10 Integrating C Modules


With the C code integration plugin, externally implemented C code files can be
included in PLC Engineering projects and C stubs can be generated from IEC
objects.
In PLC Engineering, the “C Code Module” object type is available for this pur-
pose. The C code files and the used IEC objects are located below a “C Code
Module”. A file directory on the hard disk with C code files is assigned to each
C code module.
In the project, you can generate IEC objects from a C code file in the format *.h
or *.hpp (header file) in order to use them in other POUs.
The generation of C-stubs is intended for the following use cases:
● A C code file accesses an IEC object: A C code file cannot access an IEC
object directly. It can access only the C stub that was generated from the
IEC object.
● Generation of precompiled modules that you can merge into a library
project.
After being imported, the imported source code files are part of the PLC Engi-
neering project and they are therefore decoupled from the original files on the
disk.
During compilation, a dynamic module is generated from a C code module and
saved as part of the project. Information, warnings, and errors are displayed in
the message view in the “C Code Module” category.
All dynamic modules of an application are transferred and loaded to the run-
time system during the download. The runtime system must support dynamic
linking for this.
License for the runtime system
The runtime system requires a license that permits C modules to be loaded.
Without this license, dynamic modules cannot be linked during the download,
and therefore the download will be aborted.
The dynamic modules are part of the boot application and they are reloaded
and activated when the controller is restarted. The “Reset Origin” command
unloads all C code modules in the application. The “Reset Cold” and “Reset
Warm” commands do not lead to a repeated initialization of the C code mod-
ules.
No C code for simulation mode
NOTICE
In simulation mode, C code is not generated and loaded
to the runtime system. To simulate the code contained in
the C modules anyway, you can implement it for this pur-
pose in the respective IEC objects of the C code module.
PLC Engineering does not support the monitoring of variables in C code files or
the setting of breakpoints in C source code.
Precompiled module in a library:
C code integration provides the capability of assigning a precompiled runtime
module (example: *.dll) in the library to a device and then to save it in the
library. Then, these modules can be loaded dynamically.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 147 / 1158
Integrating C Modules

See also
● linktarget doesn't exist but @y.link.required='true'
● ⮫ Chapter Object 'C Implemented Library' on page 819
● ⮫ Chapter 20.4 Handling of Device User Management on page 262

Configuring C code modules


Requirement: A project is open that already includes a C code module.
1. Click the object “C Code Module” in the device tree.
2. Select the command “Properties” in the context menu.

Programming the application


3. Open the “Build” tab in the “Properties” dialog.
4. Specify the file path of the Visual Studio installation on your computer.
The input assistant ( ) and the search tool (magnifying glass) are also
available.
5. Specify the file path of the MS Windows SDK installation on your com-
puter. The input assistant ( ) and the search tool (magnifying glass) are
also available.
6. Specify a file path for PLC Engineering to store the temporary compile
files.

Importing folders with C source files from the file directory


Requirement: A project is open. The project controller supports the integration
of C code.
1. Select “Application” in the device tree and click “Project 🠂 Add Object
🠂 C Code Module”.
2. If necessary, specify a new name for your C code module in the “Add C
Code Modules” dialog. If you do not, then your object will be given the
standard name “C Code Module”.
3. Click the symbol ( ) next to the “Source directory” input field.
4. The “Find Folder” dialog opens.
5. In the “Find Folder” dialog, select the folder containing the C source files
(*.c, *.cpp, *.h, or *.hpp).
6. When you select the “Monitor folder for source code changes” option, PLC
Engineering displays a message when changes have been made to the C
source files in the selected folder of the file system.
7. Click “Add”.
🡆 PLC Engineering inserts the C code module into the device tree with
the folders “Extensions”, “IEC interface”, and “Source Files”.
8. In the device tree, click the plus symbol (“+”) of the “Source Files” folder.
🡆 The imported C source files are listed in the open folder.
9. If you double-click one of the C source files ( ), then the C code file
opens in your editor.

Importing individual C code files


Requirement: A project is open that already includes a C code module.
1. Click the object “C Code Module” in the device tree.
2. Click “Project 🠂 Add Object 🠂 C Code File”.
3. In the “Add C Code-File” dialog, use the input assistant ( ) to select a
file in *.c, *.cpp, *.h, or *.hpp format, and then click “Add”.
🡆 PLC Engineering inserts the selected C code file into the device tree
below the “C Code Module”.

R911403764, Edition 08 Bosch Rexroth AG


148 / 1158 ctrlX PLC Engineering
Integrating C Modules

4. If you double-click the new C code file ( ) in the device tree, then it
opens in the editor for modification.

Generating empty C code files


Requirement: A project is open that already includes a C code module.
1. Click the object “C Code Module” in the device tree.
2. Click “Project 🠂 Add Object 🠂 C Code File”.
3. In the “Add C Code File” dialog, specify the name for the new C code file
with the appropriate file extension and click “Add”.
🡆 PLC Engineering inserts the selected C code file into the device tree
below the “C Code Module”.
4. If you double-click the new C code file ( ) in the device tree, then it
opens in the editor for modification.

Converting C code files into IEC objects for use as programming objects in
applications
Requirement: A project is open that includes a C code module and C
code files. For example, the C code file contains the following C code: int
adder(int a, int b);
1. Click a C code file with the file extension *.h. In this example, it is
test.h.
2. Click “Build 🠂 C-Integration 🠂 Create IEC Interface”.
🡆 The dialog “Create C Interface” opens and lists the file test.h and its
function adder (int, int). Both are activated for the import.
3. Click “Import”.
4. PLC Engineering generates the “adder (FUN)” function and inserts it as an
object in the “IEC Interface” folder in the device tree.
5. When you double-click the “adder (FUN)” object, it opens in the editor.
🡆 It contains the following declaration part:

6. You can now call the adder function in the implementation part of a POU
(example: adder (diVar1, diVar2);).

Creating C stubs
Requirement: A project is open that includes a C code module. A POU is
added to the C code module and this POU has implemented code.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 149 / 1158
Searching and Replacing in the Entire Project

In the device tree, select the POU below the C code module and click
“C-Integration 🠂 Create Stub Implementation in C”.
🡆 PLC Engineering creates the objects “iec_external.c” and
“iec_external.h” and adds them to the “Extensions” folder in the device
tree.
In the message view (“C Code module” category), you will find a mes-
sage that an m4 file has been successfully created.
When you click “Create Stub Implementation in C”, the application
is compiled automatically. If errors occur in the process, then these

Programming the application


are indicated in the message view. In addition, please monitor the mes-
sages in the “C Code Module” category.

Assigning precompiled runtime modules to devices and saving them in libraries


Requirement: A library (*.library) is open in PLC Engineering.
1. Click “View 🠂 POUs”.
🡆 The “POUs” view opens and displays the library project and its objects.
2. Select the library project and click “Project 🠂 Add Object 🠂 C-
Implemented Library”.
3. Click “Add” in the “Add C-Implemented Library” dialog.
🡆 PLC Engineering adds the object “C Implemented Library” to the
“POUs” view.
4. Double-click the “C Implemented Library” object.
🡆 The object opens in its editor
5. Click “Add” in this editor.
🡆 The “Select Device” dialog opens.
6. In the “Object file” input field, specify the name of a dynamically loadable
module in the format *.dll or *.so.

NOTICE The *.dll file must contain the title of the library
project in its name. For example, if the library project is named XYlib, then
the “Object file” must be called: <Name>_XYlib.dll.
7. In the “Device” window, select a device for assignment of the “Object
file”.
8. Click “Select Device”.
🡆 PLC Engineering displays the created device file assignment in the
editor on the tab “Compiled Components”.
9. Save the library project.
See also
● ⮫ Chapter Object 'C Implemented Library' on page 819

18.11 Searching and Replacing in the Entire Project


In PLC Engineering you can search for strings in single objects or project-wide.
If required, you can replace the string found.
1. Choose the command “Search” in the main menu “Edit 🠂 Search
Replace”.
🡆 The dialog “Find” opens.
2. Enter the string to be found in the field “Find what”.
3. Activate the search options
4. Define the objects to be searched by choosing an entry from the com-
bobox “Search”.

R911403764, Edition 08 Bosch Rexroth AG


150 / 1158 ctrlX PLC Engineering
Refactoring

5. Click on the button “Find Next”.


🡆 The first hit is displayed.
6. Click on the button “Replace” to replace the string found by a different
one.
7. Click on the button “Find All” to get a list of all hits.
See also
● ⮫ Chapter Command ‘Search', 'Search in project on page 878
● ⮫ Chapter Command ‘Replace’. 'Replace in project’ on page 877

18.12 Refactoring
In general, refactoring is a technique for improving the design of existing soft-
ware code without changing the way it functions.
In PLC Engineering, refactoring provides functions for renaming objects and
variables and updating referenced pins. You can display all occurrences of
renamed objects and variables and then rename them all at once or individu-
ally. In “Tools 🠂 Options”, you can also configure where PLC Engineering will
prompt you for refactoring.

Renaming global variables


Requirement: A project is open that includes at least a function block “FB” and
a global variable list. The global variable list “GVL” is open in the editor and
contains a variable declaration (example: iGlobal). “FB” uses iGlobal.
Renaming global variables throughout the project
1. Select the global variable name iGlobal.
2. Right-click the variable and click “Refactoring 🠂 Rename iGlobal”.
3. In the “Rename” dialog, type a name in the “New name” input field, for
example iGlobalOK, and click “OK”.
🡆 The “Refactoring” dialog opens. In the device tree view on the left, the
“GVL” and “FB” objects are highlighted in red and yellow. In the view
on the right, “FB” in is open in its editor and iGlobal has already been
renamed as iGlobalOK.
4. Click “OK”.
🡆 No global variable iGlobal is in your project. Now iGlobalOK is every-
where.
Renaming global variables throughout the project (except for a POU)
1. Select the global variable name iGlobal.
2. Right-click the variable and click “Refactoring 🠂 Rename iGlobal”.
3. In the “Rename” dialog, type a name in the “New name” input field, for
example iGlobalTest, and click “OK”.
🡆 The “Refactoring” dialog opens. In the device tree view on the left,
the “GVL” and “FB” objects are highlighted in red and yellow. In the
window on the right, the function block “FB ” is open in its editor.
iGlobalTest is listed instead of iGlobal.
4. Right-click in the view on the right.
5. Click “Reject this Object” and click “OK”.
🡆 The global variable iGlobal is available in “FB” in your project. The var-
iable iGlobalTest is now specified in the objects where the previous
variable occurred.
The error message in the message view reports that the iGlobal iden-
tifier is not defined.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 151 / 1158
Refactoring

Adding and removing input variables


In the declaration part of blocks, you can add and delete input and output vari-
ables by using the refactoring commands. PLC Engineering performs updates at
the occurrence locations and calling locations of the blocks. You can accept or
reject these updates individually. The “Refactoring” dialog also opens for this
purpose.
Requirement: The FCT (function type) POU is open in the editor. The function
already contains the input variables input1, input2, and inputx. They are
called in the PLC_PRG and POU programs.

Programming the application


1. Set the focus in the declaration part of the FCT function.
2. Click “Refactoring 🠂 Add Variable”.
🡆 The default dialog opens for declaring variables.
3. Declare the variable input_3 with the scope of VAR_INPUT and data type
INT. Click “OK” to close the dialog.
🡆 The “Refactoring” dialog opens (see figure below). The affected loca-
tions are marked in yellow. (1)+(2)
4. In the upper right corner, select “Add inputs with placeholder text” from
the drop-down list. (3).
5. In the left side of the window, click one of the highlighted objects (for
example, PLC_PRG). Right-click and choose the “Accept Whole Project”
command to add the new variable at the new location of use in FCT for
the entire project.
🡆 You see the change in the implementation part of PLC_PRG in the
view on the right: The placeholder _REFACTOR_ appears at the location
where the new variable was added.
6. Click “OK” to close the “Refactoring” dialog.
7. Click “Edit 🠂 Find”. Search the project for "_REFACTOR_" to check and
edit the affected locations.
8. Note: As an alternative, you can insert the new variable with another initi-
alization value without working with a placeholder first. In this case, in
Step 4 you select "Add inputs with the following value" and type the value
in the field on the right side of the drop-down list.

R911403764, Edition 08 Bosch Rexroth AG


152 / 1158 ctrlX PLC Engineering
Refactoring

Example of a new variable with placeholder text in a CFC block:

Please note that you can also remove variables with refactoring.

Reordering variables in the declaration


In the declaration part of function blocks, you can change the order of declara-
tions by refactoring This is possible for declarations with scope VAR_INPUT,
VAR_OUTPUT, or VAR_IN_OUT.
Requirement: The declaration part of a POU is open and includes declarations,
for example:

VAR_INPUT
invar2 : INT;
invar1 : INT;
in : DUT;
bvar : BOOL;
invar3 : INT;
END_VAR
1. Right-click in this declaration block to access the context menu.
2. Click “Refactoring 🠂 Reorder Variables”.
🡆 The “Reorder” dialog opens with a list of VAR_INPUT variables.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 153 / 1158
Encrypting the application

3. Drag the “invar1 : INT;” entry to the position before the “invar2.” entry.
🡆 The invar1 declaration is now at the top position.
4. Click “OK” to close the dialog.
🡆 The “Refactoring” dialog opens. The affected locations are marked in
yellow (see figure above).
5. Click “OK” to accept the new order for the function block.

Changing a variable declaration and applying refactoring automatically


Refactoring helps you in the declaration when renaming variables (by means of

Programming the application


"Auto declare").
Requirement: Function block fb_A.
1. Click “Tools 🠂 Options”.
🡆 The “Options” dialog opens.
2. Select the “Refactoring” category.
3. In “Auto-Declare”, activate the options “On renaming variables” and “On
adding or removing variables, or for changing the namespace”.
4. Double-click the function block fb_A.
5. Select a variable in the declaration of fb_A, for example iA. As an alterna-
tive, you can set the cursor before or in the variable.
6. Specify “Edit 🠂 Declare variable” ([Shift]+[F2]).
🡆 The “Declare Variable” dialog opens. The dialog includes the settings of
iA.
7. Change the name of iA to iCounter_A.
8. The option “Changes by means of refactoring” appears and is activated.
9. Click “OK”.
🡆 The dialog “Refactoring” “Renaming from iA to iCounterA” opens. All
locations affected by the variable renaming are marked there.
10. Click “OK” to close the dialog.
🡆 The changes are applied.

See also
● ⮫ Chapter Command 'Refactoring' - 'Rename <...>' on page 894
● ⮫ Chapter Command 'Refactoring' - 'Update Referenced Pins' on page 895
● ⮫ Chapter Command 'Refactoring' - 'Add Variable' on page 895
● ⮫ Chapter Command 'Refactoring' - 'Remove <variable>' on page 896

18.13 Encrypting the application


Know-how protection and copy protection of a boot application can be ach-
ieved by means of a control-specific license management and a corresponding
setting in the object properties of the application. In this case, the download
code and the boot application are encrypted.

Encrypting with certificate


Prerequisites: A project with a application that is to be loaded to the control as
encrypted boot application. In the Windows Certificate Store of your computer,
there is a certificate for encrypting the application. Note: If you want to load
the application on different controls, you need the appropriate certificate for
each control.
1. Select the application in the device tree.

R911403764, Edition 08 Bosch Rexroth AG


154 / 1158 ctrlX PLC Engineering
Encrypting the application

2. Select the “Properties” command from the context menu.


🡆 The “Properties - <Application name>” dialog is displayed
3. Select the Security tab
4. For the Encryption technique, select Encryption with certificates.
🡆 The “Certificates” dialog box becomes active.
5. If no certificate is entered in the table yet, click on the button.
🡆 The Certificate selection dialog opens to select a certificate from the
local Windows Certificate Store.
6. Select a certificate in the lower area and drag it into the upper field using
the button. Confirm with OK.
🡆 The certificate is displayed in the Encryption dialog in the Certificates
field.
If you want to sign the boot application as well, proceed as follows:
Enable the Digitally sign application code option in the Properties dialog and
follow steps 1-13 of the "Sign boot application with certificate only, do not
encrypt" guide below.
For further information, see:
⮫ Security for the Runtime System / PLC
⮫ Encrypting the project with a certificate

Encrypting with the dongle


Prerequisites: A project with a application that is to be loaded to the control
as encrypted boot application. A dongle for license management is plugged into
your computer.
1. Select the application in the device tree.
2. Select the “Properties” command from the context menu.
🡆 The “Properties - <Application name>” dialog is displayed.
3. Select the “Encryption” tab.
4. For “Encryption technique”, select “Simple encryption” and enter the
“product code” you received from the hardware manufacturer for the con-
trol. Depending on the control, this is protected by means of a dongle (the
firm code is displayed automatically) or, for example, via a permanently
installed Wibu SD card.
5. Select the command “Online 🠂 Login” and perform a download of the
application.
🡆 If the matching dongle and/or the valid license is available, the appli-
cation can be loaded to the control. By default, a boot application is
automatically created in the control directory. This default setting is
defined in the “properties” of the application in the “boot application”
category.
6. Log out again, change the application and log in again.
🡆 A prompt is displayed asking the user if an online change is to be
performed. In the query dialog you also have the option to update the
boot application on the control. If the dongle and license match, you
can log in, otherwise you will receive a corresponding message.

Sign boot application with certificate only, do not encrypt it


1. Open the “Security screen” view via the button in the status bar of PLC
Engineering and select a private key certificate for a “digital signature ”
user profile. The procedure is described in the instructions "Configuring a
certificate for the digital signature in a user profile".

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 155 / 1158
Encrypting the application

2. In the “Users” tab, double-click on the “Digital signature” certificate.


🡆 The “Certificate” dialog is displayed.
3. On the “Details” tab, select the “Copy to file” button.
🡆 The “Certificate export wizard” starts.
4. In the “Export private key” prompt, select the “No, do not export private
key” option.
5. For “Format of the file to be exported”, select the “DER-encoded-binary
X.509 (.CER)” format.
6. In the next step, select a file name and location for the certificate.

Programming the application


7. After the last step “Complete”, a message is displayed whether the export
process was completed successfully.
8. After the successful export in PLC Engineering, open the device editor by
double-clicking on the control in the device tree and select the “Files” tab
for file transfer.
9. In the right part of the dialog “Runtime ”, select the “path” cert/import.
10. In the left part of the dialog “Host”, select the path in the file system
where you stored the exported certificate and select the certificate.
11. Click on .
🡆 The certificate is copied to the cert/import folder.
12. Select the “PLC Shell” tab.
13. In the input line of the tab, type the command cert-import trusted
<filename.cer> and press the [Enter key]. Make sure that the file name
is specified with the .cer file extension, otherwise the certificate is not
imported successfully.
🡆 The certificate is created on the control under trusted. This certificate
allows the control to verify the integrity of the boot application.
14. Open the “security screen” by double-clicking on in the status bar.
15. If you want to always encrypt downloads, online changes and boot appli-
cations of your project, enable the option “Force signing of downloads,
online changes and boot applications” in the “User” tab in the “Security
level” area. The option “Force encryption of downloads, online changes
and boot applications” also has to be enabled.
Also refer to
● ⮫ Chapter 11.12 Encrypting the project with a certificate on page 84
● ⮫ Encryption, Signature on page 373
● ⮫ Chapter Command 'Security Screen' on page 908
● ⮫ Chapter Dialog 'Properties' - 'Encryption' on page 1049

Encrypting the download, the online change and the boot application
Prerequisite: The add-on product CODESYS Security Agent is installed.
The “Security Screen” view provides an additional tab: “Devices”. It allows the
configuration of certificates for encrypted communication with controls. In this
case, refer to the CODESYS Security Agent help.
Option:
If CODESYS Security Agent is not available, you can proceed as follows via the
PLC shell of the device editor:
To use certificates from the control for download, online change, and boot
application encryption, these certificates first have to be generated on the con-
trol, loaded from the control, and installed in the Windows Certificate Store.
Prerequisite: You are connected to the control

R911403764, Edition 08 Bosch Rexroth AG


156 / 1158 ctrlX PLC Engineering
Encrypting the application

1. Double-click on the control in the device tree to open the device editor
and select the“PLC shell” tab.
🡆 The tab is displayed with an empty display window. Below you will find
an input line for a command
2. Type a ? in the input line and press [Enter].
🡆 All commands are listed in the display window.
3. Enter the following command in the input line: cert-getapplist
🡆 All used certificates are listed with information about components and
availability with certificates.
4. If there is no certificate for the CmpApp component, enter the cert-
genselfsigned <Number of the Component in the applist> com-
mand.
5. Select the “Log” tab and click the refresh button .
🡆 It displays whether the certificate was successfully generated.
6. Enter cert-getcertlist and press [Enter].
🡆 The individual certificates that can be used for encryption are listed.
For the next step, the information Number: and Key usage(s) are
important.
Number: Enter the number specified as a parameter in the next step
Key usage(s): Data Encipherment means that it is a certificate of
control for download, online change and boot application.
7. Export the desired certificate with the command cert-export own
0 and press [Enter]. 0 is the Number of the certificate with Key
usage(s):Data encryption.
🡆 The display shows that the certificate has been exported to a cert
folder.
8. Select the “Files” tab of the device editor.
9. In the right dialog section “Runtime”, click on the refresh button .
🡆 The list of the files and directories are updated.
10. In the list, open the “cert” folder and subsequently the “export” subfolder.
11. In the left half of the “Host” dialog, open the directory where the certifi-
cate is to be loaded from the control.
12. In the right half of the dialog, select the certificate you have exported and
click on .
🡆 The certificate is copied to the selected folder.
13. Use your file Explorer, go to the folder where the certificate was copied to
and double-click on the certificate.
🡆 The “Certificate” dialog is displayed and provides information about
this certificate.
14. In the “General” tab, click on the “Install certificate” button.
🡆 The “Certificate import wizard” starts.
15. In the “Certificate import wizard”, in the “Certificate store ” dialog, select
“Save all certificates to the following store ” and select the “Control
certificates” folder.
🡆 The control certificate is imported into the “controller certificates”
folder in the Windows Certificate Store and is now available to encrypt
the download, online change, and boot application.
16. Open the “Security screen” by double-clicking on the in the status bar.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 157 / 1158
Unit Conversion

17. If you want to always encrypt the downloads, online changes, and
boot applications, enable the “Enforce encryption of downloads, online
changes, and boot applications” option in the “Security level” section of
the “Users” tab.
18. Open the “Project” tab and double-click on the application in the
“Encryption of boot application, download and online change” section.
🡆 The properties dialog of the application is displayed.
19. Select the “Encryption” tab and select from the drop-down list“with
Encryption technique” “Encryption with certificates” and click on .

Programming the application


If the “Force encryption of downloads, online changes, and boot
applications” option is enabled in the “Security screen”, “encryption with
certificates” is already selected.
20. In the “Certificate selection” dialog, select the certificate from the
“Controller certificates” folder and click on .
21. Confirm the dialog with “OK”
🡆 The certificate is displayed in the properties dialog.
22. Confirm the properties dialog of the application.
🡆 The certificate is displayed in the “Secruity screen” in the “Project” tab
in the “Encryption of boot application, download and online change”
area.
Boot application, download and online change are encrypted.
Also refer to
● Help for the additional product CODESYS Security Agent
● ⮫ Chapter 33.1.17 “PLC shell” tab on page 756
● ⮫ Chapter Command 'Security Screen' on page 908

Delete the certificate for encrypting the boot application, the download and
online change
Prerequisite: The add-on product CODESYS Security Agent is installed. A certif-
icate with the information "Encrypted application" is already installed on your
computer.
1. In the “Security screen” view, “Project” tab, double-click on the entry for
the application in the lower part of the window.
🡆 The “Properties” dialog, “Encryption” tab for the application is opened.
2. Select “encryption technique” “encryption with certificates”. In the
“Certificates” box, click on .
3. In the “Certificate selection” dialog, delete the certificate as described
above.
4. Exit the “Certificate selection” dialog with “OK”.
🡆 The certificate is no longer displayed in the “Properties ” dialog.
Also refer to
● Help for the additional product CODESYS Security Agent
● ⮫ Chapter Command 'Security Screen' on page 908

18.14 Unit Conversion


You define a conversion rule when you want to convert data for another system
of units. This data is executed for a specific order of magnitude and unit of
measure.
Conversion rules are defined in a “Unit Conversion” object. PLC Engi-
neering automatically implements each conversion rule as a function block
<name>_Impl and instances it as <name>. Each conversion rule includes

R911403764, Edition 08 Bosch Rexroth AG


158 / 1158 ctrlX PLC Engineering
Unit Conversion

Convert and Reverse methods for use as function blocks. Locations where
you access a variable, you can link the variable to a conversion rule. The input
assistant provides conversion rules in the “Function Blocks” and “Instance
Calls” categories. After execution, the result is a converted value according to
the conversion rule.
In a visualization, an IEC variable that is configured in an element property can
also be linked to a conversion rules.

Defining unit conversions


1. Double-click a “Unit conversion” object in the device tree.
🡆 The respective editor opens with a table of the defined conversion
rules. You edit a rule in “Type setting” and a respective condition in
“Condition setting”.
2. Double-click the “Add new entry” field and type a name.
🡆 PLC Engineering implements the <name>_Impl function block and
instances it as <name>.
3. Double-click the “Type” field and click a type from the drop-down list.
🡆 Input fields are displayed below the table for editing the conversion
rule. The input fields vary according to selected type.
4. Change the conversion rule in the input fields.
🡆 The changes are displayed in the “Setting” category of the table.
5. Double-click the “Condition” field and click a condition type from the
drop-down list.
🡆 Input fields are displayed below the “Condition Setting” category of the
table to edit the condition. The input fields vary according to selected
type.
6. Edit the condition.
🡆 The changes are displayed in the “Condition Setting” category of the
table.

Defining switchable unit conversions


You can define which conversion rule is applied to a specific language or condi-
tion.
1. Double-click a “Unit Conversion” object in the device tree.
🡆 The respective editor opens with a table of the predefined conversion
rules.
2. Click the “Add new entry” field and type a name.
🡆 Example: Conv_A_LanguageDependent
3. Double-click the “Type” field and click “Switchable conversion”. Double-
click the “Condition” field and click “Language”.
🡆 Below the main table, the “Switchable Conversion” table is displayed
with “Condition setting”.
4. In the “Switchable Conversion” table, double-click a predefined conver-
sion rule from the drop-down list in the “Switchable conversion name”
column, for example Conv_AInInch.
In “Condition Setting”, type a value in the “For condition 'Language'” input
field, for example en.
🡆 PLC Engineering executes the Conv_AInInch conversion rule only if the
language set in the visualization manager is “en ”.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 159 / 1158
Unit Conversion

5. In the “Switchable Conversion” table, double-click a predefined conver-


sion rule from the drop-down list in the “Switchable conversion name”
column, for example Conv_AInMM.
In “Condition Setting”, type a value in the “For condition 'Language'” input
field, for example de.
🡆 PLC Engineering executes the Conv_AInMM conversion rule only if the
language set in the visualization manager is “de”.
6. Apply the Conv_A_LanguageDependent conversion rule in the application
or visualization.

Programming the application


🡆 If the set language in the visualization is English, then the application
visualization apply the Conv_AInInch conversion rule. If the set lan-
guage in the visualization is German, then the application visualization
applies the Conv_AInMM conversion rule. The current visualization lan-
guage is located in the VisuElems.CurrentLanguage variable.

Applying conversion rules


Add a conversion rule to objects that access IEC variables.
1. In the device tree, double-click an object that accesses IEC variables in
order to link an IEC variable to a conversion rule at that location.
2. Declare a variable for the conversion result of the IEC variable.
🡆 ST sample code: rConvertedA : REAL;
3. Use the input assistant to apply the conversion rule with the Convert
method and then assign the result to the variable.
🡆 ST sample code to link the IEC variable to the conversion rule:
rConvertedA := ConvRule_A.Convert(rA);

Applying reverse conversion rules


1. In the device tree, double-click an object that accesses an IEC variable.
2. Declare a variable for the result of the conversion rule.
🡆 ST sample code: rReverseA: REAL;
3. Apply the reverse conversion rule with the Reverse method and then
assign the result to the variable.
🡆 rReverseA := ConvRule_A.Reverse(rConvertedA);

Example
Requirement: The conversion rule is Conv_XtoY.

ST call

PROGRAM A_PRG
VAR
rA : REAL;
rConvertedA : REAL;
rReverseToA : REAL;
END_VAR

rConvertedA := Conv_XtoY.Convert(rA);
rReverseToA := Conv_XtoY.Reverse(rConvertedA);

R911403764, Edition 08 Bosch Rexroth AG


160 / 1158 ctrlX PLC Engineering
Declaring variables

CFC call
In the CFC editor, define the instance name of the conversion rule via the
block. Select the method in the block.

See also
● ⮫ Chapter 33.2.27 Object 'Unit Conversion' on page 803
● ⮫ Chapter 18.5 Using the input assistance on page 131

18.15 Using function blocks for implicit checks


PLC Engineering provides special POUs that implement implicit monitoring
functions. During the runtime, these monitoring functions check the array
boundaries or subarea type boundaries, the validity of pointer addresses or
a division by 0.
1. Select the “Application” object in the device tree.
Select the command “Project 🠂 Add object 🠂 POU for implicit checks...”
🡆 The “Add POU for implicit checks” dialog is displayed.
2. Select the required functions.
3. Click on the “add” button.
🡆 The selected POUs are inserted below the “Application” in the device
tree.
4. Open the POUs in the editor.
5. Adapt the implementation suggestion to your requirements.

CAUTION To get the feature for monitoring functions, do not


edit the declaration part. However, you are permitted to add local varia-
bles.
Also refer to
● ⮫ Objects

18.16 Declaring variables


18.16.1 Variable declaration where and how
Variables can be declared in the following positions:
● Declaration part of a programming object
The “Declare variable” dialog supports the user.
Tip: When declaring a variable in the tabular declaration editor, the correct
syntax is automatically established.
● Declaration part of the GVL or NVL editor
● I/O image configuration of an I/O device object

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 161 / 1158
Declaring variables

Syntax
( <pragma> )*
<scope> ( <type qualifier> )?
<identifier> (AT <address> )? : <data type> ( := <initial
value> )? ;
END_VAR
Declaration Also refer to
● ⮫ Chapter 18.16.3 Using
the Declaration Editor

Programming the application


on page 165
● ⮫ Chapter 18.16.4 Using
the 'Declare variable'
dialog on page 165
● ⮫ Chapter Command 'Auto-
Declare' on page 889
<pragma> Pragma (not once, once or several Also refer to
times) ● ⮫ Chapter 18.6 Using
Note: By adding a pragma, you can pragmas on page 134
influence the behavior and proper-
ties of one or more variables.
<scope> Validity range Also refer to
● VAR ● ⮫ Chapter 32.2.2 Local var-
● VAR_CONFIG iables - VAR on page 438
Note: If variables with incom- ● ⮫ Chapter 32.2.11 Con-
plete address information (for figuration Variables -
example AT %I*) are declared VAR_CONFIG on page 446
in function modules, the varia- ● ⮫ Chapter 32.2.9 External
bles have to be declared in Variables - VAR_EXTERNAL
the VAR_CONFIG variable config- on page 445
uration. Only then such a vari- ● ⮫ Chapter 32.2.6 Global
able can be accessed in a local Variables - VAR_GLOBAL
instance. on page 444
● VAR_EXTERNAL ⮫ Chapter 33.2.15 Object
● VAR_GLOBAL 'GVL' - Global Variable List
● VAR_INPUT on page 777
● ⮫ Chapter 32.2.3 Input
● VAR_INST
Variables - VAR_INPUT
● VAR_IN_OUT on page 438
● VAR_OUTPUT ● ⮫ Chapter 32.2.10
● VAR_STAT Instance Variables -
● VAR_TEMP VAR_INST on page 445
● ⮫ Chapter 32.2.5
Input/Output Variable
(VAR_IN_OUT) on page 439
● ⮫ Chapter 32.2.4 Output
Variables - VAR_OUTPUT
on page 439
● ⮫ Chapter 32.2.8 Static
variables - VAR_STAT
on page 444
● ⮫ Chapter 32.2.7 Tempo-
rary Variable - VAR_TEMP
on page 444

R911403764, Edition 08 Bosch Rexroth AG


162 / 1158 ctrlX PLC Engineering
Declaring variables

<type Type qualifier Also refer to


qualifier ● CONST ● ⮫ Chapter 32.2.12 Con-
> stant variables - 'CON-
● RETAIN
● PERSISTENT STANT' on page 446
● ⮫ Chapter 32.2.14
Retain variable - RETAIN
on page 449
● ⮫ Chapter 32.2.13 Persis-
tent Variable - PERSISTENT
on page 447
<identifi Identifier, variable name Also refer to
er> Note: The rules listed in the ● ⮫ Chapter 32.7 Identifier
chapter "Identifiers" must be fol- on page 651
lowed without exception when
assigning an identifier. Additionally,
recommendations to standardize
the assignment of names.
AT Assignment of an address in the Also refer to
<address> input, output, or flag memory area ● ⮫ Chapter 17.4 Config-
(I, Q, or M) uring Devices and I/O
AT % <memory area prefix> Mapping on page 118
( <size prefix> )? <memory ● ⮫ Chapter 18.18.3 AT Dec-
position> laration on page 200
Example ● ⮫ Chapter 32.4.13
● AT %I* // Incomplete Addresses on page 552
address
● AT %I7.5
● AT %IW0
● AT %QX7.5
● AT %MD48
<data Data type Also refer to
type> ● <elementary data type> ● ⮫ Data types
● <user defined data type> ● ⮫ Chapter Object 'DUT'
● <function block > on page 815
⮫ Chapter ‘Function block’
object on page 823
<initial Initial value Also refer to
value> <literal value> | ● ⮫ Chapter 32.7 Identifier
<identifier> | <expression> on page 651
● ⮫ Chapter 32.4.1 Oper-
ands – General information
on page 540
● ⮫ Chapter ST expressions
on page 380
( ... )? Optional
( ... )* Optional repetition

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 163 / 1158
Declaring variables

Example
GVL
{attribute 'qualified_only'}
{attribute 'linkalways'}
VAR_GLOBAL CONSTANT
g_ciMAX_A : INT := 100;
g_ciSPECIAL : INT := g_ciMAX_A - 10;
END_VAR
GVL_CONFIG

Programming the application


{attribute 'qualified_only'}
VAR_CONFIG
// Generated instance path of variable at incomplete address
PLC_PRG.fbDoItNow.XLOCINPUT AT %I*: BOOL := TRUE;
END_VAR
FB_DoIt (FB)
METHOD METH_Last : INT
VAR_INPUT
iVar : INT;
END_VAR
VAR_INST
iLast : INT := 0;
END_VAR

METH_Last := iLast;
iLast := iVar;

FUNCTION_BLOCK FB_DoIt
VAR_INPUT
wInput AT %IW0 : WORD; (* Input variable *)
END_VAR
VAR_OUTPUT
wOutput AT %QW0 : WORD; (* Output variable *)
END_VAR
VAR_IN_OUT
aData_A : ARRAY[0..1] OF DATA_A; // Formal variable
END_VAR
VAR_EXTERNAL
GVL.g_ciMAX_A : INT; // Declared in object GVL
END_VAR
VAR_STAT
iNumberFBCalls : INT;
END_VAR
VAR
iCounter: INT;
xLocInput AT %I* : BOOL := TRUE; // VAR_CONFIG
END_VAR

iNumberFBCalls := iNumberFBCalls + 1;
PLC_PRG (PRG)
PROGRAM PLC_PRG
VAR
iLoop: INT;
iTest: INT;
fbDoItNow : FB_DoIt;
iTest_200: INT;

R911403764, Edition 08 Bosch Rexroth AG


164 / 1158 ctrlX PLC Engineering
Declaring variables

aData_Now : ARRAY[0..1] OF DATA_A := [(iA_1 := 1, iA_2 :=


10, dwA_3 := 16#00FF),(iA_1 := 2, iA_2 := 20, dwA_3 :=
16#FF00)];
END_VAR

iTest := GVL.g_ciMAX_A;
iTest_200 := 2 * GVL.g_ciMAX_A;
fbDoItNow(aData_A := aData_Now);
FOR iLoop := 0 TO GVL.g_ciSPECIAL DO
;
END_FOR

18.16.2 Variable initialization


The standard initialization value for all declarations is 0. In the declaration part
you can also specify user-defined initialization values for each variable and each
data type.
The user-defined initialization starts with the assignment operator := and con-
sists of any valid expression of the programming language ST (structured text).
You thus define the initialization value with the help of constants, other varia-
bles or functions. If you use a variable, you must also initialize it.

Examples
VAR

var1:INT := 12; //
initialization value 12

x : INT := 13 + 8; //
initalization value defined by an expression of constants

y : INT := x + fun(4); //
initialization value defined by an expression,
// that
contains a function call; notice the order!

z : POINTER TO INT := ADR(y); // not


described in the standard IEC61131-3:
//
initialization value defined by an adress function;
// Notice: In
this case the pointer will not be initialized
// during an
Online Change *)
END_VAR

Notes on the order of initialization


From compiler version 3.5.3.40, variables in a function block are initialized in
the following order: First, all constants in accordance with the order of their
declarations, then all other variables in accordance with the order of their
declarations.
For compiler version 3.3.2.0 and higher, always initializes
NOTICE
global variables before the local POU variables.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 165 / 1158
Declaring variables

Also refer to
● ⮫ Chapter 32.5.18 Data Type 'ARRAY' on page 569
● ⮫ Declaration and initialization of structure variables on page 584
● ⮫ Chapter Attribute 'global_init_slot' on page 618

18.16.3 Using the Declaration Editor


The declaration editor is used for declaring variables in the variable lists and
POUs.
The declaration editor offers two possible views: textual and tabular .

Programming the application


in the dialog in “Tools 🠂 Options 🠂 Declaration Editor”, you define whether
only the textual view or only the tabular view is available, or whether you can
switch between both views by means of the buttons on the right side of the
editor view.
If the declaration editor is used in conjunction with a programming language
editor, it appears as the declaration part at the top of the window of a POU.

Declaring in the textual declaration editor


The behavior and the appearance of the textual editor are configured with the
settings in the dialog “Tools 🠂 Options 🠂 Text Editor”. The settings concern
colors, line numbers, tab widths, indentations etc. The usual Windows func-
tions are available, plus the IntelliMouse functions if necessary.
Requirement: You have opened a programming object (POU, GVL or NVL) of a
project. The textual declaration editor has the focus.
Enter the variable declarations in correct syntax. With [F2] you can open
the dialog “Input Assistant” for the selection of the data type or a key-
word.

Declaring in the tabular declaration editor


In the tabular declaration editor, you add variable declarations to a table
with the following columns: “Scope”, “Name”, “Address”, “Data type”,
“Initialization”, “Comment”, and “Attributes” (pragmas).
Requirement: A programming object (POU or GVL) of a project is open. The
tabular declaration editor has the focus.
1. Click the button in the declaration header or select the command
“Insert” in the context menu.
🡆 PLC Engineering inserts a new row for a variable declaration and the
input field for the variable name opens.
2. Specify a valid variable identifier.
3. Open the other fields of the declaration line as required with a double-
click and select the desired specifications from the drop-down lists or
with the help of the dialogs which appear.

See also
● ⮫ Declaration editor in online mode on page 377
● ⮫ Chapter Command 'AutoDeclare' on page 889
● ⮫ Chapter 18.16.4 Using the 'Declare variable' dialog on page 165
● ⮫ Chapter “Edit declaration header” command on page 1012
● ⮫ Dialog 'Input Assistant' - Tab 'Categories' on page 892

18.16.4 Using the 'Declare variable' dialog


Prerequisite: A programming object (POU or GVL) of a project is open.

R911403764, Edition 08 Bosch Rexroth AG


166 / 1158 ctrlX PLC Engineering
Declaring variables

1. Select the command “Edit 🠂 Declare variable”.


🡆 The “Declare variable” dialog opens.
2. Select the desired scope for the variable from the “Scope” drop-down list.
3. Enter a variable name in the input field “Name”.
4. Select the desired “data type” from the drop-down list.
5. If the initialization value deviates from the standard initialization value,
enter an initialization value for the variable.
6. Complete your entries by clicking on “OK”.
🡆 PLC Engineering lists the newly declared variable in the declaration
part of your programming object.
With the help of pragmas in the declaration part you can affect the processing
of the declaration by the compiler.
Also refer to
● ⮫ Chapter Command 'AutoDeclare' on page 889
● ⮫ Data types
● ⮫ Chapter 18.6 Using pragmas on page 134

18.16.5 Declaring Arrays


Requirement: A programming object (POU or GVL) of a project is open.
1. Click “Edit 🠂 Declare Variable”.
🡆 The “Declare Variable” dialog opens.
2. Select the desired scope for the array from the drop-down list “Scope”.
3. Enter an identifier for the array in the “Name” input field.
4. Click the arrow button ( ) next to the “Data type” input field and select
the “Array Assistant” entry from the selection menu.
5. In the input fields “Dimension 1”, type in the lower and upper limit of the
first dimension of the array (example: 1 and 3).
🡆 The field “Result” displays the 1st dimension of the array (example:
ARRAY [1..3] OF ?).
6. In the input field “Basic type”, type in the data type of the array or use the
“Input Assistant” ( ) or the “Array Assistant” (example: DINT).
🡆 The field “Result” displays the data type of the array now (example:
ARRAY [1..3] OF DINT).
7. Define the second and third dimensions of the array according to steps 5
and 6 (example: Dimension 2: 1 and 4, Dimension 3: 1 and 2).
🡆 The “Result” field displays the array with the defined dimensions:
ARRAY [1..3, 1..4, 1..2] OF DINT. The array consists of 3 * 4
* 2 = 24 elements.
In an array of variable length, declare the dimension limits with an
asterisk placeholder (*). Arrays of variable length are permitted to be
used only in VAR_IN_OUT declarations of function blocks, methods, or
functions.
Example of a 2-dimensional array of variable length:
aiUnknownLengthData : ARRAY [*,*] OF INT;
8. Click “OK”.
🡆 In the dialog “Declare Variable” the field “Data type” displays the array.
9. To modify the initialization values of the array, click the arrow button ( )
next to the “Initialization value” input field.
🡆 The “Initialization Value” dialog opens.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 167 / 1158
Declaring variables

10. Select the line of the array element whose initialization value you wish to
modify. Example: Select array component [1, 1, 1].
11. Enter the desired initialization value in the input field below the list and
click button “Use value on selected lines” (example: value 4).
🡆 PLC Engineering displays the changed initialization value of the
selected line.
12. Click “OK”.
🡆 In the “Initialization value” field of the “Declare Variable” dialog, PLC
Engineering displays the initialization values of the array (example:{4,

Programming the application


23(0)]).
13. You can optionally enter a “Comment” in the input field.
14. Click “OK” in order to conclude the declaration of the array.
🡆 PLC Engineering adds the declaration of the array to the declaration
part of the programming object.

See also
● ⮫ Chapter Command 'AutoDeclare' on page 889
● ⮫ Chapter 32.5.18 Data Type 'ARRAY' on page 569

18.16.6 Declaring Global Variables


Declaring global variables that are available within the application.
Requirement: A project is open.
1. In the Device tree of your project, select the application in which the
global variables are to be valid.
2. Select the context menu command “Add Object 🠂 Global Variable List”.
🡆 PLC Engineering inserts the “GVL” in the Device tree under the applica-
tion and opens it in the editor.
3. Select the menu command “Edit 🠂 Auto Declare”.
🡆 The dialog box “Auto Declare” opens.
4. In the selection list “Scope”, select the entry “VAR_GLOBAL”.
5. In the field “Name”, enter a name for the global variable.
6. Select a data type from the selection list “Type”.
7. If your variable is to have an initialization value other than the standard
initialization value, click on next to the field “Initialization”.
🡆 The dialog box “Initialization Value” opens.
8. Double-click on the cell “Init value” of your variable and enter the desired
valid value.
9. Click on “OK”.
🡆 The initialization value is displayed in the dialog box “Auto Declare”.
10. Activate one of the “Flags” if necessary.
11. Confirm your entries by clicking on the button “OK”.
🡆 PLC Engineering inserts the declared variable in the GVL.
The global variable is available in the total application of your project.

Declaring global variables that are available in the entire project.


1. Select the menu command “View 🠂 POUs”.
🡆 The “POUs” view opens.

R911403764, Edition 08 Bosch Rexroth AG


168 / 1158 ctrlX PLC Engineering
Declaring variables

2. In the “POUs” view, select the uppermost node with the project name and
select the context menu command “Add Object 🠂 Global Variable List”.
🡆 PLC Engineering inserts the “GVL” in the “POUs” view and opens it in
the editor.
3. Select the menu command “Edit 🠂 Auto Declare”.
🡆 The dialog box “Auto Declare” opens.
4. In the selection list “Scope”, select the entry “VAR_GLOBAL”.
5. In the field “Name”, enter a name for the global variable.
6. Select a data type from the selection list “Type”.
7. If your variable is to have an initialization value other than the standard
initialization value, enter it in the column “Initialization”.
8. Activate one of the “Flags” if necessary.
9. Confirm your entries by clicking on the button “OK”.
🡆 PLC Engineering inserts the declared variable in the GVL.
The global variable is now available in the entire project.

See also
● ⮫ Chapter Command 'AutoDeclare' on page 889

18.16.7 Using Task-Local Variables


Task-local variables are cycle-consistent. In a task cycle, they are written only
by a defined task, while all other tasks have read-only access. It is taken into
account that tasks can be interrupted by other tasks or can run simultaneously.
The cycle consistency also applies above all if the application is running on a
system with a multicore processor.
Therefore, using task local global variable lists is one way to automatically
achieve a synchronization (by the compiler) when multiple tasks are processing
the same variables. This is not the case when using ordinary GVLs. Multiple
tasks can write simultaneously to ordinary GVL variables during a cycle.
However, it is imperative to note: The synchronization of task-local variables
requires a relatively large amount of time and memory and is not always the
best solution for every application. For this reason, see below for more detailed
technical information and best practice guidance to help you make the right
decision.
In the PLC Engineering project, the “Variable List (Task-Local)” object is
available for defining task-local variables. Syntactically, it corresponds to a
normal GVL, but also contains the information of the task that has write access
to the variables. Then all variables in such a GVL are not changed by another
task during a cycle of a task.
The next section contains a simple example that demonstrates the principle
and functionality of task-local variables. It includes a writing program and a
reading program. The programs run in different tasks, but they access the same
data that is stored in a task-local global variable list so that they are processed
cycle-consistently.

Showing functionality in an example


See below for Instructions on reprogramming this sample application.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 169 / 1158
Declaring variables

Sample application
(* task-local GVL, object name: "Tasklocals" *)
VAR_GLOBAL
g_diaData : ARRAY [0..99] OF DINT;
END_VAR

PROGRAM ReadData
VAR
diIndex : DINT;

Programming the application


bTest : BOOL;
diValue : DINT;
END_VAR
bTest := TRUE;
diValue := TaskLocals.g_diaData[0];
FOR diIndex := 0 TO 99 DO
bTest := bTest AND (diValue =
Tasklocals.g_diaData[diIndex]);
END_FOR

PROGRAM WriteData
VAR
diIndex : DINT;
diCounter : DINT;
END_VAR
diCounter := diCounter + 1;
FOR diCounter := 0 TO 99 DO
Tasklocals.g_diaData[diIndex] := diCounter;
END_FOR

The programs “WriteData” and “ReadData” are called by different tasks.


In the program WriteData, the array g_diaData is populated with values.
The program ReadData tests whether or not the values of the array are as
expected. If so, then the variable bTest yields the result TRUE.
The array data that is tested is declared via the variable g_diaData in the
object Tasklocals of type Global Variable List (Task-Local). This syn-
chronizes the data access in the compiler and guarantees cycle consistency,
even when the accessing programs are called from different tasks. In the
sample program, this means that the variable test is always TRUE in the pro-
gram ReadData.
If the variable g_diaData were declared only as a global variable list in this
example, then the test (the variable test in the program ReadData) would
yield FALSE more often. In this case, this is because one of the two tasks
in the FOR loop could be interrupted by the other task, or both tasks could
run simultaneously (multicore controllers). And therefore the values could be
changed by the writer while the reader reads the list.

Constraints in the declaration


An online change of the application is not possible after
NOTICE
changes in declarations in the list of task-local variables.
Note the following when declaring a global task-local variable list:
● Do not assign direct addresses by means of an AT declaration.
● Do not map to task-local variables in the controller configuration.
● Do not declare any pointers.
● Do not declare any references.

R911403764, Edition 08 Bosch Rexroth AG


170 / 1158 ctrlX PLC Engineering
Declaring variables

● Do not instantiate any function blocks.


● Do not declare any task-local variables as PERSISTENT and RETAIN at the
same time.
The compiler reports write access in a task without write access as an error.
However, not all write-access violations can be detected. The compiler can only
assign static calls to a task. However, the call of a function block by means of
a pointer or an interface is not assigned to a task, for example. As a result,
any write access is not recorded there either. Moreover, pointers can point to
task-local variables. Therefore, data can be manipulated in a read task. In this
case, a runtime error is not issued. However, values that are modified by means
of pointer access are not copied back in the shared reference of variables.

Properties of task-local global variables and possible behavior


The variables are located at a different address in the list for each task. For
read access, this means: ADR(variable name) yields a different address in
each task.
The synchronization mechanism guarantees the following:
● Cycle consistency
● Freedom from locked states: A task never waits for an action from another
task at any time.
With this method, however, no time can be determined when a reading task
securely receives a copy of the writing task. Fundamentally, the copies can
deviate. In the example above, it cannot be concluded that each written copy is
processed one time by the reader. For example, the reading task can edit the
same array over multiple cycles, or the contents of the array can skip one or
more values between two cycles. Both can occur and have to be considered.
The writing task can be paused for one cycle between two accesses to the
shared reference by each reading task. This means that when n reading tasks
exist, the writing task can have n cycles of delay until the next update of the
shared reference.
In each task, the writing task can prevent a reading task from getting a reading
copy. As a result, no maximum number of cycles can be specified after which a
reading task will definitely receive a copy.
In particular, this can become problematic if very slow running tasks are
involved. Assuming a task runs only every hour and cannot access the task-local
variables during this time, then the task works with a very old copy of the list.
Therefore, it can be useful to insert a time stamp in the task-local variables
so that the reading tasks can at least determine whether or not the list is
up-to-date. You can set a time stamp as follows: Add a variable of type LTIME to
the list of task-local variables and add the following code to the writing task, for
example: tasklocal.g_timestamp := LTIME();.

Best practice
Task-local variables are designed for the use case "Single writer - multiple
readers". When you implement a code that is called by different tasks, using
task-local variables is a significant advantage. For example, this is the case for
the sample application appTasklocal as described above when it is extended
by multiple reading tasks that all access the same array and use the same
functions.
Task-local variables are especially useful on multicore systems. On these sys-
tems, you cannot synchronize tasks by priority. Then other synchronization
mechanisms become necessary.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 171 / 1158
Declaring variables

Do not use task-local variables when a reading task always has to work on
the newest copy of the variable. Task-local variables are not suitable for this
purpose.
A similar issue is the "Producer - Consumer" dilemma. This happens when a
task produces data and another task processes the data. Choose another type
of synchronization for this configuration. For example, the producer could use a
flag to notify that a new date exists. Then the consumer can use a second flag
to notify that it has processed its data and is waiting for new input. In this way,
both can work on the same data. This removes the overhead for cyclic copying
of data, and the consumer does not lose any data generated by the producer.

Programming the application


Monitoring
At runtime, multiple different copies of the task-local variable list may exist
in memory. When monitoring a position, not all values can be displayed. There-
fore, the values from the shared reference are displayed for inline monitoring,
in the watch list, and in the visualization for a task-local variable.
When you set a breakpoint, the data of the task is displayed that ran to the
breakpoint and was halted as a result. Meanwhile, the other tasks continue
running. Under certain circumstances, the shared copy can be changed. In
the context of the halted task, however, the values remain unchanged and are
displayed as they are. You need to be aware of this.

Background: Technical implementation


For a list of task-local variables, the compiler creates a copy for each task,
as well as a shared reference copy for all tasks. This creates a structure that
contains the same variables as the list of task-local variables. Moreover, an
array with this structure is created in which an array dimension is created for
each task. As a result, an array element is indexed for each task. If a variable
in the list is accessed now in the code, then the task-local copy of the list
is actually accessed. Furthermore, it is determined in which task the block is
currently running and the access is indexed accordingly.
For example, the line of code diValue := TaskLocals.g_diaData[0]; from
the above example is replaced by:
diValue :=
__TaskLocalVarsArray[__CURRENTTASK.TaskIndex].__g_diarr[0];
__CURRENTTASK is an operator that is available in PLC Engineering V3.5 SP13
and later in order to determine the current task index quickly.
At runtime, at the end of the writing task, the contents of the task-local list are
written to the global list. For a reading task at the beginning, the contents of
the shared reference are copied to the task-local copy. Therefore, for n tasks,
there are n+1 copies of the list: One list serves as a shared reference and every
task also has its own copy of the list.
A scheduler controls the time-based execution of multiple tasks and therefore
also task switching. The strategy, which is tracked by the scheduler in order to
control the allocation of the execution time, has the goal of preventing a task
from being blocked. The synchronization mechanism is therefore optimized to
the properties of task-local variables to prevent blocking states (lock states)
and at no time does a task wait for the action of another task.
Synchronization strategy:
● As long as the writing task writes a copy back to the shared reference, none
of the reading tasks gets a copy.
● As long as a reading task gets a copy of the common reference, the writing
task does not write back a copy.

R911403764, Edition 08 Bosch Rexroth AG


172 / 1158 ctrlX PLC Engineering
Declaring variables

Instructions for creating the sample application as described above


Aim: With a program ReadData, you want to access the same data that is
written by a program WriteData. Both programs should run in different tasks.
You make the data available in a task-local variable list so that it is processed
automatically in a cycle-consistent manner.
Requirement: A brand new standard project is created and open in the editor.
1. Rename the application from Application to appTasklocal.
2. Below appTasklocal, add a program in ST named ReadData.
3. Below appTasklocal, add another program in ST named WriteData.
4. Below the object Task Configuration, rename the default task from
MainTask to Read.
5. In the “Configuration” dialog of the task Read, click the “Add Call” button
to call the program ReadData.
6. Below the “Task Configuration” object, add another task named Write,
and add the call of the program Write to this task.
🡆 Now there are two tasks Write and Read in the task configuration
which call the programs WriteData and ReadData, respectively.
7. Select the application appTasklocal and add an object of type “Global
Variable List (Task-Local)”.
🡆 The “Add Global Variable List (Task-Local)” dialog opens.
8. Specify the name Tasklocals.
9. Select the Write task from the “Task with write access” list box.

🡆 The object structure for using task-local variables within an application


is complete. Now you can code the objects as described in the example
above.

See also
● ⮫ Chapter Command 'AutoDeclare' on page 889
● ⮫ Chapter 18.16.6 Declaring Global Variables on page 167
● ⮫ Chapter 33.2.16 Object 'GVL' - Global Variable List (task-local)
on page 778

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 173 / 1158
Creating source code in IEC

● ⮫ Chapter 18.18.3 AT Declaration on page 200


● ⮫ Chapter 22.3.2 Calling of Monitoring in Programming Objects on page 291

18.17 Creating source code in IEC


18.17.1 Creating source code in IEC – General information
source code
"Source code" refers to the implementation code that you insert into the pro-
gramming blocks using the appropriate programming language editors. The

Programming the application


following block types are available: POU (program, function, function block) ,
action, method, property, interface.

Programming block
When creating a programming block, you decide in which implementation lan-
guage you want to program. In addition to the IEC languages, CFC is also
available.

Programming editor
A programming block is opened for editing in the corresponding programming
language editor when double-clicking on the object in the device tree or POUs
tree. The function block is either displayed in the textual ST editor or in one of
the graphical editors for FBD/LD/IL, SFC or CFC. Each editor consists of two
windows: In the upper window you make the declarations, depending on the
setting in textual or tabular form. In the lower window, insert the implementa-
tion code. You can configure the representation and behavior of each editor
across the project in the associated tab of the PLC Engineering options.
Note the possibility to open a programming block even while the application is
online in the offline state of the editor.
Also refer to
● ⮫ Programming languages and their editors
● ⮫ Command 'Edit Object (Offline)'

18.17.2 FBD/LD/IL
FBD/LD/IL – General information
A combined editor enables programming in the languages FBD (function block
diagram), LD (ladder diagram) and IL (instruction list).
The basic unit of the FBD and LD programming is a network. Each network
contains a structure that can represent the following: A logical or arithmetic
expression, the call of a programming function block (function, function block,
program etc.), a jump or a return instruction. IL actually does not require any
networks. However, in PLC Engineering an IL program also consists of at least
one network to support conversion to FBD or LD. Thus, also divide an IL pro-
gram into useful networks.
Also refer to
● ⮫ Chapter FBD/LD/IL Editor on page 410

Function block diagram (FBD)


The function block diagram is a graphically oriented IEC 61131 programming
language. The function block diagram uses a list of networks. Each network
contains a structure that can contain logical and arithmetic expressions, calls
to function modules, a jump or a return statement.

R911403764, Edition 08 Bosch Rexroth AG


174 / 1158 ctrlX PLC Engineering
Creating source code in IEC

Here, function blocks are used which are known from Boolean algebra. Func-
tion blocks and variables are linked with connecting lines. The signal flow runs
from left to right in the network. The signal flow in the editor runs from top to
bottom, starting with network 1.

Example

CFC is also a programming language based on the principle of FBD, but with
the following differences:
− The CFC editor is not network-oriented.
− You can freely place the elements in the CFC editor.
− Direct insertion of feedbacks is possible.
− The processing order is determined by a list of currently inserted elements,
which you can change.
Also refer to
● ⮫ Chapter Programming in a function block diagram (FBD) on page 174
● ⮫ Chapter 33.3.1 Menu commands – General information on page 868 (Com-
mands)
● ⮫ Chapter 18.1 Program application – General information on page 129

Programming in a function block diagram (FBD)


Creating POUs in the Function Block Diagram (FBD) implementation language
1. Select an application in the device tree.
2. Select the command “Project 🠂 Add object 🠂 POU”
🡆 The “Add POU” dialog opens.
3. Enter a name and select the implementation language “Function block
diagram (FBD)”.
Click on “Add”.
🡆 The POU is added to the device tree and then it is opened in the editor.
It consists of the declaration editor in the top part and the implemen-
tation part with an empty network in the lower part. The “Tool” view
is also opened automatically, in which the appropriate elements, opera-
tors and function blocks for FBD programming are available.
Also refer to
● ⮫ Chapter 33.2 Objects on page 761
● ⮫ Programming the application

Programming a network
1. Click inside the automatically inserted empty network in the implementa-
tion part.
🡆 The network is given a yellow background and the area at the left-hand
side with the network number is given a red background.
2. Open the context menu with the right mouse button.
🡆 Among other things, you get the insert commands for the elements that
can be inserted at this point.
3. Insert the elements required for your programming using the menu com-
mands or by dragging in the elements from the toolbox.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 175 / 1158
Creating source code in IEC

4. For example, choose the “Insert assignment” command.


🡆 An assignment line is inserted. In each case three question marks stand
for assignment source and assignment target.
5. Select the question marks and replace them with the desired variable.
Input assistance is available for this purpose.
6. Move the cursor over the assignment line.
🡆 The possible insertion positions for further elements are displayed as
gray diamonds. A click a diamond selects that position and the suitable
insert commands are once again available.

Programming the application


7. Alternatively, you can drag an element with the mouse from the toolbox
into the network. For example, click in the tool box on the box element,
keep the mouse button pressed and move the cursor over the network.
🡆 Each possible insertion position lights up green.
8. Release the mouse button in order to insert the box.
🡆 The box is displayed in the network. The type of box on the inside and
the instance name above the box, which is required in the case of a
function block, are still kept free with three question marks.
9. Select the string ??? inside the box and replace it with the name of the
box. Input assistance is available for this purpose.
🡆 The inputs and outputs of the selected box are displayed. They are still
kept free with question marks, as is the instance name in the case of a
function block.
Also refer to
● ⮫ Menu commands
● ⮫ Programming the application

Programming branches (subnetworks)


1. In the implementation part of your POU, insert a new network using the
command “FBD/LD/IL 🠂 Insert network” or from the tool box.
2. For example, drag an “ADD” operator into the empty network and replace
the characters ??? with two variables of the type INT.
3. Drag the element “Line branch” from the tool box into your implementa-
tion and release the mouse button at the green insertion position directly
at the output of the operator.
🡆 The branch splits the processing line at the output of the operator box
into 2 subnetworks.
4. Further FBD elements and also further branches can now be added to
each of the two subnetworks.
Also refer to
● ⮫ Chapter FBD/LD/IL Element 'Branch' on page 424
● ⮫ Chapter Command 'Insert Branch' on page 1004

Also refer to
● ⮫ Chapter FBD/LD/IL Editor on page 410

Ladder diagram (LD)


The ladder diagram (LD) is a graphically oriented programming language that
is similar to an electrical circuit diagram. On the one hand the ladder diagram
is suitable for designing logical switching units, but on the other you can also
create networks just as in FBD. Therefore you can use LD very well for control-
ling calls of other program blocks.

R911403764, Edition 08 Bosch Rexroth AG


176 / 1158 ctrlX PLC Engineering
Creating source code in IEC

The ladder diagram consists of a series of networks. A network is bounded on


the left side by a vertical line (bus bar). A network contains a circuit diagram
of contacts, coils, optional boxes (POUs) and connecting lines. On the left side
of a network there is a contact or a series of contacts that relay the ON or
OFF state, which corresponds to the Boolean values TRUE and FALSE, from left
to right. A Boolean variable is associated with each contact. If this variable is
TRUE, the status is relayed from left to right via the connection line. Otherwise
OFF is relayed. Thus the coil(s) in the right part of the network receive(s) the
value ON and OFF coming from the left and the value TRUE or FALSE is written
accordingly into the Boolean variable assigned to them.
If the elements are connected in series, this means an AND operation. If they
are connected in parallel, this means an OR operation. A line through an ele-
ment means a negation of the element. The negation of an input or an output is
indicated by a circle symbol.

Example

IEC 61131-3 defines a complete LD command set, consisting of different types


of contacts and coils. Contacts conduct the current (according to their type)
from left to right. Coils store the incoming value. Contacts and coils are
assigned to Boolean variables. You can supplement an LD network by jumps,
returns, labels and comments.
Also refer to
● ⮫ Chapter Programming Ladder Diagrams (LD) on page 176
● ⮫ Chapter 33.3.1 Menu commands – General information on page 868 (Com-
mands)

Programming Ladder Diagrams (LD)


Creating a POU in the ladder diagram (LD) implementation language
1. Select the application in the Device tree.
2. Select the command “Project 🠂 Add Object 🠂 POU”.
🡆 The dialog box “Add POU” opens.
3. Enter a name and select the implementation language “Ladder Diagram
(LD)”.
Click on “Add”.
🡆 PLC Engineering adds the POU to the Device tree and opens it in
the editor. An empty network is inserted in the implementation part.
The empty network is bounded on the left by a vertical line, which
represents a bus bar. The view “ToolBox” is also automatically opened,
in which the suitable elements, operators and function blocks for LD
programming are available.

Adding a contact and a function block (TON)


Requirement: a POU with the implementation language LD is opened in the
editor and an empty network is inserted.
1. Click on the category “Ladder Elements” in the view “ToolBox”

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 177 / 1158
Creating source code in IEC

2. Click on the “Contact” element, drag it into your network and release the
mouse button at the insertion position “Start here”.
🡆 The contact is added on the left in the network directly against the
vertical line.
3. Click on ??? and enter the identifier of a boolean variable. The input
assistant is also available to you for this.
4. Click on the category “Function Blocks” in the view “ToolBox” and drag
the function block “TON” onto an insertion position on the connecting line
to the right of the inserted contact.

Programming the application


🡆 PLC Engineering inserts the box “TON” to the right of the contact. The
contact is connected with the input IN of the TON box.
5. Enter a time constant at the input PT, for example T#3s.
🡆 If the variable of your contact goes TRUE, then the input IN of the
TON box also goes TRUE. The TON box forwards the value TRUE to the
output Q with a switch-on delay of T#3s, for example.

Inserting a closed line branch


Requirement: a POU with the implementation language LD is opened in the
editor and an empty network is inserted.
1. Click inside the empty network and select the command “FBD/LD/IL
🠂 Insert Contact”.
2. Select the connecting line to the left of the contact and select the com-
mand “FBD/LD/IL 🠂 Set Branch Start Point”.
🡆 The starting point on the connecting line is marked by a red rectangle.
PLC Engineering marks all possible end points of the branch with a
blue rectangle.
3. Click on a blue rectangle in order to set the end point of your closed line
branch.
🡆 PLC Engineering inserts the line branch between the starting and end
points. The program flow will go through both branches up to the end
point.
If you insert the line branch at a box instead of at a contact, the box
will only be called if none of the other branches is TRUE.

See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter Closed Branch on page 421
● ⮫ Chapter LD Element 'Contact' on page 423

Instruction list (IL)


The instruction list is an assembler-like IEC 61131-compliant programming lan-
guage. It supports accumulator-based programming.
An instruction list (IL) consists of a series of instructions. Each instruction
starts in a new line and contains an operator and, depending on the type of
operation, one or more operands separated by commas. A label, followed by a
colon, can be placed in front of an instruction. It serves the identification of the
instruction and you can use the label as a jump destination. A comment must
be the last element in a line. Empty lines can be inserted between instructions.
All IEC 61131-3 operators are supported, as are multiple inputs, multiple out-
puts, negations, comments, set/reset of outputs and conditional/unconditional
jumps.

R911403764, Edition 08 Bosch Rexroth AG


178 / 1158 ctrlX PLC Engineering
Creating source code in IEC

Each instruction is based primarily on the loading of values into the accumu-
lator (LD instruction). After that the corresponding operation is executed with
the parameter from the accumulator. The result of the operation is written
again into the accumulator, from where you should store it purposefully with
the help of an ST instruction.
The instruction list supports comparison operators (EQ, GT, LT, GE, LE, NE)
and jumps for programming of conditional executions or loops. Jumps can be
unconditional (JMP) or conditional (JMPC / JMPCN). In the case of conditional
jumps, a check is performed as to whether the value in the accumulator is TRUE
or FALSE.

Example

Also refer to
● ⮫ Chapter Programming in Instruction List (IL) on page 178
● ⮫ Chapter Modifiers and operators in IL on page 415
● ⮫ Chapter 33.3.1 Menu commands – General information on page 868

Programming in Instruction List (IL)


If necessary, IL can be activated in the PLC Engineering options.

Creating POUs in the Instruction List (IL) implementation language


1. Select the application in the device tree.
2. Click “Project 🠂 Add Object 🠂 POU”.
🡆 The “Add POU” dialog opens.
3. Enter a name and select the implementation language “Instruction List
(IL)”.
Click “Add”.
🡆 PLC Engineering adds the POU to the device tree and opens it in the
editor. A network is already inserted in the implementation part.

Programming networks (example: ADD operation)


Requirement: A POU (IL) is opened in the editor and possesses an empty
network.
1. Click the line marked in color in the 1st column and enter the operator LD.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 179 / 1158
Creating source code in IEC

2. Press the [Tab] key.


🡆 The cursor jumps to the 2nd column
3. Enter the first summand of your ADD operation, for example 6.
4. Press [Ctrl]+[Enter] or select the command “FBD/LD/IL 🠂 Insert IL Line
After”.
🡆 PLC Engineering inserts a new instruction line. The first column of this
line has the focus.
5. Enter ADD and press [Tab].
6. Enter the second summand of your ADD operation, for example 12.

Programming the application


7. Press [Ctrl]+[Enter]
8. Enter the operator ST and press [Tab].
9. Specify a variable of the data type INT, for example iVar.
🡆 The result – 16 in the example – is stored in the iVar.

Calling function blocks


Requirement: A POU (IL) is opened in the editor and possesses an empty net-
work. A variable of the data type <function block> is declared in the declaration
part (example: C1:CTU;).
1. Click the line marked in color in the 1st column and select the command
“FBD/LD/IL 🠂 Insert Box”.
🡆 The input assistant opens.
2. Select the desired function block in the category “Function Blocks” or
“Boxes”, for example the “CTU” counter from the “Standard” library, and
click “OK”.
🡆 PLC Engineering inserts the selected function block “CTU” as follows:

3. Replace the strings ??? with the variable name and the values or variables
for the inputs/outputs of the function block.
4. As an alternative to inserting the function block via the input assistant,
you can directly enter the call in the editor as shown in the picture at step
4.

See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter Modifiers and operators in IL on page 415

18.17.3 Continuous Function Chart (CFC)


CFC programming – Basics
The “Continuous Function Chart (CFC)” implementation language is a graphical
programming language which extends the standard languages of IEC 61131-3.

R911403764, Edition 08 Bosch Rexroth AG


180 / 1158 ctrlX PLC Engineering
Creating source code in IEC

You can graphically program a system by means of a POU in CFC. You insert
elements and position them freely. You insert connections and wire the ele-
ments to a network so that a well-structured function block diagram is created.
You can also insert feedback. You can read function block diagrams like an
circuit diagram or a block diagram.
The execution sequence of a function block diagram is data flow-based. In
addition, a programming block can process several data flows. Then the data
flows do not have any common data. In the editor, multiple networks do not
have any connections to each other.
On the other hand, POUs in FBD, LD, or IL have a network-based execution
order.

Also refer to
● ⮫ Chapter CFC editor on page 425
● ⮫ Chapter CFC editor, page-oriented on page 428
● ⮫ Chapter 33.3.1 Menu commands – General information on page 868
● ⮫ Chapter Dialog 'Properties' - 'CFC Execution Order' on page 1055

CFC programming – Page-oriented


The “Continuous Function Chart (CFC) - page-oriented” implementation lan-
guage is also a graphical programming language which extends the standard
languages of IEC 61131-3.
In this language, you can graphically program large, complex function block
diagrams. The same elements and commands are available as for “Continuous
Function Chart (CFC)”. In addition, you can arrange the code on as many pages
as you like. This allows to create extensive function plans that can still be
printed. Each page also has margin areas. You can arrange inputs and sink
connection marks on the left, and outputs and source connection marks on the
right. This helps you to insert connecting lines and provides a better overview.
Unfortunately, it is not possible to switch a POU between the “Continuous
Function Chart (CFC) - page-oriented” and “Continuous Function Chart (CFC)”
implementation languages.

Automatic execution order according to data flow


The execution order in programming blocks is uniquely determined in text-
based and network-based editors. However, in the CFC editor you can position
the elements freely and thus the execution order is initially not clear. It is there-
fore determined by PLC Engineering according to the data flow and, in the case
of multiple networks, according to the topological position of the elements.
The top elements are sorted before the bottom elements and the left elements
before the right elements and networks. The execution sequence is now unique
and causes the programming function block to be processed in a time- and
cycle-optimized manner.
You can get information about the time sequence of the elements in the chart
and temporarily display the execution sequence. When you program networks
with feedback, you can set an element in the feedback loop as the starting
point.
You can also explicitly edit the sequence of processing in a CFC object if
required. To do this, switch the default “Automatic data flow mode” property
of the CFC object and enable the “Explicit execution order mode” property.
In this mode you have the possibility to edit the execution order with menu
commands.
Before ctrlX I/O Engineering System V3.5 SP15, you had to explicitly define
the execution order for each programming function block. There was no mode
switching.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 181 / 1158
Creating source code in IEC

Data flow
The chronological sequence of which data is read or written when and how
in which programming objects is generally referred to as data flow. A program-
ming function block can process any number of data flows, which can also be
executed independently of each other.

Display execution order


The execution order of a CFC object is determined automatically by default.
The “Automatic data flow mode” property is enabled. The automatically deter-

Programming the application


mined execution order can be temporarily displayed in the CFC editor.
1. Create a new project using the “Default project” template and enter, for
example, the name Minimal.
2. Extend the application with the function block FB_DOIt in the implemen-
tation language “ST” with inputs and outputs.
🡆
FUNCTION_BLOCK FB_DoIt
VAR_INPUT
iAlfa : INT;
iBravo: INT;
sCharlie : STRING := 'Charlie';
xItem : BOOL;
END_VAR
VAR_OUTPUT
iResult : INT;
sResult : STRING;
xResult : BOOL;
END_VAR
VAR
END_VAR

iResult := iAlfa + iBravo;

IF xItem = TRUE THEN


xResult := TRUE;
END_IF
3. Create the ExecuteCFC function block in the “CFC” implementation lan-
guage.
🡆
PROGRAM ExecuteCFC
VAR
fb_DoIt_0: FB_DoIt;
fb_DoIt_1: FB_DoIt;
iFinal_1: INT;
iFinal_0: INT;
xFinal: BOOL;
END_VAR

R911403764, Edition 08 Bosch Rexroth AG


182 / 1158 ctrlX PLC Engineering
Creating source code in IEC

The automatic data flow mode is enabled in newly created program-


ming objects in CFC. The execution order of the programming object is
optimally determined internally.
4. Select the command “CFC 🠂 Execution order 🠂 Show execution order”.
🡆 The execution order of the object is shown. The blocks and outputs are
numbered accordingly and reflect the time sequence of the processing.
As soon as you click again in the CFC editor, the numbering will be
hidden.

Specifying the execution order for networks with feedbacks


1. Create a CFC program that includes a feedback loop.
🡆 The PrgPositiveFeedback programming function block counts.

PROGRAM PrgPositiveFeedback
VAR
iResult: INT;
END_VAR

2. Select an element within the feedback.


🡆 The selected element is highlighted in red.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 183 / 1158
Creating source code in IEC

3. Select the command “CFC 🠂 Execution order 🠂 Set starting point of


feedback”.

Programming the application


🡆 During runtime, this function block is processed first. The start module
of the feedback is set and is assigned the symbol . The execution
order is reordered and the selected element is assigned 0 (generally
the lowest number in the feedback).
4. Select the start function block again.
5. Select the command “CFC 🠂 Execution order 🠂 Set starting point of
feedback”.
🡆 The function block is deselected as start function block.

The execution order is set internally.


6. Select the command “CFC 🠂 Execution order 🠂 Show execution order”.
🡆 The execution order by data flow is displayed.

Explicitly set execution order


The automatically defined execution sequence according to data flow causes a
time and cycle optimized execution of the programming function block. Thus,
you do not need any information about the internally managed execution order
during the development process.
In the “Explicit execution order mode”, adjust the execution order in direct
responsibility and assess the consequences and effects yourself. This is
another reason why the execution order is constantly displayed.
You can explicitly change the automatically set execution order of a CFC object
if you have enabled the “Explicit execution order mode” option for the object.
1. Select a CFC object in the “Devices” view or in the “POUs” view
2. Open the context menu and select the “Properties” command.
3. Select the “CFC Execution Order” tab.
🡆 The “Execution order” drop-down list shows the currently activated
mode.

R911403764, Edition 08 Bosch Rexroth AG


184 / 1158 ctrlX PLC Engineering
Creating source code in IEC

4. In the “Execution order” drop-down list, select “Explicit execution order


mode”.
5. Confirm the dialog with “OK”.
🡆 The explicit execution order mode is enabled. In the CFC editor, the
networks are numbered and in the menu “CFC 🠂 Execution order” the
following commands are available for editing the execution order.
6. Open a CFC object.
7. Select a numbered element and select the command “CFC 🠂 Execution
order 🠂 To the beginning”.
🡆 The execution order is reordered and the selected element has the
number 0.

Also refer to
● ⮫ CFC editor
● ⮫ CFC editor, page-oriented
● ⮫ Menu commands
● ⮫ Dialog 'Properties' - 'CFC Execution Order'

Programming in the CFC editor


You can wire programming function blocks together in the CFC Editor and
create descriptive block diagrams.
The editor supports you as follows:
● Programming with elements and connecting lines
● Dragging instances and variables to the editing area
● Autorouting of the connecting lines
● Automatic linking
● Fixing connecting lines by control points
● Collision detection
● Input support for connection marks
● Forcing and writing values in online mode
● Moving the selection using arrow keys
● Reduced representation of a function block without unconnected connec-
tors

Insert elements and connect them with connecting lines


1. Place one element “function block” and one element “output” in the
editor.
2. Click on the output of the “function block” element.
🡆 The output is marked with a red square.
3. With the mouse button pressed, draw a connecting line from the block
output of the “function block” element to the block input of the “output”
element.
🡆 When the function block input is reached, the cursor changes its
symbol.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 185 / 1158
Creating source code in IEC

4. Release the mouse button.


🡆 The output pin of the function block is wired to the input pin of the
output.

Programming the application


Optionally, you can select the two pins by holding down the [Ctrl key] and
selecting the “Connect selected pins” command.

Calling instances
1. Create a new project using the default template and enter, for example,
the name First.
🡆 The First.project is created.
2. Extend the application with the function block FB_DOIt in the implemen-
tation language “ST” with inputs and outputs.
🡆
FUNCTION_BLOCK FB_DoIt
VAR_INPUT
iAlfa : INT;
iBravo: INT;
sCharlie : STRING := 'Charlie';
xItem : BOOL;
END_VAR
VAR_OUTPUT
iResult : INT;
sResult : STRING;
xResult : BOOL;
END_VAR
VAR
END_VAR

iResult := iAlfa + iBravo;

IF xItem = TRUE THEN


xResult := TRUE;
END_IF
3. Select the application and choose in the context menu the command
“Add object 🠂 POU”. Select the implementation language “Continous
Function Chart (CFC)” and the type Program. For example, enter the
name PrgFirst.
Confirm the dialog with “OK”.
🡆 The PrgFirst program is created and is displayed in the editor. It is
still empty.

R911403764, Edition 08 Bosch Rexroth AG


186 / 1158 ctrlX PLC Engineering
Creating source code in IEC

4. Instantiate function modules and declare variables.


🡆
PROGRAM PrgFirst
VAR
iCounter: INT;

fbDoIt_1 : FB_DoIt;
fbDoIt_2 : FB_DoIt;

iOut : INT;
sOut: STRING;
xOut: BOOL;

END_VAR
5. Drag an element “function block” from the “Tools” view into the editor.
6. Click on the ??? field and enter ADD.
🡆 The function block type is ADD. The function block acts as an adder.
7. Click the line number 3 in the declaration editor.
🡆 The declaration line of iCounter is selected.
8. Click in the selection and drag the selected variable into the implementa-
tion and focus an input of the ADD function block.
🡆 An input was created, declared and connected to the block.
9. Click again in the selection and drag the variable to the output of the ADD
function block.
🡆 An output was created, declared and connected to the function block.
10. From the “Tools” view, drag an “input” element into the implementation.
Click on the ??? field and enter 1.
11. Connect input 1 to an input at the ADD function block.
🡆 A network is programmed. During runtime, the network counts the bus
cycles and stores the result in iCounter.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 187 / 1158
Creating source code in IEC

Programming the application


12. Click the line number 5 in the declaration editor.
🡆 The line is selected.
13. Click in the selection and drag the selected instance into the implementa-
tion.
🡆 The instance is displayed as function block in the editor. Type, name
and the function block pins are displayed accordingly.

R911403764, Edition 08 Bosch Rexroth AG


188 / 1158 ctrlX PLC Engineering
Creating source code in IEC

14. Drag the instance fbDoIt_2 into the editor. Interconnect the instances
with each other and with inputs and outputs.
🡆 Example:

A program in ST with the same functionality could look like this:

PROGRAM PrgFirstInSt
VAR
iCounter: INT;

fbDoIt_1 : FB_DoIt;
fbDoIt_2 : FB_DoIt;

iOut : INT;
sOut: STRING;

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 189 / 1158
Creating source code in IEC

xOut: BOOL;

END_VAR
iCounter := iCounter + 1;
fbDoIt_1(iAlfa := 16, iBravo := 32, sCharlie := 'First',
xItem := TRUE, iDelta := 2, iResult => fbDoIt_2.iAlfa,
xResult => fbDoIt_2.xItem);
fbDoIt_2(iBravo := fbDoIt_1.iResult, sCharlie :=
'Second', iDelta := 2, iResult => iOut , sResult=> sOut,
xResult => xOut);

Programming the application


Creating connection marks
Prerequisite: You have a CFC programming function block with connected ele-
ments.
1. Select a connecting line between two elements.
🡆 The connecting line is displayed as selected. The ends of the con-
necting line are marked with red squares .
2. Select the command “CFC 🠂 Connection marker”.
🡆 The connection is disconnected and is replaced by a “connection
marker - source” and a “connection marker - target”. The name of the
marks is generated automatically.

3. Click in the source connection marker.


🡆 The name can be edited.
4. Enter SimpleMark as the name for the source connection mark.
🡆 Source connection marker and target connection marker have the same
name.

Solve collisions and fix connecting lines by control points


The following example shows how to use the “Route all connections” command
and how to use checkpoints.
1. Position the elements “input” and “output”. Connect the elements.

R911403764, Edition 08 Bosch Rexroth AG


190 / 1158 ctrlX PLC Engineering
Creating source code in IEC

2. Position 2 elements of the type “Function block” on the line.


🡆 The connecting line and the function blocks are highlighted in red due
to the collision.

3. Execute the command “CFC 🠂 Routing 🠂 Route all connections”.


🡆 The collision is solved

4. Change the connecting lines step-by-step.

🡆 The connecting line was changed manually and is now blocked for
autorouting. This is indicated by a lock symbol at the end of the con-
nection.

5. Select the connecting line and choose the command “CFC 🠂 Routing
🠂 Create control point”
🡆 A control point is created on the connecting line. The connecting line is
fixed at the control point.

Optionally, you can drag a control point from the “Tools” view onto a
line.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 191 / 1158
Creating source code in IEC

6. Change the connecting line according to the following example.

Programming the application


🡆 The control point allows you to change the connecting line individually.
You can set as many control points as you want.
7. Remove the checkpoint with the context command “CFC 🠂 Routing
🠂 Remove control point”.
8. Disconnect with the command “Disconnect” or by a mouse click on the
lock icon.
9. Select the connecting line and choose the command “Route all
connections”.
🡆 The connecting line is automatically routed as shown in step 3.

Connections within a group are not automatically routed.


NOTICE

Reduce representation of a function block


Prerequisite: A CFC programming function block is open. In the editor, its
blocks are displayed with all declared connections.
1. Select a function block whose connections are partially unconnected.
🡆 Example: fb_DoIt_1

The function block requires space for all connections.

R911403764, Edition 08 Bosch Rexroth AG


192 / 1158 ctrlX PLC Engineering
Creating source code in IEC

2. Select the command “CFC 🠂 Pins 🠂 Remove unconnected pins”.


🡆 The block requires less space and is now only displayed with the func-
tionally relevant connections.

Also refer to
● ⮫ Chapter 32.1.3 Common Functions in Graphical Editors on page 378
● ⮫ Chapter CFC editor on page 425
● ⮫ Chapter CFC editor, page-oriented on page 428
● ⮫ Programming languages and their editors

18.17.4 Structured Text (ST), Extended Structured Text (ExST)


Structured text (ST)– General information
The ST editor is used for the programming of POUs in the IEC-61131-3 pro-
gramming language Structured Text (ST) and Extended Structured Text. The
Extended Structured Text provides some additional functions with regard to the
IEC 61131-3 standard.
Structured text is a programming language that is comparable with other high
level languages such as C or PASCAL which allows complex algorithms to be
developed. The program code consists of a combination of expressions and
instructions, which can also be executed conditionally (IF… THEN… ELSE) or in
loops (WHILE… DO).
An expression is a construct that returns a value after being evaluated. Expres-
sions are also operators and operands together. Assignments can also be used
as expressions. An operand can be a constant, a variable, a function call or
another expression.
Instructions control how to process the expressions.
For this text editor you can make various settings with regard to behavior,
appearance and menus in the dialogs “Options” and “Adapt” in the “Tools”
menu. The familiar Windows functions (for example IntelliMouse) are also avail-
able for this editor.
Also refer to
● ⮫ Chapter Programming in Structured Text (ST) on page 193
● ⮫ Chapter 'Options' dialog - 'Text editor' on page 1087
● ⮫ Chapter Dialog 'Customize' - 'Menu' on page 1094

ExST - Extended Structured Text


Extended Structured Text (ExST) is a PLC Engineering-specific extension with
respect to the IEC 61131-3 standard for Structured Text (ST).

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 193 / 1158
Creating source code in IEC

Also refer to
● ⮫ Chapter ExST Assignment 'R=' on page 383
● ⮫ Chapter ExST Assignment 'S=' on page 382
● ⮫ Chapter ExST - Assignment as expression on page 383

Programming in Structured Text (ST)


Principle
The programming languages 'Structured Text' and 'Extended Structured Text'
are programmed in the ST editor. The program code consists of a combination

Programming the application


of expressions and instructions, which can also be executed conditionally or in
loops. Complete each instruction with a semicolon ;.
The variables are declared in the declaration editor.

Creating a POU in the Structured Text (ST) implementation language


1. Select an application in the device tree.
2. Select the command “Project 🠂 Add object 🠂 POU”
🡆 The “Add POU” dialog opens.
3. Enter a name and select the “Structured Text (ST)” “implementation
language”. Click on “Add”.
🡆 The POU is added to the device tree and opened in the editor.
Now insert the variable declarations in the upper part of the POU and
enter the ST program code in the lower part of the POU.
Also refer to
● ⮫ Chapter ST expressions on page 380
● ⮫ Chapter 18.17.4 Structured Text (ST), Extended Structured Text (ExST)
on page 192
● ⮫ Chapter ST Function Block Call on page 389
● ⮫ Chapter ST – Comments on page 390
● ⮫ Chapter 18.16.3 Using the Declaration Editor on page 165

18.17.5 Sequence language (AS)


Programming the Sequential Function Chart (SFC) – General information
Use the SFC editor for programming POUs in the IEC 61131-3 compliant SFC
implementation language. Sequential function chart (SFC) is a graphically-ori-
ented language to describe the chronological sequence of individual actions in
a program. For this purpose, actions that are discrete programming objects are
assigned to step elements. Transition elements control the processing order of
steps.
Also refer to
● ⮫ Chapter SFC (sequential function chart) editor on page 391

Programming in SFC
Creating a POU in SFC
1. Select an application in the device tree.
2. Click “Project 🠂 Add Object 🠂 POU”.
🡆 The “Add POU” dialog opens.

R911403764, Edition 08 Bosch Rexroth AG


194 / 1158 ctrlX PLC Engineering
Creating source code in IEC

3. Specify a name and select the “Sequential Function Chart (SFC)” imple-
mentation language.
Click “Add”.
🡆 PLC Engineering adds the POU to the device tree and opens it in the
editor.

Adding a step-transition
1. Select the transition after the initial step.
🡆 The transition is marked in red.
2. Click “SFC 🠂 Insert Step-Transition After”.
🡆 PLC Engineering inserts the “Step0” step and the “Trans0” transition.
3. Select the “Trans0” transition and click “SFC 🠂 Insert Step-Transition”.
🡆 PLC Engineering inserts the “Trans1” transition and the “Step1” step
before the “Trans0” transition.
You can also drag the “Step” and “Transition” elements into the diagram from
the “Toolbox” view.
See also
● ⮫ Chapter SFC Elements 'Step' and 'Transition' on page 400
● ⮫ Chapter Command 'Insert Step-Transition' on page 978
● ⮫ Chapter Command 'Insert Step-Transition After' on page 979

Adding an entry action


1. Select the “Step0” step.
2. Click “SFC 🠂 Add Entry Action”.
🡆 By default, you are prompted to select the duplication mode for the
step actions. You decide whether the reference information about the
existing step action objects is copied when the step is copied, or the
objects are embedded. Embedding results in new step action objects
being created when the step is copied. The duplication mode is defined
in the “Duplicate when copying” step property. When this property is
deactivated, the copied steps call the same actions as the current step.
You can deactivate the prompt completely in the SFC properties.
The display of embedded objects in the “Devices” and “POUs” views
can be deactivated by means of a menu command.
3. For this example, accept the “Copy reference” default setting and click
“OK” to confirm.
🡆 The “Add Entry Action” dialog opens.
4. Enter the name "Step0_entry" and select the “Structured Text (ST)” imple-
mentation language. Click “Add”.
🡆 PLC Engineering inserts the “Step0_entry” action below the POU in the
device tree and opens the action in the editor.
In the Step0_entry entry action, you program statements to be exe-
cuted one time when the “Step0” step becomes active.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 195 / 1158
Creating source code in IEC

5. Close the editor of Step0_entry.


🡆 The “Step0” step is now marked with an “E” in the lower left corner.
Double-click this marker to open the editor.

Programming the application


The entry action Step0_entry is now available in the properties of
the step in “Entry action”. Other actions can also be selected there as
needed.
6. Select the “Step0” step. Press [Ctrl]+[V] to copy the step.
🡆 The same entry actions inserted above are available In the inserted
copy of the step. The new step then calls the same exact action.
See also
● ⮫ Chapter Command 'Add Entry Action' on page 979
● ⮫ 2. Step actions on page 403
● ⮫ Chapter “Options” - “SFC editor” dialog on page 1089

Adding an exit action


1. Select the “Step0” step.
2. Click “SFC 🠂 Insert Exit Action”.
🡆 By default, you are prompted to select the duplication mode for the
step actions of the step. See above for adding an entry action. Then the
“Insert Exit Action” dialog opens.
3. Enter the name "Step0_exit" and select the “Structured Text (ST)” imple-
mentation language. Click “Add”.
🡆 PLC Engineering inserts the “Step0_exit” action below the POU in the
device tree and opens the action in the editor.
In the Step0_exit exit action, you program statements to be executed
one time before the “Step0” step becomes inactive.
4. Close the editor of Step0_exit.
🡆 The “Step0” step is now marked with an “X” in the lower right corner.
Double-click this marker to open the editor.

You can define the exit action in the properties of the step in “Exit action”.
Other actions can also be selected there.
See also
● ⮫ Chapter Command 'Add Exit Action' on page 980
● ⮫ 2. Step actions on page 403

R911403764, Edition 08 Bosch Rexroth AG


196 / 1158 ctrlX PLC Engineering
Creating source code in IEC

Adding an action
1. Double-click the “Step0” step.
🡆 By default, you are prompted to select the duplication mode for the
step actions of the step. See above for adding an entry action. The
“Add Action” dialog opens.
2. Type in the name "Step0_active" and select the “Structured Text (ST)”
implementation language. Click “Add”.
🡆 PLC Engineering inserts the “Step0_active” action below the POU in the
device tree and opens the action in the editor.
In the Step0_active step action, you program statements to be exe-
cuted as long as the step is active.
3. Close the editor of Step0_active.
🡆 The “Step0” step is now marked with a black triangle in the upper right
corner.

You can define the action in the properties of the step in “Step action”. Other
actions can also be selected there.
See also
● ⮫ 2. Step actions on page 403

Adding an alternative branch


1. Select the “Step1” step.
2. Click “SFC 🠂 Insert Branch Right”.
🡆 PLC Engineering inserts the “Step2” step to the right of “Step1”. The
steps are connected as a parallel branch signified by two pairs of
double lines.
3. Select one of the double lines.
🡆 The double line is marked red.
4. Click “SFC 🠂 Alternative”
🡆 PLC Engineering converts the branch into an alternative branch. The
double lines change into a single line.
You can click “SFC 🠂 Parallel” to convert an alternative branch into a parallel
branch.
See also
● ⮫ Chapter SFC Element 'Branch' on page 405
● ⮫ Chapter Command 'Parallel' on page 980
● ⮫ Chapter Command 'Insert Branch' on page 980
● ⮫ Chapter Command 'Insert Branch Right' on page 981

Adding a jump
1. Select the “Step2” step.
2. Click “SFC 🠂 Insert Jump After”.
🡆 PLC Engineering inserts the “Step” jump after the “Step2” step.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 197 / 1158
Creating source code in IEC

3. Select the “Step” jump destination.


🡆 You can type the jump destination manually or select it by using the
Input Assistant . Select Step0.

Programming the application


See also
● ⮫ Chapter SFC Element 'Jump' on page 407
● ⮫ Chapter Command 'Insert Jump' on page 983
● ⮫ Chapter Command 'Insert Jump After' on page 983

Adding a macro
1. Select the “Step1” step.
2. Click “SFC 🠂 Insert Macro After”.
🡆 PLC Engineering inserts the “Macro0” macro after the “Step1” step.
3. Double-click the “Macro0” element.
🡆 The macro opens in the implementation section of the editor. The name
"Macro0" is displayed in the caption.
4. Click “SFC 🠂 Insert Step-Transition”.
🡆 PLC Engineering inserts a step-transition combination.
5. Click “SFC 🠂 Zoom out of Macro”.
🡆 The implementation section returns to the main diagram.
See also
● ⮫ Chapter SFC Element 'Macro' on page 407
● ⮫ Chapter Command 'Insert Macro' on page 983
● ⮫ Chapter Command 'Insert Macro After' on page 984

Adding an association
1. Select the “Step2” step.
2. Click “SFC 🠂 Insert Action Association”.
🡆 PLC Engineering inserts an association to the right of the “Step2” step.
3. Click in the left field of the association to select the qualifier.
🡆 You can enter the qualifier manually or use the Input Assistant .
Select "P".

R911403764, Edition 08 Bosch Rexroth AG


198 / 1158 ctrlX PLC Engineering
Programmatic access to I/Os

4. Click in the right field of the association to select the action.


🡆 You can type the action or select it by using the Input Assistant .

See also
● ⮫ 1. IEC actions on page 403
● ⮫ Chapter Qualifiers for Actions in SFC on page 394
● ⮫ Chapter Command 'Insert Action Association' on page 982
● ⮫ Chapter Command 'Insert Action Association After' on page 983

Using the library 'analyzation.library' for the analyzation of expressions


The library analyzation.library allows for the analyzation of expressions. It
can be used, for example, in the SFC diagram to examine the result of the flag
SFCError. This flag is used to monitor timeouts in the SFC diagram.
See also
● ⮫ Chapter Library "Analyzation" on page 400

See also
● ⮫ Chapter SFC (sequential function chart) editor on page 391

18.18 Programmatic access to I/Os


18.18.1 Programmatic access to I/Os – General information
PLC Engineering provides the following features for mapping project variables
to input, output and memory addresses:
● Assigning project variables to input addresses, output addresses and
memory addresses in the “I/O Mapping” tab of the device editor
● Programmatic access to I/Os
– Variable configuration
– AT declaration
We recommend to define the mapping of project varia-
NOTICE
bles to input addresses, output addresses and memory
addresses in the “I/O mapping” tab of the editor of the
respective device.
Also refer to:
● ⮫ Chapter 17.4 Configuring Devices and I/O Mapping on page 118

18.18.2 Variables Configuration - VAR_CONFIG


Use the variables configuration for mapping variables of functions blocks to
the process map. For declarations in the function block, assign the variables to
the device inputs/outputs without providing the full address. Later, the exact
address is provided centrally for all function block instances of the application
in a global variable list including VAR_CONFIG declarations. This global variables
list with the VAR_CONFIG declarations is termed the "variables configuration".

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 199 / 1158
Programmatic access to I/Os

For changes to variables that are assigned to I/O


NOTICE
addresses, PLC Engineering displays them immediately
In the process map. For changes to variables that are
mapped by a variables configuration, PLC Engineering
displays them not until the end of the responsible task.
Declaration of variables in functions blocks
When declaring variables in a function block, declare the variables between the
keywords VAR and END_VAR and assign incomplete addresses to the variables.
Mark these incomplete addresses with an asterisk (*).

Programming the application


Syntax:
<identifier> AT %<I|Q>*:<data type>;

Example
Define two local I/O variables: the input variable xLocIn and the output vari-
able xLocOut.
FUNCTION_BLOCK locio
VAR
xLocIn AT %I*: BOOL := TRUE;
xLocOut AT %Q*: BOOL;
END_VAR

Final definition of addresses in the variables configuration of the global varia-


bles list
In the global variables list that you use as the variables configuration, define
the variable declarations with the absolute addresses between the keywords
VAR_CONFIG and END_VAR.
You must declare the VAR_CONFIG variables with the complete instance path,
separating the individual POU and instance name by a dot (.). The declaration
must include an address whose class (input/output) agrees with the class of
the incomplete address (%I*, %Q*) in the function block. The data type must
also agree.
Syntax:
<instance variable path> AT %<I|Q><location>: <data type>;
If the path instance does not exist, then an error is reported. PLC Engineering
prints an error also if there is not an address configuration available for a
variable that you declared with an incomplete address.

Example
The locio function block in the example above is used in a program as fol-
lows:
PROGRAM PLC_PRG
VAR
locioVar1: locio;
locioVar2: locio;
END_VAR
A correct variables configuration in a global variable list could then look like
this:
VAR_CONFIG
PLC_PRG.locioVar1.xLocIn AT %IX1.0 : BOOL;
PLC_PRG.locioVar1.xLocOut AT %QX0.0 : BOOL;
PLC_PRG.locioVar2.xLocIn AT %IX1.0 : BOOL;
PLC_PRG.locioVar2.xLocOut AT %QX0.3 : BOOL;
END_VAR

R911403764, Edition 08 Bosch Rexroth AG


200 / 1158 ctrlX PLC Engineering
Programmatic access to I/Os

See also
● ⮫ Chapter 32.2.11 Configuration Variables - VAR_CONFIG on page 446
● ⮫ Chapter 18.18.3 AT Declaration on page 200
● ⮫ Chapter 32.4.13 Addresses on page 552

Creating a variables configuration


Requirement: You have a project open that includes a controller configuration
with a field device. The project contains a program (e.g. PLC_PRG) and a func-
tion block (e.g. func1). The field device has inputs and outputs. The textual
view is selected in the options for the declaration editor.
In the function block, assign variables to device I/Os with incomplete addresses
and then create a variables configuration.
1. Double-click a function block in the device tree (e.g. func1).
🡆 The function block editor opens.
2. Type the following between the keywords VAR and END_VAR: xLocIn AT
%I*: BOOL := TRUE; and XLocOut AT %Q*:BOOL; in the next line.
🡆 You have declared an input variable xLocIn and assigned it to the
incomplete input address %I* of a field device. You have assigned the
declared output variables have to the incomplete output address %Q*.
3. Click the PLC_PRG object in the device tree and add the following to the
declaration section of the program between VAR and END_VAR:
locioVar1: func;
locioVar2: func;
4. Right-click the “Application” object in the device tree and click “Add
Object 🠂 Global Variable List” and then click “Add” in the “Add Global
Variable List” dialog box.
🡆 The global variables list is added to the device tree and opens in the
editor.
5. Change the keyword VAR_GLOBAL to VAR_CONFIG.
6. Click “Declarations 🠂 Add All Instance Paths”.
🡆 The following instance paths are added:
PLC_PRG.logioVar1.xLocIn AT %I*;
PLC_PRG.logioVar2.xLocIn AT %I*;
PLC_PRG.logioVar1.xLocOut AT %Q*;
PLC_PRG.logioVar2.xLocOut AT %Q*;
7. Now, replace the incomplete addresses %I* and %Q* with the absolute,
complete addresses.
See also
● ⮫ Chapter Command 'Add all instance paths' on page 1014

18.18.3 AT Declaration
In the variables declaration, the code AT assigns a project variable to a specific
input address, output address, or memory address of the PLC that is config-
ured in the device tree. You can also define the assignment of variables to an
address in the “I/O Mapping” dialog of the device in the PLC configuration.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 201 / 1158
Programmatic access to I/Os

Syntax

<variable name> AT <address> : <data type>;

<address> : %<memory area prefix> ( <size prefix> )? <memory


position>
The AT declaration allows you to give the address a meaningful name. You can
make any necessary changes for the input or output signals at just one location,
for example in the declaration.

Programming the application


Examples
VAR wInput AT %IW0 : WORD; END_VAR Variable declaration with address information of
an input word
VAR xActuator AT %QW0 : BOOL; END_VAR Boolean variable declaration
Note: For Boolean variables, one byte is allo-
cated internally if a single bit address is not
specified. A change in the value of xActuator
affects the range from QX0.0 to QX0.7.
VAR xSensor AT IX7.5 : BOOL; END_VAR Boolean variable declaration with explicit speci-
fication of a single bit address. On access, only
the input bit 7.5 is read.
VAR xSensor AT IX* : BOOL; END_VAR For the address specification, the placeholder
* is given instead of the memory position. The
final address specification is done in the varia-
bles configuration.
Note: This is possible in function blocks.

If you assign a variable to an address, please note the following:


● You cannot write to variables that are placed at inputs. This will cause a
compiler error.
● You can perform AT declarations only for local and global variables, not for
input/output variables of POUs.
● Furthermore, AT declarations cannot be used in persistent variable lists.
● If you use AT declarations for structure components or function block varia-
bles, then all instances use the same memory. This is just like using static
variables in classic programming languages, such as C.
● The memory layout of structures also depends on the target system.

If you do not specify a single bit address explicitly, then


NOTICE
Boolean variables are allocated byte-by-byte.

Example

PROGRAM PLC_PRG
VAR
xVar AT %QW0 : BOOL;
END_VAR

xVar := TRUE;
When the variable xVar is written, the output memory range from QX0.0 to
QX0.7 is affected.

R911403764, Edition 08 Bosch Rexroth AG


202 / 1158 ctrlX PLC Engineering
Checking the syntax and analyzing code

See also
● ⮫ Chapter 18.18.2 Variables Configuration - VAR_CONFIG on page 198
● ⮫ Chapter 32.2.11 Configuration Variables - VAR_CONFIG on page 446
● ⮫ Chapter 32.4.13 Addresses on page 552

18.19 Checking the syntax and analyzing code


18.19.1 Checking the syntax and analyzing code – General information
PLC Engineering provides useful functions to help you create programs and
detect errors. The syntax check already flags errors and outputs error messages
while programming.
The static code analysis in PLC Engineering also assists you in complying with
defined coding guidelines and detecting weak constructs.
Also refer to
● ⮫ Chapter 18.19.2 Checking Syntax on page 202
● ⮫ Chapter 18.19.3 Analyzing Code Statically on page 202

18.19.2 Checking Syntax


When you input code, the precompile in PLC Engineering already runs some
basic checks. Then, wavy underlines appear under buggy code in the editor and
an error message is printed to the messages view.
PLC Engineering automatically generates the application code from the source
code that was written in the development system. This is done automatically
before downloading the application to the PLC. Before the application code
is generated, a test is performed for checking the allocations, the data types,
and the availability of libraries. Moreover, the memory addresses are allocated
when the application code is generated. You can click “Build 🠂 Generate Code”
to execute this command explicitly, or press the [F11] key. This is useful for
detecting any errors in your source code, even when the PLC is not connected
yet.
PLC Engineering prints all errors and warnings to the "Build" category of the
messages view. Double-clicking the error message opens the respective POU in
the editor with the buggy code marked. As an alternative, you can also jump to
the buggy code by right-clicking the error message.
Note the settings for this in the PLC Engineering options.
See also
● ⮫ Chapter 'Options' dialog - 'Intelligent coding' on page 1082

18.19.3 Analyzing Code Statically


You can subject your source code also to static analysis (lint) during the code
generation. This determines whether or not your source code complies with
the coding guidelines that you defined - according to the idea behind the lint
analysis tool.
● You activate the rules to the checked in the “Project Settings” dialog in the
“Static Analysis Light” category. The check itself is performed automatically
each time code is generated, for example when you click “Build 🠂 Generate
Code”. If divergence from the rules is determined, then it is reported as an
error message in the “Build” category of the message view. The reported
errors have the prefix SA<number>.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 203 / 1158
Checking the syntax and analyzing code

For static code analysis with “Static Analysis Light”, only


NOTICE
the application code of the project is checked. Libraries
are excluded from the check.
GVL variables in the “POUs” view are not necessarily
checked: If you have a project with several applica-
tions, then only the objects in the active application
are checked. If you have only one application, then the
objects in the common POU pool are also checked.
“Static Analysis Light” includes only a reduced set of rules in the default devel-

Programming the application


opment system. A larger set of rules, additional naming conventions, and met-
rics are available when you install the CODESYS Static Analysis add-on.

Deactivating lines of code in the implementations with pragmas from the static
analysis
By means of the pragma {analysis ...}, you can mark code so that the
specified rules are not checked. As a result, the marked lines of code are not
subjected to static analysis. The marked code is ignored during the check.
Syntax:
{analysis <sign><rule number>|,<other combinations of signs and
rules, comma-separated>}
-<rule number>: Deactivate the rule SA<rule number>.
-<rule number>: Activate the rule SA<rule number>.
Excluding implementation code
Requirement: Rules are activated in the “Project Settings” dialog.
1. Add the pragma {analysis -<number>} above the line of code that con-
tains code not to be checked first of all. For example, for the rule SA0024
🡆 The line of code is the first line of the code snippet that is not checked
with rule 24.
2. Add the pragma {analysis -<number>} below the line of code that con-
tains code not to be checked first of all. For example, for the rule SA0024
🡆 The line of code above is the last line of the code snippet that is not
checked with rule 24.

Example: Ignore untyped literal

{analysis -24}
nTest := 99;
iVar := INT#2;
{analysis +24}
The rule “SA0024: Untyped literals only” is deactivated for two lines. An error
is not issued although the code does not correct to: nTest := DINT#99;

Example: Ignore several rules

{analysis -10, -24, -18}


...
{analysis +10, +24, +18}
“SA0010: Arrays with only one component”
“SA0018: Unusual bit access”
“SA0024: Untyped literals only”

R911403764, Edition 08 Bosch Rexroth AG


204 / 1158 ctrlX PLC Engineering
Orientation and navigation

However, you cannot deactivate the rule SA0004: “Multiple Write Access on
Output” with a pragma.

Excluding programming objects with pragmas from the static analysis


Syntax:
{attribute 'analysis' := '-<rule number>[,<other negative rule
numbers, comma-separated>]'}
When you insert the attribute pragma in the declaration part of a programming
object, the specified rules are excluded for the entire programming object. If
multiple rules are excluded, then the rules are each comma-separated with a
dash and a number. A pragma statement for activation is not required.

Example

{attribute 'analysis' := '-33, -31'}


TYPE LocalData :
STRUCT
iLocal : INT;
uiLocal : UINT;
udiLocal : UDINT;
END_STRUCT
END_TYPE
The rules SA0033 and SA0031 are ignored for the structure LocalData.

{attribute 'analysis' := '-100'}


big: ARRAY[1..10000] OF DWORD;
The rule SA0100 is ignored for the array big.

See also
● ⮫ Chapter Dialog 'Project Settings' - 'Static Analysis Light' on page 1066

18.20 Orientation and navigation


18.20.1 Using the Cross-Reference List to Find Occurrences
The occurrences of symbols of a variable, a POU (program, function block,
function), or a DUT can be displayed in a cross reference list. Then you can
jump from the list directly to the corresponding locations in the project.
There are two ways to search for occurrence locations of a symbol:
● Plain text search: You manually specify a text (symbol name, placeholder) in
the “Cross Reference List” view.
● Search for a specific declaration:
– In the “Cross-Reference List” view, you select the declaration from the
input assistant.
– The focus is on a symbol name in the POU editor and you start the
cross-reference search from the context menu.
– The focus is on a symbol name in the POU editor, the “Cross-Reference
List” view is open, and the cross-reference search executes automatically.
– In the “Cross-Reference List” view which already lists occurrence loca-
tions for several declarations, you limit these results to a specific declara-
tion.

Cross references with text search by symbol name


Requirement: The “Cross-Reference List” view is open.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 205 / 1158
Orientation and navigation

1. Specify a string in the field next to the name, for example the identifier
of the variable for which you want to find the occurrence location in the
project. Example: "iCounter".
For the text search, you can use the asterisk "*" (for any number of
characters) or the question mark "?" (for an exact number of characters)
combined with a substring of a variable identifier.
Use the percent sign "%" to search for IEC addresses. Examples: "%MW8",
"%M*".
2. Click the button to start a text search in the project.

Programming the application


🡆 The view “Cross-Reference List” opens and displays the occurrence
locations for the iCounter variable. The declaration parts are always
displayed in the project with the occurrence location indented.
3. Double-click an occurrence location in the cross-reference list.
🡆 The respective object opens in the editor with the marked occurrence
location.

Cross-references for a specific symbol declaration


Requirement: A POU is open in the editor.
From the POU editor, with a menu command
1. Set the cursor at the identifier of the symbol (variable, POU) in the decla-
ration part or implementation part.
2. Click “Browse for Symbol 🠂 Browse Cross-References” in the context
menu or “Edit” menu.
🡆 The “Cross-Reference List” view opens and shows the occurrence loca-
tions of the variables or POU.
If the “Cross-Reference List” view is already open, then you can also search the
occurrence locations for a specific result as follows:
From the POU editor, automatic
Select the “Automatically list selection in cross reference view” check box
in “Tools 🠂 Options” (“SmartCoding” category). Select the name of the
symbol in the POU, or set the cursor in the name.
🡆 Depending on the position of the selection or cursor, the cross-refer-
ence list automatically shows the occurrence locations for the respec-
tive symbol.
In the cross-reference list view, with input assistance
In the “Cross-Reference List” view, use the input assistant to specify a
symbol name in the field next to “By declaration”.
🡆 The cross reference list displays the occurrence locations for the
symbol.
In the cross-reference list view, limited to a specific declaration
If multiple declarations for a symbol are listed in the “Cross- Reference
List” view, for example after a text search, then you can reduce the display
to one result: Select the line with the desired declaration and click the
button or click “Limit Results to Current Declaration” in the context menu.
🡆 the cross-reference list includes only the occurrence locations for the
selected declaration.
See also
● ⮫ Chapter Command 'Cross Reference List' on page 903
● ⮫ Chapter Command 'Browse Cross References' on page 889
● ⮫ Chapter 'Options' dialog - 'Intelligent coding' on page 1082

R911403764, Edition 08 Bosch Rexroth AG


206 / 1158 ctrlX PLC Engineering
Orientation and navigation

18.20.2 Finding Declarations


PLC Engineering provides the capability of searching the entire project for the
definition location of a variable or function. The block that includes the defini-
tion opens in the editor with the marked declaration.

Finding the declaration of a variable


Requirement: You have opened a POU in the editor.
1. Set the cursor at an identifier in the implementation section.
2. Click “Edit 🠂 Browse 🠂 Go to Definition”.
🡆 The POU with the declaration opens in the editor with the variable
definition marked. If the definition is located in a compiled library, then
the respective block opens in the library manager.
You can execute this command in both online and offline mode.

Examples
The following block includes a function block definition (fbinst), a program
call (prog_y()), and a function block call (fbinst.out):
VAR fbinst:fb1; ivar:INT; END_VAR prog_y(); ivar:=prog_y.y;
res1:=fbinst.out;
If the cursor is located at prog_y, then the command opens the program
prog_y in the editor.
If the cursor is located at fbinst, then this command focuses in the declara-
tion section at line fbinst:fb1;
If you set the cursor at out, then this command opens the function block fb1
in its editor.

See also
● ⮫ Chapter Command 'Go to Definition' on page 893

18.20.3 Setting and Using Bookmarks


Bookmarks are used for easy navigation through long programs. You can use
bookmarks in all implementation language editors, except SFC (sequential
function chart). Commands help to navigate directly to the marked position
in the program.

Setting and deleting bookmarks


Requirement: The POU is open in the editor.
1. Set the cursor at any program line.
2. Click “Edit 🠂 Bookmarks 🠂 Toggle Bookmark”.
🡆 A bookmark is set at this position in the program. This is marked by the
bookmark symbol .
3. Set several bookmarks at different places in the program.
4. Set the cursor at a bookmarked program line.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 207 / 1158
Orientation and navigation

5. Click “Edit 🠂 Bookmarks 🠂 Toggle Bookmark”.


🡆 The bookmark is removed. The bookmark symbol is deleted.
As an alternative to this, you can delete one or more bookmarks in
the “Bookmarks” view by clicking the button. For this purpose, the
corresponding bookmarks have to be selected in the “Bookmarks” view.
Click “Edit 🠂 Bookmarks 🠂 Clear All Bookmarks (Active Editor)” to
remove all bookmarks from the active POU.
In order to delete all bookmarks in a project, click “Clear All
Bookmarks”. However, for this command to be available, you first have

Programming the application


to add it to a menu by means of the command “Tools 🠂 Customize”.
See also
● ⮫ Chapter Command 'Toggle Bookmark' on page 887
● ⮫ Chapter Command 'Clear All Bookmarks (Active Editor)' on page 888
● ⮫ Chapter Command 'Clear All Bookmarks' on page 888

Jumping to bookmarks within a POU


Requirement: The POU is open in the editor. Multiple bookmarks are set.
1. Click “Edit 🠂 Bookmarks 🠂 Next Bookmark (Active Editor)”.
🡆 Depending on the current cursor position, the cursor jumps to the next
bookmark (see below).
2. Click “Edit 🠂 Bookmarks 🠂 Previous Bookmark (Active Editor)”.
🡆 Depending on the current cursor position, the cursor jumps to the pre-
vious bookmark (see above).
See also
● ⮫ Chapter Command 'Next Bookmark (Active Editor)' on page 887
● ⮫ Chapter Command 'Previous Bookmark (Active Editor)' on page 888

Jumping to bookmarks of different POUs in a project


A project is open with multiple POUs. Multiple bookmarks are set in different
POUs.
1. Click “View 🠂 Bookmarks”.
🡆 The “Bookmarks” view opens.
All bookmarks in the project are listed in a table in the view.
2. Click the “Next Bookmark” button.
🡆 In the “Bookmarks” view, the bookmark in the row below the selected
bookmark is selected.
The POU with the recently selected bookmark in the table opens in the
editor and the row with the bookmark is selected in the POU.
3. As in step 2, you can click the “Previous Bookmark” button to jump to
the bookmark in the project that is displayed in the row above it in the
“Bookmarks” view.
See also
● ⮫ Chapter Command 'Bookmarks' on page 901
● ⮫ Chapter Command 'Previous Bookmark' on page 888
● ⮫ Chapter Command 'Next Bookmark' on page 887

R911403764, Edition 08 Bosch Rexroth AG


208 / 1158 ctrlX PLC Engineering
Task configuration

18.21 Task configuration


18.21.1 Creating a task configuration
In the task configuration, you define one or more tasks for controlling and
executing the application program in the PLC. Each application has to include a
“Task Configuration” object.
A task is a time sequence unit of an IEC program. It is defined by a name, a
priority and a type that specifies which condition triggers the start of the task.
You can define this condition either by time (cyclic-interval, freewheeling) or by
the occurrence of an internal or external event to process the task. Examples of
an event are the rising edge of a global project variable or an interrupt event of
the PLC.
A task calls one or more program blocks (POUs). These programs can be appli-
cation-specific (objects below the application in the device tree) or project-spe-
cific (objects available in the POU view). In the case of a project-specific pro-
gram, the application instances the project-global program. If PLC Engineering
processes the task in the current cycle, then the programs are executed for the
duration of a cycle.
With the combination of priority and condition, you define the order in which
the tasks are processed. For each task you can configure a time monitoring
(watchdog). In addition, you have the possibility, for example, to link Start,
Stop, Reset directly with the execution of a project block.
Rules for the processing order of the defined tasks:
● If the task condition is satisfied, then PLC Engineering processes the task.
● If multiple tasks fulfill the condition for processing at the same time, then
PLC Engineering processes the tasks with the highest priority first.
● If multiple tasks with the same priority level fulfill the condition for proc-
essing at the same time, then PLC Engineering processes the longest
waiting task first.
● The program calls are processed in the order they appear in the configura-
tion dialog of the task.
● If a called program has the same name in the device tree of the application
and in a library or project-global in the POU view, then the application pro-
gram is used.
Important notes
All tasks share one process image. Reason: A separate process image for each
task is detrimental to performance. However, the process image can be con-
sistent only with one task. When you create a project, you must ensure that
the application copies the input and output data to a safe location in case of
conflicts. Modules, such as the library SysSem, provide the capability of solving
consistency and synchronization problems.
Consistency problems can also occur when accessing other global objects,
such as global variables or blocks. Consistency problems always occur if sev-
eral tasks read and write to one variable. Modules, such as the library SysSem,
are available as a solution.
Also refer to
● ⮫ Chapter 33.2.31 "Task configuration" object on page 860
● ⮫ Chapter 33.2.32 "Task" object on page 865

18.21.2 Creating a Task Configuration


Requirement: The open project includes a program-type POU and a “Task
Configuration” with a “Task” object has been inserted below “Application” in
the device tree.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 209 / 1158
Task configuration

1. Double-click the task object below “Task Configuration” in the device tree.
🡆 The “Configuration” tab of the task object opens.
2. In the “Type” dropdown list., click “Cyclic”.
🡆 The “Interval (e.g. t#200ms)” input field appears.
3. Enter t#300ms in the “Interval (e.g. t#200ms)” input field.
4. Click “Add Call”.
🡆 The Input Assistant opens.
5. In “Input Assistant 🠂 Categories” -> “Programs”, click the desired POU

Programming the application


and then click “OK”.
🡆 PLC Engineering inserts the selected POU into the POU list of the
“Configuration” tab and below the task object in the device tree.
When the application is executed from the controller, PLC Engineering
executes the selected POU in cyclical intervals of 300 ms.
● ⮫ Chapter “Configuration” tab on page 865

18.21.3 Definitions of jitter, latency


On the “Monitoring” tab in the “Task configuration” object, the periodic jitter
values of the individual tasks at runtime are visualized. The periodic jitter is
to be distinguished from the latency-based release jitter. See the following
definitions:

Periodic jitter
The periodic jitter (Jper) is the deviation of the cycle time of a task (Tper) from
the desired task cycle time (T0).
Jper =Tper -T0

The desired (ideal) cycle timeT0 is specified as an “interval” in the task configu-
ration.
The current value, as well as the maximum and minimum value of the peri-
odic jitter is visualized at runtime in the “Monitoring” tab of the “Task
configuration”.
If the sum of all negative Jper values and the sum of all positive Jpervalues do not
balance, a drift occurs.

Latency
Latency is the delay between calling a task (invocation) and the actual start of
the task execution (release).

Release jitter
The release jitterJr is the difference between the maximum and minimum
latency (L) ever occurred.
Jr =Lmax -Lmin

If Lmax =Lmin, the release jitterJr is 0. This corresponds to an offset shift.

Also refer to
● ⮫ Chapter 33.2.31 "Task configuration" object on page 860
● ⮫ Chapter “Configuration” tab on page 865
● ⮫ Chapter Tab 'Monitor' on page 863

18.21.4 Multicore
Object: “Task configuration”

R911403764, Edition 08 Bosch Rexroth AG


210 / 1158 ctrlX PLC Engineering
Task configuration

More and more of today's controllers have processors with multiple CPU cores.
In order to take advantage of this for the IEC program and improve perform-
ance, PLC Engineering provides options for distributing the IEC tasks over
these CPU cores. In addition, the IEC program is to be divided into several
tasks.
There are two basic different strategies in PLC Engineering for distributing IEC
tasks over CPU cores:
● Fixed linking of an IEC task to a CPU core:
The task is always executed on this specific CPU core. In this case, multiple
tasks can also be bundled to one and the same CPU core if the IEC program
is not yet able to be executed on multiple CPU cores at the same time.
● The IEC task is executed on all CPU cores:
The operating system takes control of distributing the task on the CPU
cores.
When the IEC tasks are distributed over CPU cores,
NOTICE
some changes result in the behavior in the IEC program,
which have to be considered:
− The processing of IEC tasks by priority is no longer a
given. They are processed by priority only if the tasks
are bundled together to one CPU core.
− The cycle consistency of the data in the IEC task with
the highest priority is no longer a given. Therefore,
the data has to be copied locally at the beginning of
the IEC task cycle if the values should not change
during the cycle.
− For consistent counters (incrementer, decre-
menter), the atomic external library function
SysCpuAtomicAdd() should always be used (for
more details, see SysCpuHandling.library).
Data consistency
NOTICE
− Bit accesses (data type BIT) are not processed con-
sistently (atomically) in the IEC program on multi-
core CPUs. For this we recommend that you use the
external library function SysCpuTestAndSetBit()
(for more details, see SysCpuHandling.library).
− Simple data types up to 32-bit width (BYTE, WORD/
INT, DWORD/DINT,. ..) are processed consistently
(atomically) in the IEC program even on multi-core
CPUs
− 64-bit data types (LINT, LWORD, LREAL) are proc-
essed consistently (atomically) in the IEC program
only on 64-bit systems and multi-core systems. You
do not have to take any provisions
− To access complex data types (STRINGs, FBs,
STRUCTs, ARRAYs), you have to make arrangements
yourself for the synchronization/consistency.
− In the task configuration, determine in the “Variable
use” tab whether a variable in an IEC task has read or
write access
− A so-called memory reordering effect can occur
on multi-core systems. For more information, see
__MemoryBarrier() IEC-Operator.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 211 / 1158
Data persistence

Also refer to
● ⮫ Chapter 33.1.17 “PLC shell” tab on page 756
● ⮫ Chapter 'Variable use' tab on page 864
● ⮫ Chapter 32.3.13 Multicore operators on page 458

Distributing tasks over multiple processor cores


Prerequisite: You have defined at least two tasks in your application, for
example “MainTask (IEC task)” and “LowTask (IEC task)”.
1. Open the “Task Configuration” object in the editor.

Programming the application


2. Click the “Task Groups” tab.
🡆 The overview shows a “IEC-Tasks” task group.
3. Add a new task group by clicking “Add Group”.
🡆 The group “NewGroup” is added.
4. Double-click the group name “NewGroup” and change it to LowGroup.
5. Select an assignment in “Core”, for example “1”.
6. Open the task “LowTask (IEC task)” in the editor.
7. Select the new group “LowGroup” in “Task Group”.
🡆 The task “LowTask” is processed now by processor core 1 due to its
group membership in “LowGroup”.
Also refer to
● ⮫ Chapter ‘Task group’ tab on page 865
● ⮫ Chapter “Configuration” tab on page 865

Display the Processor Load in the Trace for each Processor Core

18.22 Data persistence


18.22.1 Data persistence – General information
The lifetime of variables and their data ranges from the time a variable is
created until the time it is deleted and its memory space is released again. The
time of variable creation, initialization or instantiation depends on the declared
scope. The time when the memory is freed usually depends on the scope as
well. For example, the memory of global variables is freed by exiting the appli-
cation.
They can retain data longer than usual. The following mechanisms are provided
for this purpose.
Mechanisms for data retention
● (A): Persistent global variable list with the keyword PERSISTENT RETAIN
Persistent variables retain their values when the application is reloaded.
Moreover, the values are restored after a download, warm start, or cold
start.
● (B): Retain variables with the keyword RETAIN
Retain variables retain their values after a warm start, but not after reloading
the application, a download, or a cold start.
● (C): Recipe variables
Recipe variables and their values are stored in a recipe file.
Also refer to
● ⮫ Chapter 18.22.6 Preserving Data with Retain Variables on page 217
● ⮫ Chapter 18.22.7 Preserving Data with Recipes on page 217
● ⮫ Chapter 32.2.13 Persistent Variable - PERSISTENT on page 447

R911403764, Edition 08 Bosch Rexroth AG


212 / 1158 ctrlX PLC Engineering
Data persistence

● ⮫ Chapter 32.2.14 Retain variable - RETAIN on page 449


● ⮫ Chapter 33.2.17 Object 'Persistent variable list' on page 778

18.22.2 Mechanisms in comparison


Which mechanism is suitable for which application? Some common use cases
are considered in the table. The specific examples refer to a building control
system.
Table 2: Comparison of mechanisms and use cases
Use case (A) Per- (B) Retain (C): Varia- (D)
sistent variables bles of Recipe
variables the per- variables
sistence
manager
1 The application must main- Suitable1 Suitable Suitable2 Possible,
tain device settings. Preferred Preferred use This is but very
Example: After a power use case case advanta- compli-
failure, the building control cated and
In this Retain varia- geous for
has to have information control- therefore
case, you bles are an
available about how long a can also advantage lers that not rec-
window blind needs to be do not ommende
use retain when their
raised. d.
variables declarations have any
instead of are changed hardware
persistent often. support.
variables. Special
This is function-
advanta- alities
geous for make this
variables possible,
whose such as
declara- double
tion is file buf-
often fering.
changed.
2 The application must main-
tain values also after pro-
gram changes or extensions.
2a: Rare extensions Suitable1 Suitable Suitable2 Possible,
Example: An application Preferred but com-
programmer extends the use case plicated.
program with a new switch
and installs a new light. The
building control must still
have saved values available
until then.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 213 / 1158
Data persistence

Use case (A) Per- (B) Retain (C): Varia- (D)


sistent variables bles of Recipe
variables the per- variables
sistence
manager
2b: Unrestricted changes, Not suit- Suitable Suitable Possible if
including deleting or able Data from as far as textual,
changing the data type of retain varia- possible
2 but com-
variables bles are pre- Preferred plicated
The building control is run- served as far use case

Programming the application


ning and is persistent. When as possible
an application programmer after an
adds a new functionality to online
the controller and therefore change.
adds another persistent var-
iable to a function block,
the values saved up to that
point must be retained. For
example, the program in an
FB is extended with a vari-
able that controls the auto-
matic switching off of a pre-
viously uncontrolled lamp
after a certain time. The
building control must have
the times of all controlled
lamps available after the
extension.
2c: The application has Suitable Not suitable Suitable Suitable
to maintain values after a
download.
3 The application must be Not suit- Not suitable Not suit- Suitable
able to use different value able able Preferred
sets. use case
Example: The operating set-
tings for summer, winter,
and holidays must be saved
and imported when needed.
4 The application must be Not suit- Not suitable Suitable2 Suitable3
able to use settings from able
another system.
It must be possible to
transfer settings to another
plant using similar variables.
5 The application must pro- Not suit- Not suitable Suitable2 Suitable3
vide human readable data. able
The user must be able to
read, compare, and edit the
data.
1Disadvantage: Only possible if the runtime system supports this mechanism
and an NVRam memory or UPS is available. Advantage: Speed; recommended
use case: 1 and 2a

R911403764, Edition 08 Bosch Rexroth AG


214 / 1158 ctrlX PLC Engineering
Data persistence

2 Disadvantage: In case of a large amount of variables (> 10000) long waiting

times for an initialization and a shutdown are to be expected. Advantage: No


special memory is required; value retention exists even in case of changes,
extensions, or deletions.
3 Advantage: Externally editable, transferable. Disadvantage: Complicated

18.22.3 Lifespan of variables when calling online commands


User input in the Variable with usual life- RETAIN PERSISTENT
“Online” menu span RETAIN PERSISTENT
Neither RETAIN nor PERSISTENT RETAIN
PERSISTENT
Command “Online x x x
Change”
“Reset warm” command i x x
“Reset cold” command i i x
Command “Download” i i x1
“Reset origin” command i i i
x : Variable retains its value.
i : Variable is initialized.
1 Note: For the structure of persistent data, see the information in "Mechanism

for downloading".
Also refer to
● ⮫ Mechanism for downloading on page 215
● ⮫ Chapter "Online change" command on page 943
● ⮫ Chapter Command 'Reset Origin' on page 949
● ⮫ Chapter Command 'Reset Cold' on page 948
● ⮫ Chapter Command 'Load' on page 942

18.22.4 Lifespan of variables when downloading a boot project


The values of ordinary variables lose their value and are reinitialized.
The values of persistent variables are protected when:
● The structure of the persistent variable in memory matches the structure in
the persistent data list.
The values of retain variables are protected when:
● The structure of the persistent variable in memory matches the structure in
the persistent data list.
● The persistent variables match the application (GUID has to agree).
A "Retain mismatch" occurs when the requirements for restoring the values of
retain variables and persistent variables are not met when the application is
booted. The response to this discrepancy is described in the documentation of
the hardware manufacturer.
Note: For the structure of persistent data, please refer to the information under
"Mechanism during download".
Also refer to
● ⮫ Mechanism for downloading on page 215

18.22.5 Preserving Data with Persistent Variables


Persistent variables retain their values after reloading the application, and after
a download, warm start, or cold start.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 215 / 1158
Data persistence

A special non-volatile memory area on the controller, for example as NVRAM or


UPS, is required to extend the lifespan. Securing the data in such a memory
does not require any additional time, which is an advantage over data retention
with the Persistence Manager. If the controller does not provide hardware sup-
port, then the data is usually stored in a file. Then the data will be retained
if you shut down the controller correctly. In the event of a power failure or a
pulled plug, however, data will be lost.

Behavior
Value retained for

Programming the application


● Uncontrolled exit
● Warm start by calling the “Reset Warm” command
● Cold start by calling the “Reset Cold” command
● Repeated download of the application
Reinitialization for
● Call of the “Reset Origin” command
Therefore, persistent variables are reinitialized only if you reset the controller to
the factory settings (for example, when you click “Online 🠂 Reset Origin”).
If, on the other hand, you download the application again, the persisted data
is retained if possible. That depends on how profound the changes that led to
the download were. Changing the application name always leads to a full reini-
tialization. Changes to the implementations never lead to a reinitialization: the
data persistence is completely preserved. Changes to the declarations lead to
an initialization of the new variables only if the existing variables are persistent,
when you change the declarations so that the persistent variable list remains
consistent. This is the case when you add a new variable or delete an existing
one. Inconsistencies can occur if you edit and change the identifiers or data
types of previously declared persistent variables.

Mechanism for downloading


Editing the variable list in the persistence editor causes the variable list to be
edited automatically before it is saved, not to be saved as it is shown in the
editor.
During post-processing, a variable that you have removed is replaced by a
placeholder variable with the same memory requirement. As a result, the sub-
sequent variables retain their addresses in the process image. Moreover, a
variable you add is moved to the end of the list. Post-processing can neutralize
changes that would lead to a loss of persistence. But you create gaps that use
additional memory.
When downloading, the CRC value of the variable list and the length of the list
(number of variables) are stored on the controller. When downloading again,
the new test value is compared with the test value currently on the controller.
Then the variable list is compared successively up to the specified length. If
you have edited a declaration (for example, the name or data type), then the
variable is reinitialized. Otherwise its value is retained. When the download is
repeated, PLC Engineering checks whether the variable list declared in the per-
sistence editor is still consistent with the variable list already on the controller.
The mechanism works well when the variables themselves are not modified
significantly. Too extensive changes of the identifiers and the data types con-
tinue to lead to a reinitialization and the loss of persistence. If you anticipate
frequent changes due to your application requirements, then this kind of a list
is not recommended. Moreover, in an online change after a data type change, a
persistent variable is less robust than a variable with a normal lifespan.

R911403764, Edition 08 Bosch Rexroth AG


216 / 1158 ctrlX PLC Engineering
Data persistence

It is good practice to clear any gaps in the variable list after a while (command
“Reorder List and Clear Gaps”). After cleaning, however, the list no longer
matches the list on the controller and you have triggered an initialization of all
persistent variables. The persistence of all variables is lost.
For versions before V3.5 SP1, changes in the persistence editor always lead to
reinitialization.

Recovering data with the recipe manager


To clean up the global persistent variable list without losing persistence, you
can save the data in a recipe using the Recipe Manager. This creates a list for
all variables of the persistent variable list in the recipe manager, and at the
same time its current values are stored by the controller as a recipe. Then
execute the command “Reorder List and Clear Gaps” and perform a download
again. Now when you execute the command “Restore Values from Recipe”, the
values saved in the recipe are restored.

Changing an existing declaration in the persistent variable list


if you change the name or data type of a variable, this is interpreted as a new
declaration and causes a re-initialization of the variables at the next online
change or download. For complex data types, a change occurs when a new
component is added, or when you change the type of a variable from INT to
UINT in the depth of a used structure used, for example.
Basically, complex user-defined data types are not suitable for administration in
a persistent variable list, because even small changes cause the variable to be
initialized with all components.

Double allocation of memory in the case of instance paths


You can persist global variables or variables declared locally in a function block
or program. To do this, add the keyword PERSISTENT to the declaration. In
addition, you insert the instance path to this variable in the persistent global
variable list. To do this, execute the “Add All Instance Paths” command in the
persistence editor.
Persistence is guaranteed by the following mechanism:
● The cyclic tasks in which the variable is accessed are determined.
● At the end of the first cyclic task (in each cycle), the variable is copied to the
persistent global variable list.
● After restarting the controller, the value of the persistent variable is copied
to the ordinary variable.
The disadvantage of this mechanism is that memory is allocated both at the
place of declaration and at the place of the instance path. This persistent
variable has a double memory allocation. Moreover, the data is copied to both
places in each cycle. This can be time consuming, especially when large struc-
tured values are involved.

Memory location in the case of persistent function block instances


A function block instance is always stored completely in memory. This is nec-
essary so that the same code can work on different instances. If only one vari-
able in a function block is marked with PERSISTENT, then the function block
instance is stored completely with all variables in remanent memory, although
only the one variable is treated as persistent. However, non-volatile memory is
not available to the same extent as main memory.
A function block with a pointer to an instance in SRAM as a variable is not
stored in the protected memory.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 217 / 1158
Data persistence

See also
● ⮫ Chapter 32.2.13 Persistent Variable - PERSISTENT on page 447
● ⮫ Chapter Command 'Add all instance paths' on page 1014

18.22.6 Preserving Data with Retain Variables


Retain variables preserve their values after a warm start. However, the degree
of value retention for persistent variables is higher.
A special non-volatile memory area on the controller, for example as NVRAM or
UPS, is required to extend the lifespan. Securing the retain variables in such

Programming the application


a memory does not require any additional time, which is an advantage over
data retention with the Persistence Manager. If the controller does not provide
hardware support, then the data is usually stored in a file. Then the data will
be retained if you shut down the controller correctly. In the event of a power
failure or a pulled plug, however, data will be lost.

Declaration
To declare a retain variable, add the RETAIN keyword to a variable declaration.

Behavior
Value retained for
● Uncontrolled exit
● Call of the “Reset Warm” command
Reinitialization for
● Repeated download of the application
● Call of the “Reset Cold” command (in contrast to persistent variables)
● Call of the “Reset Origin” command
When you restart an application, its variables are usually initialized with an
explicitly preset initial value or with a default value. Variables marked with the
RETAIN keyword are managed in a separate memory area depending on the
target system and retain their value. Then the variables are protected from
power failure, for example. This means that you can apply retain variables to a
parts counter in a production line so that you can continue counting even after
a power failure.

Memory location of persistent function block instances


Function block instances are stored as one block in memory. This is necessary
so that the same code can work on different instances. If a variable is marked
with RETAIN in a function block, then each instance of the function block is
protected with all variables. This is also true for the variables of the function
block that are not marked this way. However, non-volatile memory is not avail-
able to the same extent as main memory.
A function block with a pointer to an instance in SRAM as a variable is not
stored in the protected memory.

See also
● ⮫ Chapter 32.2.14 Retain variable - RETAIN on page 449

18.22.7 Preserving Data with Recipes


Variables are managed persistently in the Recipe Manager. The Recipe Manager
does not need any special memory on the controller in order to preserve values
and data.

R911403764, Edition 08 Bosch Rexroth AG


218 / 1158 ctrlX PLC Engineering
Data persistence

Declaration
A recipe definition consists of a set of variables with values and is created and
edited in the “Recipe Manager” object and saved to a file.

Functionality
● You can include a variable in multiple recipes, each with different values.
● In online mode, you can read in the actual values of the variables from the
controller and save them as recipe values (specified value).
● You can use the Recipe Management library to programmatically implement
the creation and editing of a recipe.
● You can save and backup a recipe as a recipe file.

See also
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter "Save current values to recipe" command on page 1013
● ⮫ Chapter "Rearrange list and clean gaps” command on page 1013
● ⮫ Chapter "Restore values from recipe” command on page 1014
● ⮫ Chapter 33.2.22 Object 'Recipe Manager' on page 784
● ⮫ Chapter 33.2.23 Object 'Recipe Definition' on page 787

18.22.8 Declaring VAR PERSISTENT Variables


Below you will declare persistent variables in a persistent variable list and in a
POU.
Requirement: A project is opened and contains a program POU. You have
selected the option for the textual view in the “Declaration Editor” category
of the options (menu command in “Tools 🠂 Options”).
1. Add the “Persistent Variables” object to the application object with the
menu command “Project 🠂 Add Object”.
🡆 PLC Engineering adds the persistent variable list “PersistentVars”
below the application object in the device tree and the editor opens.
2. In the editor, enter a variable declaration, for example ivarpersist1 :
INT; between VAR_GLOBAL PERSISTENT RETAIN and END_VAR.
3. Double-click the POU in the device tree.
🡆 The editor of the POU opens.
4. Specify the following declaration in the declaration part:
VAR PERSISTENT RETAIN
ivarpersist2 : INT;
END_VAR
5. Click “Build 🠂 Build”.
🡆 The message view opens. If PLC Engineering has compiled the applica-
tion without errors, then close the message window and continue with
the next step. Otherwise, correct the error(s) and select the menu
command “Build 🠂 Build” again.
6. Set the focus in the “PersistentVars” editor. Click “Declarations 🠂 Add All
Instance Paths”
🡆 PLC Engineering adds the persistent variable from the persistent vari-
able list “PersistentVars” to the POU:
// instance path of the persistent variables created
POU.IVARPERSIST2 : INT

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 219 / 1158
Object-oriented programming

See also
● ⮫ Chapter 32.2.13 Persistent Variable - PERSISTENT on page 447
● ⮫ Chapter 32.2.14 Retain variable - RETAIN on page 449
● ⮫ Chapter 33.2.17 Object 'Persistent variable list' on page 778
● ⮫ Chapter Command 'Add all instance paths' on page 1014

18.22.9 Saving the values of a persistent variable list in a recipe


Prerequisite: A project is open and there is a persistent variable list with decla-
rations of persistent variables below an application object.

Programming the application


1. Double-click on the control in the device tree and select the
“Communication”tab.
2. Select your gateway and click “Scan Network”.
🡆 Your device is shown in bold in the tree view of the gateway.
3. Select your device and click “Set Active Path”.
4. Select your application object in the device tree and select the context
menu command “Set Active Application”.
🡆 The application object is displayed in bold.
5. Select the menu command “Online 🠂 Login”
🡆 Your application is logged in to the controller and the controller and the
application object in the device tree have a green background.
6. Double-click on the persistent variable list and select “Declarations
🠂 Save current values to recipe” from the context menu.
🡆 PLC Engineering creates the “Recipe Manager” and
“PersistentVariables” objects under the application object.
7. Select the menu command “Online 🠂 Logout”.
🡆 The application is logged out from the control.
Also refer to
● ⮫ Chapter "Save current values to recipe" command on page 1013
● ⮫ Chapter 18.22 Data persistence on page 211

18.23 Alarm management


On the subject of alarm management and alarm visualization, please see the
help on CODESYS Visualization.

18.24 Object-oriented programming


18.24.1 Object-oriented programming – General information
PLC Engineering supports object-oriented programming with function blocks
and provides the following functionalities and objects for this purpose:
● Methods
● Interfaces
● Properties
● Inheritance
● Method call, virtual function call
● Definition of function blocks as extensions of other function blocks
Also refer to
● ⮫ Chapter 'Method’ object on page 829
● ⮫ Chapter Object 'Interface' on page 827

R911403764, Edition 08 Bosch Rexroth AG


220 / 1158 ctrlX PLC Engineering
Object-oriented programming

18.24.2 Extension of Function Blocks


The extension of a function block is based on the concept of inheritance in
object-oriented programming. A derived function block thereby extends a basic
function block and in doing so is given the properties of the basic function
block in addition to its own properties.
The extension of a function block means:
● The inherited function block contains all data and methods that are defined
by the basic function block. You can use an instance of the basic function
block in every context in which PLC Engineering expects a function block of
the type of the basic function block.
● The derived function block can overwrite the methods that you have defined
in the base function block. This means that the inherited function block can
define a method with the same name, the same inputs and the same output
as is defined by the basic function block.
Tip: You have the following support when overwriting methods, actions,
attributes, and transitions that are inherited by the base block: When you
insert a method, action, etc. below an inherited block, the “Add Object”
dialog includes a combo box with a list of methods, actions, etc. used in the
base block. You can accept these and adapt them accordingly.
● The derived function block may not contain function block variables with the
same names as used by the basic function block. The compiler reports this
as an error.
The only exception: If you have declared a variable in the basic function
block as VAR_TEMP, then the inherited function block may define a variable
with the same name. In this case, the inherited function block can no longer
access the variable of the basic function block.
● You can directly address the variables and methods of the basic function
block within the scope of the inherited function block by using the SUPER
pointer.
Multiple inheritance is not permitted.
NOTICE
Exception: A function block can implement multiple inter-
faces, and an interface can extend other interfaces.

Extension of a basic function block by a new function block


Requirement: the currently opened project possesses a basic function block,
for example “POU_1(FB)”, which is to be extended by a new function block.
1. Right-click the “Application” object in the device tree and select “Project
🠂 Add Object 🠂 POU”.
🡆 The “Add POU” dialog opens.
2. Type the name for the new POU in the “Name” input field, for example
“POU_Ex”.
3. Select “Function block”.
4. Click “Advanced” and then the more button ( ).
5. In the category “Function blocks” under “Application” in the input assis-
tant, select the POU(FB) that is to serve as the basic function block, for
example POU_1, and click “OK”.
6. As an option, you can select an “Access modifier” for the new function
block from the drop-down list.
7. Select from the “Implementation language” combo box (example:
“Structured text (ST)”.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 221 / 1158
Object-oriented programming

8. Click “Add”.
🡆 PLC Engineering adds the POU_Ex function block to the device tree and
opens the editor. The first line contains the text:
FUNCTION_BLOCK POU_Ex EXTENDS POU_1
The function block POU_Ex extends the basic function block POU_1.

Extension of a basic function block by an existing function block


Requirement: The open project possesses a base function block (example:
POU_1(FB)) and another function block (example: POU_Ex(FB)). The function

Programming the application


block POU_Ex(FB) is also to be given the properties of the basic function
block. This means that POU_Ex(FB) should extend POU_1(FB).
1. Double-click the function block POU_Ex(FB) in the device tree.
🡆 The function block editor opens.
2. Extend the existing entry in the top line FUNCTION_BLOCK POU_Ex with
EXTENDS POU_1.
🡆 The function block POU_Ex extends the basic function block POU_1.

See also
● ⮫ Chapter 18.24.3 Implementing Interfaces on page 221
● ⮫ Chapter 18.24.4 Extending Interfaces on page 223
● ⮫ Chapter 32.2.15 SUPER on page 450
● ⮫ Chapter 32.2.16 THIS on page 451
● ⮫ Chapter ‘Function block’ object on page 823
● ⮫ Chapter 'Method’ object on page 829
● ⮫ Chapter Object 'Property' on page 839
● ⮫ Chapter Object 'Action' on page 843
● ⮫ Chapter Object 'Transition' on page 845

18.24.3 Implementing Interfaces


Implementing interfaces is based on the concept of object-oriented program-
ming. With common interfaces, you can use different but similar function
blocks the same way.
A function block that implements an interface has to include all methods and
attributes that are defined in that interface (interface methods and interface
attributes). This means that the name and the inputs and outputs of the
methods or attributes must be exactly the same. When you create a new func-
tion block that implements an interface, PLC Engineering adds all methods and
attributes of the interface automatically to the tree below the new function
block.

R911403764, Edition 08 Bosch Rexroth AG


222 / 1158 ctrlX PLC Engineering
Object-oriented programming

If you add more interface methods afterwards, then PLC


NOTICE
Engineering does not add these methods automatically
to the affected function block. To perform this update,
you must execute the “Implement Interfaces” command
explicitly.
For inherited function blocks, you have to make sure
that any methods or attributes that were derived through
the inheritance of an interface also receive the appro-
priate implementation. Otherwise they should be deleted
in case the implementation that was provided in the
basis should be used. Respective compile error mes-
sages or warnings are displayed, prompted automatically
by added pragma attributes. For more information, refer
to the help page for the “Implementing Interfaces” com-
mand.
− You must assign the interface of a function block to a
NOTICE
variable of the interface type before a method can be
called via the variable.
− A variable of the interface type is always a reference
of the assigned function block instance.
A variable of the interface type is a reference to instances of function blocks.
This kind of variable can refer to every function block that implements the
interface. If there is no assignment to a variable, then the variable in online
mode contains the value 0.

Examples
The I1 interface contains the GetName method.
METHOD GetName : STRING
The functions blocks A and B implements the interface I1:
FUNCTION_BLOCK A IMPLEMENTS I1
FUNCTION_BLOCK B IMPLEMENTS I1
For this reason, both function blocks must include a method named GetName
and the return type STRING. Otherwise the compiler reports an error.
A function includes the declaration of a variable of interface I1 type.
FUNCTION DeliverName : STRING
VAR_INPUT
l_i : I1;
END_VAR

Function blocks that implement the I1 interface can be assigned to these


input variables.
Examples of function calls:
DeliverName(l_i := A_instance); // call with instance of type
A
DeliverName(l_i := B_instance); // call with instance of type
B
Calling of interface methods:
In this case, it depends on the actual type of l_i whether the application calls
A.GetName or B.GetName.
DeliverName := l_i.GetName();

● ⮫ Chapter Command 'Implement Interfaces' on page 1034

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 223 / 1158
Object-oriented programming

Implementing an interface in a new function block


Requirement: The open project has at least one interface object.
1. Right-click “Application” in the device tree and select “Project 🠂 Add
Object 🠂 POU”.
🡆 The “Add POU” dialog box opens.
2. Type the name for the new POU in the “Name” input field, for example
“POU_Im”.
3. Select “Function block”.

Programming the application


4. Click “Implemented” and then the more button ( ).
5. In the input assistant, select the interface from the category “Interfaces”,
for example ITF1, and click on “OK”.
6. To insert more interfaces, click and select a another interface.
7. As an option, you can select an “Access modifier” for the new function
block from the selection list.
8. Select from the “Implementation language” combo box (example:
“Structured text (ST)”.
9. Click “Add”.
🡆 PLC Engineering adds the “POU_Ex” function block to the device tree
and opens the editor. The first line contains the text:
FUNCTION_BLOCK POU_Im IMPLEMENTS ITF1
The interface and its methods and properties are now inserted below
the function block in the device tree. Now you can type program code
into the implementation part of the interface and its methods.

Implementing an interface in an existing function block


Requirement: The currently open project has a function block (example:
“POU_Im”) and at least one interface object (example: “ITF1”).
1. Double-click the “POU_Ex(FB)” POU in the device tree.
🡆 The POU editor opens.
2. Extend the existing entry in the uppermost line FUNCTION_BLOCK POU_Im
with IMPLEMENTS ITF1
🡆 The “POU_Im” function block implements the “ITF1” interface.

See also
● ⮫ Chapter ‘Function block’ object on page 823

18.24.4 Extending Interfaces


You can extend interfaces just like function blocks. The interface is then also
given the interface methods and interface properties of the basic interface in
addition to its own.
Creation of an interface that extends another interface.
1. Select the object “Application” in the device tree.
2. Select the command “Project 🠂 Add Object 🠂 Interface”.
🡆 The dialog box “Add Interface” opens.
3. Enter a name for the new interface.
4. Activate the option “Extended” and click on the button .
5. The input assistant opens.
6. From the category “Interfaces”, select the interface that is to be extended
by the new interface.

R911403764, Edition 08 Bosch Rexroth AG


224 / 1158 ctrlX PLC Engineering
Object-oriented programming

● ⮫ Chapter Object 'Interface' on page 827

18.24.5 Calling Methods


To implement a method call, the actual parameters (arguments) are passed to
the interface variables. As an alternative, the parameter names can be omitted.
Depending on the declared access modifier, a method can be called only within
its own namespace (INTERNAL), only within its own programming module
and its derivatives (PROTECTED), or only within its own programming module
(PRIVATE). For PUBLIC, the method can be called from anywhere.
Within the implementation, a method can call itself recursively, either directly
by means of the THIS pointer, or by means of a local variable for the assigned
function block.

Method call as a virtual function call


Virtual function calls can occur due to inheritance.
Virtual function calls enable one and the same call to call various methods in a
program source code during the runtime.
In the following cases the method call is dynamically bound:
● You call a method via a pointer to a function block (for example
pfub^.method).
In this situation the pointer can point to instances of the type of the function
block and to instances of all derived function blocks.
● You call the method of an interface variable (for example
interface1.method).
The interface can refer to all instances of function blocks that implement
this interface.
● A method calls another method of the same function block. In this case the
method can also call the method of a derived function block with the same
name.
● The call of a method takes place by means of a reference to a function
block. In this situation the reference can point to instances of the type of the
function block and to instances of all derived function blocks.
● You assign VAR_IN_OUT variables of a basic function block type to an
instance of a derived FB type.
In this situation the variable can point to instances of the type of the func-
tion block and to instances of all derived function blocks.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 225 / 1158
Object-oriented programming

Example

Overloading methods
The function blocks fub1 and fub2 extend the function block fubbase and
implement the interface interface1. The methods method1 and method2
exist.
PROGRAM PLC_PRG
VAR_INPUT
b : BOOL;

Programming the application


END_VAR

VAR pInst : POINTER TO fubbase;


instBase : fubbase;
inst1 : fub1;
inst2 : fub2;
instRef : REFERENCE to fubbase;
END_VAR

IF b THEN
instRef REF= inst1; (* reference to fub1 *)
pInst := ADR(instBase);
ELSE
instRef REF= inst2; (* reference to fub2 *)
pInst := ADR(inst1);
END_IF
pInst^.method1(); (* If b is TRUE, fubbase.method1
will be called, otherwise fub1.method1 is called *)
instRef.method1(); (* If b ist TRUE, fub1.method1 will
be called, otherwise fub2.method1 is called*)

On the assumption that fubbase in the above example contains two methods
method1 and method2, it overwrites fub1 method2, but not method1. The
call of method1 takes place as follows:
pInst^.method1();
If b is TRUE, then PLC Engineering calls fubbase.method1. If not, then
fub1.method1 is called.

Additional outputs
In accordance with the IEC 61131-3 standard, methods can have additional out-
puts declared, like normal functions. With the method call, you assign variables
to the additional outputs.
Detailed information about this can be found in the topic “Function”.
Syntax for the call:

<function block name>.<method name>(<first input name> :=


<value> (, <further input assignments>)+ , <first output name>
=> <first output variable name> (,<further output assignments>)
+ );

R911403764, Edition 08 Bosch Rexroth AG


226 / 1158 ctrlX PLC Engineering
Object-oriented programming

Example
Declaration

METHOD PUBLIC DoIt : BOOL


VAR_INPUT
iInput_1 : DWORD;
iInput_2 : DWORD;
END_VAR
VAR_OUTPUT
iOutput_1 : INT;
sOutput_2 : STRING;
ENDVAR
Call

fbInstance.DoIt(iInput_1 := 1, iInput_2 := 2, iOutput_1 =>


iLocal_1, sOUtput_2 => sLocal_2);
When the method is called, the values of the method outputs are written to
the locally declared output variables.

Calling a method even if the application is in the STOP state


In the device description it is possible to define that a certain function block
instance (of a library function block) always calls a certain method in each task
cycle. If the method contains the input parameters of the following example,
PLC Engineering processes the method even if the active application is pres-
ently in the STOP state:

Example

VAR_INPUT
pTaskInfo : POINTER TO DWORD;
pApplicationInfo: POINTER TO _IMPLICIT_APPLICATION_INFO;
END_VAR

(*Now the status of the application can be queried via


pApplicationInfo and the instructions can be implemented: *)
IF pApplicationInfo^.state = RUNNING THEN <instructions>
END_IF;

Calling methods recursively


Use recursions mainly for processing recursive data types such as linked lists.
Generally, we recommend that you be careful when using recursion. An unex-
pectedly deep recursion can lead to stack overflow and therefore to machine
downtime.
Within their implementation, a method can call itself:
● Directly by means of the THIS pointer
● Indirectly by means of a local function block instance of the basic function
block
Usually, a compiler warning is issued for such a recursive call. If the method
is provided with the pragma {attribute 'estimated-stack-usage' :=
'<sstimated_stack_size_in_bytes>'}, then the compiler warning is sup-
pressed. For an implementation example, refer to the section "Attribute 'esti-
mated-stack-usage'".

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 227 / 1158
Object-oriented programming

See also
● ⮫ Chapter Attribute 'estimated-stack-usage' on page 614
● ⮫ Chapter 32.2.16 THIS on page 451
● ⮫ Chapter 32.2.15 SUPER on page 450
● ⮫ Chapter 'Method’ object on page 829
● ⮫ Chapter Object 'Property' on page 839

Programming the application

R911403764, Edition 08 Bosch Rexroth AG


228 / 1158 ctrlX PLC Engineering
Object-oriented programming

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 229 / 1158
Symbol Configuration

19 Working with control networks


19.1 Working with control networks – General information
With the following functionalities, PLC Engineering supports communication
between controllers (PLC) and the insertion of a safety controller below a PLC:
● Symbol configuration: PLC Engineering creates symbols with certain access
rights for the variables in an application. With these symbols, you can access
the variables from outside, for example from an OPC server.

Working with control networks


● Data source manager: Manages the connection settings and the data trans-
mission to removed devices (data sources). The transferred data is mapped
into data source variables, which are then accessed in the visualization or
the local application. An example of this is a control panel that controls
remote devices and visualizes the state of the devices as an HMI application.
● Network variables: Network variables are variables whose values are acces-
sible to different control devices in the network. For this purpose, the vari-
ables have to be defined in rigid, identical lists in both the sender device
and the receiver device. These lists are assigned to applications, but can be
located in different projects.
● A safety controller can be inserted below a PLC in the device tree. The
communications links of the safety controllers to the field devices, controller
networks, and development system are routed via this controller.
The “DataServer” object is obsolete.
The data link with PLC Engineering DataServer has already been superseded
with SP10 by a data link with data sources. With PLC Engineering 3.5 SP17, the
functionality has now been completely removed.
In case you want to adapt an existing project with a “DataServer” object, you
can do the following: Open the existing project with PLC Engineering V3.5
SP16, select the data server object, and click “Convert Data Server to Data
Source Manager” in the context menu. After the conversion of the data link
to a data source connection, you can open the project with a current PLC
Engineering version.
Also refer to
● ⮫ Chapter 19.2 Symbol Configuration on page 229
● ⮫ Chapter 19.6.1 Data Source Manager – General information on page 241
● ⮫ Chapter 19.5.1 Network variables – General information on page 238
● ⮫ Chapter 19.4.2 Network Topology on page 233
● ⮫ Chapter 19.4.3 Addressing and Routing on page 233
● ⮫ Chapter 19.4.4 Address Structures on page 235
● ⮫ Chapter 19.3 Subordinate Safety Controller on page 232

19.2 Symbol Configuration


Use the symbol configuration for preparing symbols with specific access rights
for project variables. With these symbols, you can access the variables from
outside, for example from an OPC server. When generating code, PLC Engi-
neering also generates a symbol file (*.xml) that includes the description of the
symbols.
The symbol file is stored in the project directory. The name of the symbol
file is composed as follows: <project name>.<device name>.<application
name>.xml

Example
proj_xy.PLC1.application.xml

R911403764, Edition 08 Bosch Rexroth AG


230 / 1158 ctrlX PLC Engineering
Symbol Configuration

You can also generate the symbol file with the “Generate Code” command. This
is very useful when downloading to the PLC is not possible.
The variables that you export as symbols can be bundled in the symbol config-
uration editor or defined in the variables declaration using the {attribute
'symbol'} pragma. Another option is using the element in the SFC editor,
where you can define the implicitly generated element variables that should be
exported to the symbol configuration.
The name of the symbol is generated in the symbol configuration in the fol-
lowing syntax: <application name>.<POU name>.<variable name>. When
accessing the variable, you must always provide the complete symbol name in
this syntax.

Example
MyApplication.PLC_PRG.a or MyApplication.SymFB.a

As a rule, read-only access applies to symbols for input addresses and for vari-
ables that are mapped to input channels. Write access is possible for testing
purposes in simulation mode only.
The symbol file is downloaded together with the application to the PLC.
Depending on the device description, this file can be generated as an addi-
tional (child) application. This application is then listed on the “Application”
tab of the device editor. Syntax: <application name>._symbols. The symbol
application is regarded as a "normal" application with respect to the maximum
number of applications on the PLC.
If your controller has a user management, then you can assign different access
rights to a symbol to the individual user groups (clients). To do this, place the
same symbol in different symbol sets and allow the individual user groups (cli-
ents) either to access a symbol set or not. An on-site operator or an operating
data record, for example, receives more information and access to the same
symbols as remote maintenance.
See also
● ⮫ Chapter 33.2.25 "Symbol configuration” object on page 788
● ⮫ Chapter Attribute 'symbol' on page 646
● ⮫ Chapter Effects of Pragmas on Symbols on page 648
● ⮫ Chapter SFC Element Properties on page 408
● ⮫ Chapter 33.1.11 Tab 'Applications' on page 748
● ⮫ Chapter Command 'Simulation on page 953

Creating a symbol configuration


Requirement: The project can be compiled without any errors.
1. Select the “Application” object in the device tree.
2. Click “Project 🠂 Add Object 🠂 Symbol Configuration”.
🡆 The “Symbol Configuration” object is added to the device tree and the
objects editor opens.
3. Open the “View” menu of the editor and activate the categories of varia-
bles that should be provided in the configuration editor. Click “Build” in
the symbol configuration editor.
🡆 All variables (according to the currently defined filter in the “View”
menu) are displayed in a tree structure.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 231 / 1158
Symbol Configuration

4. Select the check boxes of individual variables.


Note: Pay attention to the current settings (see the “Settings” button in
the menu bar of the editor).
🡆 In the field below the menu bar of the editor, information is provided
about the current situation with accompanying instructions, as well as
controls for corrective actions.
5. Follow the prompt in the field below the menu bar. In the following case,
this should be only the information that the modified symbol configuration
is transferred with the next download or online change.

Working with control networks


Click “Build 🠂 Generate Code” on the PLC Engineering menu bar.
🡆 The <project name>.<device name>.<application name>.xml file
is generated in the project directory.
PLC Engineering transmits the symbol configuration to the PLC for an applica-
tion download or online change.
See also
● ⮫ Chapter 33.2.25 "Symbol configuration” object on page 788

Creating symbol sets with different access rights for different control clients
A symbol set is a defined set of symbols. If supported by the target device,
you can combine different symbol sets from the symbols of the application
in the symbol configuration editor. The information about the symbol sets is
downloaded to the controller. Then you can define the user group that has
access to each symbol set. Rights are assigned on the “Symbol Rights” tab of
the device editor.
As a result, symbol sets allow different client-specific access rights to a symbol
in the controller.
You can download changes to a symbol set definition to the controller in an
online change. When the application is deleted on the controller, the symbol
sets are also deleted. When building the application, you can create and save a
symbol file in XML format for each symbol set.
In the following section, you will see an example of steps for creating symbol
sets and the assignment of rights on the controller:
Requirements: The application has a defined symbol configuration in the
project. The “Enable symbol sets” option is enabled in the settings of the
symbol configuration. The controller has a user management. For the example
here, there should be a user group that has the necessary rights for the serv-
icing of the plant. By default, this type of user group, named "Service", is
already created.
1. Define the connection to the controller in the “Communication Settings”
of the device editor.
2. Click the button in the editor of the “Symbol Configuration” in order to
create a new symbol set. Specify a name of the group ("Startup") in the
“Add New Symbol Set” dialog.
3. Click the button (“Build”) in the toolbar of the dialog in order to display
all symbols available in the project. Select the users who should belong to
the group. Save the project.
4. Click the “Configure Symbol Rights” button.
🡆 The “Symbol Rights” tab of the device editor opens.
5. Click the button (“Synchronization”) to synchronize the display of the
symbol sets with the device.
🡆 If you have not enabled user management on the controller yet, then
you will see a dialog in the “Users and Groups” tab prompting you to do
it.

R911403764, Edition 08 Bosch Rexroth AG


232 / 1158 ctrlX PLC Engineering
Subordinate Safety Controller

6. Click “OK” in the dialog and click the “Users and Groups” tab.
Click the button (“Synchronization”). Click “Yes” to confirm that user
management should be enabled.
🡆 The “Device User Logon” dialog opens.
7. Sign in. If this is the first login, use "Administrator" as the user name and
password, and then set a new password in the following dialog.
🡆 After the dialog is closed, the configurations of the device user man-
agement are displayed in the “Users and Groups” and “Access Rights”
tabs.
8. Log in to the controller by clicking “Online 🠂 Login”. Click “Yes” to the
prompt of whether or not the application should be downloaded to the
device.
9. After successful login, click the “Symbol Rights” tab. Click the
“Synchronization” button.
🡆 In “Symbol Sets”, you see all sets that have currently been downloaded
for the application (for this example, at least "startup"). In “Rights”, a
table shows the user groups that are created in the user management
of the controller. In the example, we assume that the default groups
“Administrator” and “Service” have been created. When a symbol set
is selected on the left, you see on the right the access rights of the
individual user groups to this symbol set ( : access granted; : access
not granted). The possible type of access is already defined for each
symbol in the symbol configuration (read, write, execute).
10. On the left, select the “Startup” symbol set and double-click the preset
minus sign for "Administrator" as well as for "Service".
🡆 The symbol changes into a plus sign. The "Administrator" and "Service"
now have access to the symbols in the “Startup” symbol set.
See also
● ⮫ Chapter 20.4 Handling of Device User Management on page 262

19.3 Subordinate Safety Controller


If a safety controller is below the standard controller, then the communication
with the development system and the data exchange run via the standard con-
troller. The communication links of the safety controller can interrupted the
execution of commands that affect the standard controller. You find a notice
about this for each these command.
Possible interruptions
● Temporary interruption: During the execution of the command (for example,
download), the connections with the safety control are first interrupted,
but are then automatically available again. If the interruption time is too
long, then safety-oriented reactions can occur in the output devices and
connected network variable receiver safety controllers. Then in the safety
controller, the corresponding communication errors must be acknowledged
(if not done automatically) in order to end the safety-oriented reactions. This
affects the connection to their field devices and network variable receiver
connections to other sender safety controllers. In the case of a connected
safety controller with network variable senders, the communication errors
must be acknowledged in the other safety controllers.
● Permanent interruption: The execution of the command (for example,
delete) leads to an interruption that is only terminated again by another
action (for example, a download). The interruption may cause safety-related
reactions in the output devices and connected network variable receiver

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 233 / 1158
Network and addressing

safety controls. After ending the interruption, the corresponding communi-


cation errors must be acknowledged in the safety controller (if not done
automatically) in order to end the safety-oriented reactions.
● ⮫ Chapter 19 Working with control networks on page 229

19.4 Network and addressing


19.4.1 Network and addressing – General information
In PLC Engineering, the network topology is mapped to unique addresses

Working with control networks


and the routing algorithm is kept simple by using structured addresses. There
is direct and relative addressing and automatic address determination while
booting the system.
Also refer to
● ⮫ Chapter 19.4.2 Network Topology on page 233
● ⮫ Chapter 19.4.3 Addressing and Routing on page 233
● ⮫ Chapter 19.4.4 Address Structures on page 235

19.4.2 Network Topology


Information and recommendations for the topology of a control network
It is recommended to set up a network system so that the following are pos-
sible:
● Extensive self-configuration (address assignment)
● Transparent support for every communication medium
● Transport of data packets between different networks
The routing mechanism should be so simple that each network node can
reroute data packets, even if it has a low memory capacity. Therefore, avoid
extensive routing tables, complex calculations or queries at runtime.
Construct the control network hierarchically. Each node may possess a parent
node and any number of child nodes. A node without a parent is a "top level"
node. Cycles are not permitted, i.e. each control network has the structure of a
tree.
Parent-child relationships results from the specification of certain network
areas. A network area can be, for example, a local Ethernet or a serial point-
to-point connection. We differentiate between the main network (mainnet)
and the subnetworks (subnet). Each node belongs at the most to one main
network, to which its parent node, if one exists, also belongs. For each node
any desired number of subnets can be configured, for which the node acts in
each case as a parent.
A network area may have only one parent node. Therefore, a configuration in
which a network area is defined at the same time as a subnet of several nodes
is invalid.
See also
● ⮫ Chapter 19.4.3 Addressing and Routing on page 233
● ⮫ Chapter 19.4.4 Address Structures on page 235

19.4.3 Addressing and Routing


Addressing means: the topology of the control network is mapped to unique
addresses.
A node address is composed hierarchically: for each network connection the
associated block driver determines a local address, which uniquely identifies
the node within the local network. The complete node address is formed as
follows: The local address is placed in front of the subnet index of the local

R911403764, Edition 08 Bosch Rexroth AG


234 / 1158 ctrlX PLC Engineering
Network and addressing

network assigned by the parent. In turn, the subnet index is placed in front
of the node address of the parent. The length of the subnet index (in bits) is
thereby determined by the device. The length of the local address, conversely,
is determined by the type of network. A node without a main network is a top
level node with address 0. A node with a main network that contains no parent
is likewise a top level node. It is given the local address of the main network.
See an example of a control network here:

In the example the addresses of the nodes are represented in hexadecimal


notation. The first 4 digits represent the address of the respective parent in
the main network, for example 0x007A=122 for PLC1. The next byte (in blue
lettering) is reserved for the subnet index and is followed by the local address,
for example C=12 for node ID 12. The structuring of the addresses makes a lean
routing algorithm possible. Routing tables, for example, are thus unnecessary.
Information is queried only locally: via its own address and via the address of
the parent node. On this basis a node can correctly process the data packets:
● If the destination address corresponds to the address of the current node,
then this is meant to be the receiver.
● If the destination address starts with the address of the current node, then
the data packet is either meant directly for a child or for a descendant of the
node and must be forwarded.
● In all other cases the receiver is not a descendant of the current node and
the data packet must be forwarded to its own parent.
Relative addressing is a special case: relative addresses do not contain the
node number of the receiver, but directly describe the path from the sender
to the receiver. The principle is similar to the relative path in the file system:
the address consists of the number of steps via which the packet must be
transported upwards. These are the steps to the corresponding parent and
from the subsequent path downwards to the destination node.
The advantage of relative addressing is that two nodes in the same subtree can
continue to communicate if the complete subtree is shifted to another place in
the entire network. Whereas the absolute node addressing has to be modified
due to this shift, the relative addressing is still valid.
Address determination

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 235 / 1158
Network and addressing

For a node to know its own address it must either know the address of its
parent node or know that it is a top level node. For this purpose the node
dispatches a message during the bootup to all network devices for address
determination. As long as it receives no response to this message, the node
considers itself to be a top level node, but continues to search for a possible
parent. A parent node responds by announcing its address. The node will
thus independently complete its address and will announce it to the subnets.
An address determination can be accomplished during the bootup or at the
request of the PC used for programming.
See also

Working with control networks


● ⮫ Chapter 19.4.2 Network Topology on page 233
● ⮫ Chapter 19.4.4 Address Structures on page 235

19.4.4 Address Structures


Network addresses
Network addresses represent a mapping of the addresses of the network type
(for example IP) to logical addresses within a control network. This mapping
is carried out by the corresponding block driver. The first three bytes of the IP
address are identical for all network devices within an Ethernet network with
"Class C" IP addresses. Consequently, the last 8 bits of the IP address suffice
as network address, since they enable unambiguous mapping between the two
addresses on the block driver.
A node has a different network address for each network connection. Different
network connections can have the same network address, since each address
need only be locally unique.
Terminology: the network address in the main network is usually designated as
the network address of a node with no specification of the network connection.
The length of a network address is specified in bits and can be chosen by the
block driver as required. The same length must be used for all nodes within a
network area. A network address is represented by an array of bytes in accord-
ance with the following coding:
● Length of the network address: n bits
● Necessary bytes: b = (n + 7) DIV 8
● The (n MOD 8) bits of lowest rank of the first byte and all others (n DIV 8)
are used for the network address.

Example of network address coding


Length: 11 bit
Address: 111 1000 1100

R911403764, Edition 08 Bosch Rexroth AG


236 / 1158 ctrlX PLC Engineering
Network and addressing

Node addresses
The node address indicates the absolute address of a node within a control
network and is therefore unique within the whole "network tree". The address
is composed of up to 15 address components, each of which occupies 2
bytes. The lower a node is located within the network hierarchy, the longer
its address.
The complete node address consists of the partial addresses of all preceding
nodes and the partial address of the node itself. Each partial address consists
of one or more address components. The length is therefore always a multiple
of 2 bytes. The partial address of a node is formed from the network address of
the node in its main network and the subnet index of the main network in the
case of the parent node. The bits required for the subindex are determined by
the router of the parent node. Filler bits can be inserted between the subnet
index and the network address in order to ensure that the length of the partial
address is a multiple of 2 bytes.
Special cases:
● A node without a main network: this means that there is neither a subnet
index nor a network address in the main network. In this case the address is
set to 0x0000.
● A node in the main network without a parent: In this case a subnet index
with the length 0 is assumed. The partial address corresponds to the net-
work address, if necessary extended by filler bits.

Example of node addresses

The node address is always specified in hexadecimal. The individual address


components (two bytes in each case) are separated by a colon ":". Since this
represents an array of bytes and not a 16-bit value, the components are not
displayed in the Intel format. For manually input addresses, missing parts in
an address component are supplemented by leading zeros: "274" = "0274".
In order to improve the legibility, the display should also always contain the
leading zeros.
Absolute and relative addresses
Communication between two nodes can be based on relative or absolute
addresses. Absolute addresses are identical to node addresses. Relative
addresses specify a path from the sender to the receiver. They consist of an
address offset and the descending path to the receiver.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 237 / 1158
Network and addressing

The (negative) address offset describes the number of address components


by which a packet must be passed upwards in the tree before it can be
passed back down by the common parent node. Since nodes can use partial
addresses that consist of more than one component, the number of parent
components to be passed is always equal to the address offset. This means
that the demarcation between the parent nodes is no longer clear. For that
reason the common start of the address of the communication partners is
used as the parent address. Each address component is counted as an upward
step, independent of the current parent node. Each error resulting from this
assumption can be detected by the corresponding parent node and must be

Working with control networks


handled by it accordingly.
After achieving the common parent node the relative path, as an array of
address components, is followed downwards as usual. Formal: the node
address of the receiver is formed by removing the last address offset compo-
nents from the node address of the sender and by appending the relative path
to the remaining address.

Example of the formation of node addresses


In the following example each address component is represented by a letter;
in each case a dot separates nodes from each other. Since a node can carry
several address components, there are some in the example that are repre-
sented with several letters.
Node A: a.bc.d.ef.g
Node B: a.bc.i.j.kl.m
● Address of the lowest common parent: a.bc
● Relative address from A to B: -4/i.j.kl.m (The number 4 results from the
4 components, d, e, f and g, which must pass on the data packet in the
upward direction)
In order to guarantee correct operation of the routing, the relative address
must be adapted each time it passes an intermediate node. It is sufficient to
adapt the address offset. This is always done by the parent node: If a node
receives a data packet from one of its subnets, the address offset is increased
by the length of the address component of this subnet.
● If the new address offset is < 0, then the data packet must be passed
further upward.
● If the address offset is >= 0, then the data packet must be passed on to the
child node whose local address corresponds to the relative path, starting
from the address offset. First of all, however, the address offset must be
increased by the length of the local address of the child node, so that the
child node sees the correct address.
A special situation results if the error mentioned above occurs during the
determination of the common parent node. In this case the address offset of
the actual parent node is negative, but this value is larger than the length of
the partial address of the subnet from which the packet originated. So that
the next node sees a correct relative address in this case, the node concerned
must do the following: it must discover the error, calculate the local address
of the child node on the basis of the address of the predecessor node and
the length difference, and adapt the address offset accordingly. In this case,
too, the address components as such remain unchanged; only the offset is
changed.

Broadcast addresses
There are two types of broadcast - global and local. A global broadcast is sent
to all the nodes in a network. The empty node address with a length of 0 is
reserved for this purpose.

R911403764, Edition 08 Bosch Rexroth AG


238 / 1158 ctrlX PLC Engineering
Network variables

Local broadcasts are sent to all the devices in a network area. For this purpose,
all the bits of the network address are set to 1. This is permissible both in
relative and in absolute addresses.
A block driver must be able to process both kinds of broadcast addresses.
This means: empty network addresses as well as network addresses whose bits
were all set to 1 must be interpreted and sent to all devices concerned.

19.5 Network variables


19.5.1 Network variables – General information
The values of network variables can be exchanged between different PLCs in
a network. The variables must be defined in strict, identical lists on both the
sender device and receiver device, and only one device application defines the
network variables. The lists can be in one or more projects.
The network variable list in the sender is a global variable list in whose object
properties certain protocol and transfer parameters are defined. By adding
these properties, you create a "network variable list (sender)" from a “regular"
“GVL”. You can also insert a “Network Variable List (Sender)” object directly
into the device tree when this object already has these parameters set.
The network variable list in the receiver is of type “Network Variable List
(Receiver)”. Select the respective network variable list of the server upon
creation. This variable list can also be loaded from an export file previously
generated from the sender list. An export file is required if the sender list is
defined in another project.
The network variables are transmitted as broadcasting in one direction only
(sender to receiver). However, a device can also contain a sender as well as a
receiver lists.
From version 3.5.7.0 of the NetVarUdp library no receive channel is occupied
any more if no confirmed transfer is selected. Thus, also a network variable
exchange between 2 controls on 1 hardware device is possible.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 239 / 1158
Network variables

− If the exchanging devices should be senders and


NOTICE
receivers, then the variable list identifiers must be
unique in order to prevent abnormal operation. The
variable list IDs are defined in the “Properties” dialog
of a GVL object.
− Data exchange via network variables is not possible if
− it is not supported by the device (target system)
− a firewall blocks the communication
− another client or application uses the UDP port

Working with control networks


set in the properties of the network variable list
− More than one application per sender device and
receiver device use network variable lists.
− Only arrays with limits defined with a literal or a
constant are transmitted to the receiver application!
Constant expressions are not allowed for this pur-
pose!
Example: "arrVar : ARRAY[0..g_iArraySize-1]
OF INT ;" is not transmitted: "arrVar :
ARRAY[0..10] OF INT ;" is transferred.
− The maximum size permitted of a network variable is
255 bytes. The possible number of network variables
is unlimited.
− If the size of the GVL exceeds the maximum length
of the network telegram, the data is split into several
telegrams. Depending on the configuration, this can
lead to data inconsistencies.
Communication by means of network variables is also possible when the PLCs
operated with applications from different versions of the development system
(V2.3, V3). However, in this case, you cannot use the export/import mechanism
for matching the variable lists exactly in the sender and receiver projects.
Reason: A variable export file (*.exp) that can be generated from V2.3 does
not contain the necessary amount of information to create a receiving NVL in
V3. There is no respective network parameter configuration as a GVL file, which
you exported from the sender previously. To get this file, you must recreate the
V2.3 NVL in V3 first. Then you can generate an export file and create a receiving
NVL in V3 based on this.
An alternative to data exchange between controls is the use of a data sources.
As opposed to the broadcasting method for exchanging network variables,
defined point-to-point connections are created between an application and a
remote data source.
Also refer to
● ⮫ Chapter “Properties”- “Network variables” dialog on page 1054
● ⮫ Chapter 33.2.15 Object 'GVL' - Global Variable List on page 777

19.5.2 Configuring a Network Variable Exchange


The following steps are necessary for exchanging network variables between
the sender device and receiver device.

1. Creating a network variable list in the sender device and generating an


export file
Requirements: An application is inserted in the device tree of the PLC that has
been employed as the sender device.

R911403764, Edition 08 Bosch Rexroth AG


240 / 1158 ctrlX PLC Engineering
Network variables

1. Select the application and insert a “Network Variable List (Sender)”


object. Make the following settings in the “Add Network Variable List
(Sender)” dialog: network type: UDP, example: "NVL_Sender".
2. Double-click the NVL object to open the respective editor and type the
declarations of the network variables. Example:
VAR_GLOBAL
iglobvar:INT;
bglobvar:BOOL;
strglobvar:STRING;
END_VAR
3. Right-click the NVL object in the device tree to open the “Properties”. In
the “Properties” dialog, open the “Network Variables” tab. This shows the
following settings: Network type: UDP; List identifier: 1; Pack variables;
Cyclic transmission: every 50 ms.
4. Note: You can also convert an existing GVL into a network variable list by
configuring its network variable properties.
5. Click the “Link to File” tab.in the “Properties” dialog of the “NVL_Sender”.
Define a file name <export>.gvl and a location in the file system for the
export file of the GVL. Select the “Export before compile” option.
6. Click “Build 🠂 Generate Code” to compile the application.
The export file for the network variable list is now located in the defined folder.
See also
● ⮫ Chapter “Properties”- “Network variables” dialog on page 1054

2. Creating an associated network variable list in the receiver device


Requirements: A sender device and a receiver device exist in the device tree. An
application with a task configuration is inserted below the device. An NVL or a
GVL is created below the sender device as network variable list to be sent.
1. Select the application of the receiver in the device tree and click “Add
Object 🠂 Network Variable List (Receiver)”.
🡆 The “Add Network Variable List (Receiver)” dialog opens.
2. In the dialog, select the previously created NVL of the sender device and
type a name (for example, "NVL_Receiver"). PLC Engineering populates
this receiver list automatically with the variable declarations from the
sender list.
Note: As an alternative, you can select the “Import from file” option and
load the export file that was generated previously from the sender list.

3. Testing the network variable exchange


Requirements: A network variable list (sender) exists in the sender device, a
network variable list (receiver) exists in the receiver device, and both lists have
identical variable declarations.
1. Below the application in the sender device, create a program that incre-
ments a network variable. Example: iglobvar:=iglobvar+1;.
2. Configure the application task so that this program calls it.
3. Below the application in the receiver device, create a program that
writes the value of this network variable to a local variable. Example:
ilocalvar:=iglobvar;.
4. Configure the application task so that this program calls it.
5. Download both applications to the controllers and start them. (Set the
application as active, login, download, and start.)

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 241 / 1158
Data connection with data sources

6. In the online views of the editors of both programs, check whether the
values of iglobvar match in the receiver and the sender.

Configuration of network variable communication between V2.3 and V3 PLCs


Requirements: A global variable list exists in a V2.3 project with network var-
iables that you want to read into your V3 project. In the V3 project, in the
device tree, below the PLC, there is an application with a program that uses
the variables.
1. Open the “Properties” dialog of the GVL in the V2.3 project (sender).

Working with control networks


2. Insert another PLC into the project as a dummy with an application and a
task. Then create the V2.3 GVL below it as follows:
3. Insert a “Network Variable List (Sender)” object named "dummy23" below
the dummy application.
4. Right-click “dummy23” to open the “Properties” dialog. Click the
“Network Properties” tab. Type the same network properties as the GVL
in the V2.3 project.
5. Fill “dummy23” with the same variable declarations as in the V2.3 GVL.
6. Define a location for an export file "dummy23.gvl" on the “Link To File” tab
of the “Properties” for “dummy23”.
7. Set the application of the dummy controller to active and click “Build
🠂 Generate Code” ([F11]).
🡆 When the application is compiled successfully, PLC Engineering auto-
matically creates the export file dummy23.gvl.
8. Set the application of the physical PLC as active and right-click to open
the “Add Object” dialog.
9. Select “Network Variable List (Receiver)” and type a name (for example,
"NVL_from_23").
10. Select the “Import from file” option and select dummy23.gvl, which was
generated previously.
11. Check “NVL_from_23”, which has just been created. You have to get the
same variable declarations as those in the sender GVL in the V2.3 project.

See also
● ⮫ Chapter 33.2.20 Object 'Network Variable List (Sender)' on page 783
● ⮫ Chapter 33.2.21 Object 'Network Variable List (Receiver)' on page 783

19.6 Data connection with data sources


19.6.1 Data Source Manager – General information
In order to have read and write access to remote devices to the applications
running there, extend your application with a data source manager with one or
even more data sources.
The functionality of the data source manager allows for establishing connec-
tions and communication to remote devices, and it makes its data available
through data source variables. At this time, the partners communicate by
means of a point-to-point connection. Depending on the network in which the
controls are located, the connection is established via the data source types
PLC Engineering symbolic or PLC Engineering ApplicationV3.

19.6.2 Data source type PLC Engineering ApplicationV3


This data source type is available under all device types.

R911403764, Edition 08 Bosch Rexroth AG


242 / 1158 ctrlX PLC Engineering
Data connection with data sources

The data connection with data source type PLC Engineering ApplicationV3 is
done via the address monitoring. This requires that the address information
between the remote control and the local device match: The runtime system
of the local application requires a valid communication parameters to establish
the connection.
When configuring the data source, the network scan functionality supports the
user.
Disadvantage: If you change the remote application, also update the local appli-
cation, for example, the HMI application.
The advantage is that a symbol configuration is not required in the remote
application.

19.6.3 Data source type PLC Engineering Symbolic


The data source type PLC Engineering Symbolic is only available together with
a CODESYS HMI device. But then it is advantageous to use this type.
Under a CODESYS HMI device you can configure either the data connection
with data source type PLC Engineering Symbolic or with data source type PLC
Engineering ApplicationV3. Only if no resources are available for the symbol
configuration on the remote device, it is recommended to select the data
source type PLC Engineering ApplicationV3. This is the case, for example, with
embedded or small controls, whose applications often do not contain a symbol
configuration.
A prerequisite to successfully establish a connection is that symbols have been
configured in the remote device and consequently a symbol file exists. The
application in the remote device has a symbol configuration. The data can be
connected via symbolic monitoring.
Symbolic monitoring reads the symbol file on the remote device and uses the
variable information stored there for the data source variables and the data
transfer. The advantage is that the application does not have to be updated in
the local device when someone edits modifies the remote application without
updating its symbol configuration. If the symbol file is also located on your
development system (either a file or a symbol configuration object as part of
your project), then the local symbol file can also be read. Then, you can work
offline during the development phase.
During the development phase, a variable list can be created offline by means
o local symbol configuration files. Thus, a local application can be developed
offline without connection to the data source using symbol information.
The following connection types are possible:
● “PLC Engineering V2”
The devices are located in the same network. The V2 runtime system on the
remote PLC provides a communication interface.
● “PLC Engineering V2 (via gateway)”
The devices are not located in the same network. They are connected via a
V2 gateway.
Note: For this connection, a “CoDeSys V2.3Gateway server” (V2 Gateway)
has to be installed on the development computer running on PLC Engi-
neering V3.
● “PLC Engineering V3”
The devices are located in the same network. The V3 runtime system on the
remote control provides a communication interface.
● “PLC Engineering V3 (via gateway)”:
The devices are not located in the same network. They are connected via a
V3 gateway.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 243 / 1158
Data connection with data sources

19.6.4 Data transmission


When the local application is in runtime mode, the data source variables that
appear in the data source editor of the “Variables” tab are updated in config-
urable time intervals. The remote application is also executed at this time.
Variables that are configured in the visualization, in the trend, as alarms, or for
recipes are transferred and stored automatically. When a variable is accessed in
IEC code only, the variable is not updated automatically. In this case, you must
activate the “Update always” option in the data source editor of the “Variables”
tab.

Working with control networks


The data source types support the (read or write) data access to variables of
the source control for the following data types:
● Scalar value at highest level
Example: PLC_PRG.hugo
● Property on a program or on a GVL via a call if it is flagged with {attribute
monitoring := 'call'}.
Example: PLC_PRG.PropertyCall
● Variable that is mapped to bit addresses
Example in PLC_PRG: x AT %MX0.5 : BOOL;
● Variable (type BIT) in a function block
Example: Declaration in DUT: x, y : BIT, bit access: PLC_PRG.dutInst.y
● Structured obtainable variable
Example: PLC_PRG.outerInst.innerInst.dwVar
● Property on module instance, if this is flagged with {attribute
monitoring := 'call'}
Example: PLC_PRG.instance.PropertyCall
● Property both on top level and on an instance if it is flagged with
{attribute monitoring := 'variable'}
Note: This cannot be written by monitoring or by the data sources.
● Array access with literal index
Example: PLC_PRG.arrOfInts[3], PLC_PRG.inst.arrOfBool[1]
● Nested access (for example, array of structures or structure of arrays)
Bit access used in visualizations that are transferred via
CAUTION
a data source connection function only if they contain lit-
eral offset specifications. A visualization cannot process
an offset specification by defined constants.

19.6.5 Initially Adding a Data Source


For data exchange between your local device and a remote device, add a “Data
Source Manager” object and then a “Data Source” below your application in
the device tree. A wizard guides you through the configuration of the data
source. Afterwards, you can change the settings at any time in the editor of the
object. However, it is not possible to modify the data source type later.
Use the “PLC Engineering Symbolic” data source type unless there are no
resources available in the remote PLC for a symbol configuration. As long as
the symbol configuration in the remote device is not impacted by an application
change, you have the advantage that the application in the local device does
not have to be updated.
When adding a data source, select a data source type. Then specify the connec-
tion settings of the point-to-point connection to the remote device. Ideally, the
remote device is running during this time and PLC Engineering can establish
the connection to it immediately. Then all available data source variables from
the remote PLC are displayed. Select the variables that should be transferred.

R911403764, Edition 08 Bosch Rexroth AG


244 / 1158 ctrlX PLC Engineering
Data connection with data sources

You can also select all variables. Then the data source is initialized automati-
cally, the data source variables are created below the “DataSources_Objects”
folder, and another data source is added below the data source manager.
If the data is transferred using symbolic monitoring and the symbol file is
stored on your development system, then you can read the variable information
from the symbol file and work offline. The symbol file is stored either as a file
on your development system or as a symbol configuration object as part of your
project (in PLC Engineering).
The initial settings can be changed at any time in the data source editor.
See also
● ⮫ Chapter 33.2.13 Object 'Data Sources Manager' on page 775

Initially connecting devices symbolically via 'PLC Engineering V3'


A “ctrlX CORE” is running on the remote device. Moreover, an application is
running with a symbol configuration.
1. Below your application in the device tree, insert a “Data Source Manager”
object.
2. Select the “Data Source Manager” object and click “Add Object 🠂 Data
Source”.
🡆 The “Add Data Source” dialog opens.
3. In the “Name” field, specify the data source name.
🡆 Example: ds_Remote_Device
4. As the data source type, select “PLC Engineering Symbolic”.
🡆 The data transfer is done via symbolic monitoring. The “Initialize Data
Source Wizard - Provider settings” dialog opens.
5. As the connection type, select “PLC Engineering V3”.
6. For “Type of name or address”, select the “Node name” option.
7. In the “Connection Settings” group, specify the connection parameters for
configuring the remote device. Example: “[03A7)”
🡆 The connection to the remote device is established and the application
is read. The “Initialize Data Source Wizard - Browse data items” dialog
also opens. The read remote control variables are displayed in the tree
view on the “Variables” entry. The top node is the application, which is
displayed with its remote application name.
8. In the tree view, select which control variables should be transferred.
Then click “Finish”.
🡆 The data source is initially configured. The ds_Remote_Device object
is added below the “Data Source Manager” node. The object is open,
and on the “Variables” tab, the data source variables to be gener-
ated are displayed in the tree view. The GVL ds_Remote_Device,
where the data source variables are declared, is located below the
“DataSource_Objects” folder.

Initially connecting devices symbolically via 'PLC Engineering V3 (Via gateway)'


A “ctrlX CORE” is running on the remote device. Moreover, an application is
running with a symbol configuration. The remote device exists in another net-
work so that the communication has to be routed via a gateway.
1. Below your application in the device tree, insert a “Data Source Manager”
object.
2. Select the “Data Source Manager” object and click “Add Object 🠂 Data
Source”.
🡆 The “Add Data Source” dialog opens.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 245 / 1158
Data connection with data sources

3. In the “Name” field, specify the data source name.


🡆 Example: ds_Remote_Device
4. As the data source type, select “PLC Engineering Symbolic”.
🡆 The data transfer is done via symbolic monitoring. The “Initialize Data
Source Wizard - Provider settings” dialog opens.
5. As the connection type, select “PLC Engineering V3 (Via gateway)”.
🡆 You can also specify the communication parameters for the gateway.
6. For “Type of name or address”, select the “Node name” option.

Working with control networks


7. In the “Connection Settings” group, specify the connection parameters for
configuring the remote device. Example: “[03A7)”
🡆 The connection to the remote device is established and the application
is read. The “Initialize Data Source Wizard - Browse data items” dialog
also opens. The read remote control variables are displayed in the tree
view on the “Variables” entry. The top node is the application, which is
displayed with its remote application name.
8. In the tree view, select which control variables should be transferred.
Then click “Finish”.
🡆 The data source is initially configured. The ds_Remote_Device object
is added below the “Data Source Manager” node. The object is open,
and on the “Variables” tab, the data source variables to be gener-
ated are displayed in the tree view. The GVL ds_Remote_Device,
where the data source variables are declared, is located below the
“DataSource_Objects” folder.

Initially connecting devices symbolically via 'PLC Engineering V2'


A “CoDeSys V2.3 SP PLCWinNT V2.4” is running on the remote device. More-
over, an application is running with a symbol configuration.
1. Below your application in the device tree, insert a “Data Source Manager”
object.
2. Select the “Data Source Manager” object and click “Add Object 🠂 Data
Source”.
🡆 The “Add Data Source” dialog opens.
3. In the “Name” field, specify the data source name.
🡆 Example: ds_Remote_Device
4. As the data source type, select “PLC Engineering Symbolic”.
🡆 The data transfer is done via symbolic monitoring. The “Initialize Data
Source Wizard - Provider settings” dialog opens.
5. As the connection type, select “PLC Engineering V2”.
6. In the “Connection Settings” group, specify the connection parameters for
configuring the remote device.
Example: driver type TCP/IP (Level 2 Route), address localhost,
port 1200
🡆 The connection to the remote device is established and the application
is read. The “Initialize Data Source Wizard - Browse data items” dialog
also opens. The read remote control variables are displayed in the tree
view on the “Variables” entry.

R911403764, Edition 08 Bosch Rexroth AG


246 / 1158 ctrlX PLC Engineering
Data connection with data sources

7. In the tree view, select which control variables should be transferred.


Then click “Finish”.
🡆 The data source is initially configured. The ds_Remote_Device object
is added below the “Data Source Manager” node. The object is open,
and on the “Variables” tab, the data source variables to be gener-
ated are displayed in the tree view. The GVL ds_Remote_Device,
where the data source variables are declared, is located below the
“DataSource_Objects” folder.

Initially connecting devices symbolically via 'PLC Engineering V2 (Via gateway)'


A “CoDeSys V2.3 SP PLCWinNT V2.4” is running on the remote device. More-
over, an application is running with a symbol configuration. The remote device
exists in another network so that the communication has to be routed via a
gateway.
1. Below your application in the device tree, insert a “Data Source Manager”
object.
2. Select the “Data Source Manager” object and click “Add Object 🠂 Data
Source”.
🡆 The “Add Data Source” dialog opens.
3. In the “Name” field, specify the data source name.
🡆 Example: ds_Remote_Device
4. As the data source type, select “PLC Engineering Symbolic”.
🡆 The data transfer is done via symbolic monitoring. The “Initialize Data
Source Wizard - Provider settings” dialog opens.
5. As the connection type, select “PLC Engineering V2 (Via gateway)”.
🡆 You can also specify the communication parameters for the gateway.
6. In the “Connection Settings” group, specify the connection parameters for
both the gateway and the device configuring the remote device.
Example: driver type TCP/IP (Level 2 Route), address localhost,
port 1200
🡆 The connection to the remote device is established and the application
is read. The “Initialize Data Source Wizard - Browse data items” dialog
opens. The remote control variables are displayed in the tree view on
the “Variables” entry.
7. In the “Connection Settings” group, specify the connection parameters for
configuring the remote device. Example: “[03A7)”
🡆 The connection to the remote device is established and the application
is read. The “Initialize Data Source Wizard - Browse data items” dialog
opens. The read remote control variables are displayed in the tree view
on the “Variables” entry. The top node is the application, which is
displayed with its remote application name.
8. In the tree view, select which control variables should be transferred.
Then click “Finish”.
🡆 The data source is initially configured. The ds_Remote_Device object
is added below the “Data Source Manager” node. The object is open,
and on the “Variables” tab, the data source variables to be gener-
ated are displayed in the tree view. The GVL ds_Remote_Device,
where the data source variables are declared, is located below the
“DataSource_Objects” folder.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 247 / 1158
Data connection with data sources

Initially adding data source variables from a symbol file


Ideally, the same symbol file on the remote device is saved on your develop-
ment system.
1. Below your application in the device tree, insert a “Data Source Manager”
object.
2. Select the “Data Source Manager” object and click “Add Object 🠂 Data
Source” in the context menu.
🡆 The “Add Data Source” dialog opens.

Working with control networks


3. In the “Name” field, specify the data source name.
🡆 Example: ds_Symbols
4. As the data source type, select “PLC Engineering Symbolic”.
🡆 The data transfer is done via symbolic monitoring. The “Initialize Data
Source Wizard - Provider settings” dialog opens.
5. In “Variable information”, click the “From symbol file” entry.
6. In “Select symbol file”, specify the location and the file name of the
symbol file. When the code is generated, an XML symbol file is created
in the project directory by default.
🡆 Example: D:\Projects\V3.5
SP11\Project_A.Device.Application.xml
Hint: When a symbol file is specified, no additional connection settings
have to be configured. A connection is not established. You are working
offline. You have to configure the connection settings only when you
need current data from the controller which is transferred online. In the
“Variable information” settings, select the “From connection settings”
option.
7. Click the “Next” button.
🡆 The “Initialize Data Source Wizard - Browse data items” dialog opens.
The read symbols are displayed in the tree view on the “Variables”
entry.
8. In the tree view, select the symbols to be transferred. Then click “Finish”.
🡆 The data source is initially configured. The ds_Symbols object is added
below the “Data Source Manager” node. The object is open, and on the
“Variables” tab, the data source variables that were generated based
on the symbol file are displayed in the tree view. The GVL ds_Symbols,
where the data source variables are declared, is located below the
“DataSource_Objects” folder.

Initially adding data source variables from a symbol configuration


Your active project contains the control application for the remove device.
The control application includes a symbol configuration with symbols that are
added to your local application as data source variables.
1. Below your local application in the device tree, insert the “Data Source
Manager” object.
2. Select the “Data Source Manager” object and click “Add Object 🠂 Data
Source”.
🡆 The “Add Data Source” dialog opens.
3. In the “Name” field, specify the data source name.
🡆 Example: ds_Symbols
4. As the data source type, select “PLC Engineering Symbolic”.
🡆 The data transfer is done via symbolic monitoring. The “Initialize Data
Source Wizard - Provider settings” dialog opens.

R911403764, Edition 08 Bosch Rexroth AG


248 / 1158 ctrlX PLC Engineering
Data connection with data sources

5. In “Variable information”, select the “<remote


device>.<application>.symbol configuration” entry.
🡆 Example: Device.Application.Symbol Configuration
Hint: When a symbol file is specified, no additional connection settings
have to be configured. A connection is not established. You are working
offline.
6. Click the “Next” button.
🡆 The “Initialize Data Source Wizard - Browse data items” dialog opens.
The read symbols are displayed in the tree view on the “Variables”
entry.
7. In the tree view, select the symbols to be transferred. Click “Finish”.
🡆 The data source is initially configured. The ds_Symbols object is added
below the “Data Source Manager” node. The object is open, and on the
“Variables” tab, the data source variables that were generated based
on the symbol configuration are displayed in the tree view. The GVL
ds_Symbols, where the data source variables are declared, is located
below the “DataSource_Objects” folder.

Initially connecting devices with address monitoring


A “ctrlX CORE” is running on the remote device. The project of the remote
device is located on your development computer. The engineered application
there does not contain a symbol configuration.
Use this communication link only if there are no resources available in the
remote PLC for a symbol configuration.
1. Below your application in the device tree, insert a “Data Source Manager”
object.
2. Select the “Data Source Manager” object and click “Add Object 🠂 Data
Source”.
🡆 The “Add Data Source” dialog opens.
3. In the “Name” field, specify the data source name.
🡆 Example: ds_Remote_Device
4. As the data source type, select “PLC Engineering ApplicationV3”.
🡆 The data transfer is done by means of address monitoring. The
“Initialize Data Source Wizard - Provider settings” dialog opens.
5. For “Select the project type”, select the “Other Project” option.
6. For “Choose file”, specify the file and location of the project on the
remote device. Example: C:\Data\Projects\PLC_A.project.
🡆 The remote device is displayed in the tree view of the window below,
and as a result the connection was established.
7. Click the “From device” link.
🡆 The connection parameters to the remote device are read and displayed
in the dialog. The connection is configured.
8. Click “Next>”.
🡆 The “Initialize Data Source Wizard - Browse data items” dialog opens.
The remote control variables are displayed in the tree view on the
“Variables” entry.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 249 / 1158
Data connection with data sources

9. In the tree view, select which control variables should be transferred.


Then click “Finish”.
🡆 The data source is configured. A connection is established. The settings
are stored in the object and can be modified in the editor of the object.
The data source is initially configured. The ds_Remote_Device object
is added below the “Data Source Manager” node. The object is open,
and on the “Variables” tab, the data source variables to be gener-
ated are displayed in the tree view. The GVL ds_Remote_Device,
where the data source variables are declared, is located below the

Working with control networks


“DataSource_Objects” folder.

See also
● ⮫ Chapter Tab 'Communication' via PLC Engineering Symbolic on page 808
● ⮫ Chapter Tab 'Communication' via PLC Engineering ApplicationV3
on page 812

19.6.6 Editing data source variables


At runtime, the remote data is saved to the data source variables. The data
source variables and their mapping to the remote variables are displayed in
the data source editor below of the “Variables” tab. If the local and remote
variables have the same names and the same data types, then the data is
mapped 1:1. The variables and the data types are created automatically. That is
the regular procedure.
You can also map to existing variables. This is necessary, for example, if a
visualization includes a data type in an interface. Then the same data must be
passed to this visualization. In this case, the declared local variable and the
remote variable have the same data type, e.g. of a library. Moreover, you can
map a local variable with a conforming data type to a remote variable. The data
type can be created on the “Type Mappings” tab.
The specifically created variables and data types are declared in the
“DataSources_Objects” folder. For each data source, a global variable list of
the same name as the data source is declared there. Moreover, the data source
variables usually have the identical or conforming data type as the remote con-
trol variable and they are declared as user-defined data types (DUT objects).
Considering all data sources, multiple declaration of the same data types is
avoided.
Do not edit the data interface in the “DataSources_Objects” folder manually. It
is created initially when adding a data source. Changes can be made later in
the editor of the data source.
Also refer to
● ⮫ Chapter 19 Working with control networks on page 229
● ⮫ Chapter 19.6.8 Updating Data Interfaces on page 252
● ⮫ Chapter Tab 'Variables' on page 805

Selecting variables for data transfer


You can edit the selection of the data source variables.
Prerequisite: The remote device and its application are running. A data source
manager is already inserted below the local application with a data source.
1. Open the editor of the data source.
2. Select the “Variables” tab.
3. Click “Update variables”.
🡆 The “Browse variables” dialog opens.

R911403764, Edition 08 Bosch Rexroth AG


250 / 1158 ctrlX PLC Engineering
Data connection with data sources

4. Activate the variables that should be transferred and click “OK” to close
the dialog.
🡆 The data source variables are modified according to the selection. The
declaration of variables and data types is also modified.
The “Variables” tab shows the modified selection. Moreover, the
mapped remote variable is listed in the “Remote variable” column.
Also refer to
● ⮫ Chapter 19 Working with control networks on page 229
● ⮫ Chapter 19.6.8 Updating Data Interfaces on page 252
● ⮫ Chapter Tab 'Variables' on page 805

Mapping remote variables to a new variables

You need to map a remote variable to a global implicit variable that is created
new. That is the regular procedure for transposing data source to 1:1.
Prerequisite: A project is open A data source manager and a data source below
it are located in the device tree of the local application.
1. Open the editor of the data source.
2. Select the “Variables” tab.
🡆 The data source variables are listed.
3. Select a variable and click the symbol in the “Create or map” column.
4. Specify a name in “Local variable”.
🡆 A variable is declared automatically and it contains the same value as
the mapped remote variable.

Mapping remote variables to an existing variables

You need to map a remote variable to an existing variable.


Prerequisite: A data source manager and a data source below it are located
in the device tree of the local application. The remote data that should be
transferred is displayed in the editor of the data source in the “Variable” tab
1. Open the editor of the data source.
2. Select the “Variables” tab.
3. Select a variable and click the symbol in the “Create or map” column.
🡆 A variable contains the same value as the mapped remote variable.

Mapping remote variables to local variables with a conforming data type

First, create a conforming data type and then use it for a variable.
Prerequisite: A data source manager and a data source below it are located
in the device tree of the local application. The remote data that should be
transferred is displayed in the editor of the data source in the “Variable” tab
1. Open the editor of the data source.
2. Select the “Type mappings” tab.
3. Select the data type in the list that you want to edit.
🡆 The elements of the data type are listed in the window below the data
type list
4. Specify a name for the data type. Example: DataType_A. Select the
name for the remote data types to which the local type should conform.
Example: Library1.DataType_A.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 251 / 1158
Data connection with data sources

5. Modify it in the window below the data type list and remove the elements
that are not necessary for the data transfer.
6. Select the symbol for this data type in the “Create or map” column.
🡆 The data type DataType_A is declared in the “DataSources_Objects”
folder.
7. Select the “Variables” tab.
8. Specify a name in the “Local variable” column. Example: Var_A
9. Select the symbol in the “Create or map” column.

Working with control networks


10. Under the column “Mapping type”, enter the data type DataTyp_A.
11. Select the remote variable with the data that should be transferred.
Example: appPLC_A.Data_A. Use the input assistance for this.
🡆 A variable Var_A is declared automatically with the user-defined data
type DataType_A. During data transfer, it receives the data of the
mapped remote variables.

Example

Library SnakeUtil
The example demonstrates how variables of the data source are created. At
this time, new variables are created, data is mapped to existing data types
and their variables, and new data types are created with type-conforming
mapping.
The remote PLC uses POU instances from the SnakeUtil library and the HMI
device displays these POU instances. This is why the HMI application requires
a variable in the user interface that has a data type appropriate for a visualiza-
tion template. As a result, the SnakeUtil library is linked integrated into the
HMI application and the HMI variables instantiate the SnakeUtil.SnakeVisu
visualization function block.
The following library function blocks from the SnakeUtil library are used in
the remote control:
● SnakeUtil.Snake function block: Equipped with a lot of logic and external
function calls.
● DUT SnakeUtil.PositionInfo: 2 values (of the variables x and y)
● DUT: SnakeUtil.DrawingInfo: Image ID
● The SnakeUtil.SnakeVisu visualization function block with transfer
parameter SnakeUtil.Snake displays the Snake function block.
The following settings are entered in the editor of the “Type Mappings” tab:

In the visualization, a frame is inserted with a reference to


SnakeUtil.SnakeVisu. This expects to have the type SnakeUtil.Snake.
The data types SnakeUtil.PositionInfo and SnakeUtil.DrawingInfo are
mapped to existing data types ( symbol in the “Create or map” column). The
data types are small and contain data only.
The SnakeUtil.Snake function block is very complex and calls external func-
tions that are not available in the HMI visualization. The function block with
code is not required in the visualization. You need a less extensive but com-
patible and conforming type in the HMI visualization. Therefore, do not create

R911403764, Edition 08 Bosch Rexroth AG


252 / 1158 ctrlX PLC Engineering
Data connection with data sources

the original data type directly. Instead, first modify the original data type and
remove the unnecessary elements. Then create the new data type Snake by
selecting the symbol in the “Create or map” column.

19.6.7 Editing Communication


You have added a “Data Source Manager” object and below it a “Data Source”
object below your application in the device tree. The connection parameters
are displayed in the data source editor of the “Communication” tab. You can
modify it there.
The data source type and the current connection type are listed in the status
bar. It is not possible to modify the data source type later.
See also
● ⮫ Chapter 19.6.5 Initially Adding a Data Source on page 243
● ⮫ Chapter Tab 'Communication' via PLC Engineering Symbolic on page 808
● ⮫ Chapter Tab 'Communication' via PLC Engineering ApplicationV3
on page 812

19.6.8 Updating Data Interfaces


The data source variables are updated cyclically in runtime mode. Only the data
is updated that either is used in the current visualization or has the property
“Update always”.
You can define the time interval. Moreover, you can define variables whose data
is transferred in each update interval, and therefore they are always update. To
update variables that are not used in the application code, you can implement
an update programmatically with the help of interface functions from the data
source manager.
If data traffic between the remote and local device is too
NOTICE
high, then the update rate is reduced automatically. This
can lead to an incomplete transfer.
See also
● ⮫ Chapter Tab 'Variables' on page 805

Setting the update rate


1. Open the editor of the data source.
2. Click the “General and Diagnosis” tab.
3. Specify a value in the “Update rate” field.
Example: 100
🡆 The data from the remote device to the local device is transferred every
100 ms.
See also
● ⮫ Chapter Tab 'General and Diagnosis' on page 815

Selecting the variable for 'Update always'


Avoid updating too many variables always. Each update
NOTICE
produces additional data traffic at the connection
between the remote and local devices. When data traffic
is too high, the update rate is reduced automatically. This
can lead to an incomplete transfer.
1. Open the editor of the data source.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 253 / 1158
Data connection with data sources

2. Activate the option “Update always” for a variable.


🡆 The data of the variables is transferred at each update cycle, even when
the data has not changed.
See also
● ⮫ Further information on page 805

Updating data programmatically


The data source manager provides interface functions in the Datasources
library. If a data source manager is integrated in the application code, then

Working with control networks


the global variable g_Datasources is instantiated automatically. This provides
access to the interface functions.
Then you can update individual variables that are not called in the active visuali-
zation.

Example
The variable ivar is activated and deactivated by means of methods from the
Datasources library so that its value is transferred. Furthermore, you can
configure that the variable is updated only over a defined duration in order to
save transfer capacity.

//Synchronize with DatasourcesTask and block until access is


possible
//Regard the feedback in ERR_OK or in
ERR_DE_MULTITASKING_LOCKED
g_Datasources.BeginDataConfiguration(TRUE);
// Activate variable
g_DataServer.UseData(ADR('RemoteDevice.Application.PLC_PRG.iVa
r'));
// Deactivate variable
//
g_DataServer.ReleaseData(ADR('RemoteDevice.Application.PLC_PRG
.iVar'));
g_DataServer.EndDataConfiguration();
The data configuration is started with BeginDataConfiguration(TRUE),
thus initializing the synchronization of the task DatasourceTask with the
application task. The value TRUE blocks the processing until the access to
the variable is possible; FALSE repeats access attempts without blocking. The
return values ERR_OK and ERR_DS_MULTITASKING_LOCKED provide feedback
about the access attempts.
When synchronization is successful, the variable is activated by means of
the UseData method. Then the data configuration is completed with the
EndDataConfiguration method and the synchronization triggered again with
the task DatasourceTask.
The ReleaseData method is used in the same way for deactivating the vari-
able again at the desired processing time.

19.6.9 Using Remote Data


The variables that are listed in the data source editor of the “Variables” tab
(and declared in the “DataSources_Objects” folder) can be used in your appli-
cation like IEC variables. For example, you can visualize the variables.
If multiple data sources are available and therefore conflicts occur regarding
unique variable names, then you must specify the data source name as the
prefix. If no conflicts occur, then this is not necessary and you can map the
variables without a data source prefix.

R911403764, Edition 08 Bosch Rexroth AG


254 / 1158 ctrlX PLC Engineering
Data connection with data sources

<data source name>.<function block name>.<variable name>

Displaying variable values from the remote device


You need to show the variable value iTemp of a remote device in a visualization
element of a visualization in the local application (with the data source man-
ager).
Initial situation: A data source dsRemotePLC is below the local data source
manager where the connection to the remote device is configured. In addition,
the variable iTemp is selected in the data source editor of the “Variables” tab.
1. Select the visualization element in the editor view. Select the properties
“Text variables” - “Text variable” in the “Properties” view.
2. Select the iTemp variable.
🡆 The variable mapping is qualified. Example:
dsRemotePLC.PLC_PRG.iTemp.
3. Select the “Text” property of the visualization element and type in the
following: Temperature: %s
🡆 The value of the iTemp variable from the remote device RemoteDevice
is displayed.
4. Download and start the remote application.
5. Download and start the local application.
🡆 The visualization starts and displays the actual value of iTemp.
The visualization integrated in PLC Engineering does not
NOTICE
display actual values of variables that are transferred by
means of a data source connection. The integrated visu-
alization displays only the initialization values or the last
otherwise delivered values because they do not establish
a connection to the data sources.
If variables are used that are not called in the visualiza-
NOTICE
tion code, then the variables must be updated in the
application code by means of functions from the data
source interface.

19.6.10 Establishing an Encrypted Connection of a Data Source OPC UA


Client to an OPC UA Server
Requirement:
● An OPC UA Server is available. For a description of the OPC UA Server
which is included in the standard installation PLC Engineering, see the
chapter "OPC UA Server".
● You have installed the CODESYS Security Agent add-on in PLC Engineering.
● PLC Engineering is open.
● The “Allow anonymous login” option is selected for your controller
in the “Change Communication Policy” dialog of the device editor
(“Communication Settings” tab, “Change Communication Policy” command,
“Device” menu). Or the user management has been explicitly disabled
(for example, by switching to “Optional user management” in the “Change
Communication Policy” dialog) and then “Reset Origin”.
1. Start the OPC UA Server.
2. Create a new PLC Engineering project.
3. Add a “Data Source Manager” object to the application.
4. Add a “Data Source” “OPCUAClient” to the “Data Source Manager”.
🡆 The “Datasource” dialog opens.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 255 / 1158
Data connection with data sources

5. In the “Datasource” dialog, specify the URI of the started OPC UA Server
and select the “Information Model Source”. When you select “Online” as
the “Information Model Source”, the OPC UA Client connects to the OPC
UA Server and reads the information about which variables and types
exist. When you select “Offline”, the client reads the same information
from an installed information model and does not require a running OPC
UA Server to do this.
6. For “Message Security Mode”, select “Sign and Encrypt”.
Note: You should use “Message Security Mode” = “None” only in closed

Working with control networks


networks.
7. Click “Next”.Now the client scans the OPC UA Server to find the variables
and types of the OPC UA Server. The OPC UA Server has to be online to
do this.
8. Now select one or more variables.
🡆 These variables can be exchanged later via encrypted communica-
tion between the OPC UA Client and the OPC UA Server. For the
variables, components are created in the “Devices” view, in the
“DataSources_Objects” folder. The variables can be used in the applica-
tion.
9. In the next steps, you create a certificate for the encrypted communica-
tion from the OPC UA Client to the OPC UA Server.
10. Click “View 🠂 Security Screen”.
11. Select the “Devices” tab.
12. Select the controller in the left view.
🡆 In the right view, all services of the controller are displayed which
require a certificate.
13. Select the service “CmpOPCUAClient”.
14. Create a new certificate for the device. Click the icon.
🡆 The “Certificate Settings” dialog opens.
15. Define the certificate parameters and click “OK” to close the dialog.
🡆 The certificate is created on the controller.
16. Click the button and save the certificate to the local file directory of the
OPC UA Server, in the folder certs.
🡆 Now when you restart the OPC UA Server, it will recognize the client
certificate. The the server sends its certificate to the client. In the
following steps, this certificate will be made "trusted" to the client.
17. To do this, in the “Security Screen” view, on the “Devices” tab, click the
“Certificates in Quarantine” folder in the left area.
🡆 The certificate is displayed in the right area.
18. Drag this certificate to the “Trusted Certificates” folder.
🡆 Now the server certificate is "trusted" by the client.
19. Now when you connect to the controller and the application starts, the
data source variables of the OPC UA Client can be exchanged with the
OPC UA Server via the encrypted connection.

R911403764, Edition 08 Bosch Rexroth AG


256 / 1158 ctrlX PLC Engineering
Data connection with data sources

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 257 / 1158
Configuring the connection to the PLC

20 Transferring the application to the PLC


20.1 Transferring the application to the PLC – General infor-
mation
To transfer your application to the control, the program has to be compiled
without any errors and the connection settings have to be set for the control.

Transferring the application to the PLC


If the communication with the controller is encrypted and/or restricted to spe-
cific users, then you need the respective certificates and permissions. See
here:
− ⮫ Chapter 20.4 Handling of Device User Management on page 262
− ⮫ Chapter 18.13 Encrypting the application on page 153
You can edit the basic security policy for communication with the device in a
dialog on the “Communication Settings” tab of the device editor. See here:
− ⮫ Chapter 20.3 Encrypting Communication, Changing Security Settings
on page 258
If these prerequisites are met, the application is loaded to the control upon
login.

20.2 Configuring the connection to the PLC


A gateway is used to connect to the control. This gateway can be your develop-
ment computer or another network computer connected to the controller. The
“Communication Settings” dialog is available for configuring the connection
path. This dialog opens automatically when you attempt to log in, but the com-
munication settings have not been configured yet.
If the communication with the controller is encrypted and secured by means of
user management, then you need a corresponding certificate and credentials to
establish the connection to the controller. In this case, see the relevant instruc-
tions on the "Encrypting communication and Changing Security Settings" help
page.
Prerequisite: The project can be complied successfully. A programmable logic
controller (PLC) is inserted in the device tree. The use of a user administration
is mandatory for the device, but not yet activated.
1. In the device tree, select the PLC and click “Project 🠂 Edit Object”.
🡆 The PLC opens in the editor.
2. Click the “Communication Settings” tab.
3. In the menu bar, click “Scan Network”.
🡆 The “Select device” dialog opens. All available devices in the network
are shown on the left side.
4. Select the required device and click “OK”.
🡆 You will receive a message box stating that user management is manda-
tory for the device, but it is not yet enabled. You are prompted whether
you want to enable the user management now. You are informed that
you have to create a new administrator user and then log in as this
user.
5. Close the query with “Yes.”
🡆 The “Add device user” dialog opens for creating an initial device admin-
istrator.

R911403764, Edition 08 Bosch Rexroth AG


258 / 1158 ctrlX PLC Engineering
Encrypting Communication, Changing Security Settings

6. Define the access data for the device administrator: “Name” and
“password”. Enable the “Password can be changed by user” option.

NOTICE Note the importance of the password: Within the


development system, there is no way to access the control if the password
was forgotten.
Click “OK” to close the dialog.
🡆 The “Device User Logon” dialog opens.
7. Enter the access data for the device administrator defined in the previous
step.
🡆 The connection path for the PLC is set.
You can reset the communication settings view to the original view in the PLC
Engineering options of the device editor.
Also refer to
● ⮫ Chapter 20.3 Encrypting Communication, Changing Security Settings
on page 258
● ⮫ Chapter 33.1.1 Tab “Communication” on page 735
● ⮫ Chapter 'Options' dialog - 'Device editor' on page 1082

20.3 Encrypting Communication, Changing Security Settings


Recommendations for data protection
NOTICE
In order to minimize the risk of data security violations,
we recommend the following organizational and tech-
nical actions for the system where your applications are
running. Whenever possible, avoid exposing the PLC and
control networks to open networks and the Internet. Use
additional data link layers for protection, such as a VPN
for remote access. Install firewall mechanisms. Restrict
access to authorized persons. Use high-strength pass-
words. Change any default passwords regularly before
and after commissioning.
Use the security features supported by PLC Engineering
and the respective controller, such as encryption of
communication with the controller and intentionally
restricted user access.
Communication with the device can be protected by means of encryption and
user management on the device. You can change the current security preset on
the “Communication Settings” tab of the device editor.

Establishing a connection to the control, logging in, installing a trusted certifi-


cate for encrypted communication
Prerequisite: Encrypted communication to the control and user management on
the control are forced. However, there is no individual password yet. Your com-
puter does not have an appropriate certificate installed yet and the connection
to the control is not configured.
1. In the device tree, double-click on the control.
🡆 The device editor opens.
2. Click the “Communication Settings” tab.
3. Click “Scan Network”.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 259 / 1158
Encrypting Communication, Changing Security Settings

4. Select the desired control.


🡆 A dialog opens, informing you that the certificate of the device does not
have a trusted signature for communication. You are prompted whether
you want to install this certificate as trusted in the local 'Controller
Certificates' store on your computer, or whether you accept it only for
this one session.

NOTICE A control certificate installed in this way is valid

Transferring the application to the PLC


for only 30 days. This gives you time for the following long-term solu-
tions:
− Creation of an additional self-signed certificate with a longer term
(for example, 365 days). You can do this on the security screen if
you have installed the CODESYS Security Agent, even if a certificate
already exists. Using the PLC shell of the device editor is not a
convenient workaround.
For more information: "Configure encrypted communication with a
longer-term valid control certificate..."
− Importing a CA-signed certificate. This is currently only possible
via the PLC shell commands of the runtime system. Therefore we
recommend to use self-signed certificates first.
5. If you want to install the certificate, select the first option and confirm the
message box with “OK”.
🡆 The certificate is listed as trusted. After accepting the self-signed certif-
icate for the first time, you can establish an encrypted connection with
the control again and again without further prompts.
You receive a message box that user management is mandatory for the
device, but that it is not yet enabled. You are prompted whether you
want to enable the user management now. You are informed that you
have to create a new administrator user and then log in as this user.
6. Close the query with “Yes.”
🡆 The “Add device user” dialog opens to create an initial device adminis-
trator.
7. Create a device user to edit the user management as this user. In this
case, only the “Administrator” group is available. Define “Name” and
“Password” for the user. The password strength is displayed. Also note
the options set regarding a password change. By default, the password
can be changed by the user at any time. Confirm the dialog with “OK”.
🡆 The “Device User Logon” dialog opens.
8. Enter the access data for the device administrator defined in the previous
step.
🡆 You are logged in on the control. On the “Users and groups” tab, it can
be switched to the synchronized operation using the button. The
device user management is displayed and can be edited.
Confirm with “OK” and the device user management is displayed in the
editor window. It contains the just defined user of the “Administrator”
group. Its name is also shown in the taskbar of the window as the
“Device user”.
9. All saved control certificates (from step 5) are kept in the local Windows
Certificate Store on your computer. To access this memory, go to “Run”,
command certmgr.msc.
🡆 All registered certificates for encrypted communication with controls
are listed here in “Controller Certificates”.

R911403764, Edition 08 Bosch Rexroth AG


260 / 1158 ctrlX PLC Engineering
Encrypting Communication, Changing Security Settings

Configuring a control certificate with a more long-term validity period for


encrypted communication by means of CODESYS Security Agent (recom-
mended)
Prerequisite: The add-on product CODESYS Security Agent is installed. You
want to replace the temporary certificate (as described above) acquired the
first time you connected to the protected control with a certificate with a
longer validity period.
In this case, the “Security Screen” view provides an additional tab: “Devices”.
This allows for the simple configuration of certificates for the encrypted com-
munication with controls. For information on the operation, go to the help on
the CODESYS Security Agent: "Encrypted communication with the device via a
control certificate".

Installing a control certificate for encrypted communication via the PLC shell of
the device editor
Choose this less convenient method when the CODESYS Security Agent is
unavailable to you. In this case, you can set up a certificate with a more long-
term validity period for communication encryption on the “PLC Shell” tab of
the device editor.
Prerequisite: You are connected to the control.
1. At first, check whether a qualified certificate is already on the control. If
no certificate is available, then you create a new certificate.
Double-click on the control in the device tree to open the device editor
and select the “PLC shell” tab.
🡆 The tab is displayed with an empty display window. Below that is a
command line.
2. Enter the following command in the input line: cert-getapplist
🡆 All used certificates are listed. The list includes information about the
runtime component and whether or not the certificate is available.
3. If a certificate still does not exist for the component CmpSecureChannel,
type the following command in the input line:
cert-genselfsigned <number of the component in the applist>
4. Select the “Log” tab and click the refresh button .
🡆 It displays whether the certificate was successfully generated.
5. Change back again to the “PLC Shell” tab and type the command cert-
getapplist.
🡆 The new certificate for the component CmpSecureChannel is dis-
played.
6. In the next two steps, activate encrypted communication in the security
screen of PLC Engineering.
7. Open the “Security screen” by double-clicking on the in the status bar.
8. On the “User” tab, select the “Enforce encrypted communication” option
in the “Security Level” group.
🡆 The communication with all control is encrypted. If there is no certifi-
cate on a control, you cannot log in to that control.
The connecting line between the development system, the gateway, and
the control is displayed in yellow on the “Communication Settings” tab
of the device editor of the control.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 261 / 1158
Encrypting Communication, Changing Security Settings

9. As an alternative to the “Enforce encrypted communication” option which


applies to all controls, you can also define encrypted communication for
specific controls only. Select the “Communication Settings” tab in the
editor of the respective control. Click “Encrypted Communication” in the
“Device” list box.
🡆 The communication with this control is encrypted. If there is no certifi-
cate on the control, you cannot log in to this control.
The connecting line between the development system, the gateway, and

Transferring the application to the PLC


the control is displayed in yellow on the “Communication Settings” tab
of the device editor of the control.
10. When you log in to the control for the first time, a dialog opens with infor-
mation that the certificate of the control is not signed by a trustworthy
authority. In addition, the dialog displays information about the certificate
and prompts for you to install it as a trustworthy certificate in the local
store in the “Controller Certificates” folder.
When you confirm the dialog, the certificate is installed in the local store
and you are logged in to the control.
In future, communication with the control is encrypted automatically with
this control certificate.

Changing the communication policy (encryption, user management)


Prerequisite: The connection to the device is established.
1. In the device tree, double-click on the control.
🡆 The device editor opens.
2. Click the “Communication Settings” tab.
3. Open the “Device” menu in the header of the editor. Click “Change
Communication Policy”.
🡆 The “Change Communication Policy” dialog opens.
4. In the upper part of the dialog, you can toggle between the “Optional
encryption”, “Enforced encryption”, and “No encryption” settings.
5. In the lower part of the dialog, you can toggle between the “Optional user
management” and “Enforced user management” settings.

Enabling and disabling forced encrypted communication


Prerequisite: The device supports encrypted communication.
1. In the device tree, double-click on the control.
🡆 The device editor opens.
2. Click the “Communication Settings” tab.
3. Open the “Device” menu in the header of the editor. Click “Encrypted
Communication”. The status toggles between enabled and disabled.
🡆 If the “Encrypted communication” option is selected, the connection
line between the development system, the gateway, and the device is
highlighted in the editor in bold and in color in the graphical represen-
tation.

Also refer to
● ⮫ Chapter 20.4 Handling of Device User Management on page 262
● ⮫ Chapter 18.13 Encrypting the application on page 153
● ⮫ Chapter 11.2 Project encryption with certificates on page 75

R911403764, Edition 08 Bosch Rexroth AG


262 / 1158 ctrlX PLC Engineering
Handling of Device User Management

20.4 Handling of Device User Management


Recommendations for data protection
NOTICE
In order to minimize the risk of data security violations,
we recommend the following organizational and tech-
nical actions for the system where your applications are
running. Whenever possible, avoid exposing the PLC and
control networks to open networks and the Internet. Use
additional data link layers for protection, such as a VPN
for remote access. Install firewall mechanisms. Restrict
access to authorized persons. Use high-strength pass-
words. Change any default passwords regularly before
and after commissioning.
Use the security features supported by PLC Engineering
and the respective controller, such as encryption of
communication with the controller and intentionally
restricted user access.
For devices that support a device user management, the device editor includes
the “Users and Groups” tab and the “Access Rights”. If the device allows it,
you can not only view the user management for the device, but also edit it in
synchronization mode (not in offline mode). Certain rights on the control can
be assigned or rejected to the defined user groups.
The device user management can already be set up in the device description.
Note the commands in the “Online 🠂 Security” menu. You can easily add, edit,
or remove a user account on the control you are currently logged in.
In order for the “Access Rights” tab to be available in the device editor, the
corresponding PLC Engineering option must be selected in the device editor
and unlocked in the device description. If the device editor is not available,
contact the manufacturer of the control.
To assign access rights to a user group, users and user groups have to be
configured first in the “Users and groups” tab of the device editor. User man-
agement first has to be set up on the control before access rights can be
configured on it. If the user management of a device is not yet active, it can
be enabled as follows: By switching to synchronized mode on the “Users and
Groups” site or by adding a new user via the command “Online 🠂 Security
🠂 Add device user”.

General information about device user management


For the missing definition for variable 'tvDeviceControl' devices, a user management is enforced by
default.
Access rights can only be assigned to groups, not to individual users. Thus,
each user has to be a member of a group.
Access rights can be assigned for the following actions performed on the indi-
vidual objects of the control:
● Add/remove
● Modify
● View
● Execute
An object on the control is usually assigned to a single control component.
Each object can use all of the listed actions, but usually only the rights for the
following actions are required on one object:
● “View”
● “Modify”

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 263 / 1158
Handling of Device User Management

The objects are organized in a tree structure. There are two root objects for the
two types of objects:
● “Runtime objects 🠂 Device”: In these objects, all objects with online access
to the control are managed, as they have to control the access rights
● “File system objects 🠂 /”: In these objects, the rights to folders of the
current execution directory of the control can be assigned
The access rights are inherited from the root object (i.e. “Device” or“"/”") to
the child objects. If you reject or explicitly assign a right to a user group on a

Transferring the application to the PLC


parent object, all child objects are affected.
A single right can be explicitly granted or denied (green plus sign or red minus
sign), or it is "neutral" (light gray sign). Neutral means that the right was nei-
ther explicitly granted nor denied. In this case, the right of the parent object
applies.
If no right has been explicitly granted or denied in the entire hierarchy of
objects, it is denied by definition. This initially denies all rights, except for the
access right for the “View” action: This right is initially granted for each user
group on the “Device” runtime system object and on the“"/”" file system object.
This means that read-only access to all objects is initially permitted unless it is
explicitly revoked in child objects.
For an overview table for the objects, see the "Tab 'Access Rights'" chapter.
Refer to the instructions below on how to use the device user management
editor:

First-time login on the control to edit or view its user management


Prerequisite: The connection to the control is configured. The control supports
a device user management, but none is active yet.
1. Double-click the control device object in the device tree.
🡆 The device editor opens.
2. Click the “Users and Groups” tab.
3. Click on the button.
🡆 A dialog opens prompting whether the device user management should
be activated.
4. Click “Yes” to confirm the prompt.
🡆 The “Add device user” dialog opens.
5. Create a device user to edit the user management as this user. In this
case, only the “Administrator” group is available. Define “Name” and
“Password” for the user. The password strength is displayed. Also note
the options set regarding a password change. By default, the password
can be changed by the user at any time. Confirm the dialog with “OK”.
🡆 The “Device User Logon” dialog opens.
6. Enter the “User name” and “Password” for the just defined user.
🡆 Confirm with “OK” and the device user management is displayed in the
editor window. It contains the just defined user of the Administrator
group. Its name is also shown in the taskbar of the window as the
“Device user”.

Setting up a new user in the user management of the control


Prerequisite: The control has a device user management. You have the corre-
sponding access data.
1. Double-click the control device object in the device tree.
🡆 The device editor opens.
2. Click the “Users and Groups” tab.

R911403764, Edition 08 Bosch Rexroth AG


264 / 1158 ctrlX PLC Engineering
Handling of Device User Management

3. Click (Synchronization) to load the user management configuration


from the control to the editor. If you are not logged in to the device
yet, the “Device user login” dialog opens to enter the user name and the
password.
🡆 The user management configuration of the device is shown in the
editor.
4. In the “Users” view, click “Add”.
🡆 The “Add User” dialog opens.
5. Specify the name of the new user and assign the user to a group. This
counts as the user's minimum required default group. The user can be
assigned to other groups later. Define and confirm a “Password” for the
user. Define whether the user can change the password and whether the
user has to change the password at the first login. Confirm the dialog with
“OK”.
🡆 The new user appears in the “Users” view as a new node and in the
“Groups” view as a new subentry of the selected default group.
According to these instructions, new user groups can also be added to the
"Groups" window. A runtime system object is automatically created for this user
group and shown in the ⮫ Tab 'Access Rights' under the object UserManage-
ment. This allows graded or restricted administrator groups to be set up. For
example, a visualization administrator group can be set up that can only add
existing users to the visualization user group, but cannot create new users, or
change the passwords of existing users.

Changing of access rights to control objects in the user management of the


control
Prerequisite: The control has a device user management. You have the corre-
sponding access data.
1. Double-click the control device object in the device tree.
🡆 The device editor opens.
2. Click the “Access Rights” tab.
3. Click (Synchronization) to load the rights management configuration
from the control to the editor. If you are not logged in to the device yet,
the “Device User Logon” dialog opens for entering the access data.
🡆 The access rights management configuration of the device is shown in
the editor.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 265 / 1158
Generating Application Code

4. Select the object whose access right you want to change to the left in the
object tree.
🡆 In the “Rights” view, a table shows the access rights to this object for
all configured user groups.
5. Double-click the right in the table that you want to change.
🡆 If the object has child objects, a dialog prompts whether you want to
modify the rights for the child objects.

Transferring the application to the PLC


6. Click “Yes” or “No” to close the prompt.
🡆 The rights are switched from "allowed" to "not allowed" , or the
other way around. The icon in the table cell changes accordingly.
Explicitly set rights appear in the table as green or red icons, rights
inherited from the parent object appear as gray icons.

In offline mode, transfer a saved user management from a DUM2 file to a


control and enable it
As of V3.5 SP16, a *.dum2 file to be encrypted with a password is used to
export a user management.
1. Double-click the control device object in the device tree.
🡆 The device editor opens.
2. Click the “Users and Groups” tab.
3. Click on the button.
🡆 The dialog to select a file from the local file system is shown.
4. Select the file (<file name>.dum2) with the intended user management
and confirm with “Open”.
🡆 The “Enter password” dialog is shown.
5. Enter the password assigned when the user management file was
exported (possible via the button ).
CAUTION: Importing a device user management via a *.dum2 file com-
pletely overwrites the user management on the device! To log in to the
device again, authentication data from the newly imported user manage-
ment is required.
🡆 If the password is entered correctly, the configuration from the loaded
user management file is now displayed in the editor window.
6. Edit the configuration however you like. For example, change the user
password or add a new user.
🡆 Each change is immediately loaded to the device.

Also refer to
● ⮫ Chapter 33.1.10 Tab 'Access Rights' on page 743
● ⮫ Chapter 'Options' dialog - 'Device editor' on page 1082
● ⮫ Chapter 33.1.16 "Users and groups” tab on page 754
● ⮫ Chapter 17.4 Configuring Devices and I/O Mapping on page 118
● ⮫ Chapter 20.3 Encrypting Communication, Changing Security Settings
on page 258

20.5 Generating Application Code


The application code is the machine code that a PLC executes when you start
an application.
PLC Engineering automatically generates the application code from the source
code that was written in the development system. This is done automatically
before downloading the application to the PLC. Before the application code

R911403764, Edition 08 Bosch Rexroth AG


266 / 1158 ctrlX PLC Engineering
Generating Application Code

is generated, a test is performed for checking the allocations, the data types,
and the availability of libraries. Moreover, the memory addresses are allocated
when the application code is generated.
You can click “Build 🠂 Generate Code” to execute this command explicitly. This
is useful for detecting any errors in your source code, even when the PLC is
not connected yet. The errors are output in the message view in the "Build"
category.
If you have encrypted the application, then consider the
NOTICE
following information: If a (new) boot application is gen-
erated on request after an online change, then the boot
application is formed in the RAM with the current code
that is not encrypted.

Explicitly generating the application code


Requirement: The application can be compiled without any errors.
Click “Build 🠂 Generate Code”.
🡆 The application code is generated. Detailed information about memory
allocation is output in the message view.
See also
● ⮫ Chapter 20.7 Generating Boot Applications on page 268
● ⮫ Chapter Command 'Generate Code' on page 932

Messages when generating the application code


When you generate the application code, PLC Engineering outputs information
about memory allocation in the message view. Gaps form in the memory
because reallocation is only for new and changed POUs and variables due
to the incremental memory build. Online changes have the same effect. This
fragmentation reduces the amount of available memory. However, you can com-
pletely reallocate the memory by clicking “Clean” and therefore increase the
amount of free memory.
Syntax errors and bugs that PLC Engineering detects during the code gener-
ation and memory allocation are also output in the message view (“Build”
category).
Output information about memory allocation:
● “ Size of the generated code” (in bytes): Sum of all code segments
● “Size of global data” (in bytes): Total memory used by the global variables.
Inputs and outputs are not included unless inputs or outputs are mapped in
the area of the global variables.
● “Total allocated memory size for code and data” (in bytes): The total allo-
cated memory is composed of the already used memory areas plus the
reserved, not yet used memory for incremental builds and online changes.
After the first build, the already used memory is approximately equal to
the highest used address (see below). The largest contiguous memory gap
(see below) still corresponds approximately to the difference to the total
allocated memory. However, as the number of incremental builds and online
changes increases, the number of memory gaps also increases, and the
largest contiguous memory gap becomes smaller.
● “Memory area <n>”: Contents of the individual reserved memory areas
Background: It depends on the PLC which data and code is stored in which
memory areas. For example, code and data are located in the same area
on the ctrlX CORE. For the addresses %I, %M, and %Q, memory is always
reserved, even when a variable is not assigned to an address. After cleaning
the application, the memory is reallocated completely. In this case, small
gaps could result from the predefined alignment (normally 8). Larger gaps

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 267 / 1158
Downloading the Application Code, Logging in, and Starting the PLC

result from changing a date without cleaning, for example by increasing an


array area. In this case, only the affected POUs are recompiled. Furthermore,
in the case of an online change, the memory is used only for new variables
and new code. Memory that was previously reserved by deleted variables
and code is made available again. As a result, memory fragmentation can
occur after many incremental builds and online changes. This creates many
small gaps that might not be usable at all in some cases. To clarify how
much memory is safely available, the "largest contiguous memory gap" of the

Transferring the application to the PLC


memory area is output during code generation.
– “highest used address” (Byte) : This is the highest reserved address in
the entire allocated memory area. During the first build after a "Clean"
operation, the memory addresses are output to variables in ascending
order, taking into consideration the alignment (usually 8 bytes). As a
result, the highest address used at this time corresponds approximately
to the amount of memory used. The rest of the allocated memory area is
still completely available for incremental builds and online changes.
– “Largest contiguous memory gap” (in bytes): This is the memory size that
is available for backup.
Resulting gaps in the allocated memory are reused whenever possible
for other changes. When, for example, a global variable of type Byte
is added, it is placed in the first free byte of the memory. Even just
a small gap is enough for this. However, an FB instance, a variable of
the type structure or array, or the code for a POU has to be stored con-
tiguously and therefore occupies more memory accordingly. As a result,
they can be allocated only to the largest contiguous memory area. This is
why during code generation the "largest contiguous memory gap" that is
safely available is output (in bytes), as well as its percentage of the total
memory.
Note the options for generating applications.
See also
● ⮫ Chapter Dialog 'Properties - Application Build Options' on page 1053

Encrypting the application code


See also
● ⮫ Chapter 18.13 Encrypting the application on page 153

20.6 Downloading the Application Code, Logging in, and


Starting the PLC
In order to download the source code of your application to the PLC, you
must log in to the PLC with application. If there are several applications in the
project, then you must switch explicitly to the correct application first.
When you download an application to the PLC, PLC Engineering performs the
following checks:
The list of applications on the PLC is compared with the applications available
in the project. If they do not match, then you are prompted to download the
application that is not on the PLC yet or delete existing applications.
For "externally implemented" blocks in the application to be downloaded, PLC
Engineering checks whether these are available on the PLC. If they are not avail-
able, then the message "unresolved reference(s)" is printed to a dialog prompt
and to the message view. Then PLC Engineering compares the parameters (var-
iables) of the blocks in the application to be downloaded and the parameters
of the same-named blocks in the application that exists on the PLC (signature
check). If there are any discrepancies, then the message "invalid signature(s)"
is printed to a dialog prompt and to the message view.

R911403764, Edition 08 Bosch Rexroth AG


268 / 1158 ctrlX PLC Engineering
Generating Boot Applications

If the "Download Application Info" check box is selected in the application


properties, then additional information about the application contents are
downloaded to the PLC.
if multiple applications exist for the same device, then notice that the “I/O
Mapping” dialog contains the definition for which of the applications is used
for for the I/O mapping of the device.
See also
● ⮫ Chapter 33.2.6 “Application” object on page 763

Transferring an application and starting the program


Requirement: The application contains no errors and the communication set-
tings of the PLC are correct. The application does not exist yet on the PLC: The
application and the communication with the controller are not encrypted.
1. Select the required application in the device tree. Skip to Step 3 if you
have only one application.
2. Click “Set Active Application”.
🡆 The application name appears in bold typeface.
3. Click “Online 🠂 Login”.
🡆 A dialog prompts you whether the application should be created on the
PLC.
4. Click “Yes” to confirm.
🡆 The application is downloaded to the PLC.
5. Click “Debug 🠂 Start” or press the [F5] key.
🡆 The application is running on the controller.

20.7 Generating Boot Applications


A boot application is the application that is started automatically when the
controller is switched on or started. For this to happen, the application on the
controller must exist as a file <application name>.app.
For each application that is running on the controller, a boot application can
also be saved there.
By default, PLC Engineering generates the boot application automatically when
an application is downloaded and transfers them to the PLC. The defaults for
generating automatically are located in the “Boot application” category of the
application “Properties”. When logging in with a changed application, you are
still prompted whether or not to generate a new boot application.
In addition, you can create a (new) boot application at any time in online mode
by clicking “Online 🠂 Create boot application”.
You can create and save a local copy of a boot application in offline mode as
well. Then, you can copy this application to the controller with external tools.
In this way, you transfer an application to the controller, even when there is no
connection to PLC Engineering.

Generating boot applications on the controller automatically and explicitly


Requirement: Offline mode; the application is compiled without errors. The
connection to the controller is configured and the controller is running. The
application is active. The following steps demonstrate the options:
1. Click “Online 🠂 Login”.
🡆 The boot application file <application name>.app is created on the
controller with the checksum of the boot application <application
name>.crc.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 269 / 1158
Generating Boot Applications

2. Click “Online 🠂 Create Boot Application” explicitly.


🡆 The files on the controller are replaced by new files.
3. Log out.
4. Change the application. Log back in to the controller.
🡆 You are prompted whether an online change should be performed.
You see the “Update boot application” check box in the same dialog
box. This is cleared by default, but this can be changed in the “Boot

Transferring the application to the PLC


Application” category of the application “Properties”.
5. Keep the check box cleared and continue login.
🡆 A new boot application file is not created.
6. Log out. Close the project. Stop the controller. Restart the controller.
🡆 The boot application that was created above is running on the con-
troller.
You can save the encrypted boot application on the controller. These settings
are defined in the “Application Build Options” category of the application
“Properties”.
See also
● ⮫ Chapter Dialog 'Properties - Application Build Options' on page 1053
● ⮫ Chapter Dialog 'Properties' - 'Boot Application' on page 1049
● ⮫ Chapter 23.2 Executing the Online Change on page 315
● ⮫ Chapter Command 'Create Boot Application' on page 942

Creating boot applications in offline mode


Requirement: Offline mode; the application is compiled without errors. You
want to generate a boot application for an application and save it in the file
directory for copying it later to the controller by using external tools (without
PLC Engineering).
1. Click “Online 🠂 Create Boot Application”.
🡆 A dialog box opens for specifying a save location in the local file
system.
2. Click a save path and then click “Save”.
3. If the application has changed since the last boot application was gener-
ated, then you are prompted to use a new code for the boot application.
In this case, click “Yes”.
🡆 The “Save as” dialog box opens.
4. Select a directory and click “Save”.
🡆 The boot application file <application name>.app is created in the given
path.
You are prompted whether or not the build information for the boot
application is saved.
5. Click “Yes”.
🡆 The build information is saved to the project directory as a file named
<application name>.compileinfo. It is a requirement for a possible
online change the next time the application is updated. Please note:
Clicking “Build 🠂 Clean” deletes this file.
See also
● ⮫ Chapter Command 'Create Boot Application' on page 942

R911403764, Edition 08 Bosch Rexroth AG


270 / 1158 ctrlX PLC Engineering
Generating Boot Applications

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 271 / 1158
Using Breakpoints

21 Testing and debugging


21.1 Testing and troubleshooting – General information
PLC Engineering provides various options for testing your application and
detecting errors. You can start your application in simulation mode, even
without connecting any hardware. Use breakpoints and commands for a step-
by-step processing of specific points in the program. Writing values to variables
can affect the running program.
Commands are provided that reset your application differently. This ranges
from resetting only non-persistent variables to completely resetting the control

Testing and debugging


to the delivery state.
Also refer to
● ⮫ Chapter 21.2 Testing in Simulation Mode on page 271
● ⮫ Chapter 21.3 Using Breakpoints on page 271
● ⮫ Chapter 21.4 Stepping Through a Program on page 275
● ⮫ Chapter 21.6 Resetting applications on page 281

21.2 Testing in Simulation Mode


Use simulation mode for testing and debugging your program when you do
not have a physical target device. In this mode, the application is started on a
simulated device.
The command is available only when you are logged out.
Requirement: You program contains no errors (compiler error messages or
compile errors) and you are not logged in.
1. Activate simulation mode as follows:
● Click “Online 🠂 Simulation”, or
● Right-click the controller in the device tree and click “Simulation”.
🡆 The name of the controller in the device tree is displayed in italics.
In the status line, "Simulation" appears highlighted in red. The
“Simulation” command is selected in the main menu.
2. Click “Online 🠂 Login”.
3. When logging in for the first time with the active application, you will
be prompted whether the application "Sim.<device name>.<application
name>" should be created and loaded. Click “Yes” to confirm.
🡆 The application is logged onto the controller. This is marked in the
device tree by a warning symbol ( ) in front of the controller.
4. Now you can check and correct the program flow with the commands
provided in the main menu in “Debug”.
5. Log out from the controller and end the simulation mode.
See also
● ⮫ Chapter Command 'Simulation on page 953

21.3 Using Breakpoints


Breakpoints are commonly used for debugging programs. PLC Engineering sup-
ports breakpoints in all IEC editors.
You can set breakpoints at specific positions in the program to force an execu-
tion stop and to monitor variable values. You can set special data breakpoints
to halt program execution when the value of a specific variable changes.

R911403764, Edition 08 Bosch Rexroth AG


272 / 1158 ctrlX PLC Engineering
Using Breakpoints

The halt at a breakpoint or data breakpoint can be linked to additional condi-


tions. You can also redefine breakpoints and data breakpoints as execution
points where specific code is executed instead of stopping the program.
The “Breakpoints” view provides an overview of all defined breakpoints. It also
includes additional commands for processing batch changes to multiple break-
points.
In the editor, the following symbols identify the status of a breakpoint or execu-
tion point:
● The breakpoint is enabled.
● The breakpoint is disabled.
● Breakpoint is set in another instance of the POU open in the editor.
● The program is halted at the breakpoint.
● The conditional breakpoint is enabled.
● The conditional breakpoint is disabled.
● The execution point is enabled.
● The execution point is disabled.
● The conditional execution point is enabled.
● The conditional execution point is disabled.
● The data breakpoint is enabled.
● The data breakpoint is disabled.
● Halt at data breakpoint
● The data execution point is enabled.
● The data execution point is disabled.
● Halt at data execution point
● The conditional data execution point is enabled.
● The conditional data breakpoint is enabled.
See also
● ⮫ Chapter Command 'Breakpoints' on page 902

Data breakpoints
The function of data breakpoints depends on the target system. Currently, data
breakpoints are possible only with the ctrlX CORE.
Program execution stops at a data breakpoint when the value of a particular
variable or memory address changes. As with ordinary breakpoints, the halt can
be linked to an additional condition, or specific code can be processed instead
of the halt (converted to a data execution point).
You set a data breakpoint either by means of the “New Data Breakpoint”
command in the “Debug” menu or by means of the “New” button in the
“Breakpoints” view. You specify a qualified variable name or a memory address
directly which is to be monitored for changes in its value.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 273 / 1158
Using Breakpoints

Example
In the following sample code, the memory of the variable iNumber is over-
written unintentionally. However, a data breakpoint at the variable iNumber
will detect when its value changes. The processing then stops with a corre-
sponding message at the array access, which overwrites the variable value:
Idx = 7. See also below: "Setting a data breakpoint".
PROGRAM PLC_PRG
VAR
Idx : INT;
Ary : ARRAY[0..3] OF BYTE;

Testing and debugging


iNumber : INT := 55;
END_VAR
FOR idx := 0 TO 6 DO
Ary[idx] := 0;
END_FOR

Breakpoints in applications with multiple tasks


Basically, debugging is not possible for multiple tasks at the same time. While
you are working on a task with breakpoints or stepping, breakpoints are
ignored in other tasks.
If a POU containing a breakpoint is used by multiple tasks, then only the debug
task is halted because it reaches the breakpoint first. All other tasks continue.
The “Call Stack” dialog shows which task is currently halted.
If you need a breakpoint to affect only one specific task, then you can define
this in the breakpoint properties.
Breakpoints operate separately for each application so that a "HALT ON BP"
does not affect any other applications. This applies also to parent/child appli-
cations, even if the breakpoint is set in a block that is used by several applica-
tions and whose code is located only once on the PLC.
The I/Os that are called by the debug task are not
NOTICE
updated at a halt in the breakpoint, even if you select
the “Refresh I/Os in Stop” check box in the PLC settings.
If the application stops at a breakpoint on the PLC, then an online change or
download causes all tasks to halt which means the PLC will stop. In this case,
PLC Engineering prompts you whether or not to continue with the login.
See also
● ⮫ Chapter Command 'Call Stack' on page 906

Setting a single breakpoint (example in ST editor)


Requirement: The application is in online mode and running. The operating
mode is “Debug”.
1. In the editor, open a POU programmed in structured text (ST).
2. Place the cursor in the line where a breakpoint will be set.
3. Click “Debug 🠂 Toggle Breakpoint” or press [F9].
🡆 The line is marked in red and identified by the "breakpoint enabled"
symbol ( ). If the program is halted at the breakpoint, then the line is
marked by the "stop at breakpoint" symbol ( ). The processing of the
program is stopped. This is identified in the status line by the HALT ON
BP status highlighted in red.
4. Click “Debug 🠂 Start” or press [F5].
🡆 The program continues.

R911403764, Edition 08 Bosch Rexroth AG


274 / 1158 ctrlX PLC Engineering
Using Breakpoints

5. Set more breakpoints and check the variable values at the break position.
6. Place the cursor in the line where a breakpoint should be removed.
7. Click “Debug 🠂 Toggle Breakpoint” or press [F9].
🡆 The marking disappears. The breakpoint is deleted.
See also
● ⮫ Chapter Command 'Toggle Breakpoint' on page 957

Defining a breakpoint condition (example in ST editor)


1. In the editor, open a POU programmed in structured text (ST).
2. Place the cursor in the line where a breakpoint will be set.
3. Click “Debug 🠂 New Breakpoint”.
🡆 The “Breakpoint Properties” dialog opens.
4. Click the “Condition” tab.
5. Click “Break when the hit count is a multiple of” in the “Hit Count” list
box.
Specify the value "5" in the field to the right.
6. In addition, you can define a Boolean condition for when the breakpoint
should be active. Select the “Break, when true” check box. Specify a
Boolean variable in the text field to the right.
7. Select the “Enable breakpoint immediately” check box.
8. Close the dialog.
🡆 The line is marked red and identified by the "conditional breakpoint
enabled" symbol ( )
Monitor the running program. As long as the Boolean variable for the condition
is FALSE, the breakpoint condition is not fulfilled and the program continues
to run. If you set the variable to TRUE, then the condition is fulfilled and the
program halts at the breakpoint every 5th pass.
See also
● ⮫ Chapter 33.4.9 Dialog 'Breakpoint Properties' on page 1040

Defining an execution point (example in ST editor)


1. In the editor, open a POU programmed in structured text (ST).
2. Place the cursor at the position for an execution point.
3. Click “Debug 🠂 New Breakpoint”.
🡆 The “Breakpoint Properties” dialog opens.
4. Click the “Execution Point Settings” tab.
5. Select the “Execution point” option.
In the “Execute the following code” field, type the following statement:
iCounter := iCounter + 1;
In the “Print a message in the device log” field, type the following text:
Execution point reached {iCounter}
6. Close the dialog.
When the program reaches the execution point, it does not halt, but executes
the code defined above. In addition. a message is issued to the device log.
See also
● ⮫ Chapter 33.4.9 Dialog 'Breakpoint Properties' on page 1040

Setting a data breakpoint


Requirement: The application is in online mode and running.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 275 / 1158
Stepping Through a Program

1. Click “View 🠂 Breakpoints”.


2. Click “Debug 🠂 New Data Breakpoint”.
3. Click the button in the “New breakpoint” dialog (“Data” tab.
4. In the “Input assistant” dialog (“Watch Variables” tab), select the varia-
bles for which the program should halt when changed.
As an alternative, specify the qualified name of the variable on the “Data”
tab directly in the input line. Example: PLC_PRG.iNumber. The exact
number of bytes to be monitored is specified as the “Size”. A value that
corresponds to the data type is set here automatically by default. You can
also specify fewer bytes to be monitored.

Testing and debugging


5. In the “Breakpoints” view, select the line with the data breakpoint and
click the button.
🡆 The line is marked and identified by the "Data breakpoint enabled"
symbol ( ). When the program reaches the data breakpoint (meaning
when the value of the selected variables changes), the program proc-
essing halts. In the implementation part of the POU, the next line is
identified by an arrow . This is identified in the status line by the
HALT ON BP status highlighted in red.
6. Click “Debug 🠂 Start” or press [F5].
🡆 The program continues running and halts again when the value of the
variables changes again.
See also
● ⮫ Chapter 33.4.9 Dialog 'Breakpoint Properties' on page 1040

21.4 Stepping Through a Program


You can step through an application and navigate the code. This is useful to
check the status of your code at runtime. You can examine the call process,
track variable values, or locate errors.
Stepping commands are provided in the “Debug” menu for this purpose. The
commands become available when you set breakpoints in online mode and
then halt execution at a breakpoint: the application is in “HALT ON BP” state
(debug mode). During debug mode, the current break position is highlighted in
yellow and marked with the symbol in the text editors.

Switching to debug mode


1. Download your application to a controller.
🡆 The application is highlighted in green. PLC Engineering and the editors
of the POUs are in online mode.

R911403764, Edition 08 Bosch Rexroth AG


276 / 1158 ctrlX PLC Engineering
Stepping Through a Program

2. In the POUs, set breakpoints at the locations in the code that you want to
examine.
🡆 All breakpoints are listed in the “Breakpoints” view.
3. Start the application.
🡆 The application starts and the code is processed until the first break-
point.
Now the application is in debug mode. In the device tree, the applica-
tion is labeled with “[halt on breakpoint]”. The status bar provides
information about the operating state:

The editor was opened at the current break position. The line of code
with an active breakpoint where program execution was halted is high-
lighted in yellow and marked by the symbol. This statement high-
lighted in yellow has not been executed yet.

Now you can select the various stepping commands or display the call
tree.
Alternatively, you can first start the application and then set a breakpoint.

Behavior of the stepping command in the 'Debug' menu


● Command “Step Over”
The statement at the breakpoint position is executed. Program execution
halts before the next statement in the POU.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 277 / 1158
Forcing and writing of variables

If the statement contains a call (from a program, function block instance,


function, method, or action), then the subordinate POU is processed com-
pletely in one step.
● Command “Step Into”
The statement at the breakpoint position is executed. Program execution
halts before the next statement.
If the statement contains a call (from a program, function block instance,
function, method, or action), then the program execution jumps to this sub-
ordinate POU. The first statement there is executed and the program execu-
tion halts before the next statement. The new current breakpoint position is
then in the called POU.

Testing and debugging


● Command “Step Out”
The command executes the POU from the current breakpoint position to the
end of the POU and then jumps back to the calling POU. Program execution
halts at the calling position (in the line with the call).
If the current breakpoint position is in the main program, then the POU
is run through to the end. Then the program execution jumps back to the
beginning (to the program start at the first line of code in the POU) and
halts there.
● Command “Run to Cursor”
First set the cursor at any line of code and then execute the command. The
program is executed from the current breakpoint position and halts at the
current cursor position without executing the code of this line.
● Command “Set Next Statement”
First set the cursor at any line of code (also before the current breakpoint
position) and then execute the command. The statement marked with the
cursor is executed next. All statements in between are ignored and skipped.
● Command “Show Next Statement”
If you do not see the current breakpoint position, then execute the com-
mand. Then the window with the current breakpoint position comes into
focus and the breakpoint position is visible.
Click “View 🠂 Call Stack” to completely show the previous call tree for the
breakpoint position currently reached in the program processing.
The “Call Stack” view shows the location of the block in the call structure of
the program at all times, even before compiling the application.

See also
● ⮫ Chapter Command 'Step Into' on page 958
● ⮫ Chapter Command 'Step Over' on page 957
● ⮫ Chapter Command 'Step Out' on page 958
● ⮫ Chapter Command 'Run to Cursor' on page 958
● ⮫ Chapter Command 'Set Next Statement' on page 959
● ⮫ Chapter Command 'Show Next Statement' on page 959
● ⮫ Chapter Command 'Call tree' on page 906

21.5 Forcing and writing of variables


Unusual changes to variable values in an application cur-
CAUTION
rently running on the controller can lead to undesired
behavior of the controlled machinery.
Evaluate possible dangers before forcing variable values.
Take the respective safety precautions. Depending on the
controlled machinery, the result may lead to damage to
machinery and equipment or injury to health and life of
personnel.

R911403764, Edition 08 Bosch Rexroth AG


278 / 1158 ctrlX PLC Engineering
Forcing and writing of variables

In PLC Engineering, variable values in the PLC can be changed in online mode.
It is distinguished between forcing and writing of a previously prepared value.
Writing is executed with the command “Write values”, [Ctrl] + [F7] and sets the
variable once to the prepared value. The program can thus overwrite the value
again at any time.
Forcing is executed with the command “Force values”, [F7] and permanently
sets the prepared value. For more information, see below.
Preparing a value for forcing or writing is possible at various points:
● Declaration part: “Prepared value” field
● Implementation part of the FBD/LD/IL editor: Inline monitoring field
● Monitoring window: “Prepared value” field
See below for instructions. If you want to prepare a new value for a variable
that has already been forced, the “Prepare value” dialog opens for this purpose
with options for handling the current force value.

Functional forcing principle


Setting the prepared value to the respective variable is done at the beginning
and end of each task cycle (or processing loop in case of other task types).
The processing sequence in each cycle of a task is as follows:
1. Reading in the inputs
2. Forcing: Prior to the first program call, all prepared values are written from
the runtime system to the variables, regardless of whether they are used by the
task or not.
3. Processing of the IEC code
4. Forcing: After the last program call, all prepared values are written to the
variables by the runtime system, regardless of whether they are used by the
task or not.
5. writing of the outputs
Also note: It is possible that a forced variable is temporarily assigned a different
value during code processing in the cycle as the IEC code performs an assign-
ment. The variable then receives the forced value again only at the end of the
cycle. Also by the write access of a client to symbols of the application the
variable value can be overwritten in the middle of the cycle. For this case,
see the option “Variable access synchronous to IEC task” in the “properties”
of the device object, respectively the setting “Configure synchronization with
IEC tasks ” in the symbol configuration. This enables synchronization of write
accesses by clients with the task cycle, which is supported by the PLCHandler.
Forced values are marked with the symbol . PLC Engi-
NOTICE
neering continues forcing until it is explicitly cancelled by
the user through one of the following actions:
− Cancel the command “Cancel forcing for all values”
− Canceling the force in the “Prepare value” dialog
− Log out of the application
If there are still forced variables when logging out, a
dialog opens with the query whether forcing should
be cancelled for all variables. If you answer this with
“No”, the forced values apply again the next time you
log in.
Also refer to
● ⮫ Chapter 18.21 Task configuration on page 208
● ⮫ Chapter “Properties” - “Options” dialog on page 1059
● ⮫ Setting: Configure synchronization with IEC tasks on page 794

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 279 / 1158
Forcing and writing of variables

Forcing in the declaration section


Prerequisite: Your application contains a function block with declarations. The
application is in online mode.
1. Open the POU in the editor by choosing the command “Project 🠂 Edit
Object”.
2. In the declaration part of the editor, double-click in column (1) “Prepared
Value” of a variable.
🡆 The field can be edited and a value can now be entered. If it is a
boolean variable, change the value by clicking on the field.

Testing and debugging


3. Execute step 2 for further variables.
4. Click on “Debug 🠂 Write values”.
🡆 The variable values are overwritten with the prepared values. The
values are marked with the symbol .

Variable values can also be forced in the “Watch” view.

Forcing in the implementation section


Prerequisite: The application is in online mode.
1. Open the POU in the editor by choosing the command “Project 🠂 Edit
Object”.
2. In the implementation part of the editor, double-click an inline monitoring
field (1).
🡆 The “Prepare values” dialog opens.
3. Enter the new value in the field “Prepare a new value for the next write or
force operation”.
🡆 The prepared value is displayed in the “Inline monitoring” field.

R911403764, Edition 08 Bosch Rexroth AG


280 / 1158 ctrlX PLC Engineering
Forcing and writing of variables

4. Click on “Debug 🠂 Write values”.


🡆 The variable value is overwritten with the prepared values. The values
are marked with the symbol .

View and edit all forced variables 1 list


Prerequisite: The application is in online mode. Multiple variables are in the
forced state.
1. Click “View 🠂 Watch 🠂 Watch All Forces”.
🡆 The “Watch All Forces” view opens. It contains all currently forced vari-
ables of the application in the form of a watch list.
2. Select all the lines in the list and select “Unforce 🠂 Unforce and retain all
selected values” in the selection list on the upper left in the view.
🡆 Forcing is canceled for the variables. They obtain the values they had
before forcing.

Forcing a function block input in CFC


Prerequisite: An application has a CFC POU that contains a function block, and
the application is in offline mode.
This kind of forcing uses a data breakpoint internally
NOTICE
and is therefore different from forcing with the “Force
Values” command or [F7].
Values that were forced by the command “Force FB
Input” do not respond to the commands “Show All
Forces” or “Unforce Values”.
1. Open the editor of the CFC POU by double-clicking the object in the tree.
2. Log in to the application on the target device.
3. If you are using compiler version 3.5.11.x or 3.5.12.x: Activate the forcea-
bility for the desired function block. Select the POU element in CFC and
click “CFC 🠂 Prepare POU Element for Forcing”.
4. In CFC, select the input of the POU and click “Force FB Input” in the
context menu.
🡆 The “Force Value” dialog opens.
5. Set a new value for the input. Example in the case of a TON function block:
FALSE for the boolean input IN, or t#4s for the input PT (TIME). Confirm
the dialog with “OK”.
🡆 The set value is forced immediately. A green circle is displayed at the
upper left of the POU element and the name of the input in the element
is highlighted in green. For a Boolean value, a small monitoring view
with the value also opens at the input. In the monitoring views, the
forced value is displayed, for example in the “Value” column, as in the
declaration part.
6. To remove the forced value, click “Force FB Input” again. In the “Force
Value” dialog, select the “Remove value” option.
🡆 Forcing is canceled. The input gets the current value from the con-
troller.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 281 / 1158
Resetting applications

Also refer to
● ⮫ Chapter Command 'Prepare Box for Forcing' on page 995
● ⮫ Chapter Command 'Force Function Block Input' on page 996
● ⮫ Chapter 33.4.10 Dialog 'Prepare Value' on page 1041
● ⮫ Chapter Command 'Force Values' on page 959
● ⮫ Chapter Command 'Unforce Values' on page 960
● ⮫ Chapter Command 'Write Values' on page 960
● ⮫ Chapter 22.3.3 Using Watch Lists on page 297

21.6 Resetting applications

Testing and debugging


Resetting the application stops the program and resets the variables to their
initialization values. Depending on the type of reset, retain variables and persis-
tent variables are also reset.
● Reset warm: All variables are reset, except RETAIN and PERSISTENT varia-
bles.
● Reset cold: All variables are reset, except PERSISTENT variables.
● Reset origin: All variables are reset
● Reset Origin Device: All variables are reset and all applications are deleted.
The following example program and instructions show the response of the
various resets.
Also refer to
● ⮫ Chapter 18.22.3 Lifespan of variables when calling online commands
on page 214

Sample program

Declaration

VAR
iVar: INT := 0;
END_VAR
VAR RETAIN
iVarRetain: INT :=0;
END_VAR
VAR PERSISTENT
iVarPersistent : INT:= 0;
END_VAR

Implementation

iVar := 100;
iVarRetain := 200;
iVarPersistent :=300;
1. Insert the “Persistent Variables” object below the application and open it
in the editor.
2. Select “Create 🠂 Build”.
3. Select “Declaration 🠂 Add all instance paths”.
🡆 The instance path of the persistent variables is inserted.
4. Load the application to the control.

Executing a "Reset warm", "Reset cold" and "Reset origin"


Prerequisite: The example program runs on the control.

R911403764, Edition 08 Bosch Rexroth AG


282 / 1158 ctrlX PLC Engineering
Sequential control

1. Select the command “Online 🠂 Login” to switch to online mode.


2. Monitor the variables iVar, iVarRetain and iVarPersistent.
3. Click “Online 🠂 Reset Warm”.
🡆 You are prompted whether you really want to execute the command.
4. Select “Yes” to confirm the dialog.
🡆 The application is reset. The iVar variable is set to the initialization
value 0. The other two variables retain their values.
5. Click “Online 🠂 Reset Cold”.
🡆 You are prompted whether you really want to execute the command.
6. Select “Yes” to confirm the dialog.
🡆 The application is reset. The iVar and iVarRetain variables are set
to the initialization value 0. The iVarPersistent variable retains its
value.
7. Click “Online 🠂 Reset Origin”.
🡆 You are prompted whether you really want to execute the command.
8. Select “Yes” to confirm the dialog.
🡆 The application is reset. All variables are reset to their initialization
values.
Also refer to
● ⮫ Chapter Command 'Reset Warm' on page 949
● ⮫ Chapter Command 'Reset Cold' on page 948
● ⮫ Chapter Command 'Reset Origin' on page 949
● ⮫ Chapter Command 'Reset Origin Device' on page 950

21.7 Sequential control


Using sequential control, you can monitor the processing of the application
program. The sequential control is available for the speech editors ST, FBD, LD
and CFC.
With an activated sequential control, PLC Engineering displays the variable
values and results from function calls and operations at the respective proc-
essing location and time. In this way, the exact lines of code and networks
that run through the current cycle are marked in colors. Compare: In standard
monitoring, PLC Engineering returns only the value that a variable has between
two processing cycles.
The sequential control operates in all currently visible parts of the editor
window. “Sequential control enabled” is displayed in the status line as long
as the function is active and the sequential control positions (processed parts
of code) are visible in an editor window.
You can write values in the declaration part and in the implementation part,
forcing is not possible.
The values are written at the end of the current cycle.
NOTICE

When enabling the sequential control, the cycle time of


NOTICE
the application is prolonged!
When “Confirmed online mode” is selected in the com-
munication settings, a dialog prompt appears when
switching on the sequential control to cancel the opera-
tion.
When sequential control is activated, it is not possible to
use breakpoints or incrementatlly process the program.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 283 / 1158
Sequential control

Also refer to
● ⮫ Chapter 33.1.1 Tab “Communication” on page 735
● ⮫ Chapter Command 'Flow Control' on page 961

Display of the sequential control in different language editors:


By default, PLC Engineering displays the flow control positions of the proc-
essed parts of code as green fields. Unprocessed parts of code are displayed in
white.
Note that the displayed value of an unprocessed code position is an ordinary
monitoring value. This is the value between two task cycles.

Testing and debugging


In network editors, PLC Engineering marks the processed networks with bars
on the left edge in the flow control color.
In LD, PLC Engineering displays the currently processed connecting lines in
green and all others in gray. The actual value of the connection is also dis-
played: TRUE by a bold blue line, FALSE by a bold black line, and unknown
or analog values by thin black lines. Due to the combination of the relevant
information, this might lead to dashed lines.

In IL, PLC Engineering uses two fields for each instruction to display actual
values. One to the left of the operator with the current accumulator and one to
the right of the operands with the operand value.

R911403764, Edition 08 Bosch Rexroth AG


284 / 1158 ctrlX PLC Engineering
Checking the Task Deployment

21.8 Determining the Current Processing Position with the


Call Stack
You can use the call stack for determining the current position of the program
flow. This function is very useful when stepping into programs.
Requirement: The application is in online mode. The program is halted at a
breakpoint or you are stepping into it.
Open the call stack by clicking “View 🠂 Call Stack”.
🡆 The call stack opens. The list shows the current location with the com-
plete call path.
The call stack is also available in offline mode and normal online mode (without
using debugging functions). In this case, it receives the last displayed location
during a stepped execution, but it is displayed in gray.
See also
● ⮫ Chapter Command 'Call Stack' on page 906
● ⮫ Chapter 21.4 Stepping Through a Program on page 275

21.9 Checking the Task Deployment


The Tab “Task Deployment” of the device editor indicates in an overview the
tasks that process the individual inputs and outputs of the I/O mapping of your
application and the priority with which they do so. You can check here whether
an unintentional overwriting of values is caused, which can lead to undefined
values.
1. Generate code for the application: to do this select, for example, the
command “Build 🠂 Generate Code”.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 285 / 1158
Checking the Task Deployment

2. Open the device editor by double-clicking on the device object in the


device tree. Select the “Task Deployment” tab.
🡆 You obtain a display of the inputs and outputs of your application and
the assignment of the tasks and their priorities. See the description of
the “Task Deployment” tab for details.
See also
● ⮫ Chapter 33.1.15 Tab 'Task deployment' on page 753
● ⮫ Chapter 17.2 Device tree and device editor on page 111
● ⮫ General information about I/O mapping on page 119

Testing and debugging

R911403764, Edition 08 Bosch Rexroth AG


286 / 1158 ctrlX PLC Engineering
Checking the Task Deployment

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 287 / 1158
Changing values with recipes

22 Application at runtime
22.1 Application at runtime – General information
When the application is running on the PLC, there are functionalities in the
PLC Engineering development system for monitoring and changing the variable
values, as well as for recording and saving their history.
There are also possibilities to retrieve certain information from the PLC, to view
the PLC logbook, to display a coredump, and to monitor the timing behavior of
the tasks.
Observe to restrict the access on the running application via online commands

Application at runtime
from the engineering system in case of critical machine states. For this pur-
pose, certain system variables are available via a module of the Component-
Manager library.

22.2 Changing values with recipes


Use recipes to change or read recipes values for a specific set of variables
(recipe definition) on the control at the same time.
Define the basic settings for recipes, such as storage location and format, in
the “Recipe manager” object. Insert one or more recipe definitions below this
object. A recipe definition comprises one or more recipes for the contained
variable. The recipe consists of specific variable values.
Recipes can be saved to a file or directly written from files to the control.
Recipes can be loaded via the PLC Engineering development interface, the
visualization element, or the application program.
Recipe use on remote devices
The variable values from recipes are transferred automatically to and from
another controller when they are data source variables and a data source
exchange is configured. Reading/writing is done synchronously. Therefore, PLC
Engineering updates all variables in a recipe at the same time. After reading or
writing, you can use the call g_RecipeManager.LastError to check whether
or not the transfer was successful (g_RecipeManager.LastError = 0).
Also refer to
● ⮫ Chapter 33.2.22 Object 'Recipe Manager' on page 784
● ⮫ Chapter 33.2.23 Object 'Recipe Definition' on page 787
● ⮫ Chapter 19.6 Data connection with data sources on page 241

Using recipes in the PLC Engineering user interface


The PLC Engineering development interface provides commands for generating
recipes as well as read/write in online mode.
Also refer to
● ⮫ Chapter 33.3.20 “Recipes” menu on page 1017

Using recipes in applications


At runtime, recipes can be used in the user program and visualization elements.
In the user program, you use the methods for the function block
RecipeManCommands from the library RecipeManagement. In the visualization,
recipes are used via the input configuration (internal command) of visualization
elements.

R911403764, Edition 08 Bosch Rexroth AG


288 / 1158 ctrlX PLC Engineering
Changing values with recipes

During the initialization process, the recipe management reads the values of
the variables that are defined in the recipe definition. This operation takes
place at the end of the initialization phase of the application. At this point, all
initial values of the application variables are set. This is performed to initialize
missing values from recipe files correctly.
Also refer to
● ⮫ RecipeManCommands
● ⮫ Input configuration

Creating recipes
1. Select the “Application” object in the device tree.
2. Click “Project 🠂 Add Object 🠂 Recipe Manager”.
🡆 PLC Engineering adds the recipe manager to the device tree.
3. Select the “Recipe Manager” object in the device tree.
4. Click “Project 🠂 Add Object 🠂 Recipe Definition”.
🡆 PLC Engineering adds the recipe definition below the recipe manager.
5. To open the editor of the recipe definition, double-click on the object.
6. Double-click on the blank field below “Variable” in the editor. Specify the
name of a variable that you will define a recipe. The input assistant can be
used: button.
7. Select “Recipes 🠂 Add a new recipe” and enter a name for the new
recipe.
🡆 A column with the recipe name is displayed in the editor.
8. Enter the variable value for this recipe in this field.
9. Insert additional fields if required.
10. Select a variable value of the recipe and click on “Recipes 🠂 Save recipe”.
Select storage location and file name.
🡆 PLC Engineering saves the recipe in the format defined in the recipe
manager.
Also refer to
● ⮫ Chapter 33.2.22 Object 'Recipe Manager' on page 784
● ⮫ Chapter 33.2.23 Object 'Recipe Definition' on page 787
● ⮫ Chapter 33.3.20 “Recipes” menu on page 1017

Loading a recipe from a file


Prerequisite: A recipe manager is available in the application. In a recipe defini-
tion, there is a “myRec” recipe with variable values. A myRec.txt recipe file is
located on the file system and contains the entries for this recipe.
Example of the recipe file:
PLC_PRG.bVar:=0
PLC_PRG.iVar:=2
PLC_PRG.dwVar:=35232
PLC_PRG.stVar:='first'
PLC_PRG.wstVar:='123443245'
1. Double-click the “Recipe Definition” object in the device tree to open the
tabular editor for the definition of the individual recipes.
🡆 There is a myRec column with the current values for this recipe.
2. Edit the myRec.txt file in an external text editor and replace the variable
values with other values that you want to load into the recipe definition in
PLC Engineering. Save the file.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 289 / 1158
Changing values with recipes

3. Click on the “myRec” column in the recipe definition and select “Load
recipe” from the context menu.
🡆 A dialog prompt notifies you about the possibly needing to perform an
online change when logging in again. An online change is necessary
when you change the current values of the recipe variables by loading
the recipe.
4. Click on “Yes” to close the dialog (continue). Select the myRec.txt file
from the file explorer for loading.
🡆 The recipe values in the recipe definition are updated according to the
values read in the file.

Application at runtime
If you want to overwrite only individual recipe variables with new values, then
remove the values for the other variables before loading to the recipe file.
Entries without value definitions are not read, and therefore updating leaves
these variables unchanged on the PLC and in the project.
For values of the data type REAL/LREAL, the hexadecimal value is also written
to the recipe file in some cases. This is necessary so that the exact identical
value is restored when converting back. In this case, change the decimal value
and delete the hexadecimal value.
Also refer to
● ⮫ Chapter “Load Recipe” command on page 1018
● ⮫ Chapter 'Load and write recipe' command on page 1019

Recipe management on the controller; memory usage


If the option “Recipe management in the PLC” is disabled, the recipe manager
and recipe definitions do not use any memory on the control anymore.
If this option is enabled, code is generated for the recipe manager and all
recipe definitions and this code is stored on the control. The amount of
memory consumed primarily depends on the number of recipes and their
variables as well as on the data type of the variables. Whether the fields of
the recipe definition are filled is important as well. The memory consumption
of recipes cannot be calculated. It has to be determined empirically when
required. The following table merely provides some guiding principles.
Table 3: Memory Usage for PLC Engineering V3 SP6 with ctrlX CORE Controller
Code size (bytes) Data size (bytes) Total (bytes)
Recipe definition 194406 79400 267352
with 100 INT varia-
bles
Recipe definition 238318 121284 459344
with 200 INT varia-
bles
Recipe definition 282230 163084 543856
with 300 INT varia-
bles
Recipe definition 192742 69884 343168
with 100 BOOL
variables
Recipe definition 235446 101568 436872
with 200 BOOL
variables
Recipe definition 278146 133284 510072
with 300 BOOL
variables

R911403764, Edition 08 Bosch Rexroth AG


290 / 1158 ctrlX PLC Engineering
Changing values with recipes

Code size (bytes) Data size (bytes) Total (bytes)


Recipe definition 203278 870084 1154000
with 100 String
variables
Recipe definition 255570 1709784 2973296
with 200 String
variables
Recipe definition 307886 2549484 2964112
with 300 string
variables

Loading recipe values from the controller


You can apply recipe values on the controller to recipe definitions in the
project, even if these definitions have been modified in the project.
Prerequisite: The option “Reciple management in the PLC” is enabled.
1. Create a recipe definition RecDef1 in the project, containing the varia-
bles PLC_PRG.ivar and PLC_PRG.bvar. Insert a recipe “R1”: Value for
PLC_PRG.ivar: 33, value for PLC_PRG.bvar: TRUE.
2. Log in to the controller and download the application.
🡆 The recipe file R1.RecDef1.txtrecipe is saved to the default direc-
tory of the controller ($PlcLogic$).
3. Log out again and add another variable in the recipe definition in the
project: PLC_PRG.dwvar.
4. Edit the recipe definition file R1.RecDef1.txtrecipe on the device by
changing the value for PLC_PRG.ivar from 33 to 34.
Moreover, add another recipe “R2” on the device. To do this, copy
the R1.RecDef1.txtrecipe and rename it to R2.RecDef1.txtrecipe.
Then edit this file and change the recipe values: PLC_PRG.ivar: 1,
PLC_PRG.bvar: FALSE.
🡆 Now two recipes “R1” and “R2” are available on the device. In the
project, there is only “R1”, and it also contains other values than “R1”
on the device.
5. Log in again with online change to the control.
6. Click “Load Recipes from Device” from the context menu.
🡆 A dialog prompt notifies you that executing the command at the next
login may trigger an online change, and that the recipes on the runtime
system will overwrite the recipes of the current recipe definition.
7. Confirm that you want to continue.
🡆 A dialog prompt notifies you that the recipe for PLC_PRG.dwvar loaded
on the device cannot yield a value from the controller.
8. Confirm that you want to continue.
🡆 The value of PLC_PRG.ivar in recipe “R1” of the recipe definition in
the project changes to 34. The recipe “R2” with the values 1 and FALSE
is also listed in the recipe definition now. PLC_PRG.dwvar remains in
the recipe definition.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 291 / 1158
Monitoring values

22.3 Monitoring values


22.3.1 Monitoring of values – General information
In runtime mode, the current variable values of a programming object can be
monitored at different places in a project. The following is what we refer to as
monitoring:
● Online view of the programming editor of an object: “Inline monitoring"
● Online view of the declaration editor of an object
● Object-independent, configurable watch lists
When you set the {attribute 'monitoring'...} pragma, you can monitor the results

Application at runtime
from function calls and the current variable values in property-type objects.
More options for recording current variable values:
− Reading and saving “Recipes”
− Record values on a timeline for displaying the history immediately or later:
trace and trend features
Also refer to
● ⮫ Chapter Attribute 'monitoring' on page 629
● ⮫ Chapter 22.3.3 Using Watch Lists on page 297
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter 22.4.1 Data recording with 'Trace' – General information
on page 298
● ⮫ Chapter 22.5.1 Data recording with 'Trend' – General information
on page 305

22.3.2 Calling of Monitoring in Programming Objects


When an application is running on the controller, the actual values of variables
are displayed in the editors of the POUs. This is how the values of variables are
monitored.
Requirement: The “Enable inline monitoring” option is activated in “Tools
🠂 Options” in the “Text Editor” category on the “Monitoring” tab.
1. Download an application to the controller and start it.
2. Click “Debug 🠂 Display Mode 🠂 Decimal”.
🡆 The display format of the actual values is set.
3. Click a programming object in the “Devices” view or “POUs” view.
🡆 The respective editor opens. Actual values of the variables are
refreshed continually for both the declaration and implementation.

Monitoring in the declaration editor

The actual value of an expression (1) is displayed in the “Value” column (3).

R911403764, Edition 08 Bosch Rexroth AG


292 / 1158 ctrlX PLC Engineering
Monitoring values

You can write and force a value in the “Prepared Value” (4) column. During the
forcing, the actual value is decorated with a red symbol ( ).
The expression of an interface reference can be expanded. If the interface
points to a global instance, then this global instance is displayed as the first
entry below the reference. Afterwards, if the interface reference changes, then
the displayed reference is collapsed.

Monitoring in the implementation (inline monitoring)


Inline monitoring is the display of the current variable value in the implementa-
tion.
Depending on the implementation language, the following displays are possible
in the implementation part:
● Variables have a window with the current value displayed after their name:

If you have prepared values for variables for forcing or writing, then they are
displayed in angle brackets in the inline monitoring view after the current
value.
After forcing, the respective values are identified by the symbol.
● Network editors and the CFC editor:
Connecting lines are displayed in color according to their actual Boolean
value (blue means TRUE, black means FALSE).
● LD editor:
The contact and coil elements are also marked.
For contacts and coils, a prepared value (TRUE or FALSE) is shown in a small
view next to the element.
● SFC editor:
Transitions with the value TRUE are displayed in color according to their
actual Boolean value (blue means TRUE, black means FALSE).
Active steps are displayed in blue.
Forced transition values are displayed in red in the implementation.
● IL tabular editor:
Current values are displayed in a separate column.

Monitoring in the ST editor

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 293 / 1158
Monitoring values

Monitoring in the LD editor

Application at runtime
Monitoring in the SFC editor

You can deactivate the inline monitoring function in “Tools 🠂 Options”, in the
“Text Editor” category on the “Monitoring” tab.
See also
● ⮫ Chapter ST Editor on page 379
● ⮫ Chapter ST editor in online mode on page 380
● ⮫ Chapter FBD/LD/IL Editor in Online Mode on page 414
● ⮫ Chapter SFC Editor in Online Mode on page 391
● ⮫ Chapter CFC Editor in Online Mode on page 430

Partial monitoring of an array


An expanded array shows the actual values for up to 1000 elements. However,
this can be confusing. In addition, an array can contain more than 1000 ele-
ments. Then it is helpful to limit the range of displayed elements. You can do
this in online mode in the following way.
Limiting the monitoring range
Requirement: An application is running. It contains a multidimensional array
variable with more than 1000 elements. Example: arrBig : ARRAY [0..100,
-9..10, -19..20] OF INT;
1. Click in the field of the “Data Type” column for the arrBig variable.
🡆 The “Monitoring Range” dialog opens.

R911403764, Edition 08 Bosch Rexroth AG


294 / 1158 ctrlX PLC Engineering
Monitoring values

2. Specify the value [1, -9, -19] for “Start”.


3. Specify the value [1, 10, 20] for “End”.
🡆 The actual values of 800 array elements are displayed in the declaration
editor. The range is limited to the elements of the index [1, <i>,
<j>] with i from -9 to 10 and j from -19 to 20.
See also
● ⮫ Chapter 32.1.2 Declaration Editor on page 377
● ⮫ Chapter 21.5 Forcing and writing of variables on page 277
● ⮫ Chapter 33.4.12 Dialog 'Monitoring Range' on page 1043

Monitoring a function block


When you double-click the editor view of a function block in online mode, a
dialog opens where you can choose between viewing the basic implementation
or a specific instance.
If you select the basic implementation, then the code is displayed in the editor
without current values. Now set a breakpoint in the basic implementation. If
the execution halts there, then the current values of the instance that is proc-
essed first in the program flow are displayed. Now you can step successively
through all instances.
If you select one of the instances, then the editor opens with the code of the
function block instance. The current values are displayed in the declaration
and, if applicable, in the implementation, and are updated continuously.
See also
● ⮫ Chapter ‘Function block’ object on page 823
● ⮫ Chapter 21.3 Using Breakpoints on page 271

Monitoring a property
You can monitor variables in a property object by setting a breakpoint in
the function during online mode. When halted there, the current values are
displayed.
In addition to your own values, the values of the variables of the superordinate
instance are displayed automatically. In the declaration part of the property,
the THIS pointer, which points to the superordinate instance, appears in the
first line with the current data type information and values.

Example
Code

FUNCTION_BLOCK FB_BaseAlfa
VAR
iBaseLocal : INT;
sBaseLocal : STRING;
END_VAR
iBaseLocal := iBaseLocal + 1;
sBaseLocal := 'Testing Text';

FB_BaseAlfa.PorpBeta.Get
iBaseLocal := iBaseLocal + 1;
IF iBaseLocal > 0 THEN
PropBeta := TRUE;
END_IF

FB_BaseAlfa.PorpBeta.Set

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 295 / 1158
Monitoring values

IF PropBeta = TRUE THEN


iBaseLocal := 0;
sBaseLocal := 'Tested IF';
END_IF

PROGRAM PLC_PRG
VAR
fb_BaseAlfa : FB_BaseAlfa;
END_VAR

Application at runtime
fb_BaseAlfa();

IF fb_BaseAlfa.PropBeta = TRUE THEN


xResult := TRUE;
END_IF
IF xReset THEN
fb_BaseAlfa.PropBeta := TRUE;
xReset := FALSE;
END_IF

See also
● ⮫ Chapter Object 'Property' on page 839

Monitoring of property access in the superordinate programming object


You can monitor the values of subordinate properties in a function block or
program in addition to the variable values.
To do this, add either the pragma {attribute 'monitoring' =
'variable'} or {attribute 'monitoring' = 'call'} to the subordinate
property object in the declaration. If you open the superordinate program
instance or function block instance at runtime, then the current property values
are displayed in the editor in addition to the current variable values.
See also
● ⮫ Chapter Object 'Property' on page 839
● ⮫ Chapter Attribute 'monitoring' on page 629

R911403764, Edition 08 Bosch Rexroth AG


296 / 1158 ctrlX PLC Engineering
Monitoring values

Monitoring a method
You can monitor variables in a method object by setting a breakpoint in
the method during online mode. When halted there, the current values are
displayed.
In addition to your own values, the values of the variables of the superordinate
instance are displayed automatically. In the declaration part of the method, the
THIS pointer, which points to the superordinate instance, appears in the first
line with the current data type information and values.

Example
Code

FUNCTION_BLOCK FB_BaseAlfa
VAR
iBaseLocal : INT;
sBaseLocal : STRING;
END_VAR
iBaseLocal := iBaseLocal + 1;
sBaseLocal := 'Testing Text';

METHOD MethBaseAlfa : BOOL // Method of FB_BaseAlfa


VAR_INPUT
END_VAR
VAR
iMethLocal : INT;
END_VAR
iMethLocal := iMethLocal + 1;

PROGRAM PLC_PRG
VAR
fb_BaseAlfa : FB_BaseAlfa;
END_VAR
fb_BaseAlfa();
fb_BaseAlfa.MethBaseAlfa();

See also
● ⮫ Chapter Object 'Property' on page 839
● ⮫ Chapter 'Method’ object on page 829

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 297 / 1158
Monitoring values

Monitoring a function
You can monitor variables in a function object by setting a breakpoint in the
function during online mode. When halted there, the current values are dis-
played.

Monitoring the return value of a function call


In the ST editor of a POU, the current return value is displayed as inline moni-
toring at the position of the POU where a function is called.
The following conditions must be fulfilled:
● The value can be interpreted as a 4-byte numeric value. Example: INT, SINT,

Application at runtime
or LINT.
● The pragma {attribute 'monitoring' := 'call'} is inserted into the
function.
See also
● ⮫ Chapter Object 'Function' on page 825
● ⮫ Chapter Attribute 'monitoring' on page 629

22.3.3 Using Watch Lists


What is a watch list?
A watch list is a user-defined list of project variables summarized in one view
to monitor their values. In online mode, you can write and force variable values
in a watch list. Monitoring, writing and forcing are to be handled as in online
mode of the declaration editor. You can customize the format of the representa-
tion of floating-point values in the options for monitoring.
In a project, there are four read-to-use watch lists Watch <n> available in the
menu “View 🠂 Watch”.
If the expression is an interface reference, it can be expanded. In case the
interface points to a global instance, the global instance is shown as first entry
below the reference. If the interface reference changes, the displayed reference
is collapsed.
Also refer to
● ⮫ Declaration editor in online mode on page 377

Creating and editing a watch list (offline or online mode)


Prerequisite: A project is either opened in online or offline mode. It includes
an application with declared variables that you want added to one of the four
possible watch lists.
1. Click on “View 🠂 Watch 🠂 Watch <n>”.
🡆 The Watch <n> view is displayed. It contains a blank table row.
2. Double-click on the field in the “Expression” column and enter a variable
to be monitored either manually or using the input assistant.
Syntax: <DeviceName>.<ApplicationName>.<ObjectName>.<VariableName>
Example: "Dev1.App1.PLC_PRG.ivar"
When entering the name of a structured variable, the individual compo-
nents are displayed automatically in other lines in online mode.
3. Define all variables to be monitored with this list. Change the order via
drag&drop.
🡆 The “Execution point”, “Type”, “Address”, “Comment” fields are filled
in automatically according to the variables declaration. The symbol
before the expression indicates the type of variable: input variable ( ),
output variable ( ), or ordinary variable ( ).

R911403764, Edition 08 Bosch Rexroth AG


298 / 1158 ctrlX PLC Engineering
Data recording with "Trace"

In online mode, create and edit watch lists using the context menu item “Add
to watch list”.
Also refer to
● ⮫ Chapter Command 'Watch' - 'Watch <n>' on page 900

Adding variables by selecting the “Add watch” command (online mode)


Prerequisite: A project is open at runtime. It includes an application with
declared variables to be added to a watch list.
1. Click on “View 🠂 Watch <n>” to open the watch list.
2. Place the cursor on a variable in the declaration or implementation sec-
tion of a POU and select “Add watch” from the context menu.
🡆 An entry for the selected variable is added to the list.
3. Other variables can be added like this or by entering them directly into the
list in the “Expression” field as described above.
🡆 The watch lists are updated immediately.
If a watch list is not open when you click “Add Watch” for a variable, then it is
added automatically to the “Watch 1” list.
Variable values can also be written and forced in watch lists. In online mode,
the column “Prepared value” is displayed.

Also refer to
● ⮫ Chapter 'Add to watch list' command on page 1034
● ⮫ Chapter 22.3.2 Calling of Monitoring in Programming Objects on page 291
● ⮫ Chapter 21.5 Forcing and writing of variables on page 277

22.4 Data recording with "Trace"


22.4.1 Data recording with 'Trace' – General information
You can use a “Trace” to follow the value history of variables on the controller
in a similar way as a digital sampling oscilloscope. When the application is
in runtime mode with trace, all statements are executed first within the task
cycle. Then, data recording starts with value storage including time stamps.
These time stamps are relative and refer to the start time of the data recording.
The data yields a discrete time signal and PLC Engineering displays its course
in the trace editor.
A sample (data record) is composed of the value and the time stamp. The
runtime system writes the samples to a buffer with a definable size. PLC Engi-
neering requests the data, saves it in the trace editor buffer, and displays it
in the trace diagram as a function of time. You can monitor the value history
of the configured variables continually because PLC Engineering displays the
latest data.
You can trigger the data recording. When this happens, the application saves
the data from the time of the trigger and PLC Engineering displays the data at
the time of the trigger.
The configuration and the display of a trace are possible in the PLC Engineering
project by means of trace objects in the trace editor. There are the following
object types:
● “Trace”: Inserted below the IEC application in the device tree. This kind of
object always contains a purely application-specific trace configuration. You
can download this trace configuration to the controller and run it with the
application.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 299 / 1158
Data recording with "Trace"

Access to the trace manager from IEC code is possible by means of the func-
tions from the library CmpTraceMgr.library. For more information, refer to
the library documentation.
A running data recording with trace can lead to a signifi-
NOTICE
cant increase in the cycle time of the IEC task.
Data recording with trace also continues running after
NOTICE
logging out of the device.

Data recording after triggering


To monitor data that depends on an event or a condition, you can free the data

Application at runtime
recording that depends on a trigger. At runtime, the application checks whether
the event has occurred or the the condition is fulfilled, and then it buffers the
data accordingly.
The trace configuration enables triggering by:
● a trigger variable that maps the event
● a condition as expression
● a combination of trigger variable and condition

Saving samples to a file


You can save samples from the development system to a file. The file can also
include the trace configuration.
Table 4: Possible file formats
File Extension File type Description
*.trace: “Trace file” Contains the samples and the trace
configuration in XML format. You
can execute the “Load Trace” com-
mand to load the file to the trace
editor when offline and analyze the
samples without a controller.
*.txt “Text File” Contains the samples in ASCII
format. You can edit the file with an
external tool.
*.trace.csv “Trace dump” File in CSV format includes the
trace configuration and optional
samples.
You can create the file by clicking
“Export Symbolic Trace Config”.
You can transfer the file to the
controller and load it to the appli-
cation. Then you can execute the
“Load Trace” command in PLC
Engineering to display this in the
trace editor.
You can also click “Trace 🠂 Save
Trace” and select the *.trace.csv
file format. You can transfer the file
to the controller and load it with an
HMI for analysis.

R911403764, Edition 08 Bosch Rexroth AG


300 / 1158 ctrlX PLC Engineering
Data recording with "Trace"

File Extension File type Description


*.traceconfig “Symbolic trace configuration” Contains the trace configuration
CSV format. You can create the file
by clicking “Export Symbolic Trace
Config”. The CmpTraceMgr runtime
system component can read the
file.
See also
● ⮫ Chapter Command 'Save Trace' on page 1032
● ⮫ Chapter Command 'Load Trace' on page 1029
● ⮫ Chapter Command 'Export Symbolic Trace Config' on page 1027
● ⮫ Chapter 33.2.25 "Symbol configuration” object on page 788

22.4.2 Getting Started


Program PLC_PRG

PROGRAM PLC_PRG
VAR
iVar : INT;
rSin : REAL;
rVar : REAL;
END_VAR

iVar := iVar + 1;
iVar := iVar MOD 33;

rVar := rVar + 0.1;


rSin := 30 * SIN(rVar);
Requirement: The application is running the PLC_PRG program on the con-
troller.
1. In the device tree, select the application and add a new trace object by
clicking “Project 🠂 Add Object”.
🡆 The respective trace editor opens with the commands available in the
“Trace” menu.
2. Click “Trace 🠂 Configuration”.
🡆 The “Trace Configuration” dialog box opens.
3. Select a task for running the trace feature. Normally this is the same task
that is running in PLC_PRG.
4. Click “Add Variable” to add an entry to the tree view of the trace configu-
ration and assign an IEC variable (for example, PLC_PRG.rSin).
5. Click “Trace 🠂 Download Trace”.
🡆 PLC Engineering loads the trace configuration to the controller. The
application starts recording data and transmits the data to PLC Engi-
neering, where it is displayed in the trace diagram as a graph. Com-
mands are provided for navigating through the samples and controlling
the data recording.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 301 / 1158
Data recording with "Trace"

Example

Trace the sine-shaped data of the IEC variable PLC_PRG.rSin


The PLC_PRG program is running on the controller. When you follow the
instructions for "Getting Started", PLC Engineering displays the following
trace diagram.

Application at runtime
● (1) : “Configuration”
● (2) : “Add Variable”

See also
● ⮫ Chapter 33.2.26 Object 'Trace' on page 799

22.4.3 Creating Trace Configuration


For a complete trace configuration, specify at least one task and one variable.
In order to trigger the data recording, activate the trigger option and select a
trigger variable or specify a recording condition.
See also
● ⮫ Chapter Dialog 'Advanced Trace Settings' on page 1095
● ⮫ Chapter “Trace configuration” dialog on page 1096
● ⮫ Chapter 33.4.14 Dialog 'Advanced Trend Settings' on page 1044
● ⮫ Chapter 22.5.3 Configuring the trend recording on page 306

Assigning a task
In this task, the data recording is executed in runtime mode. Usually the same
task is selected where the variables are written.
1. Double-click the trace object.
🡆 The trace editor opens with the commands available in the “Trace”
menu.
2. Click “Trace 🠂 Configuration”.
🡆 The “Trace Configuration” dialog opens. In the tree view “Trace
Record”, the top item is selected and the subdialog “Record Settings”
is shown on the right.
3. Click the "arrow down" symbol ( ) in the “Task” drop-down list.
🡆 The drop-down list opens with all tasks that are available throughout
the application.
4. Select a task for the trace.
See also
● ⮫ Chapter “Trace configuration” dialog on page 1096

R911403764, Edition 08 Bosch Rexroth AG


302 / 1158 ctrlX PLC Engineering
Data recording with "Trace"

Configuring a trace variable


1. Double-click the trace object.
🡆 The trace editor opens. The commands of the “Trace” menu are avail-
able.
2. Click “Add Variable”.
🡆 The “Trace Configuration” dialog opens. The subdialog “Variable
Settings” is displayed on the right.
3. Click in the input field of the “Variable” setting and select a trace
variable in the “Input Assistant” dialog.
🡆 The variable is configured for data recording. The trace record tree and
the display tree were extended by the variable.
4. Click the “Add Variable” link.
🡆 The trace record tree and the display tree receive a new variable. The
settings of the variables are available on the right.
5. Select a trace variable.
6. Click “OK” to close the dialog.
🡆 The variables are trace variables and are displayed in the trace variable
list.

Deleting a trace variable


1. Double-click the trace object.
2. Click a variable in the trace record tree.
3. Click the “Delete Variable” command or press [Del].
4. Click “OK” to close the dialog.
🡆 The variable is removed from the trace variable list.

Tracing a parameter
1. Double-click the trace object.
2. Click “Add Variable”.
🡆 The “Trace Configuration” dialog opens. The subdialog “Variable
Settings” is displayed on the right.
3. Click (right of the “Variable” setting, left of the input field).
4. Select the “Parameter” option in the drop-down list.
5. Click and select a parameter from the “Input Assistant” dialog.
6. Configure how the parameter is displayed.
7. Click “OK” to close the dialog.
🡆 The parameter will be traced and displayed in the trace variable list.

Configuring a trigger
1. Double-click the trace object.
🡆 The trace editor opens with the commands available in the “Trace”
menu.
2. Click “Trace 🠂 Configuration”.
🡆 The “Trace Configuration” dialog opens. The subdialog “Record
Settings” is displayed on the right.
3. Select the “Enable trigger” check box.
4. Select the task in which the trend record is to be executed.
5. Select a variable from the “Trigger Variable” field.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 303 / 1158
Data recording with "Trace"

6. Click “OK” to close the dialog.


🡆 The data recording will be triggered.
The trigger time is displayed as a black line in the diagram in runtime mode.
1. Download the application and start it.
2. Click “Trace 🠂 Download Trace”.
🡆 The trace configuration is loaded. After triggering, the runtime system
saves the value graph of the trace variables. The data is displayed in the
trace editor. The trigger time is displayed as a black line in the diagram.

Configuring the display of the time axis

Application at runtime
1. Double-click a trace object.
2. Click the “Configuration” link above the configuration tree.
🡆 The “Trace Configuration” dialog opens.
3. Select “Time axis” in the display tree (below “Presentation (Diagrams)”).
🡆 The display settings of the time axis are shown on the right.
4. Edit the presets and click the “Preview” link.
🡆 The changes are seen in the coordinate system preview.
5. Click “Y-axis” in the display tree. The “Y-axis” item is below every con-
figured diagram. Therefore, the display of the value axis is set for each
diagram.
🡆 The subdialog “Display Settings” of the selected axis is displayed on
the right.
6. Change the preset value.
🡆 The changes are applied in the coordinate system preview.
7. Click OK to close the “Trace Configuration” dialog.
🡆 The display changes are visible in the affected diagrams.

Configuring the display of the trace variable


1. Double-click a trace object.
2. Click the “Configuration” link.
🡆 The “Trace Configuration” dialog opens.
3. Select a variable below “Trace Record”.
🡆 The subdialog “Variable Settings” of the selected variable is displayed
on the right.
4. Change a setting, for example the “Line type”.
5. Click “OK” to close the dialog.
🡆 The display changes are visible in the affected diagrams.

Configuring the buffer for data on the runtime system


1. Double-click a trace object.
2. Click “Trace 🠂 Configuration”.
🡆 The “Trace Configuration” dialog opens. The subdialog “Record
Settings” is displayed on the right.
3. Click “Advanced”.
🡆 The “Advanced Trace Settings” dialog opens.
4. Change the setting “Measure in every n-th cycle” or “Recommended
runtime buffer size (samples)”.

R911403764, Edition 08 Bosch Rexroth AG


304 / 1158 ctrlX PLC Engineering
Data recording with "Trace"

5. Click “OK” to close the dialog.


🡆 The buffer settings are reconfigured. It is applied after the trace config-
uration is loaded to the RTS the next time.

Editing the trace configuration in runtime mode


Requirement: The application is running on the controller and a trace configu-
ration is loaded.
1. Double-click a variable in the trace record tree.
🡆 The “Trace Configuration” dialog opens.
2. Change the color, for example.
🡆 The variable is displayed in the new color in the affected diagrams
without interrupting the execution of the application.
If you change essential settings, for example a trace variable, then you must
download the trace configuration to the controller again.

22.4.4 Operating the Data Recording


Use menu commands for controlling how data is recorded.
Requirement: The application is loaded on the runtime system and a trace is
configured.
Menu Commands
● “Trace 🠂 Download Trace”
● “Trace 🠂 Start Trace”
● “Trace 🠂 Stop Trace”
● “Trace 🠂 Reset Trigger”
See also
● ⮫ Chapter Command 'Download Trace' on page 1027
● ⮫ Chapter Command 'Start Trace' on page 1032
● ⮫ Chapter Command 'Stop Trace' on page 1032
● ⮫ Chapter Command 'Reset Trigger' on page 1031

22.4.5 Navigating into Trace Data


Use menu commands to navigate the data in the trace diagram.
Requirement: The application is in online mode.
Menu Commands
● “Trace 🠂 Cursor”
● “Trace 🠂 Mouse Zooming”
● “Trace 🠂 Reset View”
● “Trace 🠂 AutoFit”
● “Trace 🠂 Compress”
● “Trace 🠂 Stretch”
● “Trace 🠂 Convert to Single-Channel”
● “Trace 🠂 Convert to Multi-Channel”
See also
● ⮫ Chapter Command 'Cursor' on page 1026
● ⮫ Chapter Command 'Mouse Zooming' on page 1029
● ⮫ Chapter Command 'Reset View' on page 1031
● ⮫ Chapter Command 'AutoFit' on page 1025
● ⮫ Chapter Command 'Compress' on page 1026
● ⮫ Chapter Command 'Stretch' on page 1033

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 305 / 1158
Data recording with "Trend"

● ⮫ Chapter Command 'Convert to Multi-Channel' on page 1030


● ⮫ Chapter Command 'Convert to Single-Channel' on page 1030

22.4.6 Managing Trace


Use menu commands to load and save traces in various formats.
Menu Commands
● “Trace 🠂 Save Trace”
● “Trace 🠂 Load Trace”
● “Trace 🠂 Export Symbolic Trace Config”
See also

Application at runtime
● ⮫ Chapter Command 'Save Trace' on page 1032
● ⮫ Chapter Command 'Load Trace' on page 1029
● ⮫ Chapter Command 'Export Symbolic Trace Config' on page 1027

22.4.7 Showing Statistics


PLC Engineering evaluates and displays the recorded data with an option of
saving the data to the clipboard. Click “Trace 🠂 Statistics”.
See also
● ⮫ Chapter 'Statistics' command on page 1033

22.5 Data recording with "Trend"


22.5.1 Data recording with 'Trend' – General information
When you want to monitor the development of data over a long period of
time for the purpose of reading a trend, you can save the data with “Trend
recording”. You can configure any number of variables or parameters to save
their values in a persistent database. The database is located on the PLC and is
populated continually at runtime.

Trend recording comprises the following objects:


● (1): “TrendRecordingTask” of type“Task”
● (2): Object of the type “TrendRecordingManager”
● (3) : Object of the “trend recording” type

R911403764, Edition 08 Bosch Rexroth AG


306 / 1158 ctrlX PLC Engineering
Data recording with "Trend"

Timeout for trend recording


NOTICE
During a trend recording, it can happen that the appli-
cation task triggers a timeout that is caught with an
exception when transitioning from “Running” to “Stop”.
Causes can be that file operations with the SQLite data-
base are taking too long or that too many variables are
being recorded. This usually happens on a target device
with weak performance.
You can avoid the occurrence of an exception:
− Configure the trend recording with less memory
demand so that the amount of data that is stored is
adapted to the target system.
− Reduce the number of variables.
To display the collected data, you design a visualization with a “Trend” element.
This kind of visualization accesses the database to display the data.

22.5.2 Getting Started with Trend Recording


To execute trend recording on a runtime system, you need an application with a
“Trend Recording Manager” object that contains at least one “Trend Recording”
object. Then you can configure a database on the runtime system and the data
buffering.
1. Add a “Trend Recording Manager” object below your application.
2. Select the “Trend Recording Manager” object and click “Add Object
🠂 Trend Recording”. Type a name in the “Add Trend Recording” dialog
box.
🡆 PLC Engineering creates the object. The editor opens.
3. Type a task in “Record Settings”.
4. Click “Add Variable”.
🡆 PLC Engineering adds another variables. The blank settings open in the
“Variable Settings” to the right of the tree view.
5. Select a valid IEC variable from the “Variable” field.
🡆 The IEC variable is configured for trend recording.
6. Build the application.
7. Download the application to the controller and click “Start”.
🡆 The application records data in runtime mode and saves it to a data-
base.

22.5.3 Configuring the trend recording


You can configure a database on the runtime system and the data buffering.
Timeout for trend recording
NOTICE
During a trend recording, it can happen that the appli-
cation task triggers a timeout that is caught with an
exception when transitioning from “Running” to “Stop”.
Causes can be that file operations with the SQLite data-
base are taking too long or that too many variables are
being recorded. This usually happens on a target device
with weak performance.
You can avoid the occurrence of an exception:
− Configure the trend recording with less memory
demand so that the amount of data that is stored is
adapted to the target system.
− Reduce the number of variables.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 307 / 1158
Data recording with "Trend"

Assign tasks
In this task, the runtime system records the trend.
In general, trend recording runs in the same task as the main program (for
example, PLC_PRG).
1. Double-click a “Trend Recording” object in the device tree.
🡆 The respective editor opens. In the tree view of the trend configuration,
the top entry is selected, and on the right you see the current configu-
ration in “Record Settings”.
2. Click the "Arrow Down" symbol ( ) in the “Task” list box.
🡆 The selection list opens with all tasks available application-wide.

Application at runtime
3. Select a task for trend recording.

Adding IEC variable


The number of variables is limited for trend recording.
NOTICE
You can change this number in the “Trend Storage”
dialog.
1. Double-click a “Trend Recording” object in the device tree.
🡆 The respective editor opens. In the tree view of the trend configuration,
the top entry is selected, and on the right you see the current configu-
ration in “Record Settings”.
2. Right-click an entry in the tree view.
3. Select “Add variable”.
🡆 PLC Engineering adds another variables. The blank settings open in the
“Variable Settings” to the right of the tree view.
4. Select a valid IEC variable from the “Variable” field.
🡆 The IEC variable is configured for trend recording.
5. Configure how the variable is displayed in the trend diagram.
6. Configure how the alert color is displayed in the trend diagram.
Also refer to
● ⮫ Chapter 33.4.13 Dialog 'Trend Storage' on page 1043

Removing variables from the configuration


1. Double-click a “Trend Recording” object in the device tree.
2. Click on a variable in the tree view of the configuration.
3. Click “Delete Variable” or press [Del].

Starting conditional trend recording


You can configure conditional trend recording for execution. Configuration is
not possible when depending on triggering. For that you need a “Trace” object.
1. Double-click a “Trend Recording” object in the device tree.
2. Click the top node in the tree view of the trend configuration.
🡆 The name of the trend configuration is selected and on the right you
see the current configuration in “Record Settings”.
3. Assign a Boolean variable, an access to a bit, or a property to the “Record
condition” field.
🡆 At application runtime, data is recorded only if the value is TRUE.
Also refer to
● ⮫ Chapter 22.4 Data recording with "Trace" on page 298

R911403764, Edition 08 Bosch Rexroth AG


308 / 1158 ctrlX PLC Engineering
Data recording with "Trend"

add parameters
1. Double-click a “Trend Recording” object in the device tree.
🡆 The respective editor opens. In the tree view of the trend configuration,
the top entry is selected, and on the right you see the current configu-
ration in “Record Settings”.
2. Right-click an entry in the tree view.
3. Select “Add variable”.
🡆 PLC Engineering inserts a new variable. The blank settings open in the
“Variable Settings” to the right of the tree view.
4. Click the "down" symbol ( ) to the right of the “Variable” label.
5. Select “Parameter” from the list box.
6. Click and select a parameter from the “Input Assistant” dialog.
7. Configure how the parameter is displayed in the trend diagram.
8. Configure how the alert color is displayed in the trend diagram.

configure data buffering on RTS


1. Double-click a “Trend Recording” object in the device tree.
🡆 The respective editor opens. In the tree view of the trend configuration,
the top entry is selected, and on the right you see the current configu-
ration in “Record Settings”.
2. Click “Trend Storage”.
🡆 The “Trend Storage” dialog opens.
3. Now you can change the settings.
Also refer to
● ⮫ Chapter 33.4.13 Dialog 'Trend Storage' on page 1043

Configuring additional buffering


1. Double-click a “Trend Recording” object in the device tree.
🡆 The respective editor opens. In the tree view of the trend configuration,
the top entry is selected, and on the right you see the current configu-
ration in “Record Settings”.
2. Click “Advanced”.
🡆 The “Advanced Trace Settings” dialog opens.
3. Now you can change the settings.
Also refer to
● ⮫ Chapter 33.4.14 Dialog 'Advanced Trend Settings' on page 1044

Also refer to
● ⮫ Chapter 22.4.3 Creating Trace Configuration on page 301

22.5.4 Monitoring Tasks


In online mode, you can display some statistical values of the tasks in the run-
time system. This information is very useful for testing clock cycles or solving
problems in the runtime performance.
1. Switch to online mode.
2. Select the “Task Configuration” object in the device tree.
Click “Project 🠂 Edit Object”.
🡆 The task configuration opens in the editor.
3. Click the “Monitor” tab.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 309 / 1158
Data recording with "Trend"

See also
● ⮫ Chapter Tab 'Monitor' on page 863

22.5.5 Reading the PLC


PLC Engineering provides the possibility to display the events and error mes-
sages logged in the control.
Also refer to
● ⮫ Chapter 33.1.14 "Log” tab on page 751

Reading logbook

Application at runtime
Prerequisite: The control is running.
1. Select the control in the device tree.
2. Click “Project 🠂 Edit Object”.
🡆 The device editor opens.
3. Select the “Log” tab.
4. Click on to refresh the view.
🡆 A connection is established to the control. The control is highlighted in
green in the device tree.
🡆 All log events of the control are displayed. The preceding icon shows
the scaling of the log event:
● : Warning
● : Errors
● : Exception
● : Information
● : Debug
5. If you do not want to see the events of a certain scaling, click on the
corresponding icon in the menu bar. If you click this icon again, these log
events are displayed again. For example, click on the icon in the menu
bar if you do not want to see log events with the "Error" scaling.
6. In the Search in messages input field, enter a search term to find a spe-
cific event in the list. Subsequently, use the and buttons to jump to
the color-coded search results.
7. To filter the events by scaling, timestamp, description or component, click
on the respective column title.
8. Click on the button to save the displayed log events to a file.
Also refer to
● ⮫ Chapter 33.1.14 "Log” tab on page 751

22.5.6 Analysing Errors with Core Dump


A core dump is a memory snapshot of the application data. In case of an
exception error, runtime systems that support this feature automatically store a
core dump file (<application name>.core) in the application directory and
on the controller.
In online mode, you can also generate a core dump explicitly if the application
is currently stopped at breakpoint or if an exception has occurred. In this case,
PLC Engineering stores the core dump file in the project directory and not on
the controller.
In offline mode, you can load the core dump from the controller to the project.
An online view of the application is then displayed with the data and values at
the time of the exception.

R911403764, Edition 08 Bosch Rexroth AG


310 / 1158 ctrlX PLC Engineering
Data recording with "Trend"

In addition, you can call a project view of the controller log file at the time of
generating the core dump.
The runtime system must completely support the func-
NOTICE
tionality to assure a correct display of variable values in
the core dump view.
In the online view of the application that PLC Engi-
neering created when loading the core dump into the
project, menu commands are displayed as available but
do not have any effect in this status. When selecting one
of these commands, a message is displayed.
Restriction (CDS-37572): Exception handling in the run-
CAUTION
time system may overwrite parts of the variable values
in the call stack. Therefore, the original values are lost
and important information may no longer be displayed
for variables in functions and methods at the time of
monitoring.
When creating project archives: If you created a core dump explicitly by clicking
“Create Core Dump”, then this option is available automatically in the archive
configuration. On the other hand, if you copied the core dump from the PLC,
then you can add it to a project archive only by selecting “Additional files”.
Important: A project archive with a core dump must necessarily include the
download information. If it does not, then PLC Engineering cannot use the core
dump.

Loading the core dump and device log into the project for analysis
Requirement: You have a project open with an application that has produced an
exception on the controller. The runtime system is able to create core dumps.
The application in the project is in offline mode.
1. Load the required core dump from the controller by clicking “Debug
🠂 Load Core Dump”.
🡆 PLC Engineering shows an online view of the application. You see the
variable values and call stack from the time of error (see below). This
includes also the values of the I/O variables in the mapping dialog
box of the device configurator and the task configuration. "Core dump
loaded" appears in the status line. PLC Engineering copies the core
dump file as <project name>.<device name>.<application name>.<appli-
cation Guid>.core to the local project directory.
2. Click “Debug 🠂 Load Device Log from Core Dump” to load the device log
from the time of error into the project.
🡆 The log view opens (as in online mode of the device editor) with the
events at the time of the core dump.
3. After completing the core dump analysis, click “Debug 🠂 Close Core
Dump”.
🡆 PLC Engineering closes the core dump view of the application. The
project returns to the normal offline mode with its views.

Creating the core dump of the running application manually


Requirement: A PLC Engineering application is in online mode. The runtime
system supports core dump functionality.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 311 / 1158
Data recording with "Trend"

Click “Debug 🠂 Create Core Dump”.


🡆 PLC Engineering starts generating a new core dump. A progress bar
appears in the status line and a button to cancel the process.
PLC Engineering saves a core dump file to the local project
directory as <project name>.<device name>.<application
name>.<application Guid>.core.

See also
● ⮫ Chapter Command 'Create Core Dump' on page 962
● ⮫ Chapter Command 'Load Core Dump' on page 961

Application at runtime
● ⮫ Chapter Command 'Close Core Dump' on page 962
● ⮫ Chapter Command 'Load Device Log from Core Dump' on page 962

22.5.7 Using PLC Shell for requesting Information


The "PLC shell" in PLC Engineering is a text-based control monitor (terminal)
on a tab of the device editor. There you can enter commands for the request of
specific information from the controller, as well as execute actions like starting,
stopping or downloading applications. Also a description on the meaning and
syntax of the possible commands you can get directly via the PLC shell.
The list of available commands depends on the PLC manufacturer. It can be
extended via the so-called SPS Shell Command Handler interface, either in a
C-component of the runtime system, or as a function block in an IEC library or
project.
The response from the PLC will be shown as a string in an output data window
within the tab.

Requesting information about the application on the controller


Requirement: Your project is connected with a controller; Example: ctrlX CORE,
on which an application App1 is running.
1. Open the device editor double-clicking on the object ctrlX CORE in the
device tree, and activate tab “PLC Shell”.
🡆 The tab shows an empty output data window. Below there is an entry
field for a command.
2. Click button .
🡆 The “Insert Standard Command” dialog appears with a list of com-
mands.
3. Choose command “?” and click button “Execute”.
🡆 The dialog closes and in the output data window you see a list of the
supported commands and their possible parameters. Each the syntax
for how to enter the command is displayed.
4. Click again and choose command “pid”. In the input assistant supple-
ment the command as follows: pid App1. Press the Enter key.
🡆 In the output data window the following gets displayed (the GUIDs are
just exmples):
pid App1
Project Identification
Application: App1
Code GUID:0x08a893c0
Data GUID:0x762d0e90

R911403764, Edition 08 Bosch Rexroth AG


312 / 1158 ctrlX PLC Engineering
Data recording with "Trend"

5. Click button in the command line.


🡆 Command pid App1 is added to the history of already entered com-
mands.
See also
● ⮫ Chapter 33.1.17 “PLC shell” tab on page 756

22.5.8 Backup and Restore


PLC Engineering and the PLC Engineering standard runtime systems (with ver-
sion 3.5.8.0 and later) support backing up application-specific files on the PLC.
You can execute the required actions in the “Backup and Restore” tab of the
generic device editor.
A backup consists of creating and saving a file in zip archive that contains the
application-related files and an information file meta.info. This backup file has
the extension TBF (="Target Backup File") and can be saved in the local file
system or on the PLC.
The following applies when restoring the software status from the backup file:
● A dialog opens with a list of affected files on the PLC, and you can deacti-
vate optional components.
● If you have to set the application to STOP mode for backup or restore, a
dialog prompt will open to warn you about this- Warnings also open when
incompatibilities are detected.
● The user interface is blocked when restoring to the PLC.
● Existing files are overwritten without warning.
● Existing boot applications are deactivated as soon as at least one new boot
application is part of the restore.
See also
● ⮫ Chapter 33.1.12 Tab 'Backup and Restore' on page 749

Creating backup files


Requirement: A project is open with an application that is running
on the required device. In addition, for this example an external file
myExternalFile.txt is inserted as an object below the application. This file
is downloaded to the PLC implicitly when downloading the application.
1. Open the device editor by double-clicking the device entry in the device
tree. Click the “Backup and Restore” tab.
🡆 The tab opens with a menu bar including the “Backup” and “Restore”
menus.
2. In the “Backup” menu, select the “Read Backup Information from Device”
item.
🡆 If the PLC is not connected at the moment, then PLC Engineering
opens a temporary connection to the device and reads the rel-
evant files from the $PlcLogic$ directory of the PLC into a
table in the lower part of the tabbed page. In this example, at
least the following files will be listed: $PlcLogic$/Application/
Application.app, $PlcLogic$/Application/Application.crc,
and $PlcLogic$/Application/myExternalFile.txt. In addition,
other external, project-dependent files are listed, which have been
inserted below the application in the device tree. Furthermore, the
source code archive file $PlcLogic$/Archive.prj is listed if you have
set the project setting for this (“Implicitly at program download and
online change”) as the loading time.
3. In the table, clear the check box for the $PlcLogic$/Application//
myExternalFile.txt file in the “Active” column.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 313 / 1158
Data recording with "Trend"

4. Select “Save Backup File to Device” in the “Backup” menu.


🡆 The “Save as” dialog opens. The file type is predefine as “Backup files
(*.tbf)”.
5. Select a location for the backup file and click “Save”.
See also
● ⮫ Chapter 'Project settings’ dialog - 'Download source code' on page 1063

Restoring from backup files


Requirement: A project is open with an application that is running on the
required device. A backup file is saved to the local file system as described

Application at runtime
above.
1. Open the device editor by double-clicking the device entry in the device
tree. Click the “Backup and Restore” tab.
Click “Restore 🠂 Load Backup File from Disc”.
🡆 The default prompt opens for selecting a backup file tbf in the local
file system.
2. Select the backup file and click “Open”.
🡆 The files are read from the backup file and shown in the
table of the dialog below. The file $PlcLogic$/Application/
myExternalFile.txt that was excluded in the backup is missing.
3. Click “Restore 🠂 Restore Backup to Device”.
🡆 A dialog prompt opens with information about the actions when
restoring.
4. Click “OK” to start restoring the files to the PLC file system.
🡆 When restore is complete, you are prompted to restart the PLC in order
to activate the loaded application.

R911403764, Edition 08 Bosch Rexroth AG


314 / 1158 ctrlX PLC Engineering
Data recording with "Trend"

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 315 / 1158
Executing the Online Change

23 Updating the application on the PLC


23.1 Updating the application on the PLC – General informa-
tion
PLC Engineering provides two possibilities to transfer a changed application to
the control: Download and Online change.
A download compiles the application again. In addition to a syntax check,

Updating the application on the PLC


application code is also generated and loaded onto the control. This stops
the running program. A download is the recommended data transfer method,
as a defined initial state is always created due to the program stop and the
re-initialization.
In the case of an online change, only the modified parts are reloaded to the
control. The running program is not stopped. Use an online change only for
minor application changes. In the case of extensive changes, the program
response cannot be safely predicted. Please read the notes in the description
of the “Online change” command.
Also refer to
● ⮫ Chapter 23.2 Executing the Online Change on page 315
● ⮫ Chapter 23.3 Execution of a Download on page 316
● ⮫ Chapter Command 'Load' on page 942
● ⮫ Chapter "Online change" command on page 943

23.2 Executing the Online Change


PLC Engineering automatically offers you an online change if you log in with
an application that is already present on the controller, but has been changed
since the last download in the programming system. With this procedure only
the modified parts are reloaded to the controller. A running program on the
controller is not stopped during the online change.
In the view “Memory reserve for online change”, you can configure memory
reserves for the online change for function blocks of a project. In this way,
instance variables do not have to be moved to the memory after changes are
made to a function block for an online change.
When carrying out the online change, pay attention to
NOTICE
the notes in the description of the “Online Change” com-
mand.
See also
● ⮫ Chapter "Online change" command on page 943
● ⮫ Chapter Command 'Login' on page 939
● ⮫ Chapter 20.5 Generating Application Code on page 265
● ⮫ Chapter 18.3 Configuring the Memory Reserve for an Online Change
on page 129

Executing the online change when logging in


Requirement: The connection settings of the controller are correctly set. The
applications in the project and on the controller are identical. The project on
the controller is running. The application is logged out.
1. Change your application.
2. Click “Online 🠂 Login”.
🡆 A dialog appears with the information that the application has been
changed since the last download.
3. Click the “Details…” button

R911403764, Edition 08 Bosch Rexroth AG


316 / 1158 ctrlX PLC Engineering
Execution of a Download

4. Check the details in the “Application information” tab.


If you have not generated any code since the last change, the command
“Application is not up to date. Generate code now?” appears at the
bottom edge of the dialog. In this case click this command.
🡆 You are shown a comparison view of the objects (objects marked red
are different).
5. Close the dialog.
6. Select the option “Login with Online Change” and click “OK”.
🡆 The change is loaded to the controller. The running program on the
controller is not stopped while doing this. The application is logged in.
See also
● ⮫ View 'Project compare' - 'Differences' on page 918

Execute online change in the logged-in state (online operation)


Requirement: The connection settings of the controller are correctly set. The
applications in the project and on the controller are identical. The project on
the controller is running. The application is logged in.
1. Select an object in the device tree. It is best to select a POU or a GVL
here.
2. Click “Project 🠂 Edit Object (Offline)”.
🡆 The object opens in the editor.
3. Change the object. For example, you can declare a new variable or change
a value assignment here.
4. Click “Online 🠂 Online Change”.
🡆 A query will appear, asking whether you really want to execute the
online change.
5. Click “Yes” to confirm the dialog.
🡆 The change is loaded to the controller.

23.3 Execution of a Download


A download of the application causes a compilation of the active application. In
the process, a syntax check is performed and application code is also created
and loaded to the controller. A program running on the controller is stopped
during the download.
During the download, pay attention to the notes in the
NOTICE
description of the “Download” command.
See also
● ⮫ Chapter Command 'Load' on page 942
● ⮫ Chapter Command 'Login' on page 939
● ⮫ Chapter 20.5 Generating Application Code on page 265

Downloading when logging in


Requirement: the connection settings of the controller are correctly set. The
applications in the project and on the controller are identical. The project on
the controller is running. The application is logged out.
1. Change your application.
2. Select the command “Online 🠂 Login”
🡆 A dialog box appears with the information that the application has been
changed since the last download.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 317 / 1158
Execution of a Download

3. Select the option “Login with download” and click on “OK”.


🡆 The running program on the controller is stopped and the change is
loaded to the controller. The application is logged in.

Downloading in the logged-in state (online mode)


Requirement: the connection settings of the controller are correctly set. The
applications in the project and on the controller are identical. The project on
the controller is running. The application is logged in.

Updating the application on the PLC


1. Select an object in the device tree. It is best to select a POU or a GVL
here.
2. Select the command “Project 🠂 Edit Object (Offline)”
🡆 The object opens in the editor.
3. Change the object. For example, you can declare a new variable or change
a value assignment here.
4. Select the command “Online 🠂 Download”.
🡆 A query will appear, asking whether you really want to execute the
download.
5. Confirm the dialog box with “Yes”.
🡆 The running program on the controller is stopped and the change is
loaded to the controller.

R911403764, Edition 08 Bosch Rexroth AG


318 / 1158 ctrlX PLC Engineering
Execution of a Download

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 319 / 1158

24 Copying Files to/from PLC


In the generic “Files” tab of the device editor, you can copy files to and from
the local file system and the controller.
Requirement: The vendor has unlocked the tab. In the device tree, the connec-
tion to the controller is configured. The device is running.
1. Double-click the PLC device object in the device tree to open the device
editor.
2. Click the “Files” tab.
3. In “Host” | “Location” on the left part of the view, set the path in

Copying Files to/from PLC


the local file system where files will be copied to and from. Example:
D:\FileTransferWithPLC. If necessary, create a new directory by
clicking the folder symbol ( ).
🡆 The files and directories are shown like in a file manager. Click the
refresh symbol ( ) to update the display.
4. In “Runtime” on the right side of the view, set the required directory for
the data transfer in the same way.
🡆 PLC Engineering shows the files on the controller.
5. Select the required files from the file system tree for the file transfer (mul-
tiple selection is possible). You can also select a directory for transferring
all files in a folder.
6. Click the left and right arrow symbols ( , ) between the two parts
of the view.
🡆 PLC Engineering copies the selected files to the other file system imme-
diately. If a file is not already available in the target directory, then it
is created. If it is already available and not write-protected, then it is
overwritten. Otherwise a message is shown.
See also
● ⮫ Chapter 33.1.13 Tab 'Files' on page 750

R911403764, Edition 08 Bosch Rexroth AG


320 / 1158 ctrlX PLC Engineering

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 321 / 1158

25 Using the command line interface


You can start the PLC Engineering.exe from the command line, specifying the
switches and options described below.
Syntax:
<folder>PLC Engineering.exe --<Schalter oder Option>
Enclose paths or option parameters that contain spaces, minus signs, or
slashes in single quotes.

Using the command line interface


Switch --culture (national language of the user interface)
Add this switch to the development system call in the command line to set the
national language of the user interface.
Syntax:

--culture=<Culture>
<Culture>: Common language abbreviation for the desired national language,
for example de, en, fr, it, es, zh-CHS.

Example
Launching the PLC Engineering with English user interface:
PLC Engineering.exe --culture=en

Also refer to
● ⮫ Chapter Dialog 'Options' – 'International Settings' on page 1084

Switch --profile (PLC Engineering profile)


Add this switch to the development system call in the command line to start
PLC Engineering directly with a specific profile. When starting PLC Engineering
without this specification, the“Select Profile” dialog is opened.
Syntax:
--profile="<profile name>"
<profile name>: Enter the exact profile name, as displayed in the in the“Help
🠂 Information” dialog of the development system or in the Start menu of your
computer.

Example
PLC Engineering.exe --culture=de --profile="PLC Engineering
V3.6"

Switch --compare (initiate project comparison)


Add this switch to the call of the development system in the command line to
directly make a comparison of two PLC Engineering projects. After the button,
first specify the "current project" and then the "comparison project". PLC Engi-
neering starts and opens the “Project comparison - Differences” view.
Syntax:
--compare="<path of project file>" "<path of reference project
file>"

Example
PLC Engineering.exe --compare "D:\proj\project1.project"
"D:\proj\project2.project"

R911403764, Edition 08 Bosch Rexroth AG


322 / 1158 ctrlX PLC Engineering

Also refer to
● ⮫ Chapter 'Compare’ command on page 917

Option --project (PLC Engineering project)


Add this option to the development system call in the command line to immedi-
ately open the specified project in PLC Engineering.
Syntax:
--project="<path of project file>"
<path of project file>: Project file path

Example
Open the project test:
PLC Engineering.exe --culture=de --
project="D:\projects\test.project"

Also refer to
● ⮫ Chapter 'Open project’ command on page 869

Option --projectarchive (PLC Engineering project archive)


Add this option to the development system call in the command line to extract
the specified project archive immediately in PLC Engineering and then open the
project.
Syntax:
--projectarchive="<path of projectarchive file>"
<path of project archive file>: File path of the project archive

Example
Extract the project archive test.projectarchive and open the project in
the programming system:
PLC Engineering.exe --
projectarchive="D:\projects\test.projectarchive"

Also refer to
● ⮫ Chapter Command 'Extract archive' on page 873

Option --runscript (execute scrip)


Add the option to the development system call in the command line to have the
specified script file executed by PLC Engineering.
Table 5: “Command line options for --runscript”
--runscript="<scriptfile>.py" PLC Engineering executes the script file <scriptfile>.py at
startup.
Specify the entire path of the script file.
--scriptargs:'<arg1> Use the option together with the --runscript option. This
<arg2>... <argn>' option triggers the parameter transfer <arg1>... <argn> to the
script. The arguments are passed on to the Python variable
sys.argv.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 323 / 1158

--noUI Use the option together with the --runscript option.


The PLC Engineering user interface does not open. PLC Engi-
neering prints all errors, warnings, compiler messages and
messages generated by the script on the command line. The
script messages (1: Severity Text) can be separated from the
other messages (2: Severity FatalError, Error, Warning, Infor-
mation) with the operator >.
--enablescripttracing Use the option together with the --runscript option. It
causes each command of the script file to be displayed in the

Using the command line interface


output.
--textPrompts Use the option together with the --noUI option. It causes
message service methods and standard dialogs to be output
to the command line so that user can be input data.
If you do not specify --textPrompts, all message service
prompts are automatically answered with the default value.
scriptdebugger Use the option together with the --runscript option. It
{="<debugger>"} switches IronPython into debug mode so that external debug-
gers can be used to debug Python scripts. The following
values are defined for <debugger>, case-insensitive:
● auto: Automatically detects if a debugger is attached
to the current process at each script start. Cur-
rently, only .NET-based debuggers can be automati-
cally detected. A detected debugger overrides the --
enablescripttracing flag.
● .NET: Enables debugging for .NET based debuggers such
as the "Python Tools for Visual Studio" (PTVS) and Sharp-
Develop. With this option, in contrast to "auto", a debugger
can also be attached to already running scripts.
Please note: This is currently the default value when --
scriptdebugger is used without specifying a value.
● disabled: Disables debugging and automatic detection.
● script: Switches the IronPython script engine into debug
mode to enable debugging for settrace-based debuggers.
The script itself has to connect to and disconnect from the
debugger
● tracing: Enables simple built-in "script tracing" operation
and disables automatic detection. Is equivalent to the --
scripttracing option.
● $absolute_path.py$: Absolute path to a Python script
that initializes the connection to a Python-based debugger.
The IronPython Script Engine is switched to debug mode
to enable debugging for settrace-based debuggers. This
script is executed once during initialization, and it should
define the following parameterless functions:
scriptdebuggersetup is executed immediately before
the user script is executed to connect to the debugger.
scriptdebuggershutdown is called immediately after the
user script is executed, or when the script engine is shut
down, and should close the connection to the debugger.

R911403764, Edition 08 Bosch Rexroth AG


324 / 1158 ctrlX PLC Engineering

Examples of using transfer parameters in script files using sys.argv


start /b /wait CODESYS.exe
--runscript="D:\Script\ArgvAnd__main__Test.py"
--scriptargs:'username password 3.14 "path=\"C:\temp\\"'
Script file ArgvAnd__main__Test.py
from __future__ import print_function
import sys
print("sys.argv: ", len(sys.argv), " elements:")

for arg in sys.argv:


print(" - ", arg)
print()
print("__name__: ", __name__)

Output result stdout:


sys.argv: 6 elements:
- D:\TestScripts\ArgvAnd__main__Test.py
- username
- password
- 3.14
- path= "C:temp"
__name__: __main__

For more information on the __name__ global variable, see the Python docu-
mentation.

Example of message output


start /b /wait CODESYS.exe --
runscript="D:\Script\AmpelTest.py" --noUI 1>ScriptMessages.txt
All messages generated by the script are redirected to the
ScriptMessages.txt file by PLC Engineering. The other messages are output
in the command line.
start /b /wait CODESYS.exe --
runscript="D:\Script\AmpelTest.py" --noUI 2>NUL
PLC Engineering suppresses all messages except script messages. The script
messages are output in the command line.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 325 / 1158

Example of use of the option --scriptdebugger


The following initdebug.py script has been successfully tested with
pydevd-based debuggers such as PyDev / LiClipse or PyCharm. To use this
script, start PLC Engineering with the following command line:
--profile="Fanta Development Build" --
scriptdebugger="D:\test\charmdebug\initdebug.py"

initdebug.py file:

Using the command line interface


from _future_ import print_function
from _future_ import unicode_literals
import sys
sys.path.append(r"D:\test\Env2\Lib\site-packages\pycharm-
debug.egg")
import pydevd
def scriptdebuggersetup():
pydevd.settrace('localhost', port=51234, stdoutToServer=True,
stderrToServer=True)
def scriptdebuggershutdown():
pydevd.stoptrace()

Also refer to
● ⮫ http://docs.python.org/tutorial/modules.html

Option --ignorewhitespace
Add this option to the call of the development system in the command line
after the --compare <project1> <project2> option so that spaces are not
included in the project comparison. Note: Semantically relevant spaces, such as
in STRING literals, are nevertheless taken into account in any case.
Syntax
--compare="<path of project file>" "<path of reference project
file>" --ignorewhitespace="true"|"false"

Example
PLC Engineering.exe --compare "D:\proj\project1.project"
"D:\proj\project2.project" --ignorewhitespace="true"

Also refer to
● ⮫ Chapter 'Compare’ command on page 917

Option --ignorecomments
Add this option to the development system call in the command line after the
--compare <project1> <project2> option so that comments are not taken
into account in the project comparison.
Syntax:
--compare="<path of project file>" "<path of reference project
file>" --ignorecomments="true"|"false"

Example
PLC Engineering.exe --compare "D:\proj\project1.project"
"D:\proj\project2.project" --ignorecomments="true"

Also refer to
● ⮫ Chapter 'Compare’ command on page 917

R911403764, Edition 08 Bosch Rexroth AG


326 / 1158 ctrlX PLC Engineering

Option --ignoreproperties
Add this option to the development system call in the command line so that
object properties (access rights, translation settings, directories, bitmaps, etc.)
are not taken into account in the project comparison.
Syntax:
--compare="<path of project file>" "<path of reference project
file>" --ignoreproperties="true"|"false"

Example
PLC Engineering.exe --compare "D:\proj\project1.project"
"D:\proj\project2.project" --ignoreproperties="true"

Also refer to
● ⮫ Chapter 'Compare’ command on page 917

Option --skipunlicensedplugins (license for components missing)


Add this option to the call of the development system in the command line to
skip the query whether unlicensed components should be loaded anyway. In
this case, PLC Engineering silently does not load these components.

Example
PLC Engineering.exe --skipunlicensedplugins

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 327 / 1158

26 API for ctrlX PLC Engineering


General information
The API for ctrlX PLC Engineering allows to create and edit projects in ctrlX PLC
Engineering based on REST (REpresentational State Transfer)
Optionally, a Client API can be generated in different programming languages
for the OpenAPI specification. This allows for an automated PLC project cre-
ated for commissioning.

API for ctrlX PLC Engineering


Start parameter for use of interface
By default, the “ctrlX PLC Engineering” software tool automatically generates a
communication port via API.
Optionally, a fixed port can be assigned to the API. Starting the software with
an additional parameter --webserverport=<Port number>+
Please note that a blank space is entered between the storage location path
and the parameter.

The ctrlX PLC Engineering API initialization of the standard port can be modi-
fied by explicitly calling ctrlX PLC Engineering.
● Via the Windows input panel
<storage location>ctrlX-PLC-Engineering.exe --webserverport="Port number"
● Via a link
<storage location>\ctrlX-PLC-Engineering.exe --webserverport="Port number"

The selected port number is required to start a web server and must not be
assigned by another application.

Documentation of REST commands


The REST API help is provided as interactive documentation.

Opening interactive documentations


In the ctrlX PLC Engineering menu bar, click on “Help 🠂 API-reference”
🡆 A browser containing interactive documentation opens.
This documentation describes the REST APIPLC Engineering com-
mands:
● The interactive browser page communicates with the opened PLC
Engineering
● The default parameter port number is contained in the address line.
Example: „http://localhost:9002/index.html“

Disabling the PLC Engineering API


To start ctrlX PLC Engineering without enabled REST API, please start the
software as follows:
<storage location>\ctrlX-PLC-Engineering.exe --disablewebserver"

R911403764, Edition 08 Bosch Rexroth AG


328 / 1158 ctrlX PLC Engineering

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 329 / 1158
Library manager

27 Using libraries
27.1 Library repository
Libraries and their respective metadata are stored in the library repository on
the engineering system. Implement any installed the libraries into your project
using the library manager. The libraries are installed under version control to
easily update the libraries.
You can create and edit more repositories in addition to the preinstalled
System repository.
Also refer to
● ⮫ Chapter Command 'Library Repository' on page 969

Using libraries
27.2 Library manager
To be able to use programming blocks provided in a block library in the applica-
tion, the library has to be included in the project in the library manager. The
prerequisite for this is the installation of the library in the library repository.
The library manager displays all included libraries according to their library
type and associated properties. In the Library Manager, you can add more libra-
ries from the library repository, remove libraries, and edit library properties.
The Library Manager can be inserted into the “POUs” view or the “Devices”
view. In this way, a project can have one Library Manager per application and
also one cross-application Library Manager in the “POUs” view. The library
modules of the linked libraries in the “POUs” view can be called regardless of
the application. The library modules of the linked libraries in the “Devices” view
can be called in the respective application code only. Furthermore, placeholder
libraries respond differently when downloading depending on their positions.
Libraries that are linked to a specific version in the project also have a place-
holder for that version (placeholder library). You can define special placeholder
resolutions. You can also use the placeholder resolution that is defined for a
device in the device description or that is stored in the library repository for
a library. The library manager notifies about the actual placeholder resolution
and shows the version that is used when downloading an application (effective
version).
If a library manager is included in the “POUs” view across applications, you
can access its contents globally. If placeholder libraries are linked, then only
the placeholder resolutions in the device description or library repository are
checked.
Normally, a Library Manager is linked in the “Devices” view. Then, only the
application code below calls the library function blocks. Moreover, the special
placeholder resolutions are checked first for placeholder libraries. Only after
that are the placeholder resolutions checked that are in the device description
or that originate from the library repository.
Also refer to
● ⮫ Chapter 33.2.19 "Library manager” object on page 780
● ⮫ Chapter 18.7 Using library function blocks on page 136

R911403764, Edition 08 Bosch Rexroth AG


330 / 1158 ctrlX PLC Engineering
Information for library developers

27.3 Information for library developers


In order to avoid consistency problems and to adequately support the user,
be sure to adhere to certain rules for the creation, referencing, encryption,
protection, and documentation of libraries.
The following description provides only an overview of the library development
possibilities. For a more detailed description of these topics, see the "LibDev-
Summary" guidelines for library development.
Also refer to
● ⮫ Chapter 27 Using libraries on page 329

General information
● Categories for libraries can be defined. The libraries are then displayed in
the library repository below these categories.
● Define a namespace for a library to ensure unambiguous access to the inte-
grated objects. For a unique access, add the namespace in front of the
function block name:
<namespace>.<variable name>
Example: AC.Module
● To open the POUs of unencrypted libraries (*.library), double-click on the
respective entry in the library manager.
● The following library types can be created:
– *.library: Implementation library (source code of the library)
– *.compiled-library, *.compiled-library-v3: Protected library; the
source code can no longer be accessed.
– *_Itfs.library: Interface library; contains only objects that serve the
interface definition of a component (for example, constants, structures,
interfaces) and do not generate any code
– *_Cnt.library: Container library; does not contain any programming
function blocks, but only other libraries; thus serves for convenient inclu-
sion of a whole set of libraries whose blocks are published at the top
level of the container library.
● External libraries can be integrated into the application. External libraries
are programmed outside of PLC Engineering in a different programming
language, for example C.
Library protection
● Source code protection:
When a library is prepared in "compiled-library" format, the source code of
the library modules is no longer visible after the library is integrated into a
project.
● Signing:
In PLC Engineering V3 SP15 and later, a certificate is always used for the
signing of library projects (*.compiled-library-v3). The signing can be
enforced by means of a setting in the security screen. Then for generating a
compiled library, you need a certificate suitable for code signing in your user
profile.
For library projects that have to be compatible with PLC Engineering < V3
SP15 (*.compiled-library), only the less secure signing with a private
key and an associated token is possible. This outdated method should only
be used for compatibility reasons and is executed via the “Sign” tab of the
“Project information”.
Note: For signing libraries you should use compiler version 3.5.15.0 or
higher, as this version uses a better memory format.
● Licensing:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 331 / 1158
Adding a Library to the Repository

You can protect libraries by means of a license (dongle or soft container).


License-protected libraries can be installed in the library repository. How-
ever, for use in the project, the valid license has to exist on the computer.
Licenses are managed in the License Manager.
Library versions
● Multiple library versions can be simultaneously installed on the system.
● You can have several versions of a library integrated into your project at the
same time. However, we do not recommend doing this. In this case, each
of the libraries must be assigned a unique namespace and access to the
symbols must be qualified. Examples: V1.SendBlob, V2.SendBlob
Referenced libraries
● A library can be integrated into other libraries (referenced libraries). The

Using libraries
nesting depth is arbitrary.
● It can be defined whether referenced libraries should be visible in the library
manager.
● You can integrate referenced libraries via library placeholders. This avoid
problems that can occur due to version dependencies or the necessity to
use vendor-specific libraries.

Also refer to
● ⮫ Chapter 8.4 Retrieving and editing project information on page 64

27.4 Adding a Library to the Application


The following instructions describe how to integrate for example the library
Util into your application in order to use its library POUs.
1. Select the Library Manager and click “Project 🠂 Edit Object” to open it in
the editor.
🡆 The Library Manager opens in the editor.
2. Click “Library 🠂 Add Library”.
🡆 The “Add Library” dialog opens.
3. Type the string "util" into the input field above to search the library.
🡆 The library Util is displayed in the library view.
4. Select the library Util and click “OK” to close the dialog.
🡆 The library Util is added to the Library Manager.
See also
● ⮫ Chapter 18.7 Using library function blocks on page 136
● ⮫ Chapter Command 'Add Library' on page 1007
● ⮫ Chapter 27.5 Adding a Library to the Repository on page 331

27.5 Adding a Library to the Repository


The following instructions describe how to install a library in the library reposi-
tory.
1. Select the command “Tools 🠂 Library Repository”.
🡆 The dialog box “Library Repository” opens.
2. Click on the “Install” button.
3. Select the library that you wish to install. You can set a file filter here.
Click on “Open”.
🡆 The library is added to the repository. The library can now be added in
the Library Manager.

R911403764, Edition 08 Bosch Rexroth AG


332 / 1158 ctrlX PLC Engineering
Exporting Library Files

See also
● ⮫ Chapter 27.4 Adding a Library to the Application on page 331

27.6 Exporting Library Files


You can export a library from the library manager of a project or from the
library repository and then save it as a file to the hard disk.
Export from the library manager
1. Open a library manager of an application in a project.
2. Select a library in the library manager.
3. Click the export command in the context menu.
🡆 The “Export Library” dialog box opens.
4. If the selected library is linked in the project not only as a compiled
library, but also in source format, then both file types are in the drop-
down list for “File type”. Otherwise, the filter automatically shows the
available type: "*.library or *.compiled-library.
5. Select the file type and storage location and click “Save”.
Export from the library manager
1. Open the PLC Engineering library repository (“Tools” menu).
2. Select a library version in the window of the installed libraries.
3. Click the “Export” button.
🡆 The “Export Library” dialog box opens.
4. As step 4 and 5 for "Export from the library manager".

See also
● ⮫ Chapter 33.2.19 "Library manager” object on page 780
● ⮫ Chapter Command 'Library Repository' on page 969

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 333 / 1158
Installing Devices

28 Managing Devices
28.1 General
PLC Engineering manages the installed devices in the so-called device reposi-
tory. A device repository is a defined location in the file system. In the default
PLC Engineering installation, it is defined with an absolute path as the system
repository. You install or uninstall devices in the “Device Repository” dialog.
The system installs a device by reading the device description file. The proper-
ties of a device are defined in these files regarding configurability, programma-
bility, and possible connections to other devices.
You can use the devices provided in the device repository by adding them to

Managing Devices
the device tree of your project.
Also refer to
● ⮫ Chapter Command 'Device Repository' on page 963
● ⮫ Chapter 28.2 Installing Devices on page 333

28.2 Installing Devices


Install a device in the device repository in order to include it in your project.
1. Click “Tools 🠂 Device Repository”.
🡆 The “Device Repository” dialog box opens.
2. Select the install location. “System Repository” is set by default.
3. Click “Install”.
🡆 The “Install Device Description” dialog box opens.
4. Select the file path of the device description.
5. Select the file type filter of the required device description.
🡆 All device descriptions of the selected file type are listed.
6. Select the required device description and click “Open”.
🡆 PLC Engineering adds the device description to the matching category
of your device repository.
If errors occur during installation (for example, missing files that are
referenced by the device description), then PLC Engineering displays
them in the lower part of the device repository dialog box.
See also
● ⮫ Chapter Command 'Device Repository' on page 963

R911403764, Edition 08 Bosch Rexroth AG


334 / 1158 ctrlX PLC Engineering
Installing Devices

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 335 / 1158
Installing/uninstalling add-ons

29 Managing packages and licenses


29.1 Licensing additional projects (plugins)
In addition to the standard installation, third-party manufacturers such as Cod-
esys GmbH offer additional products for use in PLC Engineering that are sub-
ject to a fee and license. The manufacturer provides the licenses for such
products as ticket numbers, which can be installed via the License Manager in
PLC Engineering.

Managing packages and licenses


The license information is stored on the runtime system of the ctrlX device. For
more information on the topic "Licensing", refer to the "HOW-TO" section of the
⮫ ctrlX Automation website.
In the license repository you can retrieve the current information for each ticket
number from the central license server. Other information is also provided,
such as whether a license can still be activated or must be returned.
License check when starting PLC Engineering
When it starts, PLC Engineering checks the selected profile for plug-ins that are
subject to licensing.
● If the profile does not include plug-ins subject to licensing, then PLC Engi-
neering starts as usual without a message.
● If the profile includes plug-ins subject to licensing and a dongle with the
required licenses is connected to the USB port of the computer, then PLC
Engineering starts without any message.
● If the profile includes plug-ins subject to licensing but no dongle is available
or a required license cannot be found, then, PLC Engineering displays the
“License Missing” dialog at start-up.
Note: When starting from the command line, this dialog is skipped when
specifying the --skipunlicensedplugins option in the command line. In
this case plug-ins without the required license are automatically not loaded.
License check during running operation
While PLC Engineering is running, it is checked every five minutes whether the
required licenses are available. If a license is missing, for example as the dongle
has been removed in the meantime, the “Missing license” dialog is displayed
and there are the following options:
● Plug the dongle back in and press “Repeat”: If the dongle is equipped with
the missing licenses, you can now continue working.
● “Save Current Project and Exit”: PLC Engineering saves the project and
closes.
● “Close”: PLC Engineering closes without saving the project.
When removing the license dongle after the plug-in has been loaded, an error
message is displayed.
To fix the problem, plug the dongle back in and press the Retry button. If the
dongle contains a valid license, the dialog closes and you can continue working.
Clicking “Cancel” will exit PLC Engineering.

29.2 Installing/uninstalling add-ons


The installation and management of externally provided software add-ons for
ctrlX I/O Engineering and ctrlX PLC Engineering is realized via the "Add-On
Installer" software, see:
⮫ 'Add-on installer' dialog

R911403764, Edition 08 Bosch Rexroth AG


336 / 1158 ctrlX PLC Engineering
Licensing products

The ctrlX Add-On Installer is based on functions of the CODESYS installer of


the CODESYS GmbH.
The complete documentation can be found on the CODESYS website, see:
⮫ Web documentation

Installing the add-on


1. Open the add-on installer via the menu “Tools 🠂 Add-on installer”
2. Click on “Install file”
3. In the “Open” dialog, select an add-on from the file directory and click
on“Open”.
4. In the next step, the “Confirmation required” dialog shows an overview of
the add-on to be installed. Confirm the installation with “Ok”. Optionally,
you can also cancel the installation by clicking on the“Cancel” button
5. The “Install packages” dialog opens.
In the first step, the certificates are displayed for unknown add-ons,
including the associated properties. The dialog and displays information
on whether and how the selected add-on is signed.
6. If it is a self-signed or unsigned add-on, explicitly allow the installation
of this add-on by enabling the “Allow unsigned and self-signed add-ons”
option.
7. If you agree with the displayed signing, click on“Continue”. Cancel the
installation by clicking on“Cancel”.
🡆 Add-ons may also include licensing information. This information is dis-
played in the next step. Via the tabs “License Agreement”, “Signature”
and “Third Party Licenses” you can read the corresponding details. You
can continue with the installation only after confirming the respective
conditions by clicking the box next to it and then confirming with the
“Continue” button. PLC Engineering also displays the “checksum” of
the add-on.
9. Before proceeding with the installation, first close the open instances of
ctrlX I/O Engineering and ctrlX PLC Engineering. In any case, the add-on
installer indicates any instances that may still be open via a dialog.
10. Close all PLC Engineering instances.
🡆 The add-on installer performs the installation of the add-on in PLC
Engineering and displays the installation steps as well as their progress.
11. Finally, the result of the installation is displayed. Finally, confirm the result
with“OK” on “Finish”.
Uninstalling the add-on
1. Select the add-on
2. Click on “Uninstall”
🡆 The wizard opens and is ready to uninstall the add-on.
3. Close all PLC Engineering instances.
🡆 The add-on installer performs the uninstallation of the add-on PLC Engi-
neering.

29.3 Licensing products


The use of many software products is license-protected, so before you start
using a product, first activate it. An add-on product that extends the scope of
work ofctrlX I/O Engineering or ctrlX PLC Engineering is usually activated with a
workstation license. Licensing is realized via the Codesys security key, a dongle
that manages all licenses of your workstation. Optionally, some products will
soon support licensing on a soft container.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 337 / 1158
Licensing products

Both licenses of add-on products on the local computer and individual device
licenses can be managed uniformly via the PLC Engineering license manager.
For devices with a unique serial number, if the license information on the
device is lost, the license manager can reactivate the license from an automati-
cally stored license backup file.
If possible, license your products via online activation instead of offline activa-
tion.

Online activation

Managing packages and licenses


Activation is possible in the “License manager” dialog in ctrlX I/O Engineering
System. The prerequisite for this is that your development system has internet
access. The target system itself does not require internet access.
Optionally, activate a license on the “License Central” website.

Offline activation
If your workstation computer does not have internet access, activate products
using a license activation file. The PLC Engineering license server provides
the file. Connect to the server from any web-enabled computer and request
the file. Then transfer the file to your workstation computer using any storage
device. As usual, the product is activated in ctrlX I/O Engineering System, both
for workstation licenses and for single device licenses.
Optionally, if you have access to a web-enabled computer but ctrlX I/O Engi-
neering System is not installed, you can access the “CodeMeter Control
Center” from Wibu-Systems to activate the license.
The “CodeMeter control center” controls the CodeMeter service and is
included in the PLC Engineeringsetup.

Offline activation of an add-on license on the local computer


The following instruction describes the licensing by a dongle. Licensing via a
soft container is done analogously.
Prerequisite: You have internet access on the computer on which you want
to install the license and the ctrlX I/O Engineering System is installed on the
computer. A dongle is plugged into the computer.
1. Select the command “Tools 🠂 License manager”.
🡆 The wizard starts with the “License Manager - Select target device”
dialog.
2. Select “Workstation” as the target device, click on “Next >”, then select
“Dongle” in the “License Manager - Select container” dialog, and again
click on“Next >”.
🡆 The “License manager” dialog opens and shows the product to be
licensed as unlicensed in the “Products” window.
3. Select the product and click on the “Install Licenses” button.
🡆 The wizard “Install licenses on workstation dongle <Dongle-ID> - Select
operation” is displayed.
4. Select the “Activate license” operation and click on“Next >”.
🡆 The “Install licenses on workstation dongle <Dongle ID> - Activate
licenses” dialog is displayed.
5. Enter the “ticket ID” provided by the software provider. The ID consists of
5 blocks of 5 alphanumeric characters each.
Select the “license server” that provides the license to activate the
product. The software provider provides the server URL.

R911403764, Edition 08 Bosch Rexroth AG


338 / 1158 ctrlX PLC Engineering
Licensing products

6. Click on the “Next >” button


🡆 The connection to the license server ⮫ (http://license.codesys.com) is
established.
● If the specified ticket contains only 1 license, a dialog confirming
the activation is displayed after the server action is successfully
completed.
● If the specified ticket contains multiple licenses, the “Install licenses
- Select” licenses dialog is displayed first with the list of licenses
managed in the ticket.
7. In case of multiple licenses, select the license to be activated and click on
“Next >”.
🡆 After successful completion of the server action, a dialog is displayed
confirming the activation.
Alternatively
1. Open a browser and select the ⮫ License central web page.
🡆 The “License Manager” dialog opens.
2. Enter your license number.
3. Select “Search”.
4. Click on “Next >”
🡆 The connection to the license server ⮫ (http://license.codesys.com) is
established.

Restoring licenses
From PLC Engineering V3.5 SP13, a license backup file *.WibuCmRau is auto-
matically generated when activating single-user licenses for devices with a
unique serial number. The file is stored on your computer and on the license
server. In case of loss of the licensing files on the device, the license can be
restored from this file with the help of the License Manager.
A device license was activated.
1. In PLC Engineering select the command “Tools 🠂 License Manager”.
Follow the wizard with the appropriate entries for the target device:
Device and container (soft container or dongle), and the selection of the
device in question.
2. In the “License Manager” dialog, click on the “Additional functions” button
and select the “Restore license” command.
🡆 The “Restore licenses” dialog opens.
3. Enter the “ticket ID” for the device license and click on “Restore”.
🡆 PLC Engineering searches for the license backup file, first on the local
computer, then on the License Central Server. When the file matching
the device is found, the license is restored and activated.

List license information for products and device features of a control


Prerequisites:
● ctrlX I/O Engineering System is opened (from version V3.5 SP15)
● The gateway and the control whose information is to be read out are running
● There is no application on the control
1. Select the command “Tools 🠂 Device Reader”
🡆 The “Select device” dialog opens.
2. Double-click on the desired gateway to browse the network.
If no gateway is displayed, first click on“New gateway” and select the
desired gateway in the “Gateway” dialog.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 339 / 1158
Licensing products

3. Select the desired control.


4. Confirm your selection by clicking on the “OK” button.
Note: If there is an application on the control, a dialog is displayed asking
if all applications should be removed from the control. When clicking
on“No in”, the license information of the control cannot be read. The
“Device Reader” command is aborted.
🡆 PLC Engineering creates the list with the license information for the
products and device features of the selected control and displays the
information in the “Device reader” dialog.

Managing packages and licenses

R911403764, Edition 08 Bosch Rexroth AG


340 / 1158 ctrlX PLC Engineering
Licensing products

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 341 / 1158
Using scripts– Basic information

30 Using scripts
30.1 Using scripts– Basic information
With the scripting feature in PLC Engineering, you can automate commands
or complex program operations that you would otherwise have to do manually
with mouse clicks and text input in the PLC Engineering user interface. You
can start these scripts from the PLC Engineering user interface (command or
configured toolbar) or from the Windows command line.

Examples of use cases


● Integration of PLC Engineering in automatic build server environments:

Using scripts
– Continuous Integration (CI)
– Continuous Delivery (CD)
– Continuous Testing
● Integration with third-party software, for example:
– Code generators
– Creation of projects that are custom tailored to a specific machine config-
uration
● Creation of documentation
● Updating of libraries:
– Setting of project information during the release process
● Automatic testing:
– Mostly in connection with the CODESYS Test Manager
● Outputting variables via monitoring APIs
Also refer to
● ⮫ Continuous Delivery (CD)
● ⮫ Continuous Integration (CI)
● ⮫ Continuous Testing

Scripting language
The PLC Engineering scripting language is modular and based on IronPython.
For this purpose, the PLC Engineering "ScriptEngine" component combines
the IronPython interpreter with the PLC Engineering development environment.
Then you can use the extensive Python framework libraries, which includes file
access in networks and much more.
PLC Engineering does not yet include its own Python editor. Create your scripts
with any text editor or the Python editor.
Also refer to
● ⮫ Chapter 30.3.1 Python script – Basic information on page 348

Architecture of the ScriptEngine, Extension possibilities


The (Iron)Python scripting language used in PLC Engineering allows for access
to the PLC Engineering scripting APIs for controlling PLC Engineering opera-
tions. Moreover, it lets users effectively apply both the Python standard library
and third-party Python modules, as well as third-party .NET framework libraries
and .NET assemblies.
Users can execute the scripts from menu commands or configured toolbars in
the PLC Engineering interface or from the Windows command line. Add-ons
such as the CODESYS Test Manager also provide ways to execute scripts.

R911403764, Edition 08 Bosch Rexroth AG


342 / 1158 ctrlX PLC Engineering
Executing scripts

There is not an integrated Python editor in PLC Engineering. Use your favorite
text editor or the Python development environment.
With the Automation Platform APIs, the ScriptEngine APIs can be extended.
Examples for this are CODESYS Test Manager and CODESYS SVN. Both provide
their own objects and methods as an extension to the scripting APIs. In addi-
tion, the CODESYS Test Manager allows for the execution of scripts in a test
case. Refer to the respective API documentation of the AddOns. Registered
Automation Platform users will find more information in the PLC Engineering
Developer Network.
Also refer to
● In the offline help: ⮫ API reference documentation for the ScriptEngine
● In the online help: ⮫ API reference documentation for the ScriptEngine

30.2 Executing scripts


30.2.1 Executing a script - Basic information
To execute Python script files (<filename>.py) containing a sequence of com-
mands to enable the PLC Engineeringfunctionalities proceed as follows:
● From the PLC Engineering user interface by means of commands in the
menu “Tools 🠂 Scripting”
● From the PLC Engineering user interface by means of a customized, config-
ured toolbar
● From the Windows command-line

30.2.2 Calling scripts from menu commands


Prerequisite: There is a valid Python script file <filename>.py in the file
system. The PLC Engineering user interface is open.
1. Optional: If you want to monitor the execution of the individual commands
used in the script, select the command “Tools 🠂 Scripting 🠂 Enable script
tracing”.
2. In PLC Engineering, select the menu command “Tools 🠂 Scripting
🠂 Execute script”.
🡆 The statements in the script are executed and, if script tracing is acti-
vated, listed in the message view.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 343 / 1158
Executing scripts

30.2.3 Starting scripts from the command line


In automated environments such as CI (Continuous Integration) servers or if
scripts in PLC Engineering have to be controlled by other programs, menu
commands are not appropriate for executing scripts. For these kinds of require-
ments, you can use the Windows command line to start PLC Engineering and
execute scripts.
Prerequisite: There is a valid Python script file <filename>.py in the file
system.
1. Create a CMD file that starts with start PLC Engineering and executes
the script file with the option --runscript. Other options are possible,
such as --noUI if the PLC Engineering user interface should not be
opened.

Using scripts
2. Open the Windows “Command prompt” and execute the CMD file.
You can pass arguments with additional information to the script. Python
scripts can access arguments with the sys.argv[] list. The first element
(Index 0) is always the name or path of the Python script that is executed,
followed by the actual parameters. (This is similar to argc/argv in C.) In addi-
tion, scripts can also access environment variables that are set before PLC
Engineering is started with the corresponding Python or .NET APIs.

Example
A CMD batch file argvtestbat.cmd has the following contents (all in one
line):
"C:\Program Files (x86)\3S CODESYS V3.5
SP10\CODESYS\Common\CODESYS.exe" --profile="CODESYS V3.5
SP10" --runscript="D:\Dokumente\Scripting\ArgvTestScript.py"
--scriptargs:'username password 3.14 "path=\"C:\temp\\\""' --
noUI

A matching script file ArgvTestScript.py:

Example
from __future__ import print_function

import sys
print("sys.argv: ",
len(sys.argv),
" elements:")

for arg in sys.argv:


print(" - ", arg)
Now when you execute the CMD file, PLC Engineering starts and executes
the script without opening the PLC Engineering main window. Then PLC Engi-
neering is exited:

R911403764, Edition 08 Bosch Rexroth AG


344 / 1158 ctrlX PLC Engineering
Executing scripts

For a complete reference of all possible command line parameters, see the
help page for the command line interface in PLC Engineering in the section on
"--runscript".
Also refer to
● ⮫ Python API documentation
● ⮫ Information about the .NET API

30.2.4 Calling scripts from toolbar icons


You can provide your own toolbar in the PLC Engineering user interface with up
to 32 icons for calling script files. For this you need an ICO file where the icon
is stored, and a PY file where the Python script to be called is stored.
You create the configuration file config.json in the installation directory or
in the program data directory (PLC Engineering\Script Commands). In the
file, schematically specify the call information for each icon. A maximum of 16
icons can be configured. You can also store the ICO and PY files in the same
directory.
Storage locations
● <PLC Engineering installation directory>\PLC
Engineering\Script Commands\
● %PROGRAMDATA%\PLC Engineering\Script Commands\

Example
Standardinstallation auf Windows 7

C:\Program Files (x86)\CODESYS 3.5.14.0\CODESYS\Script


Commands\
C:\ProgramData\PLC Engineering\Script Commands\

If you store a config.json file with different call information at each of the
storage locations, then you can configure up to 32 different icons.

Configuration file
Schema der Konfigurationsdatei für 2 Icons

[
{
<icon call information>
},
{
<last icon call information>
}
]
Schema der Aufrufinformation <icon call information>

"Name": "<tooltip of the symbol button>",


( "Desc": "<description of the symbol button>", )?
"Icon": "<icon file name>",
"Path": "<path of the script file>",
"Params":
[
( "<value>", )*
"<last value>"
] // Number of parameters is matching the script

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 345 / 1158
Executing scripts

Table 6: Call information


"Name" Required; displayed as icon tooltip
Example: "Name": "Pause"
"Desc" Optional; comment for icon
Example: "Desc": "Operation pause"
Note: Not yet displayed in the user interface
"Icon" Mandatory, file path <directory path>\<icon name>.ico of the
icon
Example: "Icon": "pause.ico"
Tip: If the file is located in the same folder as the config.json file,
the file name is sufficient.

Using scripts
"Path" Mandatory, path of the Python script <directory path>\<script
name>.ico
Example: "Path": "stop.py"
Tip: If the file is located in the same folder as the config.json file,
the file name is sufficient.
"Params" Optional; only if the script requires parameters
Example: "Params": [ "file1", "file2" ]

Example
Datei config.json

[
{
"Name": "Start",
"Desc": "Starts processing",
"Icon": "start.ico",
"Path": "goon.py",
"Params":
[
"--continue"
]
},
{
"Name": "Pause",
"Desc": "Pause operation",
"Icon": "pause.ico",
"Path": "stop.py",
"Params":
[
"delay:-1"
]
},
{
"Name": "Processing",
"Desc": "Process again",
"Icon": "VarStatSmall.ico",
"Path": "process.py",
"Params":
[
"exit"

R911403764, Edition 08 Bosch Rexroth AG


346 / 1158 ctrlX PLC Engineering
Executing scripts

]
}
]
The Script Commands folder contains the following files:

config.json
goon.py
stop.py
process.py
start.ico
pause.ico
VarStatSmall.ico"

Creating script calls for a toolbar button


1. Create the Script Commands folder in one of the storage locations.
🡆 C:\ProgramData\PLC Engineering\Script Commands
2. Create executable Python files there.
🡆 Example:
Datei copy.py
print("The script COPY.PY is executed")
Datei delete.py
print("The script DELETE.PY is executed")
3. Create the ICO files for the scripts.
🡆 Example: Copy_before.ico, Copy_below.ico, CopyAll.ico
4. Create a configuration file config.json there.
🡆 The folder C:\ProgramData\CODESYS\Script Commands has the fol-
lowing contents:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 347 / 1158
Executing scripts

5. Open config.json and add the outlined call information.


🡆
[
{
"Name": "Copy Before",
"Desc": "Copy something",
"Icon": "Copy_before.ico",
"Path": "copy.py",
"Params":
[
"before"
]
},

Using scripts
{
"Name": "Copy Below",
"Desc": "Copy something",
"Icon": "Copy_below.ico",
"Path": "copy.py"
},
{
"Name": "Copy All",
"Desc": "Copy something",
"Icon": "CopyAll.ico",
"Path": "copy.py",
"Params":
[
"all"
]
},
{
"Name": "Delete",
"Desc": "Delete something",
"Icon": "Delete.ico",
"Path": "delete.py",
}
]
6. Start PLC Engineering.
🡆 The script files, the symbol files and the configuration file are read
in and are then available in the dialog “Tools 🠂 Customize” dialog in
the “Command icons” tab of the “ScriptEngine commands” command
category.
7. Open the dialog “Tools 🠂 Customize” and click on the “Toolbars” tab.
8. Select the empty toolbar and click on the “Add Toolbar” button.
🡆 A line editor opens at the empty toolbar.
9. Type in a name (example: User defined toolbar).
🡆 The custom toolbar is displayed in the PLC Engineering window.
10. Add the recently imported commands and close the dialog.

R911403764, Edition 08 Bosch Rexroth AG


348 / 1158 ctrlX PLC Engineering
Creating a python script

11. Click one of the icons.


🡆 The following output is displayed in the message view.

Also refer to
● ⮫ Chapter 7.2.2 Customizing Toolbars on page 48

30.3 Creating a python script


30.3.1 Python script – Basic information
Python is a dynamic language. You can start in a simple linear programming
style (batch files) and later add the necessary and more powerful means, such
as conditions, loops, functions, exceptions, classes, and modules. The focus
of the language is on easy and expressive code. Python is more typical at
runtime and uses an automatic garbage collector to protect the programmer
from accidental damage to the entire system.
IronPython is an implementation of Python for .NET and allows for full access
to the .NET framework and classes. The implementation of the IronPython inter-
preter is based on Python Version 2.7.
There are a variety of free manuals and help pages on the Internet. See the
following links for an introduction and detailed introduction about IronPython.
● ⮫ http://forum.codesys.com/viewforum.php: "Script language Python..." in
the PLC Engineering forum.
– Especially PLC Engineering-specific questions.
– Also includes some examples.
● ⮫ https://docs.python.org/2/tutorial/index.html:: Python tutorial in the offi-
cial Python documentation.
● ⮫ http://docs.python.org/release/2.7/: Official documentation on Python 2.7
● ⮫ http://wiki.python.org/moin/BeginnersGuide: Useful manuals to learn Iron-
Python.
● ⮫ http://wiki.python.org/moin/GermanLanguage: Hyperlink collection for
German help pages.
● ⮫ http://stackoverflow.com/: General community for programming. For gen-
eral question about (Iron)Python, not PLC Engineering-specific.
● ⮫ http://ironpython.net/: IronPython homepage
● ⮫ http://ironpython.net/support/: Mailing list, FAQ, etc.
● ⮫ https://gitter.im/IronLanguages/ironpython:: Chat channel for IronPython
developers.
Version incompatibility to Python V3.x
The Python programming language will soon be available in the new version
V3.x. Some old program modules were removed. Bosch Rexroth AG plans to
upgrade to this new version. Scripting developers should take this into consid-
eration and design their scripts accordingly, for example by using the expres-
sion from __future__ import print_function. You can find more informa-
tion about this topic at ⮫ http://wiki.python.org/moin/Python2orPython3 and
⮫ http://docs.python.org/release/3.1.2/whatsnew/3.0.html

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 349 / 1158
Creating a python script

30.3.2 Getting Started with Python for PLC Engineering


See below for an simple application of a Python script in PLC Engineering:
1. In any text editor, create a text file hello.py with the following contents:
print("Hello, automation!")
2. Start PLC Engineering and click “Tools 🠂 Scripting 🠂 Execute Script File”.
Select the file hello.py in the file system.
🡆 See the result in the message view:

Using scripts
For more detailed examples of Python scripts for different use cases with PLC
Engineering, refer to the following help pages:
See also
● ⮫ Chapter 30.3.4 Basic Syntax of Python (with Examples) on page 350
● ⮫ Chapter 30.3.5 Python Control Structures (with Examples) on page 358

30.3.3 Tips for Python Programmers about .NET API Documentation


The current prerelease of the script interface documentation has been gener-
ated automatically from the underlying .NET and C# sources. Therefore, the
documentation includes some expressions that are not familiar to Python pro-
grammers. The following overview provides some tips about how these expres-
sions can be understood from the Python perspective.
● An interface is the contract that tells an instance of a class that implements
the interface which members (methods, properties) it has to prepare. In
IronPython, you can implement one or more .NET interfaces in one class
by inheriting from a superclass. If a method is needed for the interface
but is not available in the class definition, then an exception is thrown.
(The DeviceImportFromSvn.py example shows a class that implements the
ImportReporter interface.)
● Each parameter and each method in .NET is typed strictly. The type of
parameter is separated by one space character before the parameter name,
and the type of return value from a method by one space character before
the method name. You can use instances from subclasses when you define a
class (or interface). A method without a return value is marked void.
● You can overload methods, as multiple methods of the name can exist in one
class. However, the number or the types of parameters must be different.
IronPython automatically takes care of the most appropriate method over-
loading being called.
● The data type int corresponds to an integer from -2,147,483,648 to
2,147,483,647.
The data type bool corresponds to the Python type bool (True and False).
The data type string corresponds to the Python types str or unicode,
which are identical in IronPython.
The IDictionary<Object, Object> data type corresponds to an ordi-
nary Python dictionary. IronPython automatically converts between Python
and .NET data types.

R911403764, Edition 08 Bosch Rexroth AG


350 / 1158 ctrlX PLC Engineering
Creating a python script

● When a T type is inherited from IBaseObject<T>, it means that this type


can be extended by other plug-ins for additional members. The actual
use of this extended type as a parameter or return value is marked by
IExtendedObject<T>.
● The IEnumerable<T> interface to a T type means that you can use every
Python sequence (generators, lists, tuples, …) that returns T type values (or
a subclass). Returns the sequence of incompatible objects, and throws an
exception at runtime.
● The IList<T> interface to a T type identifies a typified list that guarantees
to include only elements of type T (or a subclass). An exception is thrown at
runtime when any attempt is made to add an incompatible object.
● The params T[] name id for a parameter of type T corresponds to the
Python mechanism *name for variable argument lists.
● In Python, enumerations (enum) do not exist as language constructs.
Its purpose is to define an exact number of constant values for a spe-
cific purpose, for example the days of the week. Access to .NET enumer-
ations from IronPython works by using "Name.Member", for example via
OnlineChangeOption.Try.
(There are many ways of emulating enums in Python. For exam-
ples, see ⮫ http://pypi.python.org/pypi/enum/ or ⮫ http://www.ironpy-
thon.info/index.php/Enumerations.)
● The syntax T name { get; set; } defines a property with name as the
name and T as the type. If set; is missing, then the property is read-only. In
Python, the respective construct is @property decorator.
See also
● ⮫ Documentation for Python API
● ⮫ Information about .NET API
● ⮫ Chapter 30.3.6 Accessing PLC Engineering functionalities with a script
on page 362

30.3.4 Basic Syntax of Python (with Examples)


Python is similar to the languages of the C family, but there are some signifi-
cant differences and unique properties.
The most obvious syntactic difference between Python and language such as
C and ST is that the Python parser recognizes block structures by their inden-
tation. There is no BEGIN/END or braces {} to identify the blocks of IF/ELSE
conditions, FOR and WHILE loops, or functions.
Comments start with # and extend to the end of the line. In the first and
second line of the source code, you can set a special marker to declare the
encoding of the file. We recommend that you use UTF-8 as the encoding if
ASCII characters are not required.
For debugging purposes, you use print for easy output. With the % operator,
you achieve functionality similar to the C function printf(). The output is
displayed in the message view of PLC Engineering.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 351 / 1158
Creating a python script

Example: print
# encoding:utf-8

# defining a function with the parameter i


def do_something(i):
# if branch
if i>0:
print("The value is: %i" % i)
sum += i
print("The new sum is: %i" % sum)

# else if (optional, there can be none or several elif

Using scripts
branches)
elif i=0:
print("The sum did not change: %i" % sum)

# and the final else branch (also optional).


else:
handle_error()

# an endless while loop


while True:
print("I got stuck forever!")

Everything that belongs to the same block has to be indented the same dis-
tance. The size of the indentation is irrelevant. Elements such as brackets and
braces have a higher priority than indentations. Therefore, the following code
segment is completely correct, even if it is written in a poor programming style:

Example: Indentation
# warning: bad style below. Kids, don't try this at home!
if foo >= bar:
print("foobar")
else:
print(
"barfoo"
)

To avoid ambiguity, you should not mix tabs and spaces in a file.
At this time, mixing tabs and spaces gilt in Python 3 qualifies as a syntax error.
The official Python Style Guide recommends indentation of four spaces and
includes some examples of good and poor style. The Python tutorial provides a
summary of coding style.
Python is case-sensitive, similar to and in contrast to ST. Keywords, such as
def, if, else, and while, have to be lowercase (in contrast to the ST rule:
keywords are uppercase). Two identifiers, such as "i" and "I", also identify two
different variables.
the following keywords are reserved in Python and not permitted for use as
identifiers for variables, functions, etc.: and | as | assert | break |
class | continue | def | del | elif | else | except | exec |
finally | for | from | global | if | import | in | is | lambda
| not | or | pass | print | raise | return | try | while | with
| yield.
Python 3 defined four other keywords: False | None | True | nonlocal.
While the first three are really new, the first three were already predefined
constants in Python 2 and should not be used for any other purposes.

R911403764, Edition 08 Bosch Rexroth AG


352 / 1158 ctrlX PLC Engineering
Creating a python script

See also
● ⮫ Python Style Guide
● ⮫ Python Tutorial

Variables and data types


Python is a powerful, dynamically typed language -- all type information is eval-
uated at runtime. Variables hold references to objects, and the object knows
its type, not the variable. When a programmer attempts to execute an opera-
tion that is not possible (for example, adding an integer and a string), Python
throws an exception at runtime.
Consequently, there are no declarations of variables and their types. In Python,
variables are created only to assign values to them. This is completely different
in C and ST where types are strong and static. Every variable is declared with a
type, and at compile time the compiler checks that the type and operators are
permitted.
Refer to the following examples for dealing with variables:

Example: Variables
# assign the integer 1 to the variable i (also "creates" the
variable")
i = 1

# assign the string "foobar" to the variable s


s = "foobar"

# Add 5 to the integer i - this is equivalent to i = i + 5


i += 5
# i now holds the integer 6.

# Try to add i and s - this will throw an exception when


executed
# TypeError: unsupported operand type(s) for +: 'int' and
'str'
result = i + s

# variables can also be "undeclared" by deleting them.


# Further access to the variable i will throw a NameError
exception,
# as the variable does not exist any more.
del i

i += 5 # now throws an exception: NameError: name 'i' is not


defined

All existing variables reference one value only. There is not any unassigned or
uninitialized variables in Python. To express the absence of a value, Python
provides a special object: None. In C or ST, you would use a null pointer. Its
only purpose is to express "no value here", although None is actually an existing
instance of the class NoneType.

Numeric types and floating points


In contrast to the dozens of integer types in IEC or C, there is only one integer
type in Python. Integer types in Python do not have a fixed size. Instead, they
grow as needed and are limited only by available memory.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 353 / 1158
Creating a python script

Example: Integers.py
from __future__ import print_function

i = 1
print(i)

j = 0x1234 # hex number, is 16#1234 in IEC and 4660 in


decimal
k = 0o123 # octal number, is 8#123 in IEC and 83 decimal
l = 0b101010 # binary number, is 2#101010 in IEC and 42 in
decimal
print(j, k, l)

Using scripts
m = (2 + 3)*10 # k is 50 now
print(m)

n = 10 ** 100 # 10 to the power of 100


print(n)
Resulting output:

There is also only one floating-point type in Python which is similar to the IEC
data type LREAL. It provides 64-bit IEEE floating point arithmetic.
The syntax is like C-based languages for the most part:

Example: Floating-point types


# A simple float...
a = 123.456

# A float containing the integral value 2


b = 2.

# Leading zeros can be left off


c = .3 # same as 0.3

# Exponential / scientific representation


d = -123e-5

Two special cases are True and False, two constants that define the Boolean
truth values. They behave similar to the integer values 0 and 1, except when
they are converted into strings and return their names.

R911403764, Edition 08 Bosch Rexroth AG


354 / 1158 ctrlX PLC Engineering
Creating a python script

Example: Booleans.py
# booleans behave like integers, except when converted to
strings.
# The built-in function "type" can be used to query the type
of a value.
print("True: ", True, type(True))
print("False: ", False, type(False))
print("1: ", 1, type(1))
print("False + 0: ", False + 0, type(False + 0))
print("True * 5: ", True * 5, type(True * 5))
Resulting output:

Strings
In IronPython, strings are always in Unicode and any length. It does not make
any difference if they are enclosed in ' or ". Strings can also have triple quota-
tion marks """ or ''', which allows for multiline string literals.
Similar to C, special characters can be excluded by means of backslashes (\):
As a comparison, the dollar sign ($) is used in IEC for this purpose.
There are also raw strings that have other rules for the backslash. This is prac-
tical when the string should have literal backslashes. Example: Windows file
paths or regular expressions.

Example: Strings.py
# encoding:utf-8
from __future__ import print_function

a = "a simple string"


b = 'another string'
c = "strings may contain 'quotes' of the other type."
d = "multiple string literals" ' are concatenated ' '''by the
parser'''
e = "Escaping: quotes: \" \' backslash: \\ newline: \r\n
ascii code: \x40"
f = """triple-quoted strings may contain newlines, "single"
'quotes' and '''multiquotes''' of the other type"""
g = "Üňíçǿđȩ is also possible: 北京, Москва, Αθήνα, ‫"القاهرة‬
h = r"c:\raw\strings\retain\backslashes.txt"

# we iterate over a sequence of all the variables defined


above:
for i in (a,b,c,d,e,f,g,h):
print(i) # prints the contents of the variable
Resulting output:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 355 / 1158
Creating a python script

Python does not have characters types. Characters are expressed by the use
of strings with a length of 1. In this way, iteration via a string, or indexing in a

Using scripts
string, returns a single-character string.
See also
● ⮫ Python Documentation, Strings

Lists and tuples (data sets)


Lists and tuples basically correspond to arrays in C and IEC, but there are some
noticeable differences:
● Index access is always checked. Accessing a list or a tuple with an invalid
index throws an exception.
● Both lists and tuples can contain elements of different types (also other lists
and tuples). In contrast in C and IEC, arrays can contain only elements of a
single type.
● Lists are dynamic, and elements can be added, removed, or replaced at any
time.
● Tuples are not changeable: Once a tuple is created, it cannot be modified
anymore.
Lists are created with the list() constructor. As an alternative, you can use
brackets []. Tuples are created with the tuple() constructor or parentheses
().

Example: list_tuples.py
from __future__ import print_function
print("Testing tuples and lists")

# We define a tuple with the numbers from 1 to 10:


t = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
print("Tuple:", t)

# We can access the 6th element of the tuple.


# As in C, index counting starts with 0.
print("Element 5:", t[5])

# Subscription is more powerful using the range syntax:


print("Range[2:5]:", t[2:5]) # lower bound is inclusive,
upper bound is exclusive.
print("Range[2::2]:", t[2::2]) # start with 3rd element, and
print every 2nd element.
print("Range[-3:-1]:", t[-3:-1]) # Start with the 3rd last
element, end just before the last element (upper bound is
exclusive)
print("Range[::-1]:", t[::-1]) # negative step with - print
backwards

R911403764, Edition 08 Bosch Rexroth AG


356 / 1158 ctrlX PLC Engineering
Creating a python script

# lists are similar to tuples...


l = [11, 12, 13, "8", t] # contains mixed types: 3 integers,
a string, and the tuple defined above.
print("List:", l)

# ... but elements can be added or removed dynamically.


l.append(9) # Add a 9 to the list.
print("List with 9:", l)
print("List Range[3:6:2]:", l[3:6:2]) # print the 4th and 6th
element.

del l[1] # remove the element at index 1, the 12.


print("Removed[1]:", l)
del l[1:3] # Remove the elements at index 1 and 2, the 13 and
the '8'.
print("Removed[1:3]:", l)
Resulting output:

Dictionary
Python also has a hash table type ( also "hashmap"). In contrast to the list,
it can be indexed with any elements, for example strings. Its constructor is
dict() and its literals are declared with braces {}.
The sample script dictionaries.py creates the output displayed below. In
the last line, the script is terminated with a "KeyError" exception:

Example: dictionaries.py
from __future__ import print_function
print("Testing dictionaries")

# Declare a dictionary with three entries, the third being a


list
d = {1: "a", 2: "b", "my list": [1, 2, 3]}
print(d)

# print the value of the key 1


print(d[1])

# remove the value with the key "my list"


del d["my list"]

# Add a value 4 with the key 3


d[3] = 4
print(d)

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 357 / 1158
Creating a python script

# The "get" method returns the second argument if the key


cannot be found.
print(d.get(1, 42))
print(d.get(23, 42))

# print all keys in the dictionary


for key in d:
print(key)

# index access for unknown keys will throw a "KeyError"


exception!
print(d[23])

Using scripts
Resulting output:

And then in the last line, the script terminates:

You can view the stack trace by clicking the “Details” button. Here you find out
about line number 27 and the unknown key 23.

R911403764, Edition 08 Bosch Rexroth AG


358 / 1158 ctrlX PLC Engineering
Creating a python script

30.3.5 Python Control Structures (with Examples)


Loops
As opposed to C and ST, for loops in Python do not count loop variables, but
iterate over a sequence. This kind of sequence can be a dictionary, a list, a
tuple, the characters in a string, or lines in a file.
The following example shows some for loops:

Example: loops.py
from __future__ import print_function

print("Enumerating over a simple list:")


for i in (1,2,3,4):
print(i, end=", ") # end= replaces the newline with ", "
print() # but we still need a newline at the
end of this case.

print("Enumerating over the characters in a string:")


for i in "CODESYS": # characters are representet as strings
of length 1.
print(i, end=", ")
print()

print("Enumerating over the integers 1 to 4:")


for i in range(1, 5): # upper bound is exclusive.
print(i, end=", ")
print()

print("Enumerating using xrange:")


for i in xrange(5): # xrange is similar to range, but needs
less memory for large ranges.
print(i, end=", ")
print()

print("Enumerating including the item number:")


for i, v in enumerate("CODESYS"):
print(i, v)
Resulting output:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 359 / 1158
Creating a python script

Using scripts
If you require an index or number in addition to the item, then you should use
enumerate as shown in the last case of the sample script. The following code
is considered as poor style:

Example: Poor style


text = "CODESYS"

for i in range(len(text)): # BAD STYLE!


v = text[i] # DON'T TRY THIS AT HOME!
print(i, v)

Besides for loops, Python also has while loops which are very similar to those
in C and ST:

Example: "while" loops


i = 0
while i < 3;
print(i)
i += 1
Note: This example is not very practical. You would more likely use a for loop
with a range.

IF / ELSE
The if/else construct is similar to those in other programming languages.
Here is a short example:

R911403764, Edition 08 Bosch Rexroth AG


360 / 1158 ctrlX PLC Engineering
Creating a python script

Example: "if_else.py"
from __future__ import print_function
i = int(system.ui.query_string("Please enter an integral
number..."))
if i < 0:
print("Your number was negative.")
elif i > 0:
print("Your number was positive.")
else:
print("It seems your number was zero.")

The else branch is optional and there can be zero, one, or many elif
branches.

Functions, classes, and methods


Python allows for defining functions and classes with methods. A class with
methods is basically similar to a function block in ST, or classes in languages
such as C++, Java, or C#. However, Python does not support interfaces.
For detailed information, refer to the Python documentation for defining func-
tions and classes.

Examples: Functions, classes, and methods


#defining a function with name sum and two parameters a and b:
def sum(a, b):
return a + b # we return the sum of a and b.

# we can now call the function defined above:


print(sum(5,7))

# Now we define a class Foo:


class Foo:
# The class gets a method "bar".
# Note: for methods, the first parameter is always "self"
and
# points to the current instance. This is similar to
"this" in
# ST and other languages.
def bar(self, a, b):
print("bar(%s,%s)" % (a,b))

# We create an instance of the class:


f = Foo()

# We call the method bar on the instance.


f.bar("some", "params")

See also
● ⮫ Python Documentation, Defining Functions
● ⮫ Python Documentation, Classes

Modules and standard libraries


In IEC, you can import libraries for reuse by other written code. As a pendant,
there is the possibility in Python of importing modules.
The Python standard library contains many modules for different purposes,
such as:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 361 / 1158
Creating a python script

● String processing
● Date and time handling
● Collections
● Threading
● Mathematical functions
● File handling
● Persistence
● Compression and archiving
● Database access
● Encryption services
● Network and Internet access

Using scripts
● Sending of emails
To create your own modules, write a Python file that defines the functions and
classes that you want to provide. Save this file to the same directory as our
sample script. If you name the file mymodule.py, then you can import it with
import mymodule.
Here is an example of importing and using the cosine function and the pi
constant from the math module:

Example: Import mathematical function


from math import cos, pi

print(pi) # prints 3.14159265359

print(cos(pi)) # prints -1.0

The following contains more examples that access information about the oper-
ating system, the Python version, and the interpreter:

More import examples


import os
print(os.environ["OS"])

from sys import platform, version, executable


print(platform)
print(version)
print(executable)

There is a special module __future__ for activating new language features.


Above all, it is used when Python developers introduce new functionalities that
are backward compatible. These kinds of functionalities have to be activated
with special "__future__ imports". One example that we use in most of our
sample scripts here is the activation of the new power syntax of print as a
function instead of a statement.

Example: "__future__"
# make print() a function instead of a statement
from __future__ import print_function

R911403764, Edition 08 Bosch Rexroth AG


362 / 1158 ctrlX PLC Engineering
Creating a python script

The Python documentation provides a complete list of all __future__ imports.


In addition to the normal Python modules, IronPython code can also
access .NET assemblies as if they were Python modules. This opens the access
to the .NET framework class library and third-party libraries. Here is an example
how to open a dialog box by means of the library Windows Forms:

Example: Opening a .NET dialog box


import clr
clr.AddReference("System.Windows.Forms")
from System.Windows.Forms import MessageBox

MessageBox.Show("Hello")

See also
● ⮫ Description of the Python standard library
● ⮫ List of all "__future__" imports
● ⮫ Overview of .NET framework class libraries

30.3.6 Accessing PLC Engineering functionalities with a script


All objects and commands that PLC Engineering provides for scripts are pro-
vided in the Python module "scriptengine" . Whenever a script is started,
an implicit <code>from scriptengine import *</code > is issued. This
allows easy access to PLC Engineering. However, if your script imports modules
that need access to PLC EngineeringAPIs, these modules have to import the
scriptengine module!
The main objects (categories) that can be used as entry points in Python
scripts are shown in the table below. For detailed documentation of the entry
points, see the API reference documentation for the PLC Engineering ScriptEn-
gine.
Objects Description
system Access to general PLC Engineering functionalities, for example:
● Exiting PLC Engineering
● Handling the general user interface
● Accessing the message store (including compiler messages)
● Delay and progress bar control.
projects Access to the PLC Engineering project as an object tree that com-
bines the three navigator views (devices, POUs, modules) into a single
project tree. Also allows loading, creating, saving and closing of proj-
ects.
For most objects in a project, there are special methods with detailed
functionality, for example compilation, access to ST blocks, export,
import, device configuration, etc.
online Access to online functionalities, for example:
● Logging in to devices and applications
● Managing access data (user name, password)
● Performing the network search
● Gateway management
librarymanager Allows to manage library repositories and to view, install and remove
libraries.
device_repository Handling of the device repository, import and export of device descrip-
tions.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 363 / 1158
Creating a python script

In the following, example scripts for accessing PLC Engineering functionalities


are described. For detailed information, please see the API reference documen-
tation for thePLC Engineering ScriptEngine.
Also refer to
● ⮫ Chapter 30.3.3 Tips for Python Programmers about .NET API Documenta-
tion on page 349
● In the offline help: ⮫ API reference documentation for the ScriptEngine
● In the online help: ⮫ API reference documentation for the ScriptEngine

Example: Print device tree of the current project


The PrintDeviceTree.py script is an example of how to navigate in a project.
It generates the output of a hierarchical representation of all devices in the

Using scripts
currently opened project.
Load a project that contains some device objects and then run the script.

Example PrintDeviceTree.py
# encoding:utf-8
# We enable the new python 3 print syntax
from __future__ import print_function

# Prints out all devices in the currently open project.

print("--- Printing the devices of the project: ---")

# Define the printing function. This function starts with the


# so called "docstring" which is the recommended way to
document
# functions in python.
def print_tree(treeobj, depth=0):
""" Print a device and all its children

Arguments:
treeobj -- the object to print
depth -- The current depth within the tree (default 0).

The argument 'depth' is used by recursive call and


should not be supplied by the user.
"""

# if the current object is a device, we print the name


and device identification.
if treeobj.is_device:
name = treeobj.get_name(False)
deviceid = treeobj.get_device_identification()
print("{0}- {1} {2}".format("--"*depth, name,
deviceid))

# we recursively call the print_tree function for the


child objects.
for child in treeobj.get_children(False):
print_tree(child, depth+1)

# We iterate over all top level objects and call the


print_tree function for them.
for obj in projects.primary.get_children():

R911403764, Edition 08 Bosch Rexroth AG


364 / 1158 ctrlX PLC Engineering
Creating a python script

print_tree(obj)

print("--- Script finished. ---")


In the message window, the device tree (from the "Devices" view) is displayed,
omitting all non-device objects

Example: Reading variables


The ReadVariable.py script causes a login to the device and starts the appli-
cation if necessary. Subsequently, the value of the PLC_PRG.iVar1 variable
is read and output. If you want to try the script, adjust the project path and
variable names.

Example ReadVariable.py
# encoding:utf-8
from __future__ import print_function

# close open project if necessary:


if projects.primary:
projects.primary.close()

# opens project
proj = projects.open(r"D:\data\projects\Ampel.project")

# set "Ampel.project" to active application


app = proj.active_application
onlineapp = online.create_online_application(app)

# login to device
onlineapp.login(OnlineChangeOption.Try, True)

# set status of application to "run", if not in "run"


if not onlineapp.application_state == ApplicationState.run:
onlineapp.start()

# wait 1 second
system.delay(1000)

# read value of iVar1


value = onlineapp.read_value("PLC_PRG.iVar1")

# display value in message view or command line


print(value)

# log out from device and close "Ampel.project"


onlineapp.logout()
proj.close()

Extending the ReadVariable.py script, the MailVariables.py script loads


variables and expressions from a recipe file and reads their current values from
the control. Subsequently, these values are written back to the same file. It also
uses the Python SMTP library to send an email containing a list of variables as
an attachment.
If you want to use the script, you need to adjust the paths, email address and
SMTP server name to your environment.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 365 / 1158
Creating a python script

Example MailVariables.py
# encoding:utf-8
from __future__ import print_function

# Close current project if necessary and open


"ScriptTest.project"
if not projects.primary == None:
projects.primary.close()
project = projects.open("D:\\Data\\projects\
\scriptTest.project")

# retrieve active application

Using scripts
application = project.active_application

# create online application


online_application =
online.create_online_application(application)

# login to application.
online_application.login(OnlineChangeOption.Try, True)

# start PLC if necessary


if not online_application.application_state ==
ApplicationState.run:
online_application.start()

# wait 2 seconds
system.delay(2000)

# open recipe file to read values.


recipe_input_file = open("D:\\Data\\projects\
\RecipeInput.txt", "r")

watch_expressions = []

for watch_expression in recipe_input_file:


watch_expressions.append(watch_expression.strip())

print watch_expressions

# read values from the controllerd


watch_values =
online_application.read_values(watch_expressions)

print watch_values

# open output file to write values


recipe_output_file = open("D:\\Data\\projects\
\RecipeOutput.txt", "w")
for i in range(len(watch_expressions)):
recipe_output_file.write(watch_expressions[i])
recipe_output_file.write(" = ")
recipe_output_file.write(watch_values[i])
recipe_output_file.write("\n")

# Close files
recipe_input_file.close()

R911403764, Edition 08 Bosch Rexroth AG


366 / 1158 ctrlX PLC Engineering
Creating a python script

recipe_output_file.close()

# send Email
# import respective libraries
import smtplib
from email.mime.text import MIMEText

#open output file


recipe_output_file = open("D:\\Data\\projects\
\RecipeOutput.txt", "r")
mail = MIMEText(recipe_output_file.read())
recipe_output_file.close()

#email address sender and recipient


fromm = "info@example.com"
to = "info@example.com"

# set sender and recipient


mail["Subject"] = "Attention value has changed"
mail["From"] = fromm
mail["To"] = to

# send email
smtp = smtplib.SMTP("name of smtp server")
smtp.sendmail(fromm, [to], mail.as_string())
smtp.quit()

# logout and close application


online_application.logout()
project.close()

Example: Creating and editing program function blocks


The script CreateDut.py creates the objects MyStruct, MyAlias and MyUnion
in the PLC Engineering project. The DataTypes folder has to have been cre-
ated.

CreateDut.py
# encoding:utf-8
from __future__ import print_function

STRUCT_CONTENT = """\
a : BOOL;
b : BIT;
c : BIT;
"""

UNION_WHOLE = """\
TYPE MyUnion :
UNION
Zahl : INT;
Prozent : MyAlias;
Bits : MyStruct;
END_UNION
END_TYPE
"""

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 367 / 1158
Creating a python script

proj = projects.primary

folder = proj.find('DataTypes', recursive = True)[0]

# Create a struct DUT and insert the list of variables just


into the right
# place in line two, row 0 (line numbering starts with line 0)
struktur = folder.create_dut('MyStruct') # DutType.Structure
is the default
struktur.textual_declaration.insert(2, 0, STRUCT_CONTENT)

# Alias types get their "content" via the base type, which

Using scripts
will just end up
# as one line in the declaration part:
# TYPE MyAlias : INT (0..100); END_TYPE
bereich = folder.create_dut('MyAlias', DutType.Alias, "INT
(0..100)")

# Instead of injecting the variables into the existing


declaration,
# one can also just replace the complete declaration part,
including the
# boilerplate code.
union = folder.create_dut('MyUnion', DutType.Union)
union.textual_declaration.replace(UNION_WHOLE)

Example: User interfac/ interaction with the user


In some cases, scripts need to interact with the user. For the most
common interactions, we provide some simple APIs. The example script
System_UI_Test.py shows all available functions.

Example System_UI_Test.py
# encoding:utf-8
from __future__ import print_function

"""Performs some tests on the messagestore and UI."""

print("Some Error, Warning and Information popups:")


system.ui.error("Fatal error: Everything is OK. :-)")
system.ui.warning("Your bank account is surprisingly low")
system.ui.info("Just for your information: 42")

print("Now, we ask the user something.")


res = system.ui.prompt("Do you like this?",
PromptChoice.YesNo, PromptResult.Yes);
print("The user selected '%s'" % res)

print("Now, the user can choose between custom options:")


res = system.ui.choose("Please choose:", ("First", 2, 7.5,
"Something else"))
print("The user selected option '%s'" % str(res)) # res is a
tuple

print("Now, the user can choose several options:")


res = system.ui.select_many("Please select one or more
options", PromptChoice.OKCancel, PromptResult.OK, ("La

R911403764, Edition 08 Bosch Rexroth AG


368 / 1158 ctrlX PLC Engineering
Creating a python script

Premiere", "The Second", "Das Dritte"))


print("The returned result is: '%s'" % str(res)) # res is a
tuple

print("Now, the user can select files and directories")


res = system.ui.open_file_dialog("Choose multiple files:",
filter="Text files (*.txt)|*.txt|Image
Files(*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|
*.*", filter_index = 0, multiselect=True)
print("The user did choose: '%s'" % str(res)) # res is a
tuple as multiselect is true.

res = system.ui.save_file_dialog("Choose a file to save:",


filter="Text files (*.txt)|*.txt|Image
Files(*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|
*.*", filter_index = 0)
print("The user did choose: '%s'" % res)

res = system.ui.browse_directory_dialog("Choose a directory",


path="C:\\")
print("The user did choose: '%s'" % res)

print("Now we query a single line string")


res = system.ui.query_string("What's your name?")
print("Nice to meet you, dear %s." % res)

print("Now we query a multi line string")


res = system.ui.query_string("Please tell me a nice story
about your life!", multi_line=True)
if (res):
print("Huh, that has been a long text, at least %s
characters!" % len(res))
else:
print("Hey, don't be lazy!")

print("Username and passwort prompts...")


res = system.ui.query_password("Please enter your favourite
password!", cancellable=True)
if res:
print("Huh, it's very careless to tell me your favourite
password '%s'!" % res)
else:
print("Ok, if you don't want...")

res = system.ui.query_credentials("Now, for real...")


if res:
print("Username '%s' and password '%s'" % res) # res is a 2-
tuple
else:
print("Sigh...")

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 369 / 1158
Creating a python script

Example: Manipulating “Project information” object


In the ProjectInfoExample.py script, some information is set in the “Project
information” object. The most important information parts (such as“title” and
“version”) have explicit properties. Any other information fields can be read
and written with the dictionary syntax. For example, the fields recom-
mended for the properties of a library project.
The example shown below may seem a bit unrealistic, but similar code is used
in build servers that automatically create, test and, if necessary, release library
projects as well as other projects. ScriptEngine is one of the key elements in
creating CI (Continuous Integration) and CD (Continuous Delivery) systems.

Example ProjectInfoExample.py

Using scripts
# encoding:utf-8
from __future__ import print_function

proj = projects.load("D:\Some.library")

info = proj.get_project_info()

# Set some values


info.company = "Test Library Ltd"
info.title = "Script Test Project"
info.version = (0, 8, 15, 4711)
info.default_namespace = "testlibrary"
info.author = "Python von Scriptinger"

# some values recommended in the library toolchain


info.values["DefaultNamespace"] = "testlibrary"
info.values["Placeholder"] = "testlibrary"
info.values["DocFormat"] = "reStructuredText"

# now we set a custom / vendor specific value.


info.values["SpecialDeviceId"] = "PLC0815_4711"

# Enable generation of Accessor functions, so the IEC


# application can display the version in an info screen.
info.change_accessor_generation(True)

# And set the library to released


info.released = True;

proj.save()

Example: Run external commands and import PLCOpenXML files


The example script DeviceImportFromSVN.py retrieves a PLCOpenXML file
from an external program (in this case an SVN. client) and imports the file into
a newly created PLC Engineering project.
If you want to use the script, adjust the paths to your environment.

R911403764, Edition 08 Bosch Rexroth AG


370 / 1158 ctrlX PLC Engineering
Creating a python script

Example DeviceImportFromSVN.py
# encoding:utf-8
# Imports a Device in PLCOpenXML from Subversion via command
line svn client.

# We enable the new python 3 print syntax


from __future__ import print_function

import sys, os

# some variable definitions:


SVNEXE = r"C:\Program Files\Subversion\bin\svn.exe"
XMLURL = "file:///D:/testrepo/testfolder/TestExport.xml"
PROJECT = r"D:\test.project"

# clean up any open project:


if projects.primary:
projects.primary.close()

# Fetch the plcopenxml data from subversion.


# We'll catch the output of the program into the xmldata
variable.
# The 'with' construct automatically closes the open pipe for
us.
with os.popen('"' + SVNEXE + '" cat ' + XMLURL, 'r') as pipe:
xmldata = pipe.read()

# create a new project:


proj = projects.create(PROJECT)

# import the data into the project.


proj.import_xml(xmldata, False)

# and finally save. :-)


proj.save()

print("--- Script finished. ---")

Advanced example: Retrieve library from SVN and install in PLC Engineering
The following sample script can handle retrieving and installing a library as part
of a CT (Continuous Testing) environment so that it can then be tested. In
addition to the standard PLC Engineering, the add-on CODESYS SVN also has
to be installed with a valid license.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 371 / 1158
Creating a python script

Example
import tempfile

if projects.primary:
projects.primary.close()

tempdir = tempfile.mkdtemp()
URL = "svn://localhost/testrepo/trunk/SvnTestLibrary/"

proj = svn.checkout(URL, tempdir, "testlibrary",


as_library=True)
proj.save()

Using scripts
repo = librarymanager.repositories[0]
librarymanager.install_library(proj.path, repo, True)

proj.close()

30.3.7 Transitioning from Python 2 to Python 3


With Python version 3, Python developers introduced some incompatible
changes and removed some obsolete functionalities. At this time, the Python
community is still in the transitional phase from version 2 to version 3.
IronPython does not yet support Python 3, but it is being worked on. As the
Python community no longer supports Python 2, we intend to up0grade to
Python 3 as soon as it is supported by IronPython. Although we strive for a
smooth transition, script writers should take care that their scripts are created
in a future-proof style. For example, by using the expression from __future__
import print_function.
See also
● ⮫ Python 2 or Python 3?
● ⮫ New in Python 3

30.3.8 Comparison of IronPython and cPython


There are some small differences and Incompatibilities between IronPython
and standard Python ("cPython"). Some are direct errors in IronPython and
should be removed in future versions. However, others are considered "imple-
mentation details" and will remain. Some of them are very challenging topics.
The difference that is most obvious for users is the handling of strings. Original
cPython has two different string types for byte strings and Unicode strings.
This concept is similar to the data types STRING and WSTRING in IEC. IronPy-
thon simply uses .NET strings that are always Unicode-capable and use UTF-16
internally. However, IronPython implements a trick to hide the difference to
cPython from the programmer. (Interesting is that the developers completely
reengineered string handling for the new Python version 3. A module was
developed that is much closer to that of IronPython. Afterwards, only Unicode
strings are used and there is an individual data type for handling raw bytes.)
Python modules that are written in C cannot be imported into IronPython
because cPython uses internal data structures that are completely different
from IronPython. Most of the standard library modules were reimplemented
in IronPython. However, some modules (such as the TK interface) are not avail-
able as long as they are not ported to IronPython explicitly. On the other hand,
IronPython provides access to .NET assemblies including the .NET framework
(as shown above), which more than compensates for this feature.

R911403764, Edition 08 Bosch Rexroth AG


372 / 1158 ctrlX PLC Engineering
Creating a python script

While cPython uses reference counting and a deterministic garbage collector


for cleaning up cyclic garbage, IronPython relies on the non-deterministic .NET
garbage collector. In most cases, this difference does not matter. But when
you open files or other resources from the Python standard library or the .NET
framework, you should make sure to close them later. It is best to use the with
statement with the Python context manager or .NET IDisposable instances.
See also
● ⮫ Information about Context Managers
● ⮫ Information about .NET IDisposable

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 373 / 1158
General information

31 Security
31.1 Security – Preface
Due to the increased networking of controllers and plants, potential threats are
also quickly rising. Therefore, you should carefully consider all possible safety
measures.
Security measures are absolutely necessary to protect data and communication
channels from unauthorized access.
On the following help pages, you can learn more about the safety functions of
PLC Engineering and the controller.

31.2 General information

Security
Below, find some general information about security functions ("Security"
measures). This information applies regardless of the use in PLC Engineering
or a connected control.

Access protection with user management


As a means of protecting against unauthorized access to data, it is necessary
to configure user accounts with specific access rights. Only a user with the
credentials has access to the data or functions.
Creating passwords according to the general recommendations for achieving a
high password strength is a significant contribution to security.
The following types of user management are roughly distinguished:
● Simple user management:
To access data, only a password or the valid combination of user name and
password has to be entered. This means that access can be only granted or
denied. Graduated rights cannot be configured.
● Group-based user management:
The access rights are assigned to user groups. Users who belong to a group
can access the data or functions after entering the credentials with precisely
these assigned and different rights.

Encryption, Signature
Encryption:
Encryption of data means: The data is converted into a non-readable form and
can only be rendered readable again with a matching key. In the simplest case,
the key is a password or a key pair.
There are two types of encryption methods:
● Symmetrical method: (the only type of encryption until the mid-1970s)
Feature: Use of a secret key
Advantages: Fast, easy encoding
Disadvantages: The key has to be exchanged secretly!
● Asymmetric method:
Feature: Use of a key pair (private/secret and public key)
Advantages: A public key can be made available to anyone; authentication is
possible with the key
Disadvantages: Slow (approx. 1,000-10,000x slower than symmetric
methods); complex coding; long key lengths
Key exchange is usually performed by asymmetric methods; encryption and
decryption by symmetric methods.
Signature:

R911403764, Edition 08 Bosch Rexroth AG


374 / 1158 ctrlX PLC Engineering
General information

In order for the irrefutable ownership and integrity of a message to be verifi-


able, it should be provided with a signature. The following steps are common:
● Sender: Determines a unique hash value of the data (H)
● Sender: Encrypts the hash value with private key (He)
● Recipient: Also calculates the hash value and decrypts the He with public
key and compares the two values. This allows the sender to be identified
uniquely and verifies that the sender owns the private key.
In the case of asymmetric encryption, a public key contained in a certificate is
first exchanged between the sender and the recipient. In addition, each partici-
pant needs a private key with which they can decrypt the data if they have the
certificate. So if you want to access a certificate, you need a certificate AND a
private key.
Hash methods are necessary for this:
● Hash method:
Feature: Unique "fingerprint" of the data (for example, checksum of the
data)
As low a collision as possible (it is very difficult to find / construct two
different data for a single hash value)

Certificates
To be able to assign the public key to an identity, it is usually embedded in a
so-called certificate.
In certificate-based systems, each user receives a digital certificate. The certif-
icate is used for digital identification. It contains information about the iden-
tity and the public key of the user. Each certificate is authenticated by an
issuing authority, which in turn may be authenticated by higher authorities. The
trust system of this PKI (Public Key Infrastructure) is strictly hierarchical. The
common trust anchor is a so-called root certificate.
Contents of a certificate:
● Version
● Serial number
● Algorithm ID
● Issuer (authority or company)
● Validity from (not before) to (not after)
● Certificate owner (subject)
● Certificate owner key information (subject public key)
– Public key algorithm
– Public key of the certificate owner
● Unique ID of the issuer (optional)
● Unique ID of the owner (optional). The owner has a private key matching the
public key
● Extensions
– Purpose (extended key usage)
– ...
The certificate consists of 2 parts / files:
● Public X.509 certificate (can be issued to anyone)
● Private key that matches the certificate or its public key only (must not be
passed on!).
To manage the certificates in your local "Windows Certificate Store" please also
see the following help page:
● ⮫ Chapter 11 Protecting and saving the project on page 75

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 375 / 1158
Security for the Runtime System / PLC

31.3 Security for the development system


In PLC Engineering, you can apply access protection to projects, libraries, as
well as individual applications. In addition to a simple write protection for a
project, a user management (credentials, access rights) and encryption using
certificates should be used.
Also refer to:
● ⮫ Chapter 11 Protecting and saving the project on page 75
● ⮫ Chapter 18.13 Encrypting the application on page 153

31.4 Security for the Runtime System / PLC


Communication with the controller connected in the PLC Engineering project
should be protected against unauthorized access in the following ways:

Security
● Enabling user management: simple or group-based
● Certificate-based encryption of communication with the controller
A user management is mandatory for the SL runtime sys-
NOTICE
tems

Enabling security features


First, set the communication to encryption in order not to reveal any access
data to other participants in the network when transferring the user adminis-
tration.
Enforcing encrypted communication
● On the controller:
– LZS version >= 3.5 SP14: Encryption can be enabled as a “communication
policy” and enforced for all clients
● In PLC Engineering:
– Encrypted communication can be selected as an option in the
device editor, “Communication” tab (command, or dialog “Change
communication policy”), or in the “Security screen” view
See the current help for more information:
⮫ Chapter 20.3 Encrypting Communication, Changing Security Settings
on page 258
If the CODESYS Security Agent is installed, then see the help for COD-
ESYS Security Agent.
Enforcing a user management
● On the controller:
– LZS version >= 3.5 SP17: As a “communication policy”, user management
is enforced by default
Note: At least one development system PLC Engineering V3.5 SP16 is
required to activate the user management. This means that you cannot
connect to an older development system with forced user management
that has not yet been activated.
– LZS version >= 3.5 SP14 < 3.5 SP17: User management can be explicitly
enabled and enforced as a “communication policy”
– LZS version < 3.5 SP14: A simple user administration or one for users/
groups with their rights can be activated
● In PLC Engineering:
– See the current help for more information:
⮫ Chapter 20.3 Encrypting Communication, Changing Security Settings
on page 258
⮫ Chapter 20.4 Handling of Device User Management on page 262

R911403764, Edition 08 Bosch Rexroth AG


376 / 1158 ctrlX PLC Engineering
Security for CODESYS WebVisu

31.5 Security for CODESYS WebVisu


Protect the connection between the web server of the controller and the visual-
ization client with the following measures against unwanted access:
● Configure an HTTPS connection (encryption with SSL/TSL) between the
visualization client and the web server.
● Restrict access to the visualization and configure a visualization user man-
agement.

Configure an encrypted connection.


An HTTPS connection between the web server and the visualization client
requires authentication of the web server by means of a certificate. You can
create a self-signed certificate in the “Security Screen”.
1. Click “View 🠂 Security Screen”.
2. Create a certificate for the web server on your controller.
🡆 The certificate data for the web server is displayed.
3. Stop your controller.
4. Restart the controller.
🡆 The new certificate is active.
5. Download your application to the controller.
6. Open your browser and specify the URL address of your web server.
The URL of a secure connection corresponds to the following format:
https:// <IP address/URL> :443/ <name of HTM file> .htm.
The HTML file name has to match the configured name as it is set in the
“Visualization Manager” object below the WebVisu variant. You will find
the IP address of the controller in the device editor when the a connection
is active.
🡆 Example: https://localhost:443/webvisu.htm
The browser establishes a connection. If the certificate is not rated as
trusted, then a security notice appears.
7. Confirm that you know the risk and want to proceed.
🡆 You have created self-signed certificate and confirmed it as trusted.
Now start the web application with the visualization. The lock symbol in
the browser indicates secure communication.
See the chapter "Run as CODESYS WebVisu", which describes in detail how you
use certificates in the security screen.

See also
● ⮫ Chapter "Run as CODESYS WebVisu"
● ⮫ Chapter "User management of the visualization"
● ⮫ Chapter 20.3 Encrypting Communication, Changing Security Settings
on page 258
● ⮫ Chapter 20.4 Handling of Device User Management on page 262

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 377 / 1158
Programming languages and their editors

32 Reference, programming
32.1 Programming languages and their editors
32.1.1 Programming languages and their editors – General information
Program a POU in the editor for the implementation language you selected
when creating the POU. PLC Engineering provides a text editor for ST and
graphical editors for SFC, FBD/LD/IL and CFC.
The editor opens when you double-click on the POU in the device tree or in the

Reference, programming
“POUs” view.
Each programming editor consists of two subwindows:
● In the upper part, use the “declaration editor” to make declarations.
Depending on the setting, declarations can either be made as text or table.
● Insert the implementation code of the respective language in the lower part.
You can configure the representation and behavior of each editor across the
project in the associated tab of the PLC Engineering options.

32.1.2 Declaration Editor


In the declaration editor, declare variables in variable lists and blocks.
If the declaration editor is used with an implementation language editor, it
opens in a view above the implementation language editor.
The declaration editor offers two possible views: textual and tabular . In
the “Tools 🠂 Options 🠂 Declaration Editor” dialog, you define whether only the
textual view or only the tabular view is available, or whether you can switch
between both views by means of the buttons on the right side of the editor
view.
If the editor window has a scroll bar due to long text lines, you can scroll using
the scroll wheel of the mouse while holding down the Shift key. Zooming in
the editor window is possible by using the scroll function of the mouse while
holding down the Ctrl key.
Also refer to
● ⮫ Chapter 18.16.3 Using the Declaration Editor on page 165
● ⮫ Chapter 18.16 Declaring variables on page 160
● ⮫ Chapter 32.1 Programming languages and their editors on page 377
● ⮫ Chapter ‘Options’ dialog - ‘Declaration editor' on page 1081
● ⮫ Chapter ST Editor on page 379

Declaration editor in online mode


The tabular view of the editor is shown in online
mode. The header always contains the current object path:
<DeviceName>.<ApplicationName>.<ObjectName>. In contrast to offline
mode, the table also contains the “Value” and “Prepared Value” columns.
The “Value” column displays the actual value on the control; i.e. provides moni-
toring functionality. If the expression is an array with more than 1000 elements,
you can specify the range of array indices to be monitored. Double-click in
the“Data type” column to open the “Monitoring area” dialog: In this dialog, the
declared array range is entered as the “Valid range” for monitoring. A maximum
of 20000 elements can be monitored per array. The range of array indices to
be monitored is defined by specifying the “start” and “end index”. In order to
move this area more easily while keeping the scope constant, the scrollbars
available for this purpose can be used in a coupled manner. To switch between

R911403764, Edition 08 Bosch Rexroth AG


378 / 1158 ctrlX PLC Engineering
Programming languages and their editors

coupled and uncoupled click on the symbol to the right of the bars. In the
uncoupled state, you can increase or decrease the perimeter of the area to be
monitored.
The “Prepared Value” column contains the value that you prepared for forcing
or writing.
If you double-click a “Prepared Value” field, then you can specify a value explic-
itly for writing or forcing. In case of enumerations, a combo box opens to select
a value from. In the case of a Boolean variable you can toggle the prepared
value with the help of the [Enter] key or the [Space] bar. If an expression
(variable) is of a structured data type, e.g. the instance of a function block or
an array variable, a plus or a minus is placed in front.
You can customize the format of the representation of floating-point values in
the options for monitoring.
Also refer to
● ⮫ Chapter 18.16.3 Using the Declaration Editor on page 165
● ⮫ Chapter 33.4.10 Dialog 'Prepare Value' on page 1041
● ⮫ Forcing in the declaration section on page 279

32.1.3 Common Functions in Graphical Editors


The implementation part of the graphical editors for FBD, LD, CFC, and SFC
contains a toolbar in the lower right corner.
Return to normal editing mode: The mouse pointer changes back to
the shape of the default arrow. You can select and edit elements in
the editor view.
Panning tool: The mouse pointer changes to the shape of two
crossed arrows. You can click and drag anywhere in the editor view
to move the visible area of the FBD/LD/IL editor or also pivot a CFC
chart.
Magnification tool: A magnified window opens in the lower right
corner of the editor view and the mouse pointer changes to the
shape of a cross. As you move the mouse pointer over your diagram,
the magnification tool shows the area of the diagram under the
cross at 100% magnification. Note: If you click in the view, then the
magnification tool closes and the part of the diagram that the tool
contained is displayed at 100% magnification. If you want to retain
the set zoom factor, then you should use the default arrow ( ) for
returning to the default editing mode.
Zooming tool: This opens a drop-down list with a selection of zoom
factors. Clicking more selections (...) will open the “Zoom” dialog
for typing other values. The current zoom factor is always shown to
the left of the symbol.
Zooming with the scroll wheel: By holding down the [Ctrl] key and moving the
scroll wheel, you can change the zoom factor in steps of 10%.
Every graphical editor has its own “ToolBox” view that is located on the right
of the editor view by default. The toolbox contains elements that you can drag
to insertion points in the editor view. PLC Engineering highlights the insertion
points with gray position flags in the shape of diamonds, triangles, or arrows.
These flags are green when you move the mouse pointer over them. When you
release the mouse button, PLC Engineering inserts the element at the selected
position.
It is also possible to use the mouse for moving elements in the editor.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 379 / 1158
Programming languages and their editors

You can drag function block declarations in the FBD, LD, and CFC graphical
editors to the editor view. To do this, select the full declaration (variable name
and data type) and drag it to a suitable position in the editor view. In the ladder
diagram, you can also drag Boolean declarations to the editor and insert them
as contacts.
See also
● ⮫ Chapter SFC (sequential function chart) editor on page 391
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter CFC editor on page 425

Reference, programming
32.1.4 Structured text and Extended Structured text (ExST)
ST Editor
The ST editor is a textual editor used for the implementation of code in Struc-
tured Text (ST) and Extended Structured Text (ExST).
The line numbering is displayed on the left side of the editor. The functionality
"List components" (to be activated in the PLC Engineering options, category
“Intelligent coding”), and the input help[(F2]) when entering the programming
elements. When the cursor is on a variable, PLC Engineering displays informa-
tion about the variable's declaration in the tooltip.
The box selection can be made with the following key combinations:
● [Shift] + [Alt] + [right arrow]: The selected area is extended one place to the
right
● [Shift] + [Alt] + [left arrow]: The selected area is extended one place to the
left
● [Shift] + [Alt] + [up arrow]: The selected area is extended upwards by one
line
● [Shift] + [Alt] + [down arrow]: The selected range is extended downward by
one digit
If the editor window has a scroll bar due to long text lines, you can scroll using
the scroll wheel of the mouse while holding down the Shift key.
Zooming in the editor window is possible by using the scroll function of the
mouse while holding down the Ctrl key.
You configure the behavior (such as bracketing, mouse actions, tabs) and
appearance of the editor in the PLC Engineering options in the “Text editor”
category.
For an incremental search for strings within the editor, use the key combination
[Ctrl] + [Shift] + [i] to open an input field at the bottom of the editor. As
soon as you start typing in characters, the corresponding search locations are
highlighted in color in the editor. The number of found matches is shown to
the right of the input field. Using the arrow buttons or the key combinations
[Alt] + [Page up] or [Alt] + [Page down], you can position the cursor on a found
location.
When you place the cursor on a symbol name, all occurrence locations of the
symbol within the editor are highlighted in color. The search locations corre-
spond to the hits in the cross-reference list. For very large projects, this can
cause input delays. In this case, you can disable the function in the options of
the text editor.
PLC Engineering detects syntax errors while entering data in the editor
and outputs the corresponding messages in the message window in the
“precompilation” category. In addition, if the corresponding option is enabled
in the PLC Engineering options, “Intelligent coding” category, the error places
in the text will be underlined in red.

R911403764, Edition 08 Bosch Rexroth AG


380 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Use the command “Format document” for automatic formatting of syntactically


correct ST codes.
Also refer to
● ⮫ Chapter Programming in Structured Text (ST) on page 193
● ⮫ Chapter ST expressions on page 380
● ⮫ Chapter ST – Comments on page 390
● ⮫ Chapter 32.1.4 Structured text and Extended Structured text (ExST)
on page 379
● ⮫ Chapter 'Options' dialog - 'Text editor' on page 1087
● ⮫ Chapter 'Messages’ command on page 898
● ⮫ Chapter Command 'Advanced' - 'Format Document' on page 897

ST editor in online mode


In online mode PLC Engineering displays the variables and expressions in the
ST editor. Writing and forcing variables and expressions as well as debugging
functions (breakpoints, single step execution) are also possible.
When using assignments as expressions in ST programming, no further break-
point positions are created within a line.
Also refer to
● ⮫ Chapter 22.3.2 Calling of Monitoring in Programming Objects on page 291
● ⮫ Chapter 21.5 Forcing and writing of variables on page 277
● ⮫ Chapter 22.3.3 Using Watch Lists on page 297
● ⮫ Chapter 21.3 Using Breakpoints on page 271
● ⮫ Chapter 21 Testing and debugging on page 271
● ⮫ Chapter 21.4 Stepping Through a Program on page 275
● ⮫ Chapter 21.7 Sequential control on page 282
● ⮫ Chapter 21.8 Determining the Current Processing Position with the Call
Stack on page 284

ST expressions
An expression is a construct that returns a value after being evaluated.
Expressions are composed of operators and operands. In Extended Structured
Text (ExST), assignments can also be used as expressions. An operand can be a
constant, a variable, a function call or another expression.

Examples
2014 (* Constant *)
ivar (* Variable *)
fct(a,b) (* Function call *)
(x*y)/z (* Expression *)
real_var2 := int.var; (* in ExST: Assignment *) *)

Also refer to
● ⮫ Chapter ExST - Extended Structured Text on page 192

Evaluation of expressions
The evaluation of an expression is realized by processing the operators
according to certain binding rules. PLC Engineering processes the operator
with the strongest binding first. Operators with equal priority are processed
from left to right.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 381 / 1158
Programming languages and their editors

Operation Symbol Binding strength


Bracketing (Expression) Highest priority
Function call Function name (parameter list)
All operators with syntax: <Oper-
ator> ()
Exponentiation EXPT
Negation -
Complementation NOT
Multiply *

Reference, programming
Divide /
Modulo MOD
Adding +
Subtracting -
Compare <,>,<=,>=
Equality =
Inequality <>
Bool AND AND
AND_THEN
Bool XOR XOR
Bool OR OR Lowest priority
OR_ELSE
Also refer to
● ⮫ Chapter 32.3 Operators on page 454

Assignments (ST)

ST Assignment Operator
Syntax:
<operand> := <expression>
This assignment operator executes the same function as the MOVE operator.
See also
● ⮫ Chapter 32.3.20 Operator 'MOVE' on page 462

ST Assignment Operator for Outputs


The assignment operator => assigns the output of a function, a function block,
or a method to a variable. The position on the right side of the operator can
also be blank.
Syntax
<output> => <variable>

Example
FBcomp_Output1 => bVar1;
FBcomp_Output2 => ;
FBcom_Output1 and FB_Output2 are outputs of a function block. The value of
FBcom_Output1 is assigned to the variable bVar1.

R911403764, Edition 08 Bosch Rexroth AG


382 / 1158 ctrlX PLC Engineering
Programming languages and their editors

ExST Assignment 'S='


If the operand of the Set assignment switches to TRUE, the assignment causes
the variable to the left of the operator to be assigned a TRUE. The variable is
set.
<variable name> S= <operand name> ;
The variables and the operand have the data type BOOL.

Example

PROGRAM PLC_PRG
VAR
xOperand: BOOL := FALSE;
xSetVariable: BOOL := FALSE;
END_VAR

xSetVariable S= xOperand;
When the operand xOperand switches from FALSE to TRUE, then TRUE is also
assigned to the variable xSetVariable. But then the variable keeps this state,
even if the operand continues to change its state.

Multiple assignments
In the case of multiple assignments within a code line,
NOTICE
the individual assignments are not processed from right
to left, but all assignments refer to the operands at the
end of the code line.

Example

FUNCTION funCompute : BOOL


VAR_INPUT
xIn : BOOL;
END_VAR
IF xIn = TRUE THEN
funCompute := TRUE;
RETURN;
END_IF

PROGRAM PLC_PRG
VAR
xSetVariable: BOOL;
xResetVariable: BOOL := TRUE;
xVar: BOOL;
END_VAR
xSetVariable S= xResetVariable R= funCompute(xIn := xVar);
xResetVariable receives the R= assignment of the return value of
funCompute. xSetVariable receives the S= assignmentof the return value
from funCompute, but not from xResetVariable.

Also refer to
● ⮫ Chapter ExST - Extended Structured Text on page 192
● ⮫ Chapter ExST Assignment 'R=' on page 383

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 383 / 1158
Programming languages and their editors

ExST Assignment 'R='


If the operand of the reset assignment switches to TRUE, the assignment
causes the variable to the left of the operator to be assigned a FALSE. The
variable is reset.
<variable name> R= <operand name> ;
The variables and the operand have the data type BOOL.

Example

VAR

Reference, programming
xOperand: BOOL := FALSE;
xResetVariable: BOOL := TRUE;
END_VAR

xResetVariable R= xOperand;
When the operand xOperand switches from FALSE to TRUE, then FALSE is
also assigned to the variable xResetVariable. But then the variable keeps its
state, even if the operand continues to change its state.

Multiple assignments
In the case of multiple assignments within a code line,
NOTICE
the individual assignments are not processed from right
to left, but all assignments refer to the operands at the
end of the code line.

Example

FUNCTION funCompute : BOOL


VAR_INPUT
xIn : BOOL;
END_VAR
IF xIn = TRUE THEN
funCompute := TRUE;
RETURN;
END_IF

PROGRAM PLC_PRG
VAR
xSetVariable: BOOL;
xResetVariable: BOOL := TRUE;
xVar: BOOL;
END_VAR
xSetVariable S= xResetVariable R= funCompute(xIn := xVar);
xResetVariable receives the R= assignment of the return value of
funCompute. xSetVariable receives the S= assignmentof the return value
from funCompute, but not from xResetVariable.

Also refer to
● ⮫ Chapter ExST - Extended Structured Text on page 192
● ⮫ Chapter ExST Assignment 'S=' on page 382

ExST - Assignment as expression


In ExST, PLC Engineering allows the use of assignments as expressions in
extension to the IEC 61131-3 standard.

R911403764, Edition 08 Bosch Rexroth AG


384 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Examples
int_var1 := int_var2 := int_var3 + 9; (* int_var1 and int_var2 get value of
int_var3 + 9 *)
real_var1 := real_var2 := int_var; (* real_var1 and real_var2 obtain the value
of int_var *)
int_var := real_var1 := int_var; (* incorrect assignment, data types do not
match! *)
IF b := (i = 1) THEN
i := i + 1;
END_IF

Also refer to
● ⮫ Chapter ExST - Extended Structured Text on page 192

Assignment Operator 'REF='


The operator generates a reference (pointer) to a value.
Syntax:
<variable name> REF= <variable name> ;

Example

refA : REFERENCE TO DUT;


B : DUT;
C : DUT;

A REF= B; // corresponds to A := ADR(B);


A := C; // corresponds to A^ := C;

See also
● ⮫ Chapter 32.5.17 Reference on page 567
● ⮫ Chapter Command 'REF= (Reference Assignment)' on page 987

Instructions (ST)

ST Statement 'IF'
The IF statement is used for checking a condition and, depending on this
condition, for executing the subsequent statements.
A condition is coded as an expression that returns a Boolean value. If the
expression returns TRUE, then the condition is fulfilled and the corresponding
statements after THEN are executed. If the expression returns FALSE, then
the following conditions, which are identified with ELSIF, are evaluated. If
an ELSIF condition returns TRUE, then the statements are executed after the
corresponding THEN. If all conditions return FALSE, then the statements after
ELSE are executed.
Therefore, at most one branch of the IF statement is executed. ELSIF branches
and the ELSE branch are optional.
Syntax

IF <condition> THEN
<statements>
( ELSIF <condition> THEN
<statements> )*
( ELSE

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 385 / 1158
Programming languages and their editors

<statements> )?
END_IF;
// ( ... )* None, once or several times
// ( ... )? Optional

Example

PROGRAM PLC_PRG
VAR
iTemp: INT;
xHeatingOn: BOOL;

Reference, programming
xOpenWindow: BOOL;
END_VAR

IF iTemp < 17 THEN


xHeatingOn := TRUE;
ELSIF iTemp > 25 THEN
xOpenWindow := TRUE;
ELSE xHeatingOn := FALSE;
END_IF;
The program is run as follows at runtime:
For the evaluation of the expression iTemp < 17 = TRUE, the subsequent
statement is executed and the heating is switched on. For the evaluation of
the expression iTemp < 17 = FALSE, the subsequent ELSIF condition iTemp
> 25 is evaluated. If this is true, then the statements in ELSIF are executed
and the view is opened. If all conditions are FALSE, then the statement in
ELSE is executed and the heating is switched off.

See also
● ⮫ Chapter ST expressions on page 380

ST Instruction 'FOR'
The FOR loop is used to execute instructions with a certain number of repeti-
tions.
Syntax:
FOR <counter> := <start value> TO <end value> {BY
<increment> } DO
<instructions>
END_FOR;
The section inside the curly parentheses {} is optional.
PLC Engineering executes the <instructions> as long as the <counter> is
not greater, or - in case of negative increment - is not smaller than the <end
value>. This is checked before the execution of the <instructions>.
Every time the instructions <instructions> have been executed, the counter
<counter> is automatically increased by the increment <increment>. The
increment <increment> can have any integral value. If you do not specify an
increment, the standard increment is 1.

R911403764, Edition 08 Bosch Rexroth AG


386 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Example
FOR iCounter := 1 TO 5 BY 1 DO
iVar1 := iVar1*2;
END_FOR;
Erg := iVar1;
If you have pre-configured iVar1 with 1, iVar1 has the value 32 after the FOR
loop.

The end value <end value> may not attain the same value
CAUTION
as the upper limit of the data type of the counter.
If the end value of the counter is equal to the upper
limit of the data type of the counter, an endless loop
results. For example, an endless loop results in the
above example if iCounter is of the data type SINT and
the <end value> equals 127, since the data type SINT
has the upper limit 127.
As an extension to the IEC 61131-3 standard you can use the CONTINUE instruc-
tion within the FOR loop.
See also
● ⮫ Chapter 32.5.6 Integer Data Types on page 556
● ⮫ Chapter EXST Statement 'CONTINUE' on page 389

ST Instruction 'CASE'
Use this dialog box for pooling several conditional instructions containing the
same condition variable into a construct.
Syntax:
CASE <Var1> OF
<value1>:<instruction1>
<value2>:<instruction2>
<value3, value4, value5>:<instruction3>
<value6 ... value10>:<instruction4>
...
<value n>:<instruction n>

{ELSE <ELSE-instruction>}

END_CASE;
The section within the curly brackets {} is optional.
Processing scheme of a CASE instruction.
● If the value of the variable <Var1> is <value i>, then the instruction
<instruction i> is executed.
● If the variable <Var1> has non of the given values, then the <ELSE-
instruction> is executed.
● If the same instruction is executed for several values of the variable, then
you can write the values in sequence, seperated by commas.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 387 / 1158
Programming languages and their editors

Example
CASE iVar OF
1, 5: bVar1 := TRUE;
bVar3 := FALSE;

2: bVar2 := FALSE;
bVar3 := TRUE;

10..20: bVar1 := TRUE;


bVar3= TRUE;

Reference, programming
ELSE
bVar1 := NOT bVar1;
bVar2 := bVar1 OR bVar2;
END_CASE;

ST Instruction 'WHILE'
The WHILE loop is used like the FOR loop in order to execute instructions
several times until the abort condition occurs. The abort condition of a WHILE
loop is a boolean expression.
Syntax:
WHILE <boolean expression> DO
<instructions>
END_WHILE;
PLC Engineering repeatedly executes the <instructions> for as long as the
<boolean expression> returns TRUE. If the boolean expression is already
FALSE at the first evaluation, then PLC Engineering never executes the instruc-
tions. If the boolean expression never adopts the value FALSE, then the instruc-
tions are repeated endlessly, as a result of which a runtime error results.

Example
WHILE iCounter <> 0 DO
Var1 := Var1*2
iCounter := iCounter-1;
END_WHILE;

You must ensure by programming means that no endless


NOTICE
loops are caused.
In a certain sense the WHILE and REPEAT loops are more powerful than the
FOR loop, since you don't need to already know the number of executions of
the loop before its execution. In some cases it is thus only possible to work
with these two kinds of loop. If the number of executions of the loop is clear,
however, then a FOR loop is preferable in order to avoid endless loops.
As an extension to the IEC 61131-3 standard you can use the CONTINUE
instruction within the WHILE loop.
See also
● ⮫ Chapter ST Instruction 'FOR' on page 385
● ⮫ Chapter EXST Statement 'CONTINUE' on page 389

ST Statement 'REPEAT'
The REPEAT loop is used like the WHILE loop, but with the difference that PLC
Engineering only checks the abort condition after the execution of the loop.
The consequence of this behavior is that the REPEAT loop is executed at least
once, regardless of the abort condition.

R911403764, Edition 08 Bosch Rexroth AG


388 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Syntax:
REPEAT
<instructions>
UNTIL <boolean expression>
END_REPEAT;

PLC Engineering executes the <instructions> until the <boolean


expression> returns TRUE.
If the boolean expression already returns TRUE at the first evaluation, PLC
Engineering executes the instructions precisely once. If the boolean expression
never adopts the value TRUE, then the instructions are repeated endlessly, as a
result of which a runtime error results.

Example
REPEAT
Var1 := Var1*2;
iCounter := iCounter-1;
UNTIL
iCounter = 0
END_REPEAT;

In a certain sense the WHILE and REPEAT loops are more powerful than the FOR
loop, since the number of executions of the loop doesn't already need to be
known before its execution. In some cases you can only work with these two
kinds of loop. If the number of executions of the loop is clear, however, then a
FOR loop is preferable in order to avoid endless loops.
As an extension to the IEC 61131-3 standard you can use the CONTINUE
instruction within the WHILE loop.
See also
● ⮫ Chapter ST Instruction 'WHILE' on page 387
● ⮫ Chapter ST Instruction 'FOR' on page 385
● ⮫ Chapter EXST Statement 'CONTINUE' on page 389

ST instruction “RETURN”
Use the RETURN statement in order to exit from a function block. Perform this
with regard to a condition for example.

Example

IF xIsDone = TRUE THEN


RETURN;
END_IF;

iCounter := iCounter + 1;
If the value of xIsDone is equal to TRUE, then the function block is exited
immediately and the statement iCounter := iCounter + 1; is not exe-
cuted.
Since the RETURN statement also supports conditional returns, the above
example can also be written as follows:
RETURN (xIsDone);
iCounter := iCounter + 1;

Also refer to
● ⮫ Chapter ST Statement 'IF' on page 384

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 389 / 1158
Programming languages and their editors

ST Instruction 'JMP'
The JMP instruction is used to execute an unconditional jump to a program line
that is marked by a jump label.
Syntax:
<label>: <instructions>
JMP <label>;
The jump label <label> is any unique identifier that you place at the beginning
of a program line. On reaching the JMP instruction, a return to the program line
with the <label> takes place.

Reference, programming
Example
iVar1 := 0;
_label1: iVar1 := iVar1+1;
(*instructions*)

IF (iVar1 < 10) THEN


JMP _label1;
END_IF;

You must ensure by programming means that no endless


NOTICE
loops are caused. For example, you can make the jump
conditional.

ST Instruction 'EXIT'
The EXIT instruction is used in a FOR, WHILE or REPEAT loop in order to end
the loop regardless of other abort conditions.
See also
● ⮫ Chapter ST Instruction 'FOR' on page 385
● ⮫ Chapter ST Instruction 'WHILE' on page 387
● ⮫ Chapter ST Statement 'REPEAT' on page 387

EXST Statement 'CONTINUE'


CONTINUE is an instruction of the Extended Structured Text (ExST).
The instruction is used inside FOR, WHILE and REPEAT loops in order to jump to
the beginning of the next execution of the loop.

Example
FOR Counter:=1 TO 5 BY 1 DO
INT1:=INT1/2;
IF INT1=0 THEN
CONTINUE; (* to avoid a division by zero *)
END_IF
Var1:=Var1/INT1; (* executed, if INT1 is not 0 *)
END_FOR;

Erg:=Var1;

See also
● ⮫ Chapter ST Instruction 'FOR' on page 385
● ⮫ Chapter ST Instruction 'WHILE' on page 387
● ⮫ Chapter ST Statement 'REPEAT' on page 387

ST Function Block Call


Syntax

R911403764, Edition 08 Bosch Rexroth AG


390 / 1158 ctrlX PLC Engineering
Programming languages and their editors

<FB-instance>(<FB input variable>:=<value or address>|, <other


FB input variables>);

Example

TMR:TON;

TMR (IN:=%OX5, PT:=T#300ms);


varA:=TMR.Q;

The timer function block TON is instanced in TMR:TON and called with assign-
ments for the parameters IN and PT.
The output Q is addressed with TMR.Q and assigned to the variable varA.

See also
● ⮫ Chapter ‘Function block’ object on page 823

ST – Comments
Comment Description Example
Single-line There are two ways of marking: /// This is a comment.
● Starts with // and ends at the end /// This is a comment.
of the line
● Starts with /// and ends at the end
of the line
In PLC Engineering, these comments
are handled the same way.
However, if library documentation is
created using the LibDoc Scripting Col-
lection, the following applies:
● When the property LibDocContent
= DocsOnly is entered in the
project information, only comments
marked with /// are processed
into library documentation. See the
example for this below the table.
● When LibDocContent =
CommentsAndDocs (default setting)
is defined, all comments are proc-
essed into library documentation.
Multiline Starts with (* and ends with *). (* This is a multiline comment
*)
Nested Starts with (* and ends with *). Addi- ( * a:=inst.out; (* comment 1
tional comments (*....*) can be con- *) b:=b+1; (* comment 2 *) *)
tained within this comment.

Comments for tooltips and POU documentation


A tooltip in the header of a POU is defined by the following
comment:
// tooltip text – line 1
// tooltip text – line 2
// tooltip text – line 3

Afterwards the documentation is defined as follows:


/// reStructuredText

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 391 / 1158
Programming languages and their editors

Note: It is not recommended to mix the different comment types because this
can cause unwanted side-effects when the documentation is generated.

32.1.5 Sequence language (AS)


SFC (sequential function chart) editor
The SFC editor is graphical editor. A new SFC POU includes an Init step and a
subsequent transition.
In the SFC editor, you can insert individual elements into the diagram by means
of commands in the “SFC” menu, the context menu, or the “ToolBox” view.

Reference, programming
When inserting by means of a menu command, the elements that can be
inserted at the currently selected position are available.
Before inserting branches parallel to multiple actions and transitions, you must
highlight these actions and transitions in a multiple selection.
You can also drag&drop SFC elements from the “Tools” view into the diagram.
When you drag an element over the editor, PLC Engineering marks all possible
insertion points with gray boxes. If you move the mouse over a gray box, then
the color of the box changes to green. When you release the mouse button, the
object is inserted at that location.
If a branching is inserted via drag&drop, select the beginning and the end of
the branching using the mouse. To highlight the beginning of the branching,
release the mouse on the insertion position. The color of the rectangle
becomes red. You set the end of the branch by clicking the second insertion
point. Then PLC Engineering inserts a branch around the objects between the
beginning and end markers.
For copying step and transition elements that call action objects or transition
objects, two different duplication modes can be set. Either the references are
copied at the same time, or the referenced objects are embedded and dupli-
cated when copying.
Define the look and feel of the editor in the PLC Engineering options in the
“SFC Editor” category.
Also refer to
● ⮫ Chapter 32.1.3 Common Functions in Graphical Editors on page 378
● ⮫ Chapter 32.1 Programming languages and their editors on page 377
● ⮫ Chapter Programming in SFC on page 193
● ⮫ Chapter “Options” - “SFC editor” dialog on page 1089

SFC Editor in Online Mode


In the SFC editor, the variables and expressions in use on the controller can be
displayed at runtime. You can also write and force variables and expressions.
Debugging functions, such as breakpoints and step-by-step execution, are not
available yet.
In the SFC editor options, you can set the online representation of the SFC
elements and attributes.
In the case that you have declared SFC flags explicitly, then they are displayed
in the declaration part in online mode. They are not displayed in offline mode.
Note the processing order of elements in an SFC diagram.

In online mode, PLC Engineering displays active steps in blue.

R911403764, Edition 08 Bosch Rexroth AG


392 / 1158 ctrlX PLC Engineering
Programming languages and their editors

See also
● ⮫ Chapter Implicit Variables on page 394
● ⮫ Chapter 18.16.3 Using the Declaration Editor on page 165
● ⮫ Chapter Processing Order in SFC on page 392
● ⮫ Chapter “Options” - “SFC editor” dialog on page 1089

Processing Order in SFC


Basic element behavior
● Active step: An active step includes actions currently being executed. In
online mode, PLC Engineering displays active steps in blue.
● Initial step: In the first cycle after calling a POU in SFC, the initial step is
activated automatically and the step action is executed.
● PLC Engineering executes IEC actions at least two times: the first time is
when the step is activated, and the second time when the step is deacti-
vated (but not until the next cycle).
● Alternative branches: If the step before the branch is active, then PLC Engi-
neering passes the first transition of each alternative branch line from left to
right. PLC Engineering activates the subsequent step in the first branch line
with a transition yielding TRUE.
● Parallel branches: If the step before the branch (horizontal double line)
is active and the transition before the branch yields TRUE, then PLC Engi-
neering activates the first steps in every branch line. The branch lines are
then processed at the same time. The step after the end of the branch is
activated when every last step in each branch line is active and the transi-
tion after the double line yields TRUE.
Processing order
1. Reset IEC actions
PLC Engineering resets the internal action control flags of the action
qualifiers (N, R, S, L, D, P, SD, DS, SL). These flags control IEC actions.
However, flags are not reset when they are called within actions.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 393 / 1158
Programming languages and their editors

2. Execute exit actions


PLC Engineering verifies whether all steps fulfill the condition for exe-
cuting the exit action for each step. The order of verification follows the
layout in the SFC diagram, from top to bottom and from left to right.
PLC Engineering executes an exit action when the step is deactivated
(after any entry and step actions have been executed in the preceding
cycle and the condition for the subsequent step yields TRUE).
3. Execute entry actions
PLC Engineering verifies whether all steps fulfill the condition for exe-
cuting the entry action for each step. The order of verification follows the

Reference, programming
layout in the SFC diagram, from top to bottom and from left to right. If the
conditions are fulfilled, then PLC Engineering executes the entry actions.
PLC Engineering executes an entry action as soon as the transition of the
preceding step has been processed and yields TRUE, thus indicating that
the step has been activated.
4. Time check / Execute step actions
PLC Engineering performs the following check for each step in the order
of the SFC layout:
● PLC Engineering copies the elapsed time of the active step to
the respective implicit step variable <step name>.t. (not yet imple-
mented)
● If a timeout occurs, then PLC Engineering sets the respective error
flags. (not yet implemented)
● For non-IEC steps: PLC Engineering executes the step action.
5. Execute IEC actions
PLC Engineering executes the IEC actions in alphabetical order, passing
through the list of actions two times. In the first pass, PLC Engineering
executes the IEC actions for each step that was deactivated in the pre-
ceding cycle. In the second pass, the IEC actions are executed for each
active step.
6. Transition check / Activate next steps
The transitions are passed as follows: If a step is active in the current
cycle and the subsequent transition yields TRUE and any defined minimum
time of the step has elapsed, then the subsequent step is activated.

Please note when executing actions:


NOTICE
An action can be executed multiple times within the
same cycle if you use it in multiple SFC diagrams. For
example, if a sequential function chart includes two IEC
actions A and B, both of which are programmed in SFC
and call an IEC action C, then the IEC action C is called
two times.
If you use the same IEC action at the same time in dif-
ferent levels of an SFC diagram, then this can lead to
unpredictable results when processing. For this reason,
PLC Engineering issues a corresponding error message.
This error message can appear for projects that have
been created in an earlier version of the development
system.
Please note: It is possible to use implicit variables to monitor the processing
status of steps and actions and to control processing.

R911403764, Edition 08 Bosch Rexroth AG


394 / 1158 ctrlX PLC Engineering
Programming languages and their editors

See also
● ⮫ Chapter Implicit Variables on page 394
● ⮫ Chapter Qualifiers for Actions in SFC on page 394

Qualifiers for Actions in SFC


You assign qualifiers to IEC steps. Qualifiers describe how a step action is
processed.
Qualifiers are processed by the SFCActionControl function block in the
library IecSfc.library. The library is automatically integrated into the project
by the SFC plug-in.
Table 7: Available qualifiers
N Non-stored The action is active as long as the step.
R overriding The action is deactivated.
Reset
S Set (Stored) PLC Engineering executes this action as soon as the step is active.
The action execution is continued even when the step has been
deactivated until it gets a reset.
L time Limited PLC Engineering executes this action as soon as the step is active.
The action is executed until the step is deactivated or the given
time span has elapsed.
D time Delayed PLC Engineering begins executing the action only after the given
delay time has elapsed following step activation and the step is
still active. The action is executed until the step is deactivated.
P Pulse PLC Engineering executes the action exactly two times: one time
when the step is activated and one time when the step is deacti-
vated.
SD Stored and time PLC Engineering begins executing the action only after the given
Delayed delay time has elapsed following step activation. The action is
executed until it gets a reset.
DS Delayed and PLC Engineering begins executing the action only after the given
Stored delay time has elapsed following step activation and the step is
still active. The action is executed until it gets a reset.
SL Stored and time PLC Engineering executes this action as soon as the step is acti-
limited vated. It is executed until the specified time has elapsed or it gets
a reset.
You have to specify the times for the L, D, SD, DS, and SL qualifiers in the
format of a TIME constant.
When an IEC action is deactivated, it is executed one more time. This means
that PLC Engineering executes this kind of action at least two times. This also
applies to actions with the P qualifier.
See also
● ⮫ Chapter Programming in SFC on page 193

Implicit Variables
Every SFC object supplies implicit variables for you to monitor the status of
steps and IEC actions at runtime. These implicit variables are declared auto-
matically by PLC Engineering for each step and each IEC action.
The implicit variables are structure instances of the type SFCStepType for
steps and type SFCActionType for actions. The variables have the same names
as their elements, for example "step1" variable name for "step1" step name.
The structure members describe the status of a step or action or the currently
elapsed time in an active step.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 395 / 1158
Programming languages and their editors

In the element properties, you can define whether PLC Engineering should
export a symbol definition for this flag to the symbol configuration.
See also
● ⮫ Chapter SFC Element Properties on page 408

Step and action status


Syntax for the implicit variable declaration:
<step name>:SFCStepType;
_<action name>:SFCActionType;

Reference, programming
Table 8: The following implicit variables are available for step or IEC action status:
Step
<step name>.x Shows the activation status in the current cycle.
When <step name>.x = TRUE, PLC Engineering processes the
step in the current cycle.
<step name>._x Shows the activation status for the next cycle.
When <step name>._x = TRUE and <step name>.x = FALSE,
PLC Engineering processes the step in the next cycle. This means
that <step name>._x is copied to <step name>.x at the begin-
ning of a cycle.
<step name>.t The flag t yields the current elapsed time since the step was
activated. This applies only to steps, regardless of whether a min-
imum time has been defined or not in the step properties.
Also see SFC flag SFCError.
<step name>._t For internal use only
IEC action
_<action name>.x TRUE when the action is being executed.
_<action name>._x TRUE when the action is active.
You can use the above variables to force a specific status
NOTICE
value to a step (activate a step). However, note that this
can cause an unstable status in the SFC.

Access to implicit variables


Syntax for access:
Assign the implicit variable directly in the POU: <variable name>:=<step
name>.<implicit variable> or <variable name>:=_<action
name>.<implicit variable>

Example
status:=step1._x;

From another POU, with the POU name: <variable name>:=<POU


name>.<step name>.<implicit variable> or <variable name>:=<POU
name>._<action name>.<implicit variable>

Example
status:=SFC_prog.step1._x;

R911403764, Edition 08 Bosch Rexroth AG


396 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Symbol generation
In the element properties of a step or action, you define whether PLC Engi-
neering should add a symbol definition for the step or action flag. In the
“Properties” view, you have to select the necessary access rights in the
“Symbol” column.
See also
● ⮫ Chapter SFC Element Properties on page 408

SFC Flags
SFC flags are implicitly generated variables with predefined names. You can
use them to influence the processing of an SFC diagram. You can use these
flags, for example, to display timeouts or reset step chains. In addition, you can
activate jogging mode specifically to activate transitions. You have to declare
and activate these variables in order to have access to them.

SFC flags
Name Data Type Description
SFCInit Bool TRUE: PLC Engineering resets the sequence to the initial step. The other
SFC flags are also reset (initialization). While the variable is TRUE, the
initial step remains set (active), but its actions are not executed. Only
when you set SFCInit again to FALSE is the POU further processed
normally.
SFCReset Bool This function behaves similar to SFCInit. However, PLC Engineering
continues processing after the initialization of the initial step. For
example, in the initial step, you could immediately reset the SFCReset
flag to FALSE.
SFCError Bool TRUE if a timeout occurs in an SFC diagram. If second timeout occurs
in the program, it is not registered unless you previously reset the vari-
able SFCError. The declaration of SFCError is a requirement for other
flag variables to function for controlling the chronological sequence
(“SFCErrorStep”, SFCErrorPOU, SFCQuitError).
SFCEnableLim Bool Used specifically for activating (TRUE) and deactivating (FALSE) the
it timeout control in steps using SFCError. If you declare and activate
this variable (SFC settings), then you must set it to TRUE for SFCError
to work. If you do not, then the timeouts are ignored. The is useful, for
example, at start-up or in manual operation. If you do not declare the
variable, then SFCError will work automatically.
The requirement is the declaration of SFCError.
SFCErrorStep String Stores the name of the step that caused a timeout, which was regis-
tered by SFCError. The name is kept until the registered step error is
reset by means of SFCQuitError (FALSE -> TRUE).
The requirement is the declaration of SFCError.
SFCErrorPOU String Stores the name of the block in which a timeout occurred and was
registered by SFCError. The name is saved until the timeout is reset by
SFCQuitError.
The requirement is the declaration of SFCError.
SFCQuitError Bool As long as this Boolean variable is TRUE, PLC Engineering pauses the
processing of the SFC diagram and any timeout, saved in the variable
SFCError, is reset. If you reset the variable to FALSE, then all previous
times in the active steps are reset.
The requirement is the declaration of SFCError.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 397 / 1158
Programming languages and their editors

Name Data Type Description


SFCPause Bool As long as this variable is TRUE, PLC Engineering pauses the processing
of the SFC diagram.
SFCTrans Bool TRUE if a transition is active.
SFCCurrentSt String Shows the name of the active step, regardless of the time monitoring. In
ep parallel branches, the name of the step of the rightmost branch line is
always stored.
SFCTip, Bool Controls the jogging mode of the SFC block.
SFCTipMode If you enable this flag with SFCTipMode=TRUE, then you can activate the

Reference, programming
next step only by setting SFCTip to TRUE. While SFCTipMode is set to
FALSE, transitions can also be used to continue activation.
SFCErrorAnal Contains as string all variables that contribute to the total value TRUE
yzation, of SFCError (timeout in one step). SFCError needs to be activated for
this.
SFCErrorAnalyzation implicitly uses the function of the POU
AnalyzeExpression of the library Analyzation.
SFCErrorAnal Contains in a table all variables that contribute to the total value TRUE
yzationTable of SFCError (timeout in one step). SFCError needs to be activated for
, this.
SFCErrorAnalyzationTable implicitly uses the function of the POU
AnalyzeExpressionTable of the library Analyzation.

Implicit generation of SFC flags


PLC Engineering declares SFC flags automatically when you activate the
respective options. You can set this option in the “SFC Settings” tab of the
properties dialog for each POU, or in the “SFC” project settings dialog for each
SFC POU in the project.
The SFC settings for the SFC flags of individual POUs are effective only if you
have not selected the “Use defaults” option. When you select this option, the
settings apply that were defined in the project settings.
SFC flags that you declare in the SFC settings dialog are visible only in the
online view of the SFC block.
See also
● ⮫ Flag on page 1057

Explicit generation of SFC flags


Manual declaration, which was necessary in CoDeSys V2.3, is now only
required to enable write access from another block. In this case, you should
note that when you declare the flag in a global variable list, you must deactivate
its “Declare” setting in the SFC settings dialog. If you do not do this, then a
local SFC flag is implicitly declared that PLC Engineering uses instead of the
global variable.

R911403764, Edition 08 Bosch Rexroth AG


398 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Application example for SFCError

Example
You have created an SFC block named sfc1, which contains the s1 step. You
have defined timeouts in the step properties. (See "Online view of SFC block
sfc1" below.)
If for any reason the s1 step remains active longer than its time properties
have permitted (timeout), then PLC Engineering sets the SFCError flag to
permit access by the application.
To permit access, you have to declare and activate the SFC flag in the SFC
settings. If you have only declared it, then the SFC flag is only displayed in the
online view of sfc1 in the declaration part, but it has no function.

Now the SFC flag can be referenced within the POU, for example in an action
(2) or outside of the block (1).

Online view of the SFC block sfc1

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 399 / 1158
Programming languages and their editors

Reference, programming
SFCError is TRUE as soon as a timeout occurs within sfc2.
Note that you can use the flags SFCErrorAnalyzation and
SFCErrorAnalyzationTable to determine the components of the expression
that contributes to the value TRUE of the SFCError.

See also
● ⮫ Chapter Library "Analyzation" on page 400

Access to the flags


Syntax for access:
You assign the flag directly within the POU: <variable name>:=<SFC flag>

Example
checkerror:=SFCerror;

From another POU with POU name: <variable name>:=<POU name>.<SFC


flag>

Example:
checkerror:=SFC_prog.SFCerror;

If you need write access from another block, then you also have to declare the
SFC flag explicitly as a VAR_INPUT variable in the SFC block or globally in a
GVL.

R911403764, Edition 08 Bosch Rexroth AG


400 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Example
Local declaration:
PROGRAM SFC_prog
VAR_INPUT
SFCinit:BOOL;
END_VAR
Global declaration in a global variable list:
VAR_GLOBAL
SFCinit:BOOL;
END_VAR
PROGRAM PLC_PRG
VAR
setinit: BOOL;
END_VAR
SFC_prog.SFCinit:=setinit; // write access to SFCinit in
SFC_prog

See also
● ⮫ Chapter Library "Analyzation" on page 400

Library "Analyzation"
This library contains POUs for the analysis of expressions. When a compo-
site expression has the total value of FALSE, those of its components that
contribute to this result can be determined. In the SFC editor, the flags
SFCErrorAnalyzation and SFCErrorAnalyzationTable use these functions
implicitly to examine the transition expressions. Then the flags provide the
identifiers of the variables that contributed to a timeout error. They keep
this information until they are reset explicitly by means of the SFC flag
SFCQuitError.

An analysis POU cannot be called by means of a pointer. This kind of call is


ignored. Call the POU as a single instance.
For a description of the library POUs and an example of how the SFC flags
display the analysis results in PLC Engineering, see the documentation for the
library (online help or directly in the Library Manager).

See also
● ⮫ Chapter Programming in SFC on page 193
● ⮫ Chapter SFC Flags on page 396

Elements (AS)

SFC Elements 'Step' and 'Transition'


Step symbol ; Transition symbol
As a rule, PLC Engineering inserts steps and transitions as combinations.
Inserting a step without a transition or a transition without a step causes an
error when compiling. You can modify this by double-clicking the name.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 401 / 1158
Programming languages and their editors

Step names must be unique within the scope of


NOTICE
the parent block. Consider this especially when using
actions that were also programmed in SFC.
Please note that you can convert a step into an initial step by clicking “Init

Reference, programming
step” or by setting the respective property in the SFC properties.
All steps are defined by the step properties, which you can display and edit in
the “Properties” view, depending on the set options.
You have to add those actions to the step which are to be executed when the
step is active. A distinction is made between IEC actions and step actions.
Details for this are found in the chapter about the SFC element "Action".
A transition must include the condition for the subsequent step to be active as
soon as the value of the condition yields TRUE. Therefore, a transition condition
must yield TRUE or FALSE. It can be defined in one of two ways:
● (1) Inline condition (direct): You replace the default transition name with
either the name of a Boolean variable, a Boolean address, a Boolean con-
stant, or a statement with a Boolean result, for example (i<100) AND b.
You cannot specify programs, function blocks, or assignments here.
● (2) Multi-use condition (separate transition or property object): You replace
the default transition name with the name of a transition or property object
( , ). You create these objects by clicking “Project 🠂 Add Object”. This
allows multiple use of transitions, for example "condition_xy" in the figures
below. Like an inline condition, the object can contain a Boolean variable,
Boolean address, Boolean constant, or an statement with a Boolean result.
In addition, it can also contain multiple statements with any code.

The user is responsible for assigning the required expres-


NOTICE
sion to a transition variable if the transition includes mul-
tiple instructions.
Transitions that reference a transition or property object are marked with a
small triangle in the upper right corner of the transition box.

R911403764, Edition 08 Bosch Rexroth AG


402 / 1158 ctrlX PLC Engineering
Programming languages and their editors

As opposed to CoDeSys V2.3, now PLC Engineering treats a transition condi-


tion like a method call. The entry has the following syntax:
<transition name>:=<transition condition>
(for example trans1:= a=100)
or only
<transition condition>
(for example a=100)
You will find an example (condition_xy) in the figure above.
See also
● ⮫ Chapter Programming in SFC on page 193
● ⮫ Chapter Command 'Insert Step-Transition' on page 978
● ⮫ Chapter SFC Element 'Action' on page 402
● ⮫ Chapter Command 'Init Step' on page 977
● ⮫ Chapter SFC Element Properties on page 408
● ⮫ Chapter 18.24.5 Calling Methods on page 224

SFC Element 'Action'


Symbol:
An action includes one or more statements in one of the valid implementation
languages. You can assign an action to a step.
Actions that you use in SFC steps have to be created as POUs in the project.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 403 / 1158
Programming languages and their editors

Exception: In the case of IEC actions, which you add to a step as action associ-

Reference, programming
ation, you can also specify a Boolean variable instead of an action object. The
value of these variables is switched between FALSE and TRUE each time the
action is executed.
You have to define unique step names within the scope
NOTICE
of the parent block. An action written in SFC must not
contain a step with a name identical to the step to which
the action is assigned.
A distinction is made between IEC actions and step actions:

1. IEC actions
IEC actions comply with the IEC 61131-3 standard. They are executed
according to their qualifiers.
IEC actions are executed two times: first when the step is activated and second
when the step is deactivated. If you assign multiple actions to one step, then
the action list is processed from top to bottom.
Each action box includes the qualifier in the first column and the action name
in the second column. Both can be edited directly.

When the same global Boolean variable is associated


NOTICE
as an IEC action in different SFC POUs, unwanted over-
writing can result.
In contrast to step actions, you can use different qualifiers for IEC actions.
Moreover, each IEC action is provided with a control flag. This directs PLC
Engineering to execute an action only one time at any moment, even if the
action is called by another step at the same time. This cannot be guaranteed
for step actions.
You assign IEC actions to steps by clicking “SFC 🠂 Insert Action Association”.
See also
● ⮫ Chapter Command 'Insert Action Association' on page 982
● ⮫ Chapter Qualifiers for Actions in SFC on page 394

2. Step actions
These are actions that you can use to extend the IEC standard.
● Entry action:
PLC Engineering executes this action after the step is activated and before
the main action is executed.

R911403764, Edition 08 Bosch Rexroth AG


404 / 1158 ctrlX PLC Engineering
Programming languages and their editors

You reference a new action, or an action created below the SFC object, from
a step by means of the “Entry action” element property (2). You can also
add a new action to the step by means of the “Add Entry Action” command.
The entry action is marked with an E in the lower left corner of the step box.
● Main action:
PLC Engineering executes this action when the step is active and any entry
actions have already been processed. However, in contrast to IEC actions
(see above), these step actions are not executed a second time when the
step is deactivated. Moreover, you cannot use qualifiers here.
You add an existing action to a step by means of the “Main action” element
property (1). You can create and add a new action by clicking the step
element. A main action is marked with a filled triangle in the upper right
corner of the step box.
● Exit action:
PLC Engineering executes this action one time when the step is deactivated.
However, note that an exit action is not executed in the same cycle, but at
the beginning of the next cycle.
You reference a new action, or an action created below the SFC object, from
a step by means of the “Exit action” element property (3). You can also add
a new action to the step by means of the “Insert Exit Action” command. The
exit action is marked with an X in the lower right corner of the step box.

See also
● ⮫ Chapter SFC Element Properties on page 408

Difference between IEC actions and step actions


The main difference between step actions and IEC actions with a qualifier N is
that an IEC action is always executed two times: when the step is activated and
when the step is deactivated. See the following example:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 405 / 1158
Programming languages and their editors

Example

Reference, programming
You have attached the Action_AS1 action to the AS1 step as a step action
(left) and as an IEC action with qualifier N (right). Because two transitions
are activated in each case, the time to reach the initial step again is two PLC
cycles. This is true as long as the iCounter counter variable was initialized
at 0 and then incremented in the Action_AS1 action. After the Init step
is reactivated, iCounter returns a value of 1 in the example on the left. In
the example on the right, a value of 2 is returned because the IEC action is
executed a second time due to the deactivation of AS1.

Another difference: Step actions can be pseudo-embedded. In this case, they


can be called only from the related step. If you copy this step, PLC Engineering
creates new action objects automatically and copies the respective implemen-
tation code. You define whether or not a step action is embedded, either
when the first action is inserted into the step, or later in the “Duplicate when
copying” element property. In general, this behavior can also be preset in the
SFC options.
Moreover, for IEC actions, a Boolean variable can be specified instead of an
action object. This is not possible for step actions.

SFC Element 'Branch'


Symbol
Use branches to program parallel or alternative sequences in the sequential
function chart.
For alternative branches, PLC Engineering processes just one of the branch
lines at a time, depending on the preceding transition condition. Parallel
branches are processed at the same time.
See also
● ⮫ Chapter Processing Order in SFC on page 392
● ⮫ Chapter Programming in SFC on page 193
● ⮫ Chapter Command 'Insert Branch Right' on page 981

Parallel branch
For parallel branches, the branch lines must begin and end with steps. Parallel
branch lines can contain additional branches.
The horizontal lines before and after the branch are double lines.

R911403764, Edition 08 Bosch Rexroth AG


406 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Processing in online mode: If the preceding transition (t2 in the example) yields
TRUE, then the first steps in all parallel branch lines are active (Step11 and
Step21). PLC Engineering processes the individual branch lines at the same
time and the subsequent transition is passed afterwards (t3).
The "Branch<n>" jump marker is added automatically to the horizontal line that
indicates the beginning of a branch. You can define this marker as the jump
destination.
Please note that you can convert a parallel branch into an alternative branch by
clicking “Alternative”.
See also
● ⮫ Chapter Command 'Alternative' on page 980

Alternative branch
The horizontal line before and after the branch is a single line.
In an alternative branch, the branch lines must begin and end with transitions.
The branch lines can contain additional branches.

If the step before the branch is active, then PLC Engineering passes the first
transition of each alternative branch line from left to right. For the first transi-
tion that yields TRUE, the associated branch line opens, thus activating the step
following the transition.
Please note that you can convert an alternative branch into a parallel branch by
clicking “Parallel”.
See also
● ⮫ Chapter Command 'Parallel' on page 980

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 407 / 1158
Programming languages and their editors

SFC Element 'Jump'


Symbol
Use a jump to define which actions in a step should be executed next as soon
as the transition preceding the jump is TRUE. Jumps may become necessary, as
execution paths cannot cross or lead upwards.
Excluding the required jump at the end of a diagram, you can generally insert
jumps only at the end of a branch.
The destination of a jump is defined by the added text string, which you can
edit directly. The jump destination can be a step name or the marker for a
parallel branch.

Reference, programming
See also
● ⮫ Chapter Programming in SFC on page 193
● ⮫ Chapter Command 'Insert Jump' on page 983

SFC Element 'Macro'


Symbol
A macro includes part of the SFC diagram, but it is not displayed in detail in the
main view of the editor.
Using macros does not influence the processing flow. Macros are used for
hiding specific parts of the diagram, for example to increase overall clarity.
You open the macro editor by double-clicking the macro box or by clicking “SFC
🠂 Zoom Into Macro”. You can program here just like in the main view of the
SFC editor. To close the macro editor, click “SFC 🠂 Zoom Out of Macro”.

R911403764, Edition 08 Bosch Rexroth AG


408 / 1158 ctrlX PLC Engineering
Programming languages and their editors

① Main view in the SFC editor


② Macro editor view for Macro1
Macros can also include other macros. The caption of the macro editor always
shows the path of the open macro within the diagram, for example:

See also
● ⮫ Chapter Programming in SFC on page 193
● ⮫ Chapter Command 'Zoom Into Macro' on page 984
● ⮫ Chapter Command 'Zoom Out of Macro' on page 984

SFC Element Properties


You edit the properties of an SFC element in the “Properties” view. Click
“View 🠂 Element Properties” to open this view. The properties to be displayed
depend on the currently selected element.
The properties that are displayed in the SFC diagram next to the element
depend on the settings in the “View” tab of the SFC editor options.

General
Property Value description
“Name” Element name, by default "<element><consecutive number>", for
example step name "Step0", "Step1", branch name "Branch0”, etc.
“Comment” Element comment in text, for example “counter reset”. You can insert
line breaks by pressing [Ctrl]+[Enter].

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 409 / 1158
Programming languages and their editors

Property Value description


“Symbol” For each SFC element, PLC Engineering declares an implicit variable
with the same name as the element.
The configuration determines whether this flag variable should be
exported to the symbol configuration and which access rights for the
symbol should be applied in the PLC.
● “No access”: The symbol is exported to the symbol configuration
but cannot be accessed from the PLC.
● “Read”: The symbol is exported to the symbol configuration and
can be read from the PLC.

Reference, programming
● “Write”: The symbol is exported to the symbol configuration and
can be written from the PLC.
● “Read/Write”: Combination of read and write.
● Empty: A symbol is not exported to the symbol configuration.

Specific
Property Value description
“Init step” : This option is activated only for the defined initial step. By default,
this is the first step in an SFC diagram.
Note: If you activate this property for another step, then it must be
deactivated in the previous step to prevent compilation errors.
“Duplicate when copying” This option is available for steps that contain a step action (entry
action, main action, or exit action), and for transitions that are linked
to a transition object.
: When copying the step or transition, a new object is created for
each called action or transition. It contains a copy of the implementa-
tion code of the copied object.
: When copying a step or transition, the link to the called object is
retained for the respective action or transition. No new objects are
generated. The source and the copies of the step or transition call the
same action or transition.
“Times” Minimum time that the step is active, even when the subsequent tran-
● “Minimum active” sition is TRUE.
● “Maximum active” Maximum time that the step can be active. If this time is exceeded,
then PLC Engineering sets the SFCError implicit variable to TRUE.
Times according to IEC syntax (for example t#8s) or the TIME variable;
default: t#0s.
“Actions” ● “Entry action”: PLC Engineering executes these actions after acti-
● “Entry action” vating the step.
● “Step action” ● “Step action”: PLC Engineering executes this action when the step
● “Exit action” is active and any entry actions have already been processed.
● “Exit action”: PLC Engineering executes this action in the subse-
quent cycle when the step is deactivated.
Please note the processing sequence.
When using the respective implicit SFC variables and flags, you receive informa-
tion about the status of a step or an action or about timeouts.
See also
● ⮫ Chapter “Options” - “SFC editor” dialog on page 1089
● ⮫ Chapter Implicit Variables on page 394
● ⮫ Chapter SFC Element 'Action' on page 402

R911403764, Edition 08 Bosch Rexroth AG


410 / 1158 ctrlX PLC Engineering
Programming languages and their editors

32.1.6 Continuous function chart/ladder diagram/instruction list


(FUP/LD/IL)
FBD/LD/IL Editor
The FBD/LD/IL editor is a combined editor of the programming languages FBD,
LD and IL.

If necessary, IL can be activated in the PLC Engineering options.

There is a common set of commands and elements and PLC Engineering


automatically converts the three programming languages into one another inter-
nally.
The code in the implementation part is structured in all three languages by
means of networks.
The menu “FBD/LD/IL” contains command when working in the editor.
Using the command, it can be switched between the three editor views at any
time in offline and in online mode.
The behavior of the FBD/LD/IL editor is defined by the settings in “Tools
🠂 Options” (category “FBD, LD and IL”).
There are some special elements that PLC Engineering
NOTICE
cannot convert and thus it displays only in the appli-
cable language. There are also constructs that are not
clearly convertible between IL and FBD and are therefore
'normalized', i.e. nullified, when converted back to FBD.
This applies to the: Negation and explicit/implicit assign-
ments for function block inputs and function block out-
puts.
An error-free conversion between the languages requires
syntactically correct code. Otherwise parts of the imple-
mentation can be lost.
Also refer to
● ⮫ Chapter 18.17.2 FBD/LD/IL on page 173 (programming)
● ⮫ Chapter 33.3.14 “FBD/LD/IL” menu on page 997 (Commands)
● ⮫ Chapter “Options” - “FBD, LD and IL” dialog on page 1091

FBD and LD editor


Inserting and arranging elements
You can drag elements with the mouse from the view “Tools” (toolbox) into the
implementation part of the editor. Alternatively you can use the commands of
the context menu or the “FBD/LD/IL” menu.
Settings for the display and interface are defined in the PLC Engineering
options, category “FBD/LD/IL”.
If you drag an element with the mouse over a network in the editor, all pos-
sible insertion positions are displayed with gray diamond-shaped, triangular or
arrow-shaped position marks. As soon as the mouse pointer is located over one
of these marks, the mark turns green. If the mouse button is now released, PLC
Engineering inserts the element at this position.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 411 / 1158
Programming languages and their editors

Example

If you drag a function block or an operator from the toolbox or a network at the

Reference, programming
left-hand side of the network onto one of the two arrows, then PLC Engineering
automatically creates a new network and inserts the element there.
In order to replace an element, drag a suitable other element onto its position
with the mouse. Elements that you can replace by the new element are marked
by PLC Engineering in the editor with text fields, for example “Replace”,
“Attach input”.
You can use the usual commands in the menu “Edit” for cutting, copying,
pasting and deleting elements. Copying also works with drag&drop, keeping
the [Ctrl] key pressed.
The operators with EN/ENO functionality can only be
NOTICE
inserted in the FBD and IL editors.
Selecting elements
A box or a connecting line in the editor is selected by clicking it with the mouse
so that it has the focus. Multiple selection is possible while the [Ctrl] key is
pressed. A selected element is highlighted in red.
Tooltip
If the cursor points to certain elements, for example to a variable or to an input,
a tooltip appears showing information about this element.
In the case of elements underlined with a wavy red line, the tooltip shows the
pre-compile error message of the error that occurs with this element.
Navigating in the editor
Table 9: Navigating in the editor
With the help of the keys and commands described below, you can place the
focus within the editor on a different cursor position. The change between the
positions is also network-spanning in function.
[¬] Change to the neighboring cursor position, along the signal
[®] flow, i.e. from left to right, and the other way around.
[][¯] Change to the next cursor position above or below the current
[¯] position, if this neighboring position belongs to the same log-
ical group. For example, all connections of a box form a logical
group.
If such a logical group does not exist: Change to the first
cursor position in the next higher or lower neighboring ele-
ment. In the case of parallel-connected elements, navigation
takes place along the first branch.
[Ctrl] + Change to the first network; this will be selected.
[Home]
[Ctrl] + [End] Change to the last network; this will be selected.
[Image ] Scrolls up 1 page; the topmost network on this page is
selected.

R911403764, Edition 08 Bosch Rexroth AG


412 / 1158 ctrlX PLC Engineering
Programming languages and their editors

[ Image¯] Scroll down 1 page; the lowest network on this page is


selected.
Command “Go Change to a certain network.
to…”
Open function blocks:
If a function block is inserted in the editor, open its implementation by a
double-click or with the context menu command “Browse for symbol 🠂 Go to
definition”.
Also refer to
● ⮫ Chapter Function block diagram (FBD) on page 173
● ⮫ Chapter Ladder diagram (LD) on page 175
● ⮫ Chapter Programming in a function block diagram (FBD) on page 174
● ⮫ Chapter Programming Ladder Diagrams (LD) on page 176
● ⮫ Chapter Elements (FUP/LD/IL) on page 419
● ⮫ Chapter “Options” - “FBD, LD and IL” dialog on page 1091
● ⮫ Chapter FBD/LD/IL Editor in Online Mode on page 414
● ⮫ Chapter Command 'Go to' on page 1007

IL editor
Inserting and arranging elements:
You can insert elements with the help of the commands of the menu
“FBD/LD/IL” in the context menu. A new network can also be dragged from
the toolbox into the implementation section of the editor.
You can use the usual commands in the menu “Edit” for cutting, copying,
pasting and deleting elements. Copying also works with drag&drop, keeping
the [Ctrl] key pressed.
Please note that operators with EN/ENO functionality
NOTICE
can only be inserted into the FBD and IL editors.
Each program line is entered in a table row.
Table 10: Structure of networks in the IL editor
1st line: Network title
Prerequisite: The option is activated in the PLC Engineering options.
2nd line: Network comment
Prerequisite: The option is activated in the PLC Engineering options.
From the third line:
Column Content Description
1 Operator Contains the IL operator (LD, ST, CAL, AND,
OR, etc.) or a function name. When calling
a function block, additionally specify the
corresponding parameters here; in the pre-
ceding field, enter := or =>.
2 Operand Contains precisely one operand or the name
of a jump label.
In the case of several operands you must
enter them in several rows and when doing
so insert a comma directly behind the indi-
vidual operands. (See example below)

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 413 / 1158
Programming languages and their editors

3 Address Contains the address of the operand as


defined in its declaration.
Not editable
You can activate/deactivate the display via
the option “Display symbol address”. To
do this, click “Tools 🠂 Options” and the
“General” tab in the “FBD, LD and IL” cate-
gory.
4 Symbol comment Contains the comment that was specified
for the operand if necessary in the declara-

Reference, programming
tion.
Not editable
You can activate/deactivate the display by
means of the “Display symbol comment”
option if you click “Tools 🠂 Options” and
the “General” tab in the “FBD, LD and IL”
category.
5 Operand comment Comment for the current program line.
You can activate/deactivate the display by
means of the “Operand comment” option
if you click “Tools 🠂 Options” and the
“General” tab in the “FBD, LD and IL” cate-
gory.

Example

Table 11: Navigating in the editor


Key(s)/ Cursor movement
command
[↑] Jumps to the field located above/below.
[↓]
[Tab] Jumps one field to the right within the row.
[Shift]+[Tab] Jumps to the left to the preceding field within the row
[Space] Opens the editing frame for the selected field. Alternatively,
click on the field. If applicable, the button for the input assis-
tant dialog is available.
[Ctrl] + [Enter] Inserts a new row below the current row.
[Del] Deletes the current row.
[Ctrl] + Sets the focus at the start of the document and marks the first
[Home] network.
[Ctrl] + [End] Sets the focus at the end of the document and marks the last
network.

R911403764, Edition 08 Bosch Rexroth AG


414 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Key(s)/ Cursor movement


command
[Imagine Scrolls up a page and marks the top rectangle.
down]
[Image up] Scrolls down one page and highlights the top rectangle.
Also refer to
● ⮫ Chapter Instruction list (IL) on page 177
● ⮫ Chapter Programming in Instruction List (IL) on page 178
● ⮫ Chapter Modifiers and operators in IL on page 415
● ⮫ Chapter “Options” - “FBD, LD and IL” dialog on page 1091
● ⮫ Chapter FBD/LD/IL Editor in Online Mode on page 414

FBD/LD/IL Editor in Online Mode


FBD/LD/IL editor in online mode
In online mode the current value of each variable is displayed behind the vari-
able in the editor. Writing/forcing and the setting of breakpoints is possible.
If the variable is presently forced, this is indicated directly in front of the forced
value by . If a value has been prepared for writing or forcing, this value is
displayed directly behind the current value in square brackets <value>.

Example
Forced variable:

Prepared value

In the online view of a ladder diagram (LD) the connecting lines are marked
in color: connections with the value TRUE are displayed as a thick blue line,
connections with the value FALSE as a thick black line. Conversely, connections
with an unknown or analog value are displayed normally (thin black line).
Note that values of the connections are calculated from
NOTICE
the monitored variables. This is not a genuine flow con-
trol.
Breakpoints
Possible positions for breakpoints are in principle the positions at which values
of variables can change (instructions), at which the program branches or at
which another box is called.
Possible breakpoint positions:
● On the entire network: causes the breakpoint to be set at the first possible
position in the network.
● On a box, if the box contains an assignment. Not possible with operator
boxes, for example ADD, DIV.
● On assignments.
● At the end of the box at the position of the return to the calling box. In
online mode an empty network automatically appears here; it is marked by
'RET' in place of a network number.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 415 / 1158
Programming languages and their editors

At present you cannot directly set a breakpoint on the


NOTICE
first box in the network. However, if you set a breakpoint
on the entire network, this breakpoint marking is trans-
ferred automatically to the first box in online mode.
Breakpoints in methods: PLC Engineering automatically
NOTICE
sets a breakpoint in all methods that can be called.
Therefore, if a method managed by an interface is called,
breakpoints are set in all methods that occur in func-
tion blocks that implement this interface as well as in
all derived function blocks that use the method. If a

Reference, programming
method is called by a pointer to a function block, PLC
Engineering sets the breakpoints in the method of the
function block and in all derived function blocks that use
the method.
See also
● ⮫ Chapter 21.5 Forcing and writing of variables on page 277
● ⮫ Chapter 21.3 Using Breakpoints on page 271

Modifiers and operators in IL


Table 12: Modifiers
Modifier Combined with Description
operator
C JMP, CAL, RET The statement is only executed if the
result of the previous expression is
TRUE.
N JMPC, CALC, RETC The statement is only executed if the
result of the previous expression is
FALSE.
N else Negation of the operand (not of the
accumulator).
Table 13: Operators with the possible modifiers
Operator N Meaning Example
LD N Loads the (negated) value of the LD ivar
operand into the accumulator.
ST N Stores the (negated) content of the ST iErg
accumulator in the operand.
S Sets the operand (type BOOL) to TRUE S bVar1
if the content of the accumulator is
TRUE.
R Sets the operand (type BOOL) to FALSE R bVar1
if the content of the accumulator is
TRUE.
AND N,( Bit-by-bit AND of the accumulator value AND bVar2
and (negated) operand
OR N,( Bit-by-bit OR of the accumulator value OR xVar
and (negated) operand
XOR N,( Bit-by-bit exclusive OR of the accumu- XOR N,
lator value and (negated) operand (bVar1,bVa
r2)
NOT Bit-wise negation of the accumulator
value

R911403764, Edition 08 Bosch Rexroth AG


416 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Operator N Meaning Example


ADD ( Addition of the accumulator value and ADD ivar1
the operand. The result is written to
the accumulator.
SUB ( Subtraction of the operand from SUB iVar2
the accumulator value. The result is
written to the accumulator.
MUL ( Multiplication of accumulator value MUL ivar2
and operand. The result is written to
the accumulator.
DIV ( Division of the accumulator value by DIV 44
the operand. The result is written to
the accumulator.
GT ( Checks whether the accumulator value GT 23
is greater than the operand value. The
result (BOOL) is written to the accumu-
lator; >
GE ( Checks whether the accumulator value GE iVar2
is greater than or equal to the operand
value. The result (BOOL) is written to
the accumulator.
EQ ( Checks whether the accumulator value EQ iVar2
is equal to the operand value. The
result (BOOL) is written to the accumu-
lator.
NE ( Checks whether the accumulator value NE iVar1
is not equal to the operand value. The
result (BOOL) is written to the accumu-
lator.
LE ( Checks whether the accumulator value LE 5
is smaller than or equal to the operand
value. The result (BOOL) is written to
the accumulator.
LT ( Checks whether the accumulator value LT cVar1
is smaller than the operand value. The
result (BOOL) is written to the accu-
mulator.
JMP CN Unconditional (conditional) jump to JMPN next
the specified jump label
CAL CN (Conditional) call of a program or CAL prog1
a function block (if the accumulator
value is TRUE)
RET Exiting the function block and RET
returning to the calling function block
RET C If the accumulator value is TRUE: Exit RETC
the function block and return to the
calling function block.
RET CN If the accumulator value is FALSE: Exit RETCN
the function block and return to the
calling function block.
) Evaluation of the postponed operation

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 417 / 1158
Programming languages and their editors

Example

Reference, programming
Application Description Examples
Several operands for 1 Options Variant 1:
operator ● Enter the operands
into consecutive lines
separated by commas
in the second column.
● Repeat the operator in
consecutive rows. Variant 2:

Complex operands For a complex operand, In each cycle, a string is


enter the opening paren- rotated by one character:
thesis ( into the first
column. Enter the closing
parenthesis in the first
column into a sepa-
rate line following the
operand entries of the
following lines.

R911403764, Edition 08 Bosch Rexroth AG


418 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Application Description Examples


Function block call, pro- Column 1: Operator CAL
gram call or CALC
Column 2: Name of the
function block instance
or the program and
opening parenthesis (. If
no parameters follow, the
closing parenthesis ) is
entered.
Following lines:
Column 1: Parameter
name followed by := for
the input parameter or =>
for the output parameter
Column 2: Parameter
value followed by a
comma , if further
parameters follow. The
closing parenthesis ) is
entered after the last
parameter.
As a limitation according
to the IEC standard, com-
plex expressions cannot
be used. Assign such con-
structs to the function
block or the program
before the call.
Function call Line 1: Column 1: LD
Column 2: Input variable
Line 2: Column 1:
Column2: Further input
parameters separated by
commas.
PLC Engineering writes
the return value into the
accumulator.
Line 3: Column 1: ST
Column 2: Variable to
which the return value is
written
Action call Like function block call or
program call.
The action name is
attached to the name
of the function block
instance or the program.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 419 / 1158
Programming languages and their editors

Application Description Examples


Jump Column 1: Operator JMP
or JMPC.
Column 2: Name of the
jump label of the target
network.
In case of an uncon-
ditional jump, the
preceding statement
sequence has to end with

Reference, programming
one of the following com-
mands: ST, STN, S, R,
CAL, RET, JMP
In case of a conditional
jump, the execution of
the jump depends on the
loaded value.
Also refer to
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter Instruction list (IL) on page 177
● ⮫ Chapter Programming in Instruction List (IL) on page 178

Elements (FUP/LD/IL)

FBD/LD/IL Element 'Network'


Symbol
A network is the base unit of an FBD or LD program. In the FBD/LD/IL editor,
the networks are arranged in a list. Each network is provided with a sequential
network number on the left side and can include: logical and arithmetic expres-
sions, program/function/function block calls, jumps, or return statements.
An IL program consists of at least one network. This network can include all IL
statements of the program.
You can provide each network with a title, comment, or label. In the PLC Engi-
neering options (category “FBD, LD, and IL”, you can define whether network
title, comment, and separator between individual networks are displayed in the
editor.
Click the first line of the network to enter a network title. Click the second line
of the network to enter a network comment.
See also
● ⮫ Chapter “Options” - “FBD, LD and IL” dialog on page 1091
● ⮫ Chapter Command 'Insert Network' on page 997

FBD/LD/IL Element 'Box'


Symbol:
A box and its call can represent additional functions, for example IEC function
blocks, IEC functions, library function blocks, operators.
A box can have any number of inputs and outputs.
If the box also provides an image file, the box icon is displayed inside the box.
The requirement is that the option “Show box symbol” is activated in the PLC
Engineering options, category “FBD, LD and IL”.
If you have changed the box interfaces, you can update the box parameters
with the command “FBD/LD/IL 🠂 Update Parameters” without having to re-
insert the box.

R911403764, Edition 08 Bosch Rexroth AG


420 / 1158 ctrlX PLC Engineering
Programming languages and their editors

See also
● ⮫ Chapter Command 'Insert Box' on page 998
● ⮫ Chapter “Options” - “FBD, LD and IL” dialog on page 1091
● ⮫ Chapter Command 'Update Parameters' on page 1005

FBD/LD/IL Element 'Assignment'


Symbol:
The FBD editor shows a newly inserted assignment as a line with 3 question
marks after it. The LD editor shows a newly inserted assignment as a coil with
3 question marks located above it.
After insertion you can replace the placeholder ??? by the name of the variable
to which the signal coming from the left is to be assigned. The input assistant is
available to you for this.
In IL an assignment is programmed via the operators LD and ST.

● ⮫ Chapter FBD/LD/IL Editor on page 410


● ⮫ Chapter Command 'Insert Assignment' on page 998

FBD/LD/IL Element 'Box with EN/ENO'


Symbol:
The element is available only in the FBD and LD editors.
The box generally corresponds to the FBD/LD/IL element “Box”; however, this
box additionally contains an EN input and an ENO output. EN and ENO have the
data type BOOL.
Function of the EN input and ENO output: if the input EN has the value FALSE
at the time of the calling the box, the operations defined in the box are not exe-
cuted. Otherwise, i.e. if EN has the value TRUE, these operations are executed.
The ENO output has the same value as the EN input.
See also
● ⮫ Chapter Command 'Insert Box with EN/ENO' on page 998
● ⮫ Chapter FBD/LD/IL Element 'Box' on page 419

FBD/LD/IL Element 'Input'


Symbol:
The maximum number of inputs depends on the type of box.
A newly added input is first marked with ???. You can replace the string ??? by
a variable or a constant.
See also
● ⮫ Chapter Command 'Insert Input' on page 1000
● ⮫ Chapter FBD/LD/IL Editor on page 410

FBD/LD/IL Element 'Label'


The label is an optional identifier for a network in FBD and LD, which you can
specify as a destination for a jump.
If you insert a jump label in a network, it will be added as an editable field
“Label:” in the network.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter Command 'Insert Label' on page 999

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 421 / 1158
Programming languages and their editors

FBD/LD/IL Element 'Jump'


Symbol
In FBD or LD a jump is inserted either directly before an input, directly after an
output or at the end of the network, depending on the current cursor position.
You enter a jump label as the jump destination directly behind the jump ele-
ment.
In IL you program a jump with the instruction JMP.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Reference, programming
● ⮫ Chapter Command 'Insert Jump' on page 999
● ⮫ Chapter FBD/LD/IL Element 'Label' on page 420

FBD/LD/IL Element 'Return'


This element immediately interrupts the execution of the box if the input of the
RETURN element goes TRUE.
In an FBD or LD network you can place the Return instruction parallel to or
after the preceding elements.
In IL the RET instruction is available to you for this purpose.
See also
● ⮫ Chapter Command 'Insert Return' on page 1000
● ⮫ Chapter Modifiers and operators in IL on page 415

Closed Branch
A closed branch is available in LD only, and it contains a starting point and an
end point. It is used for implementing parallel analyses of logical elements.
Inserting a closed branch
● Command “FBD/LD/IL 🠂 Insert Contact Parallel (Below) ”
● Command “FBD/LD/IL 🠂 Insert Contact Parallel (Above) ”
● Command “FBD/LD/IL 🠂 Set Branch Start/End Point”

Closed branch at a contact


When you select one or more contacts and then execute the command “Insert
Contact in Parallel”, a parallel branch is added with a single vertical line. For
this kind of branching, the signal flow passes through both branches. This is an
OR construct of both branches.

Closed branch at a block, OR evaluation, or short-circuit evaluation


New: When you select a box and execute the command “Insert Contact in
Parallel”, a parallel branch is inserted with a double vertical line. This indicates
that a short-circuit evaluation (SCE) is implemented. SCE allows for the execu-
tion of a function block with a Boolean output to be bypassed if a specific
condition is TRUE. The condition can be displayed in the LD editor as a branch
connected parallel to the function block branch. The short circuit condition is
defined by one or more contacts in this branch that are interconnected parallel
or sequentially.
Functional principle:
The branches that do not include the function block are processed first. If
PLC Engineering detects the value TRUE for one of these branches, then the
function block is not called in the parallel branch. In this case, the value at the
input of the function block is sent directly to the output. If PLC Engineering
determines FALSE for the SCE condition, then the box will be called and the
Boolean result of its processing is passed on. If all branches contain function

R911403764, Edition 08 Bosch Rexroth AG


422 / 1158 ctrlX PLC Engineering
Programming languages and their editors

blocks, they are analyzed from top to bottom and their outputs are logically
ORed. If there are no branches with function blocks, normal OR operations are
performed.

Example
The function block instance x1 (TON) has a Boolean input and a Boolean
output. The execution of x1 is skipped if TRUE is determined for the condition
in the parallel line branch. The condition value results from the OR and AND
operations that connect contacts cond1, cond2 and cond3.
x1 is executed if the condition value from the connection of the contacts
cond1, cond2 and cond3 is FALSE.

(1) Indicates from the double vertical connections that it is a construct sub-
ject to an SCE.
(2) Indicates from the single vertical connections that it is an OR construct.
The given LD example is shown below as ST code. P_IN and P_OUT are the
Boolean values at the input (split point) and output (reunification point) of
the parallel line branch.
P_IN := b1 AND b2;

IF ((P_IN AND cond1) AND (cond2 OR cond3)) THEN


P_OUT := P_IN;
ELSE
x1(IN := P_IN, PT := {p 10}t#2s);
tElapsed := x1.ET;
P_OUT := x1.Q;
END_IF
bRes := P_OUT AND b3;

See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter Command 'Set Branch Start Point' on page 1005
● ⮫ Chapter Command 'Set Branch End Point' on page 1005
● ⮫ Chapter Command 'Insert Contact in Parallel (Above)' on page 1001
● ⮫ Chapter Command 'Insert Contact in Parallel (Below)' on page 1001
● ⮫ Chapter Command 'Toggle Parallel Mode' on page 1002

FBD/LD/IL Element 'Execute'


Symbol:
The element is a box that enables you to directly enter ST code in the FBD and
LD editors.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 423 / 1158
Programming languages and their editors

You can drag the “Execute” element with the mouse from the “Tools” view into
the implementation part of your POU. If you click on “Enter ST code here...”, an
input field opens where you can input multiple-line ST code.
● ⮫ Chapter FBD/LD/IL Editor on page 410

LD Element 'Contact'
Symbol: , in the editor
The element is available only in the LD editor.
A contact passes on the signal TRUE (ON) or FALSE (OFF) from left to right
until the signal finally reaches a coil in the right-hand part of the network. For

Reference, programming
this purpose a boolean variable containing the signal is assigned to the contact.
To do this, replace the placeholder ??? above the contact with the name of a
boolean variable.
You can arrange several contacts both in series and in parallel. In the case of
two parallel contacts, only one needs to obtain the value TRUE in order for ON
to be passed on to the right. If contacts are connected in series, all of them
must obtain the value TRUE in order for ON to be passed on to the right by the
last contact in the series. Hence, you can program electrical parallel and series
connections with LD.
A negated contact forwards the signal TRUE if the variable value is FALSE.
You can negate an inserted contact with the help of the command “FBD/LD/IL
🠂 Negation” or insert a negated contact from the “Tools” view.
If you place the mouse pointer on a contact with the left mouse button pressed
and with a network selected, the button “Convert to coil” appears in the net-
work. If you now move the mouse pointer onto this button, still with the mouse
button pressed, and then release the mouse button over this button, PLC Engi-
neering converts the contact into a coil.
See also
● ⮫ Chapter Command 'Insert Contact' on page 1001
● ⮫ Chapter Command 'Insert Negated Contact' on page 1002
● ⮫ Chapter Command 'Insert Contact (Right)' on page 1001
● ⮫ Chapter Command 'Insert Contact in Parallel (Above)' on page 1001
● ⮫ Chapter Command 'Insert Contact in Parallel (Below)' on page 1001
● ⮫ Chapter FBD/LD/IL Editor on page 410

LD Element 'Coil'
Symbol: , in the editor
The element is available only in the LD editor.
A coil adopts the value supplied from the left and saves it in the boolean
variable assigned to the coil. Its input can have the value TRUE (ON) or FALSE
(OFF).
Several coils in a network can only be arranged in parallel.
In a negated coil the negated value of the incoming signal is stored in the
boolean variable that is assigned to the coil.
Set coil, Reset coil
Symbol: , , in the editor: ,
Set coil: If the value TRUE arrives at a set coil, the coil retains the value TRUE.
As long as the application is running, the value can no longer be overwritten
here.
Reset coil: If the value TRUE arrives at a reset coil, the coil retains the value
FALSE. As long as the application is running, the value can no longer be over-
written here.

R911403764, Edition 08 Bosch Rexroth AG


424 / 1158 ctrlX PLC Engineering
Programming languages and their editors

You can define an inserted coil as a set or reset coil with the help of the
command “FBD/LD/IL 🠂 Set/Reset” or insert it as an element “Set Coil” and
“Reset Coil” from the “Tools” view.
See also
● ⮫ Chapter Command 'Insert Coil' on page 1000
● ⮫ Chapter "Insert reset coil" command on page 1000
● ⮫ Chapter Command 'Negation' on page 1003
● ⮫ Chapter Command 'Set/Reset' on page 1004

LD Element 'Branch Start/End'


Symbol:
The element serves the closed line branch.
See also
● ⮫ Chapter Closed Branch on page 421
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter Command 'Set Branch Start Point' on page 1005
● ⮫ Chapter Command 'Set Branch End Point' on page 1005

FBD/LD/IL Element 'Branch'


Symbol:
The element is available in the LD and FBD editor and represents an open line
branch. A line branch splits the processing line from the current cursor position
onwards into 2 subnetworks, which are executed in succession from top to
bottom. You can branch each subnetwork further, as a result of which multiple
branches are created within a network.
Each subnetwork is given a marker symbol (rectangle) at the branch point,
which you can select in order to execute further commands.
The commands “Copy”, “Cut” and “Paste” are not available for subnetworks.

In order to delete a subnetwork, you must first delete all elements of the
network and then the marker symbol of the subnetwork.
See also
● ⮫ Chapter Command 'Insert Branch' on page 1004
● ⮫ Chapter Command 'Insert Branch Above' on page 1004
● ⮫ Chapter Command 'Insert Branch Below' on page 1005

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 425 / 1158
Programming languages and their editors

32.1.7 Continuous Function Chart (CFC) and page-oriented CFC


Continuous Function Chart – General information
From an external point of view, a function block diagram consists of inputs and
outputs, with data being processed between them. From an internal point of
view, a function block diagram consists of POUs and their connections which
represent data (signals) and act as assignment operators in ST. The overall
behavior is composed of the behavior of the inserted POUs which call other
POUs or library POUs.
Code in the “Continuous Function Chart (CFC)” implementation language

Reference, programming
mainly illustrates the data flow through the system. Therefore, a continuous
function chart is also referred to as a "signal flow chart".
In the page-oriented CFC editor, you can wire POUs to each other and create
well-structured function block diagrams distributed over multiple pages. The
page-oriented editor behaves like the CFC editor, but provides support with the
following functionality:

Continuous Function Chart – Page-oriented


The page-oriented editor behaves like the CFC editor, but provides additional
functionality.
The editor supports you through the following functionalities:
● Creating pages
● Setting the page size
● Copying and inserting pages in the page navigator
● Copying the implementation of a POU in the CFC implementation language
and inserting into a page
● Well-structured and space-saving arranging of inputs, outputs, and connec-
tion marks in the border areas
● Connection over pages with connection marks

CFC editor
Configuring the editor
You can configure the appearance, behavior and printing for the entire project
in the PLC Engineering options in the “CFC Editor” category. For example, on
the “View” tab, you can configure the color of the connecting lines depending
on the data type.

Editing
Cursor symbol: Prerequisite: “Pointer” is selected in the “ToolBox” view.
The symbol indicates that you can edit in the editor. Select elements
or connections to move them or to execute commands.
Cursor symbol: Prerequisite: An element is selected in the “ToolBox” view.
Clicking in the editor inserts the selected element. Also use drag&drop
to drag an element into the editor.
Dragging a function block Prerequisite: A line is selected in the declaration of the CFC.
instance from the declara- The instance is inserted as a POU with name, type, and all pins.
tion and dropping it into
the editor

R911403764, Edition 08 Bosch Rexroth AG


426 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Dragging a variable from The variable is inserted as an input or output with a connection to the
the declaration and drop- POU pin in focus.
ping it into the editor at a Tip: The cursor indicates when your focused location is valid for a
function block pin variable:

Dragging a variable from Prerequisite: In the declaration, the respective element is selected
the declaration and drop- ● Function block instance: A block with the corresponding data type
ping it into the editor is created
● Declaration of VAR_INPUT or CONSTANT: One input element is
inserted.
● VAR_OUTPUT declaration: An output element is inserted
● VAR, VAR_GLOBAL declaration: A window opens at the insertion
position where you can select whether to insert an input or an
output element
If a variable from the declaration part is dragged&dropped onto an
existing replaceable element, the existing element is replaced.
Drag&drop a function block A function block element with the corresponding type is inserted.
or programming function ● If a block is dragged&dropped onto an existing link line and both
block from the “Devices”, an input and an output of the block are compatible with the data
“POUs” or Library Manager type of the line, the block is inserted on the line. Here, its first
view into the editor matching input and output are connected to the elements that were
previously connected by the link line
● When a block is dragged&dropped onto an existing block, the
existing block is replaced
Reordering the sequence of Prerequisite: The text field of the input or output to be reordered to
inputs and outputs within another position is selected.
a function block using
drag&drop
[Ctrl] + click in the pro- Prerequisite: An element is selected in the “ToolBox” view.
graming area As long as you hold down the [Ctrl] key, a selected element is created
each time you click in the programming area.
[Ctrl]+[Right arrow] Prerequisite: In the CFC program, exactly one output pin is selected
for an element.
The selection is moved so that the input pin at the end of the con-
necting line is selected. In the case of multiple pins, all are selected.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 427 / 1158
Programming languages and their editors

Reference, programming
[Ctrl]+[Left arrow] Prerequisite: In the CFC program, exactly one input pin is selected for
an element.
The selection is moved so that the output pin at the beginning of
the connecting line is selected. In the case of multiple pins, all are
selected.
Example:

Also refer to
● ⮫ Chapter 32.1.3 Common Functions in Graphical Editors on page 378

Connecting
You can insert connecting lines between element connections. Connecting lines
are inserted by means of auto-routing so that connecting lines are automatically
optimal and as short as possible. The connecting lines are checked for colli-
sions.
Dragging a pin and drop- A connecting line is inserted between the two element pins.
ping it to another
Dragging a function block Release (drop) can be performed on a port or on the text field of a
and dropping it to another port.
For extensible operators (for example ADD) the release can also be
realized within the block. The following behavior applies: If there are
still unconnected input terminals, the uppermost free terminal is con-
nected. If there are no more unconnected input ports, a new port is
automatically inserted at the bottom.
Command “Connect Prerequisite: Multiple pins are selected. The pins are marked in red.
Selected Pins”

R911403764, Edition 08 Bosch Rexroth AG


428 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Move an inserted element Prerequisite: The “Enable AutoConnect” option is selected.


so that it touches the pin of The touching pins are connected automatically.
another element.
The connection icon is located in the upper right corner of the editor.
A green icon indicates collision-free connections. A red icon indicates
collisions. Clicking the icon opens a menu with commands for collision
processing, for example the “Show Next Collision” command.
Prerequisite: A connection is selected and the “Connection mark” com-
mand is selected.
Instead of a long connecting line, a connection is represented by con-
nection marks.
Also refer to
● ⮫ Chapter Command 'Show Next Collision' on page 993

CFC editor, page-oriented


POUs generated in the “Continuous Function Chart (CFC) - page-oriented”
cannot be converted into “Continuous Function Chart (CFC)” POUs or back.

● (1) Page navigator


● (2) Page header with name and description
● (3) Left border area reserved for inputs and target connection marks
● (4) Program area
● (5) Right border area reserved for outputs and source connection marks

Editing
You can drag a “Page” element from the “ToolBox” view to the page navigation.
Then an additional page is inserted.
You can select existing pages in the page navigation and duplicated them by
clicking “Edit 🠂 Copy” and “Edit 🠂 Paste”.
Change the page size via “Edit page size”.
Connections over multiple pages are established by means of the “Connection
Mark - Source” and “Connection Mark - Sink” elements. When you drag a
connecting line from an input pin or an output pin to the border area, a
new connection mark is created automatically. The advantage is that the "List
components" input assistance provides all previously defined connection mark
sources.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 429 / 1158
Programming languages and their editors

If you have selected an element in the editor, then you can use the arrow keys
to move the selection from one element to the next to navigate through the
circuit. If you then select a connection mark and press another arrow key, even
the corresponding connection mark of the next/previous page will be selected.
You can transfer networks from a CFC POU to the program area of a page-ori-
ented CFC by clicking “Edit 🠂 Copy” and “Edit 🠂 Paste” (from the clipboard).
Also use drag&drop.

Processing order
The execution order is determined automatically according to the order of the

Reference, programming
pages as they are sorted in the page navigator of the editor. Within a page, a
page-oriented CFC object behaves like a CFC object. Therefore, you can switch
between “Auto Data Flow Mode” and “Explicit Execution Order Mode”.

Additional commands in “CFC page-oriented”


Also refer to
● ⮫ Chapter Command 'Edit Page Size’ on page 985
● ⮫ Chapter Command 'Edit Worksheet' on page 985

Also refer to
● ⮫ Chapter 32.1.3 Common Functions in Graphical Editors on page 378
● ⮫ Chapter Programming in the CFC editor on page 184
● ⮫ Chapter Automatic execution order according to data flow on page 180
● ⮫ Chapter 33.3.13 "CFC" menu on page 985
● ⮫ Chapter Dialog 'Properties' - 'CFC Execution Order' on page 1055

Keyboard Shortcuts in the CFC Editors


Keyboard shortcuts in the CFC editor and page-oriented CFC editor
Keyboard short- Command
cuts
[Ctrl]+[Shift]+[A] Select All
Insert elements:
[Ctrl]+[B] Insert Box
The “Input Assistant” dialog opens in order to select the
box.
[Ctrl]+[Shift]+[B] Insert Empty Box
[Ctrl]+[Shift]+[E] Insert Box with EN/ENO
The “Input Assistant” dialog opens in order to select the
box.
[Ctrl]+[Q] Insert Input
Inserts an input element
[Ctrl]+[A] Insert Output
Inserts an output element
[Ctrl]+[L] Insert Jump
Edit already
inserted elements:
[Ctrl]+[N] Negate
[Ctrl]+[M] Toggle between Set, Reset, REF, and None
[Ctrl]+[U] Reset Pins
After inserting an element, the inserted element is selected in the editor.

R911403764, Edition 08 Bosch Rexroth AG


430 / 1158 ctrlX PLC Engineering
Programming languages and their editors

See also
● ⮫ Chapter CFC Element 'Box' on page 435
● ⮫ Chapter CFC Element 'Input' on page 435
● ⮫ Chapter CFC Element 'Output' on page 435
● ⮫ Chapter CFC Element 'Jump' on page 436
● ⮫ Chapter Command 'Negate' on page 986
● ⮫ Chapter Command 'S (Set)' on page 987
● ⮫ Chapter Command 'R (Reset)' on page 986
● ⮫ Chapter Command 'REF= (Reference Assignment)' on page 987
● ⮫ Chapter Command 'None' on page 986
● ⮫ Chapter Command 'Reset Pins' on page 993

CFC Editor in Online Mode


In online mode, you can monitor and change variable values of the control. In
addition, debugging features are provided such as breakpoints and stepping.

Monitoring
As usual, you can monitor values in the declaration part as well as in the
implementation part (with inline monitoring).
Inline monitoring of a function block is possible only when an instance of the
function block is open. No values are displayed in the basic implementation
view.

Monitoring a Boolean variable


The connections between Boolean variables are displayed in color according
to their actual value: TRUE in blue and FALSE in black. The element pins are
decorated with the actual value.

Example
An application contains a CFC POU. An internal Boolean variable is switched
there. The iToggle variable changes its state from TRUE to FALSE with each
bus cycle.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 431 / 1158
Programming languages and their editors

Reference, programming
Monitoring a scalar variable
In the case of scalar variables, the element pins are decorated with the actual
values.

Example

Forcing and writing of variables


In online mode in the declaration editor, you can prepare a value for forcing or
writing a monitored variable.
When you select the “Prepare values in implementation part” check box in the
“CFC Editor” category of the PLC Engineering options, you can also prepare
values in the implementation part.
To open the “Prepare value” dialog, double-click on an element or on the
monitoring box next to an element. No dialog appears for Boolean variables.
However, with each mouse click on the value displayed next to the variable, the
values TRUE and FALSE are toggled.
Prepared values are displayed in angle brackets. After executing a write or a
force, a red "F" is shown in the monitoring box.

R911403764, Edition 08 Bosch Rexroth AG


432 / 1158 ctrlX PLC Engineering
Programming languages and their editors

Changing of constant input parameters of function block instances


You can write input parameters of function block instances of type VAR_INPUT
CONSTANT in online mode and modify the parameters in this way. To save these
parameters after logout, click on “Save prepared parameters to project”.
Prerequisite: A CFC editor is active. An instantiated function block has
VAR_INPUT CONSTANT variables in its declaration.
1. In the editor, open the POU by calling the function block instance.
🡆 The declaration of FB_DOIt has been supplemented by the constant
MAXIMUM.

FUNCTION_BLOCK FB_DoIt
VAR_INPUT
iAlfa : INT;
iBravo: INT;
sCharlie : STRING := 'Charlie';
xItem : BOOL;
iDelta : INT;
END_VAR
VAR_INPUT CONSTANT
MAXIMUM : INT := 12;
END_VAR
VAR_OUTPUT
iResult : INT;
sResult : STRING;
xResult : BOOL;
END_VAR

The graphical representation of the function block instances contains


the “Parameters” button.
2. Log in to the controller.
3. Click the “Parameters” button of the function block instance.
🡆 The “Edit Parameters” dialog opens.
4. Click the “Value” column in an inline monitoring field of a parameter.
🡆 The “Prepare Value” dialog opens.
5. Type 20 in the “Prepare a new value for the next write or force operation”
field.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 433 / 1158
Programming languages and their editors

6. Click “OK” to confirm the entry.


🡆 The prepared value is shown in angle brackets next to the current value
(e.g. <20>).

7. Click “Debug 🠂 Write Values”.


🡆 The prepared value is written. The parameter is changed and is dis-
played in the project in brackets after the value.

Reference, programming
The difference between both values is shown by a red cross next to the
parameter field of the function block instance.

8. Click on “Edit parameters” to close the dialog. Logout.


9. Click “CFC 🠂 Save Prepared Parameters to Project”.
🡆 The changed parameter values are applied to the project. The asterisk
next to the parameter field disappears.

Breakpoint locations
Possible position of a breakpoint
● Element “Output”
Variables are described.
● Element “Box”
POUs are called.
● Element “RETURN”
The program flow branches.
● Element “Selector”
Structure elements are described.
Click “Debug 🠂 Toggle Breakpoint” to set a new breakpoint or delete an
existing breakpoint. A red circle in the block diagram represents an active
breakpoint.

R911403764, Edition 08 Bosch Rexroth AG


434 / 1158 ctrlX PLC Engineering
Programming languages and their editors

A breakpoint is automatically set in all methods that can


NOTICE
be called.
Thus, the following applies: If a method is called that
is defined via an interface, breakpoints are set in all
methods of function blocks that implement this inter-
face. This also applies to all derived function blocks
defining the method.

Stepping into a POU


You can process a POU in steps in debug mode. A called POU is supplemented
internally by a RETURN at the beginning before the element with the number 0
and at the end after the last element. In case of step-by-step processing, they
are automatically started.

Commands in online mode


Also refer to
● ⮫ Chapter Command 'Force Function Block Input' on page 996
● ⮫ Chapter Command 'Prepare Box for Forcing' on page 995
● ⮫ Chapter Command 'Edit Parameters' on page 991
● ⮫ Chapter Command 'Save Prepared Parameters to Project' on page 992

Also refer to
● ⮫ Chapter 22.3 Monitoring values on page 291
● ⮫ Chapter 21.5 Forcing and writing of variables on page 277
● ⮫ Forcing a function block input in CFC on page 280
● ⮫ Chapter 21.3 Using Breakpoints on page 271
● ⮫ Chapter 21.4 Stepping Through a Program on page 275

Elements (CFC)

CFC Element 'Page'


Symbol:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 435 / 1158
Programming languages and their editors

The element inserts a new page into the editor. It is available only in the
page-oriented CFC editor. The number of the page is automatically assigned
in accordance with its position. You can enter the name and the description of
the page into the orange header. The page size is adapted with the “Edit Page
Size” command.
See also
● ⮫ Chapter Command 'Edit Page Size’ on page 985

CFC Element 'Control Point'


Symbol:

Reference, programming
Use a control point in order to fix points of a connection before you adapt
the line routing. To do this, drag the element to the desired position on a
connecting line. Connecting lines with control points are no longer routed auto-
matically.
See also
● ⮫ Chapter Programming in the CFC editor on page 184
● ⮫ Chapter Command 'Create Control Point' on page 994
● ⮫ Chapter Command 'Remove Control Point' on page 994

CFC Element 'Input'


Symbol:
Keyboard shortcuts for inserting the element: [Ctrl]+[Q]
By default, PLC Engineering inserts an input element with the text "???". You
can edit this input field directly by clicking it and typing in a constant value or
a variable name. Alternatively, you could click to open the Input Assistant to
select a variable.

CFC Element 'Output'


Symbol:
Keyboard shortcuts for inserting the element: [Ctrl]+[A]
By default, PLC Engineering inserts an output element with the text "???". You
can edit this input field directly by clicking it and typing in a constant value or
a variable name. Alternatively, you could click to open the Input Assistant to
select a variable.

CFC Element 'Box'


Symbol:
Keyboard shortcuts for inserting the element
● [Ctrl]+[B]
● [Ctrl]+[Shift]+[B]: Empty box
● [Ctrl]+[Shift]+[E]: Box with EN/ENO
You use the element in order to insert an operator, a function, a function block,
or a program. By default, PLC Engineering inserts the element with the name
“???”. You can edit this field directly by clicking it and typing in a function block
name. Alternatively, you could click to open the Input Assistant and select a
function block
In the case of a function block, PLC Engineering also displays an input field
(“???”) above the function block symbol. You have to replace this name with
the name of the function block instance. If you instantiate a function block
with constant input parameters, then the function block element displays the
"Parameter..." field in the bottom left corner. You click on this field to edit the
parameters.

R911403764, Edition 08 Bosch Rexroth AG


436 / 1158 ctrlX PLC Engineering
Programming languages and their editors

In order to replace an existing box, you replace only the currently inserted iden-
tifier with the new desired name. When you do this, note that PLC Engineering
adapts the number of input and output pins according to the definition of the
POU and that existing assignments may be deleted as a result.
Because feedback is allowed in CFC, implicit variables
NOTICE
with the data type of the input variable are created at
the output of a box (in the example: temp_USINT). If
the result of the operation of a function block is a value
which exceeds the number range of the data type of the
input variable, then the overflow is written to the implicit
variable. The actual output variable gets the value of the
implicit variable, thus the overflow and not the actual
result of the operation (see example).

Example
Implicitly generated variables at the box output:

Implicitly generated code:


temp_USINT := USINT1 * temp_USINT;
UDINT1 := temp_USINT;

See also
● ⮫ Chapter Command 'Edit Parameters' on page 991

CFC Element 'Jump'


Symbol:
You use the element in order to define a position at which program execution
is to continue. You must define this target position by a label. To do this, enter
the name of the mark in the input field “???”. If you have already inserted the
corresponding label, you can also select it via the input assistant ( ).
See also
● ⮫ Chapter CFC Element 'Label' on page 436

CFC Element 'Label'


Symbol:
A label defines a position to which program execution jumps with the help of a
jump element.
In online mode PLC Engineering automatically inserts a RETURN flag at the end
of a CFC function block.
See also
● ⮫ Chapter CFC Element 'Jump' on page 436

CFC Element 'Return'


Symbol:
Use the element in order to exit the function block.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 437 / 1158
Programming languages and their editors

Please note that in online mode in the CFC editor a return element is automat-
ically inserted before the first line and after the last element. In single-step
execution PLC Engineering automatically jumps to the return element at the
end before exiting the function block.

CFC Element 'Composer'


Symbol:
The composer element is for handling structural components. The individual
components of a structure are made available to you as an input. For this
purpose you must name the composer element like the structure concerned

Reference, programming
(replace the “???”).
The composer element is the counterpart to the selector element.
See also
● ⮫ Chapter CFC Element 'Selector' on page 437

CFC Element 'Selector'


Symbol:
The selector element is for handling structural components. The individual
components of a structure are made available to you as an output. For this
purpose you must name the selector element like the structure concerned
(replace the “???”)
The selector element is the counterpart to the composer element.
See also
● ⮫ Chapter CFC Element 'Composer' on page 437

CFC Element 'Comment'


Symbol:
With this element you input a comment in the CFC editor. Replace the place-
holder text in the element by the comment text. A line break can be inserted
with the aid of the shortcut [Ctrl] + [Enter].

CFC Element 'Connection Mark - Source/Sink'


Symbol: ,
You can use connection marks instead of a connecting line between elements.
That helps you to display complex diagrams more clearly.
For a valid connection you must connect an element “Connection Mark -
Source” with the output of an element and an element “Connection Mark -
Sink” with the input of another element. Both marks must bear the same name.
The names are not case-sensitive.
Notes on naming
● The standard name for connection marks is C-<nr>. <nr> is a sequential
number starting with 1.
● You can rename the standard name. In doing so, you must make sure that
the connection mark - source and connection mark - sink have the same
name.
● If you change the name of the connection mark - source, the destination
name is automatically renamed.
● If you change the name of the connection mark - sink, the source name is
retained.
Observe the command “Connection Mark” for the automatic transformation of
an existing connection.

R911403764, Edition 08 Bosch Rexroth AG


438 / 1158 ctrlX PLC Engineering
Variables

See also
● ⮫ Chapter Command 'Connection Mark' on page 995
● ⮫ Chapter CFC editor on page 425

CFC Element 'Input Pin'


Symbol:
Depending on the type of function block you can add further inputs to an
inserted function block element. To do this you must select the function block
element and drag the function block input element onto the body of the func-
tion block.
Please note: You can drag an input or output connection to another position on
the function block with the [Ctrl] key pressed.
See also
● ⮫ Chapter CFC Element 'Output Pin' on page 438

CFC Element 'Output Pin'


Symbol:
Depending on the type of function block you can add further outputs to an
inserted function block element. To do this you must select the function block
element and drag the function block output element onto the body of the
function block.
Please note: You can drag an input or output connection to another position on
the function block with the [Ctrl] key pressed.
See also
● ⮫ Chapter CFC Element 'Input Pin' on page 438

32.2 Variables
32.2.1 Variables – General information
The scope of a variable defines how and where you can use a variable. You
define the scope in the variable declaration.

32.2.2 Local variables - VAR


Local variables are declared between the keywords VAR and END_VAR in the
declaration part of programming objects.
There is only read-only access to local variables using the instance path.
Extend local variables with an attribute keyword.

Example

VAR
iVar1 : INT;
END_VAR

Also refer to
● ⮫ Chapter 18.22 Data persistence on page 211

32.2.3 Input Variables - VAR_INPUT


Input variables are used at the inputs of function blocks.
VAR_INPUT variables are declared between the keywords VAR_INPUT and
END_VAR in the declaration part of programming objects.
You can extend input variables with an attribute keyword.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 439 / 1158
Variables

Example
VAR_INPUT
iIn1 : INT; (* 1st input variable *)
END_VAR

Also refer to
● ⮫ Chapter 18.22 Data persistence on page 211

32.2.4 Output Variables - VAR_OUTPUT


Output variables are used at the outputs of function blocks.

Reference, programming
Declare VAR_OUTPUT variables in the declaration part of programming objects
between the keywords VAR_OUTPUT and END_VAR. PLC Engineering returns the
values of these variables to the calling function block. There you can retrieve
the values and continue using them.
You can extend output variables with an attribute keyword.

Example

VAR_OUPUT
iOut1 : INT; (*1st output variable *)
END_VAR

Also refer to
● ⮫ Chapter 18.22 Data persistence on page 211

Output variables in functions and methods


According to the IEC 61131-3 standard, functions and methods have additional
outputs. You have to assign these additional outputs when calling the function,
as shown below.

Example
fun(iIn1 := 1, iIn2 := 2, iOut1 => iLoc1, iOut2 => iLoc2);

32.2.5 Input/Output Variable (VAR_IN_OUT)


A VAR_IN_OUT variable is an input/output variable, which is part of a POU
interface and serves as a formal pass-by-reference parameter.
Syntax Deklaration

<keyword> <POU name>


VAR_IN_OUT
<variable name> : <data type> ( := <initialization
value> )? ;
END_VAR
<keyword> : FUNCTION | FUNCTION_BLOCK | METHOD | PRG
You can declare an input/output variable in the VAR_IN_OUT declaration section
in the POUs PRG, FUNCTION_BLOCK, METHOD, or FUNCTION. As an option, a
constant of the declared data type can be assigned as an initialization value.
The VAR_IN_OUT variable can be read and written.
Use
● Call: When the programming function block is called, the formal
VAR_IN_OUT variable receives the actual variable, the so-called "pass-
through variable” as argument. At runtime, no copies are generated when
parameters are passed. Instead, the formal variable receives a reference

R911403764, Edition 08 Bosch Rexroth AG


440 / 1158 ctrlX PLC Engineering
Variables

to the actual variable passed remotely. The referential variables contain a


memory address internally as a value to the actual value (pass as pointer,
call-by reference). It is not possible to specify a constant (literal) or a bit
variable directly as an argument.
● Read/write access within the POU: If this variable is written to within the
POU, then this affects the transferred variable. When the POU is exited,
the performed changes are retained. This means that a POU uses its
VAR_IN_OUT variables just like the calling POU uses its variables. Read
access is always permitted.
● Read/write access remotely: VAR_IN_OUT variables cannot be read
or written directly from outside via <function block instance
name>.<variable name>. This works only for VAR_INPUT and VAR_OUTPUT
variables.
● Passing string variables: If a string variable is passed as an argument, the
actual variable and the formal variable should be of the same length. Other-
wise, the transferred string can be manipulated accidentally. This problem
does not occur in the case of VAR_OUTPUT CONSTANT parameters.
● Passing bit variables: A bit variable cannot be passed directly to a
VAR_IN_OUT variable because it needs an intermediate variable.
● Transferring properties: Is not permitted.
If a string is transferred as a variable or also as a constant to a formal
VAR_IN_OUT CONSTANT variable, it is automatically transferred completely.
You do not have to check the string length.
Also refer to
● Chapter⮫ Transfer variable VAR_IN_OUT CONSTANT on page 442

Example
Übergabe eines Arrays

TYPE DUT_A :
STRUCT
xA: BOOL;
iB: INT;
END_STRUCT
END_TYPE

FUNCTION_BLOCK FB_SetArray
VAR_IN_OUT
aData_A : ARRAY[0..1] OF DUT_A; // Formal variable
END_VAR
aData_A[0].xA := TRUE;
aData_A[0].iB := 100;

PROGRAM PLC_PRG
VAR
fbSetA : FB_SetArray;
aSpecialData : ARRAY[0..1] OF DUT_A; // Actual variable
END_VAR
fbSetA(aData_A := aSpecialData);

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 441 / 1158
Variables

Stringübergabe

Reference, programming
{attribute 'qualified_only'}
VAR_GLOBAL
g_sDEV_STATUS : STRING(25) := 'Device_A';
END_VAR

FUNCTION_BLOCK FB_SetStatus
VAR_IN_OUT
sDeviceStatus : STRING(25); // Formal parameter
END_VAR
sDeviceStatus := CONCAT(sDeviceStatus, ' Activ');

PROGRAM PLC_PRG
VAR
fbDoB : FB_SetStatus;
END_VAR
fbDoB(sDeviceStatus := GVL.g_sDEV_STATUS); //Call with actual
parameter
The variable sDeviceStatus is part of the POU interface of FB_B. When
calling fbDoB, first a device name is assigned to the string and then the string
is manipulated.

Übergabe einer Bitvariablen

VAR_GLOBAL
xBit0 AT %MX0.1 : BOOL;
xTemp : BOOL;
END_VAR

FUNCTION_BLOCK FB_DoSomething
VAR_INPUT
xIn : BOOL;
END_VAR
VAR_IN_OUT
xInOut : BOOL;
END_VAR
IF xIn THEN
xInOut := TRUE;
END_IF

PROGRAM PLC_PRG
VAR

R911403764, Edition 08 Bosch Rexroth AG


442 / 1158 ctrlX PLC Engineering
Variables

xIn : BOOL;
DoSomething_1 : FB_DoSomething;
DoSomething_2 : FB_DoSomething;
END_VAR

// The following line of code causes a compiler error:


// C0201: Typ 'BIT' is not equal to type 'BOOL' of VAR_IN_OUT
'xInOut'
DoSomething_1(xIn := xIn, xInOut := xBit0);

// Workaround
xTemp := xBit0;
DoSomething_2(xIn := xIn, xInOut := xTemp);
xBit0 := xTemp;

The program calls the function block instances DoSomething_1 and


DoSomething_2. As a result of the direct assignment of the bit variable
xBit0 to the VAR_IN_OUT input, a compiler error is generated when the
DoSomething_1 instance is called. In contrast, calling the DoSomething_2
instance with the assignment of an intermediate variable is correct code.

Transfer variable VAR_IN_OUT CONSTANT


A VAR_IN_OUT CONSTANT variable serves as a constant transfer parameter to
which a variable but also a constant (literal) of type STRING or WSTRING can
be transferred. The parameter can be read, but not written. The transfer of
properties is not allowed.
Syntax Deklaration
<keyword> <POU name>
VAR_IN_OUT CONSTANT
<variable name> : <data type>; // formal parameter
END_VAR
<keyword> : FUNCTION | FUNCTION_BLOCK | METHOD | PRG
VAR_IN_OUT CONSTANT variables are declared without assigning an initializa-
tion value.
Use
● When calling the programming function block, a constant variable or a literal
of type STRING or WSTRING can be transferred. Consequently, write access
is not permitted.
● Passing parameters of string constants: The string length of the constants
can be any size, and the string length does not depend on the string length
of the VAR_IN_OUT CONSTANT variables.
When in “Project 🠂 Project settings” in category “Compile options” the option
“Replace constants” is activated, the parameter transfer of a constant with
base data type or a constant variable with base data type generates a compiler
error.
The variable is supported from compiler version >= 3.5.2.0.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 443 / 1158
Variables

Example
Parameterübergabe von Stringkonstanten und Stringvariablen

FUNCTION funManipulate : BOOL


VAR_IN_OUT
sReadWrite : STRING(16); (* Can be read or written here in
POU *)
dwVarReadWrite : DWORD; (* Can be read or written here in
POU *)
END_VAR

Reference, programming
VAR_IN_OUT CONSTANT
c_sReadOnly : STRING(16); (* Constant string variable can
only be read here in POU *)
END_VAR

sReadWrite := 'String_from_POU';
dwVarReadWrite := STRING_TO_DWORD(c_sReadOnly);

PROGRAM PRG_A
VAR
sVarFits : STRING(16);
sValFits : STRING(16) := '1234567890123456';
dwVar: DWORD;
END_VAR

// The following line of code causes the compiler error C0417:


// C0417: VAR_IN_OUT parameter 'sReadWrite' needs a variable
with write access as input.
funManipulate(sReadWrite:='1234567890123456',
c_sReadOnly:='1234567890123456', dwVarReadWrite := dwVar);

// Correct code
funManipulate(sReadWrite := sValFits, c_sReadOnly := '23',
dwVarReadWrite := dwVar);
funManipulate(sReadWrite := sVarFits, c_sReadOnly :=
sValFits, dwVarReadWrite := dwVar);

In the code, strings are passed to the funManipulate function via different
VAR_IN_OUT variables. A compiler error is issued when transferring a string
literal to a VAR_IN_OUT variable. When passing a constant variable to a
VAR_IN_OUT CONSTANT variable, correct code is generated even for passing
string variables.

Also refer to
● ⮫ Chapter 18.16 Declaring variables on page 160
● ⮫ Chapter 'Project settings' dialog - 'Compiler options' on page 1062
● ⮫ Chapter Object 'Function' on page 825
● ⮫ Chapter ‘Function block’ object on page 823
● ⮫ Chapter 'Method’ object on page 829
● ⮫ Chapter Object 'Interface' on page 827
● ⮫ Chapter Object 'Interface Method' on page 835
● ⮫ Chapter 32.2.12 Constant variables - 'CONSTANT' on page 446

R911403764, Edition 08 Bosch Rexroth AG


444 / 1158 ctrlX PLC Engineering
Variables

32.2.6 Global Variables - VAR_GLOBAL


Global variables are ordinary variables, constants, external or remanent varia-
bles that are recognized within the entire project.
You declare global variables in global variable lists or in the declaration section
of programming objects between the keywords VAR_GLOBAL and END_VAR.
The system recognizes a global variable when you prepend the variable name
with a dot (for example, .iGlobVar1).
If a local variable that is declared in a block has the same
NOTICE
name as a global variable, then it has precedence within
the block.
For compiler version 3.2.0.0 and later, PLC Engineering
NOTICE
always initializes global variables before the local POU
variables.

Example
VAR_GLOBAL
iVarGlob1 : INT;
END_VAR

See also
● ⮫ Chapter 33.2.15 Object 'GVL' - Global Variable List on page 777
● ⮫ Chapter 32.3.83 Operator - Global Namespace on page 537

32.2.7 Temporary Variable - VAR_TEMP


This function is an extension of the IEC 61131-3 standard.
You declare temporary variables locally between the keywords VAR_TEMP and
END_VAR.
VAR_TEMP declarations are possible only in program blocks and function
blocks.
PLC Engineering initializes temporary variables each time the block is called.
The application can access the temporary variables only in the implementation
section of a program block or a function block.

Example
VAR_TEMP
iVarTmp1 : INT; (*1st temporary variable *)
END_VAR

32.2.8 Static variables - VAR_STAT


This functionality is an extension with respect to the IEC 61131-3 standard.
You declare static variables locally between the keywords VAR_STAT and
END_VAR. PLC Engineering initializes static variables the first time each block is
called.
You can access static variables only from within the namespace where the
variables are declared (like static variables in C). But static variables retain
their values when the application leaves the block. For example, you can use
static variables as counters for function calls.
You can extend static variables with an attribute keyword.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 445 / 1158
Variables

Example
VAR_STAT
iVarStat1 : INT;
END_VAR

Also refer to
● ⮫ Chapter 18.22 Data persistence on page 211

32.2.9 External Variables - VAR_EXTERNAL


External variables are global variables that are imported into a block.

Reference, programming
You declare these variables between the keywords VAR_EXTERNAL and
END_VAR. If the global variable does not exist, then an error message is printed.
PLC Engineering does not require you to declare a global
NOTICE
variable as external in order to use it in a POU. The
keyword exists only for maintaining compliance with IEC
61131-3.
Syntax

<POU keyword> <POU name>


VAR_EXTERNAL
<variable name> : <data type>;
END_VAR
Initialization is not permitted.

Example

FUNCTION_BLOCK FB_DoSomething
VAR_EXTERNAL
iVarExt1 : INT; (* 1st external variable *)
END_VAR

See also
● ⮫ Chapter 33.2.15 Object 'GVL' - Global Variable List on page 777

32.2.10 Instance Variables - VAR_INST


PLC Engineering does not save a VAR_INST method variable in a method stack,
but in the stack of the function block instance. This means that the VAR_INST
variable functions like other Variables of the function block instance, and it is
not reinitialized each time the method is called.
VAR_INST variables are permitted in methods only and you can access these
variables only within the method. The variable values of instance variables are
monitored in the declaration section of the method.
You can extend instance variable with an attribute keyword.

R911403764, Edition 08 Bosch Rexroth AG


446 / 1158 ctrlX PLC Engineering
Variables

Example
METHOD meth_last : INT
VAR_INPUT
iVar : INT;
END_VAR
VAR_INST
iLast : INT := 0;
END_VAR
meth_last := iLast;
iLast := iVar;

See also
● ⮫ Chapter 'Method’ object on page 829

32.2.11 Configuration Variables - VAR_CONFIG


Use configuration variables for assigning complete addresses to variables that
are declared in function blocks with incomplete addresses and will be mapped
on device I/Os.
Declare the variables in a global variables list between VAR_CONFIG and
END_VAR. The global variables list is termed "variables configuration", where
you type the configuration variables with a complete instance path and the
correct address.

Example
Declaration of the variable xLocIn with incomplete address %I* in a function
block:
FUNCTION_BLOCK locio

VAR
xLocIn AT %I* : BOOL := TRUE;
END_VAR

The locio function block is used in the PLC_PRG program:


PROGRAM PLC_PRG

VAR
locioVar1 : locio;
END_VAR

The correct variables configuration in the global variable list is as follows:


VAR_CONFIG

PLC_PRG.locioVar1.xLocIn AT %IX1.0 : BOOL;

END_VAR

See also
● ⮫ Chapter 18.18.2 Variables Configuration - VAR_CONFIG on page 198

32.2.12 Constant variables - 'CONSTANT'


Constant variables are declared in global variable lists or in the declaration
part of programming objects. In implementations, constant variables can be
accessed as read-only via the instance path.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 447 / 1158
Variables

Syntax
<scope> CONSTANT
<identifier> : <data type> := <initial value> ;
END_VAR

<scope> : VAR | VAR_INPUT | VAR_STAT | VAR_GLOBAL


<data type>: <elementary data type> | <user defined data type>
| <function block>
<initial value> : <literal value> | <identifier> | <expression>
Always assign an initialization value when declaring a constant variable. Then

Reference, programming
the constant cannot be written any more.

Example
Deklaration
VAR CONSTANT
c_rTAXFACTOR : REAL := 1.19;
END_VAR
Aufruf
rPrice := rValue * c_rTAXFACTOR;
You can only access constant variables in a read-only implementation. Con-
stant variables are located to the right of the assignment operator.

Also refer to
● ⮫ Chapter 32.2.5 Input/Output Variable (VAR_IN_OUT) on page 439
● ⮫ Chapter 32.4.1 Operands – General information on page 540

32.2.13 Persistent Variable - PERSISTENT


Persistent variables are declared in the declaration section VAR_GLOBAL
RETAIN PERSISTENT in the persistent global variable list. For variables that
are marked with the PERSISTENT keyword outside of the persistence editor,
instance paths are added there.
As of PLC Engineering version 3.3.0.1, a variable declaration with PERSISTENT
RETAIN has the same effect as with RETAIN PERSISTENT or PERSISTENT.
Syntax der Deklaration in der globalen persistenten Variablenliste
PersistentVars

VAR_GLOBAL PERSISTENT RETAIN


<identifier> : <data type> (:= <initialization>)?;
<instance path to POU variable>
END_VAR
Syntax der Deklaration in POUs

<scope> PERSISTENT RETAIN


<identifier> : <data type> ( := <initialization> )?; //
( ... )? : Optional
END_VAR
<scope> : VAR | VAR_INPUT | VAR_OUTPUT | VAR_IN_OUT | VAR_STAT
| VAR_GLOBAL

Assignment of input, output or memory addresses with the keyword AT is not


allowed.

R911403764, Edition 08 Bosch Rexroth AG


448 / 1158 ctrlX PLC Engineering
Variables

Never use the POINTER TO data type in persistent variable lists. If the applica-
tion is downloaded again, their addresses could change. The corresponding
compiler warnings are shown in the message window.
If you frequently change the names or data types of remanent variables, then it
is better to declare them as retain variables with the RETAIN keyword only.
Avoid inserting instance paths, as in this case twice as
NOTICE
much memory is used and an increased cycle time may
occur. Instead, declare variables directly in the list of
persistent variables.

Example
Deklaration in der persistenten Variablenliste PersistentVars:

{attribute 'qualified_only'}
VAR_GLOBAL PERSISTENT RETAIN
g_iCounter : INT;
// Generated instance path of persistent variable
PLC_PRG.fb_A.iPersistentCounter_A: INT;
END_VAR
Deklaration im Funktionsbaustein FB_A:

FUNCTION_BLOCK FB_A
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR PERSISTENT
iPersistentCounter_A : INT;
END_VAR
Deklaration im Programm PLC_PRG:

VAR
fb_A1 : FB_A;
END_VAR

Possible declaration locations


Directly in the persistent The variable is persistent and lies in the protected memory area.
global variable list
Locally in a program with The variable is persistent and lies in the protected memory area and in
an instance path in the per- the memory (double allocation).
sistent variable list
Locally in a function block
with an instance path in the
persistent variable list
Only locally in a program This variable is not persistent. A warning is shown in the message
Only locally in a function window.
block Tip: Select the command “Declarations 🠂 Add all instance paths” to
add the variables to the persistent variable list.
Locally in a function This declaration does not have any effect. The variable is not persis-
tent.
In the persistence editor, select the command “Declarations 🠂 Add all instance
paths” if local variables are marked with PERSISTENT.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 449 / 1158
Variables

Whenever possible, avoid marking variables, which are declared in a function


block, with PERSISTENT. This is because the function block instance is stored
completely in the remanent memory and not only the highlighted variable.

Also refer to
● ⮫ Chapter 18.22 Data persistence on page 211
● ⮫ Chapter 18.22.8 Declaring VAR PERSISTENT Variables on page 218
● ⮫ Chapter Command 'Add all instance paths' on page 1014
● ⮫ Chapter 18.22.5 Preserving Data with Persistent Variables on page 214

Reference, programming
32.2.14 Retain variable - RETAIN
Retain variables are declared by the keyword RETAIN is added in programming
objects in the scope VAR, VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT, VAR_STAT, or
VAR_GLOBAL.
Syntax bei der Deklaration

<scope> RETAIN
<identifier>: <data type> ( := <initialization> )? //
( ... )? : Optional
END_VAR
<scope> : VAR | VAR_INPUT | VAR_OUTPUT | VAR_IN_OUT | VAR_STAT
| VAR_GLOBAL
Assignment of input, output or memory addresses with the keyword AT is not
allowed.

Example
In einer POU:

VAR RETAIN
iVarRetain: INT;
END_VAR
In einer GVL:

VAR_GLOBAL RETAIN
g_iVarRetain: INT;
END_VAR

Possible declaration locations


Locally in a program Only the variable lies within the retain memory area.
Info: When using redundancy, the entire program with all its data
resides in the retain memory area.
Global in a global variable Only the variable lies within the retain memory area.
list Info: When using redundancy, the entire global variable list with all its
data can be found in the retain memory area.
Local in a function block The entire instance of the function block with all of its data lies within
the retain memory area. Only the declared retain variable is protected.
Locally in a function The variable is not within the retain memory area. This declaration
does not have any effect.
Local and persistent in a The variable is not within the retain memory area. This declaration
function does not have any effect.

R911403764, Edition 08 Bosch Rexroth AG


450 / 1158 ctrlX PLC Engineering
Variables

Whenever possible, avoid marking variables of a function block with RETAIN.

Also refer to
● ⮫ Chapter 18.22 Data persistence on page 211
● ⮫ Chapter 18.22.8 Declaring VAR PERSISTENT Variables on page 218
● ⮫ Chapter Command 'Add all instance paths' on page 1014
● ⮫ Chapter 18.22.6 Preserving Data with Retain Variables on page 217

32.2.15 SUPER
SUPER is a special variable and is used for object-oriented programming.
SUPER is the pointer of a function block to the basic function block instance
used to generate the function block. The SUPER pointer thus also allows to
access the implementation of the methods of the basic function block (basic
class). A SUPER pointer is automatically available for each function block.
You can use SUPER only in methods and in the associated function block imple-
mentations.
Dereferencing the pointer: SUPER^
Use of the SUPER pointer: with the help of the keyword SUPER you call a
method that is valid in the instance of the basic class or parent class.

Examples
ST:
SUPER^.METH_DoIt();
FBD/CFC/LD

THIS is not yet implemented for the statement list (IL).

Examples
Using the SUPER and THIS pointers

FUNCTION_BLOCK FB_Base
VAR_OUTPUT
iCnt : INT;
END_VAR

METHOD METH_DoIt : BOOL


iCnt := -1;

METHOD METH_DoAlso : BOOL


METH_DoAlso := TRUE;

FUNCTION_BLOCK FB_1 EXTENDS FB_Base


VAR_OUTPUT
iBase : INT;
END_VAR

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 451 / 1158
Variables

THIS^.METH_DoIt(); //Call of the methods of FB_1


THIS^.METH_DoAlso();

SUPER^.METH_DoIt(); //Call of the methods of FB_Base


SUPER^.METH_DoAlso();
iBase := SUPER^.iCnt;

METHOD METH_DoIt : BOOL


iCnt := 1111;

Reference, programming
METH_DoIt := TRUE;

PROGRAM PLC_PRG
VAR
myBase : FB_Base;
myFB_1 : FB_1;
iTHIS : INT;
iBase : INT;
END_VAR
myBase();
iBase := myBase.iCnt;
myFB_1();
iTHIS := myFB_1.iCnt;

Also refer to
● ⮫ Chapter 32.5 Data types on page 555
● ⮫ Chapter 32.2.16 THIS on page 451

32.2.16 THIS
THIS is a special variable and is used for object-oriented programming.
THIS is the pointer of a function block to its own function block instance. A
THIS pointer is automatically available for each function block.
You can use THIS only in methods and in function blocks. THIS is available for
the implementation in the input assistant in the category “Keywords”.
Dereferencing of the pointer: THIS^
Use of the THIS pointer
● If a local variable obscures a function block variable in a method, you can set
the function block variable with the THIS pointer. See example below (1)
● If the pointer to the function block's own function block instance is refer-
enced for use in a function. (See example below (2))

Examples
ST:
THIS^.METH_DoIt();
FBD/CFC/LD:

R911403764, Edition 08 Bosch Rexroth AG


452 / 1158 ctrlX PLC Engineering
Variables

THIS is not yet implemented for the instruction list (IL).

Examples
(1) The local variable iVarB obscures the function block variable iVarB.
FUNCTION_BLOCK fbA
VAR_INPUT
iVarA: INT;
END_VAR
iVarA := 1;

FUNCTION_BLOCK fbB EXTENDS fbA


VAR_INPUT
iVarB: INT := 0;
END_VAR
iVarA := 11;
iVarB := 2;

METHOD DoIt : BOOL


VAR_INPUT
END_VAR
VAR
iVarB: INT;
END_VAR
iVarB := 22; // The local variable iVarB is set.
THIS^.iVarB := 222; // The function block variable iVarB
is set even though iVarB is obscured.

PROGRAM PLC_PRG
VAR
MyfbB: fbB;
END_VAR

MyfbB(iVarA:=0, iVarB:= 0);


MyfbB.DoIt();
(2) A function call requires the reference to its own instance.
FUNCTION funA
VAR_INPUT
pFB: fbA;
END_VAR
...;

FUNCTION_BLOCK fbA
VAR_INPUT
iVarA: INT;
END_VAR
...;

FUNCTION_BLOCK fbB EXTENDS fbA


VAR_INPUT
iVarB: INT := 0;
END_VAR
iVarA := 11;
iVarB := 2;

METHOD DoIt : BOOL


VAR_INPUT

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 453 / 1158
Variables

END_VAR
VAR
iVarB: INT;
END_VAR
iVarB := 22; //The local variable iVarB is set.
funA(pFB := THIS^); //funA is called via THIS^.
PROGRAM PLC_PRG
VAR
MyfbB: fbB;
END_VAR

Reference, programming
MyfbB(iVarA:=0 , iVarB:= 0);
MyfbB.DoIt();

See also
● ⮫ Chapter 32.5.16 Pointers on page 566
● ⮫ Chapter 32.2.15 SUPER on page 450

32.2.17 Data type: Implicit enumeration


Implicit enumeration provides a simple way to declare a new enumeration vari-
able that is valid only within the local POU. A variable of this type can take a
limited number of integer values declared in the component list.
The implicit enumeration has no data type name or identifier.

Declaration

Example:
<variable name> : (<list of component names>) :=
<initialization>;

<list of component Comma separated list of component names with the


names> desired number of components.
Each component represents an integer value, starting
at 0.
The value of the following component increases by 1
each time.
Example: Alfa, Bravo, Charlie, Delta, Echo
A fixed value can also be assigned to the components.
Example: Zero, Alfa:=10, Bravo:=20, Charlie:=30,
Delta:=40, Echo
<initialization> Optional initialization value, usually a component.

R911403764, Edition 08 Bosch Rexroth AG


454 / 1158 ctrlX PLC Engineering
Operators

Call

Example:
PROGRAM PLC_PRG
VAR
iAlphabet : (Alfa, Bravo, Charlie, Delta, Echo) := Echo;
strText : STRING;
iNumber : INT;
END_VAR
CASE iAlphabet OF
Alfa:
strText := 'A';

Bravo:
strText := 'B';

Charlie:
strText := 'C';

Delta:
strText := 'D';

Echo:
strText := 'E';
END_CASE
iNumber := Alphabet;

Internal data type


With an implicit enumeration, a data type is created internally whose name
follows the following scheme:
IMPLICIT_ENUM_ <POU name> _ <variable name>
However, you should not use this internal identifier, as it is always possible that
the internal identifier is different.

32.3 Operators
32.3.1 Operators – General information
PLC Engineering supports all operators of the IEC-61131-3 standard.
These operators are known implicitly in the entire project.
In addition to these IEC operators, PLC Engineering also supports non-IEC
61131-3 operators.
Operators are used in blocks, such as functions.
For information on the processing order (binding strength) of the ST operators,
refer to the chapter "ST expressions".
For operations with floating-point data types, the com-
CAUTION
putational result depends on the applied target system
hardware.
For operations with overflow or underflow in the data
CAUTION
type, the computational result depends on the applied
target system hardware.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 455 / 1158
Operators

32.3.2 Operators – Overflow/underflow in data type


The PLC Engineering compiler generates code for the target device and com-
putes temporary results always with the native size that is defined by the target
device. For example, on x86 and ARM systems at least 32-bit intermediate
values are used and on x64 systems, 64-bit intermediate values are always
used. This offers significant advantages in computing speed and often pro-
duces the expected result. However, this also means that an overflow or an
underflow in the data type may not be truncated.

Examples

Reference, programming
Example 1
The result of this addition is not truncated and the result in dwVar is 65536.
VAR
wVar : WORD;
dwVar: DWORD;
END_VAR

wVar := 65535;
dwVar := wVar + 1;
Example 2
The overflow and underflow in the data type is not truncated and the results
(bVar1, bVar2) of both comparisons are FALSEon a 32 bit and on a 64 bit
hardware.
VAR
wVar1 : WORD;
wVar2 : WORD;
bVar1 : BOOL;
bVar2 : BOOL;
END_VAR

wVar1 := 65535;
wVar2 := 0;
bVar1 := (wVar1 + 1) = wVar2;
bVar2 := (wVar2 - 1) = wVar1;
Example 3
The assignment to wVar3 truncates the value to the target data type WORD and
the result bvar1 is TRUE.
VAR
wVar1 : WORD;
wVar2 : WORD;
wVar3 : WORD;
bVar1 : BOOL;
END_VAR

wVar1 := 65535;
wVar2 := 0;
wVar3 := (wVar1 + 1);
bVar1 := wVar3 = wVar2;
Example 4
To force the compiler to truncate the intermediate result, a conversion can be
inserted.
The type conversion ensures that both comparisons compare only 16 bits and
that the results(bVar1, bVar2) of both comparisons are TRUE.

R911403764, Edition 08 Bosch Rexroth AG


456 / 1158 ctrlX PLC Engineering
Operators

VAR
wVar1 : WORD;
wVar2 : WORD;
bVar1 : BOOL;
bVar2 : BOOL;
END_VAR

wVar1 := 65535;
wVar2 := 0;
bVar1 := TO_WORD(wVar1 + 1) = wVar2;
bVar2 := TO_WORD(wVar2 - 1) = wVar1;

32.3.3 Arithmetic operators


⮫ Chapter 32.3.15 Operator 'ADD' on page 459
⮫ Chapter 32.3.17 Operator 'SUB' on page 460
⮫ Chapter 32.3.16 Operator 'MUL' on page 459
⮫ Chapter 32.3.18 Operator 'DIV' on page 461
⮫ Chapter 32.3.19 Operator 'MOD' on page 461
⮫ Chapter 32.3.20 Operator 'MOVE' on page 462
⮫ Chapter 32.3.21 Operator 'INDEXOF' on page 462
⮫ Chapter 32.3.22 Operator 'SIZEOF' on page 462
⮫ Chapter 32.3.23 Operator 'XSIZEOF' on page 463

32.3.4 Bit string operators


⮫ Chapter 32.3.25 Operator 'AND' on page 464
⮫ Chapter 32.3.26 Operator 'OR' on page 464
⮫ Chapter 32.3.27 Operator 'XOR' on page 464
⮫ Chapter 32.3.24 Operator 'NOT' on page 463
⮫ Chapter 32.3.28 Operator 'AND_THEN' on page 465
⮫ Chapter 32.3.29 Operator 'OR_ELSE' on page 465

32.3.5 Bit shift operators


⮫ Chapter 32.3.30 Operator 'SHL' on page 466
⮫ Chapter 32.3.31 Operator 'SHR' on page 467
⮫ Chapter 32.3.32 Operator 'ROL' on page 467
⮫ Chapter 32.3.33 Operator 'ROR' on page 468

32.3.6 Selection operators


⮫ Chapter 32.3.34 Operator 'SEL' on page 469
⮫ Chapter 32.3.35 Operator 'MAX' on page 470
⮫ Chapter 32.3.36 Operator 'MIN' on page 470
⮫ Chapter 32.3.37 Operator 'LIMIT' on page 471
⮫ Chapter 32.3.38 Operator 'MUX' on page 471

32.3.7 Comparison operators


The comparison operators are Boolean operators comparing two inputs (first
operand and second operand).
⮫ Chapter 32.3.39 Operator 'GT' on page 472
⮫ Chapter 32.3.40 Operator 'LT' on page 472

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 457 / 1158
Operators

⮫ Chapter 32.3.41 Operator 'LE' on page 472


⮫ Chapter 32.3.42 Operator 'GE' on page 473
⮫ Chapter 32.3.43 Operator 'EQ' on page 473
⮫ Chapter 32.3.44 Operator 'NE' on page 473

32.3.8 Address operators


⮫ Chapter 32.3.45 Operator 'ADR' on page 474
⮫ Chapter 32.3.46 Operator 'Content Operator' on page 475
⮫ Chapter 32.3.47 Operator 'BITADR' on page 475

Reference, programming
32.3.9 Call operators
⮫ Chapter 32.3.48 Operator 'CAL' on page 476

32.3.10 Type conversion operators


You can explicitly call type conversion operators. For typed conversions from
one elementary type to another elementary type and also for overloads, the
type conversion operators described below are available. However, implicit con-
versions from a "larger" type to a "smaller" type, such as from INT to BYTE or
from DINT to WORD, are also possible.
Conversion type: <elementary data type> _TO_ <another elementary
data type>
Overflow conversion: TO_ <elementary data type>
Elementare Datentypen:

<elementary data type> =


__UXINT | __XINT | __XWORD | BIT | BOOL | BYTE | DATE
| DATE_AND_TIME | DINT | DT | DWORD | INT | LDATE |
LDATE_AND_TIME | LDT | LINT | LREAL | LTIME | LTOD | LWORD |
REAL | SINT | TIME | TOD | UDINT | UINT | ULINT | USINT | WORD
The keywords T, TIME_OF_DAY and DATE_AND_TIME are alternative notations
for the data types TIME, TOD and DT. T, TIME_OF_DAY and DATE_AND_TIME are
not mapped as type conversion commands.
If the operand value for a type conversion operator is
NOTICE
outside of the value range of the target data type, then
the result output depends on the processor type and is
therefore undefined. This is the case, for example, when
a negative operand value is converted from LREAL to the
target data type UINT.
Information can be lost when converting from larger data
types to smaller data types.
String manipulation when converting to STRING or
NOTICE
WSTRING
When converting the type to STRING or WSTRING, the
typed value is left-aligned as a character string and trun-
cated if it is too long. Therefore, declare the return var-
iable for the type conversion operators <>_TO_STRING
and <>_TO_WSTRING long enough that the character
string has enough space without any manipulation.
Also refer to
● ⮫ Chapter 32.3.52 Floating point number conversion on page 495
● ⮫ Chapter 32.3.54 Time conversion on page 506

R911403764, Edition 08 Bosch Rexroth AG


458 / 1158 ctrlX PLC Engineering
Operators

● ⮫ Chapter 32.3.55 Date and time conversion on page 511


● ⮫ Chapter 32.3.53 String conversion on page 498
● ⮫ Chapter 32.3.56 Operator 'TRUNC' on page 516
● ⮫ Chapter 32.3.57 Operator 'TRUNC_INT' on page 517

32.3.11 Numerical operators


⮫ Chapter 32.3.58 Operator 'ABS' on page 517
⮫ Chapter 32.3.59 Operator 'SQRT' on page 518
⮫ Chapter 32.3.60 Operator 'LN' on page 518
⮫ Chapter 32.3.61 Operator 'LOG' on page 518
⮫ Chapter 32.3.62 Operator 'EXP' on page 519
⮫ Chapter 32.3.63 Operator 'EXPT' on page 519
⮫ Chapter 32.3.64 Operator 'SIN' on page 520
⮫ Chapter 32.3.67 Operator 'ASIN' on page 521
⮫ Chapter 32.3.65 Operator 'COS' on page 520
⮫ Chapter 32.3.66 Operator 'TAN' on page 521
⮫ Chapter 32.3.68 Operator 'ACOS' on page 521
⮫ Chapter 32.3.69 Operator 'ATAN' on page 522

32.3.12 Namespace operators


Namespace operators are an extension of IEC 61131-3 operators. They provide
unique access to variables and modules, even if the same name is used mul-
tiple times for variables or modules in the project.
⮫ Chapter 32.3.83 Operator - Global Namespace on page 537
⮫ Chapter 32.3.84 Operator - Namespace for Global Variables Lists on page 538
⮫ Chapter 32.3.86 Operator - Enumeration Namespace on page 538
⮫ Chapter 32.3.85 Operator - Library Namespace on page 538
⮫ Chapter 32.3.87 Operator '__POOL' on page 539

32.3.13 Multicore operators


Working with different tasks requires the synchronization of these tasks. This
applies to a greater extent when working on multi-core platforms. To support
this synchronization, PLC Engineering provides some special operators.
These operators are extensions to IEC-61131-3. The operators TEST_AND_SET
and __COMPARE_AND_SWAP are used for similar tasks.
⮫ Chapter 32.3.82 Operator 'TEST_AND_SET' on page 537
⮫ Chapter 32.3.78 Operator '__COMPARE_AND_SWAP on page 534
⮫ Chapter 32.3.79 Operator '__XADD' on page 535
Also refer to
● ⮫ Chapter 18.21.4 Multicore on page 209

32.3.14 More operators


⮫ Chapter 32.3.70 Operator '__DELETE' on page 522
⮫ Chapter 32.3.71 Operator '__ISVALIDREF' on page 524
⮫ Chapter 32.3.72 Operator '__NEW' on page 524
⮫ Chapter 32.3.73 Operator '__QUERYINTERFACE' on page 527
⮫ Chapter 32.3.74 Operator '__QUERYPOINTER' on page 528
⮫ Chapter 32.3.88 'INI’ operator on page 539

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 459 / 1158
Operators

⮫ Chapter 32.3.75 Operators '__TRY', '__CATCH', '__FINALLY', '__ENDTRY'


on page 529
⮫ Chapter 32.3.80 Operator '__POSITION' on page 536
⮫ Chapter 32.3.81 Operator '__POUNAME' on page 536

32.3.15 Operator 'ADD'


The IEC operator adds variables.
Permitted data types: __UXINT | __XINT | __XWORD | BYTE | DATE
| DATE_AND_TIME | DINT | DT | DWORD | INT | LDATE |
LDATE_AND_TIME | LDT | LINT | LREAL | LTIME | LTOD | LWORD |

Reference, programming
REAL | SINT | TIME | TIME_OF_DAY | TOD | UDINT | UINT | ULINT |
USINT | WORD
Possible combinations for time data types:
● TIME + TIME = TIME
● TIME + LTIME = LTIME
● LTIME + LTIME = LTIME
Possible combinations for date and time data types:
● TOD + TIME = TOD
● DT + TIME = DT
● TOD + LTIME = LTOD
● DT + LTIME = LDT
● LTOD + TIME = LTOD
● LDT + LTIME = LDT
● LTOD +LTIME = LTOD
● LDT + LTIME = LDT
Feature in the FBD/LD editor: You can extend the ADD operator to function
block inputs. The number of additional function block inputs is limited.

Examples
ST:
var1 := 7+2+4+7;
FBD:

32.3.16 Operator 'MUL'


This IEC operator is used for multiplying variables.
Permitted data types: BYTE, WORD, DWORD, LWORD, SINT, USINT, INT, UINT,
DINT, UDINT, LINT, ULINT, REAL, LREAL, TIME

R911403764, Edition 08 Bosch Rexroth AG


460 / 1158 ctrlX PLC Engineering
Operators

Feature in the FBD/LD editor: You can extend the MUL operator to additional
function block inputs. The number of additional function block inputs is limited.

Examples
ST:
var1 := 7*2*4*7;
FBD:

32.3.17 Operator 'SUB'


The IEC operator subtracts variables.
Permitted data types: BYTE, WORD, DWORD, LWORD, SINT, USINT, INT, UINT,
DINT, UDINT, LINT, ULINT, REAL, LREAL, TIME, LTIME, TIME_OF_DAY (TOD),
LTIME_OF_DAY (LTOD), DATE, LDATE, DATE_AND_TIME (DT) LDATE_AND_TIME
(DT)
Possible combinations for time data types:
● TIME - TIME = TIME
● LTIME - LTIME = LTIME
Possible combinations for date and time data types:
● DATE - DATE = TIME
● LDATE - LDATE = LTIME
● TOD - TIME = TOD
● LTOD - LTIME = LTOD
● TOD - TOD = TIME
● LTOD - LTOD = LTIME
● DT - TIME = DT
● LDT - LTIME = LDT
● DT - DT = TIME
● LDT - LDT = LTIME
Negative TIME/LTIME values are undefined.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 461 / 1158
Operators

Examples
ST:
var1 := 7-2;
FBD:

Reference, programming
32.3.18 Operator 'DIV'
This IEC operator is used for dividing variables.
Permitted data types: BYTE, WORD, DWORD, LWORD, SINT, USINT, INT, UINT,
DINT, UDINT, LINT, ULINT, REAL, LREAL, TIME
Division by zero may have different results depending on
NOTICE
the target system.

Examples
ST:
var1 := 8/2;
FBD:
1. Series of DIV blocks, 2. Single DIV block, 3. DIV blocks with EN/ENO param-
eters

Please note that it is possible to monitor division by zero at runtime


by using the implicit monitoring functions CheckDivInt, CheckDivLint,
CheckDivReal, and CheckDivLReal.
See also
● ⮫ Chapter POU 'CheckDivInt' on page 851
● ⮫ Chapter POU 'CheckDivLInt' on page 851
● ⮫ Chapter POU 'CheckDivReal' on page 852
● ⮫ Chapter POU 'CheckDivLReal' on page 853

32.3.19 Operator 'MOD'


This IEC operator is used for modulo division.
The result of the function is the integer remainder of division.
Permitted data types: BYTE, WORD, DWORD, LWORD, SINT, USINT, INT, UINT,
DINT, UDINT, LINT, ULINT

R911403764, Edition 08 Bosch Rexroth AG


462 / 1158 ctrlX PLC Engineering
Operators

Division by zero may have different results depending on


NOTICE
the target system.

Examples
Result in Var1: 1
ST:
var1 := 9 MOD 2;
FBD:

32.3.20 Operator 'MOVE'


This IEC operator is used for assigning a variable to another variable of a corre-
sponding type.
Because the MOVE block is available in the CFC, FBD, and LD editors, you can
also use the EN/ENO functionality for variable assignment.

CFC with EN/ENO function:


PLC Engineering assigns the value of var1 to var2 only if "en_i" yields TRUE.

ST:
ivar2 := MOVE(ivar1);
This corresponds to:
ivar2 := ivar1;

32.3.21 Operator 'INDEXOF'


This operator is an extension of the IEC 61131-3 standard.
Instead of the INDEXOF operator, the ADR operator is provided in PLC Engi-
neering V3 for obtaining a pointer at the index of a block.
See also
● ⮫ Chapter 32.3.45 Operator 'ADR' on page 474

32.3.22 Operator 'SIZEOF'


As of compiler version 3.5.16.0 the operator XSIZEOF should be used instead
of this operator.
The operator is an extension of the IEC 61131-3 standard.
The operator determines the number of bytes needed in the transferred vari-
able or data type. An unsigned value is always returned. The type of the return
value is adapted to the type of the passed operand (variable or data type).
Return value of SIZEOF(x) Data type of the constant which PLC
Engineering uses implicitly for the
found size.
0 <= <return value> < 256 USINT

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 463 / 1158
Operators

Return value of SIZEOF(x) Data type of the constant which PLC


Engineering uses implicitly for the
found size.
256 <= <return value> < 65536 UINT
65536 <= <return value> < 4294967296 UDINT
4294967296 <= <return value> ULINT

Example in ST
PROGRAM PLC_PRG
VAR

Reference, programming
aData_1 : ARRAY[0..4] OF INT;
iReturnValue : INT;
END_VAR
iReturnValue := SIZEOF(aData_1); (* iReturnValue :=
USINT#10; *)
Result in iReturnValue is 10.

Also refer to
● ⮫ Chapter 32.3.23 Operator 'XSIZEOF' on page 463

32.3.23 Operator 'XSIZEOF'


The operator is an extension of the IEC 61131-3 standard.
An unsigned value is always returned. The data type of the return value <return
value> is defined as follows:
● For 64-bit processor platforms, the type is ULINT.
● On all other processor platforms the type is UDINT.
To generate code that runs on all platforms, the return value can be declared
with the __UXINT data type.

Syntax
<return value> := XSIZEOF(<variable>);

Example in ST
PROGRAM PLC_PRG
VAR
uxiReturnValue : __UXINT; (* Datentyp bei 64-bit-
Plattformen: ULINT *)
aData_1 : ARRAY[0..4] OF INT;
END_VAR
uxiReturnValue := XSIZEOF(aData_1);
Result: uxiReturnValue = 10

When assigning to a variable of type __UXINT, it is advisable to use the


XSIZEOF operator instead of the SIZEOF operator. This is because with
XSIZEOF the data type of the return value depends on the platform. As a result,
problems that occur when using the SIZEOF operator do not occur.
Also refer to
● ⮫ Chapter 32.3.22 Operator 'SIZEOF' on page 462

32.3.24 Operator 'NOT'


This IEC operator is used for the bitwise NOT of a bit operand.

R911403764, Edition 08 Bosch Rexroth AG


464 / 1158 ctrlX PLC Engineering
Operators

When the respective input bit yields 0, the output bit also yields 1, and vice-
versa.
Permitted data types: BOOL, BYTE, WORD, DWORD, LWORD

Examples
Result in var1: 2#0110_1100
ST:
var1 := NOT 2#1001_0011;
FBD:

32.3.25 Operator 'AND'


This IEC operator is used for the bitwise AND of bit operands.
When the input bits all yield 1, the output bit also yields 1; otherwise 0.
Permitted data types: BOOL, BYTE, WORD, DWORD, LWORD

Examples
Result in var1 is 2#1000_0010
ST:
var1 := 2#1001_0011 AND 2#1000_1010;
FBD:

32.3.26 Operator 'OR'


This IEC operator is used for the bitwise OR of bit operands.
When at least one of the input bits yields 1, the output bit also yields 1;
otherwise 0.
Permitted data types: BOOL, BYTE, WORD, DWORD, LWORD

Examples
Result in Var1 is 2#1001_1011
ST:
Var1 := 2#1001_0011 OR 2#1000_1010;
FBD:

32.3.27 Operator 'XOR'


This IEC operator is used for the bitwise XOR of bit operands.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 465 / 1158
Operators

When only one of the two input bits yields 1, the output bit also yields 1. When
both inputs yield 1 or 0, then the output yields 0.
Permitted data types: BOOL, BYTE, WORD, DWORD, LWORD
Please note the following behavior of the XOR block in
NOTICE
extended form (more than two inputs): PLC Engineering
compares the inputs in pairs and then the corresponding
results (according to the standard, but not necessarily
according to expectations).

Examples

Reference, programming
Result in var1: 2#0001_1001
ST:
var1 := 2#1001_0011 XOR 2#1000_1010;
FBD:

32.3.28 Operator 'AND_THEN'


This operator is an extension of the IEC 61131-3 standard.
The AND_THEN operator is permitted only for programming in structured text
with the AND operation of BOOL and BIT operands with short-circuit evaluation.
This means that:
When all operands yield TRUE, the result of the operands also yield TRUE;
otherwise FALSE.
However, PLC Engineering also executes the expressions on other operands
only if the first operand of the AND_THEN operator is TRUE. This can prevent
problems with null pointers, for example in conditions such as IF (ptr <> 0
AND_THEN ptr^ = 99) THEN....
In contrast, PLC Engineering always evaluates all operands when using the AND
IEC operator.
See also
● ⮫ Chapter 32.3.25 Operator 'AND' on page 464

32.3.29 Operator 'OR_ELSE'


This operator is an extension of the IEC 61131-3 standard.
The OR_ELSE operator is permitted only for programming in structured text: OR
operation of BOOL and BIT operands; with short-circuit evaluation. This means:
When at least one of the operands yields TRUE, the result of the operation also
yields TRUE; otherwise FALSE.
In contrast to using the OR IEC operator, for OR_ELSE the expressions on all
other operators are not evaluated as soon as one of the operands is evaluated
as TRUE.

R911403764, Edition 08 Bosch Rexroth AG


466 / 1158 ctrlX PLC Engineering
Operators

Example
VAR
bEver: BOOL;
bX: BOOL;
dw: DWORD := 16#000000FF;
END_VAR
bEver := FALSE;
bX := dw.8 OR_ELSE dw.1 OR_ELSE dw.1 OR_ELSE (bEver := TRUE);
dw.8 is FALSE and dw.1 is TRUE; therefore bX is the result of the operation
TRUE. However, the expression at the third input is not executed, and bEver
remains FALSE. On the other hand, if the standard OR operation was used,
bEver would be set to TRUE.

See also
● ⮫ Chapter 32.3.26 Operator 'OR' on page 464

32.3.30 Operator 'SHL'


This IEC operator is used for bitwise shift of an operand to the left.
erg := SHL (in, n)
in: Operand that is shifted to the left
n: Number of bits to shift in to the left
If n overwrites the data type width, then it depends on
NOTICE
the target system how the BYTE, WORD, DWORD, and LWORD
operands are padded. The target systems cause padding
with zeros or n MOD <tab width>.
Please note the number of bits that PLC Engineering
NOTICE
uses for this operation as defined by the data type of
the input variable in.

Examples
The results for erg_byte and erg_word are different, although the values of
the in_byte and in_word input variables are the same and the data types of
the input variables are different.
ST:
PROGRAM shl_st
VAR
in_byte : BYTE := 16#45; (* 2#01000101 )
in_word : WORD := 16#0045; (* 2#0000000001000101 )
erg_byte : BYTE;
erg_word : WORD;
n: BYTE := 2;
END_VAR

erg_byte := SHL(in_byte,n); (* Result is 16#14, 2#00010100 *)


erg_word := SHL(in_word,n); (* Result is 16#0114,
2#0000000100010100 *)

FBD:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 467 / 1158
Operators

32.3.31 Operator 'SHR'


This IEC operator is used for bitwise shift of an operand to the right.
erg := SHR (in, n)

Reference, programming
in: Operand that is shifted to the right
n: Number of bits for shifting in to the right
If n overwrites the data type width, then it depends on
NOTICE
the target system how the BYTE, WORD, DWORD, and LWORD
operands are padded. The target systems cause padding
with zeros or n MOD <tab width>.

Examples
ST:
PROGRAM shr_st
VAR
in_byte : BYTE:=16#45; (* 2#01000101 )
in_word : WORD:=16#0045; (* 2#0000000001000101 )
erg_byte : BYTE;
erg_word : WORD;
n: BYTE :=2;
END_VAR

erg_byte := SHR(in_byte,n); (* Result is 16#11, 2#00010001 *)


erg_word := SHR(in_word,n); (* Result is 16#0011,
2#0000000000010001 *)

FBD:

32.3.32 Operator 'ROL'


This IEC operator is used for bitwise rotation of an operand to the left.
Permitted data types: BYTE, WORD, DWORD, LWORD
erg := ROL (in, n)
PLC Engineering moves in n-times one bit to the left and adds the bit to the
leftmost position from the right.
Please note the number of bits that PLC Engineering
NOTICE
uses for this operation as defined by the data type of
the input variable in. If this is a constant, then PLC Engi-
neering uses the smallest possible data type. The data
type of the output variables still does not influence this
operation.

R911403764, Edition 08 Bosch Rexroth AG


468 / 1158 ctrlX PLC Engineering
Operators

Examples
The results for erg_byte and erg_word are different depending on the data
type of the input variables, although the values of the in_byte and in_word
input variables are the same.
ST:
PROGRAM rol_st

VAR
in_byte : BYTE := 16#45;
in_word : WORD := 16#45;
erg_byte : BYTE;
erg_word : WORD;
n: BYTE := 2;
END_VAR

erg_byte := ROL(in_byte,n); (* Result: 16#15 *)

erg_word := ROL(in_word,n); (* Result: 16#0114 *)


FBD:

IL:

32.3.33 Operator 'ROR'


This IEC operator is used for bitwise rotation of an operand to the right.
Permitted data types: BYTE, WORD, DWORD, LWORD
erg := ROR(in,n)
PLC Engineering moves in n-times one bit to the right and adds the bit to the
rightmost position from the left.
Please note the number of bits that PLC Engineering uses for this operation as
defined by the data type of the input variable in. If this is a constant, then PLC
Engineering uses the smallest possible data type. The data type of the output
variables still does not influence this operation.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 469 / 1158
Operators

Examples
The results for erg_byte and erg_word are different depending on the data
type of the input variables, although the values of the in_byte and in_word
input variables are the same.
ST:
PROGRAM ror_st

VAR
in_byte : BYTE := 16#45;

Reference, programming
in_word : WORD := 16#45;
erg_byte : BYTE;
erg_word : WORD;
n: BYTE := 2;
END_VAR

erg_byte := ROR(in_byte,n); (* Result: 16#51 *)

erg_word := ROR(in_word,n); (* Result: 16#4011 *)


FBD:

32.3.34 Operator 'SEL'


The IEC operator is used for bitwise selection.
OUT := SEL(G, IN0, IN1) means:
OUT := IN0; if G = FALSE
OUT := IN1; if G = TRUE
Permitted data types:
IN0, ..., INn and OUT: Any identical data type. Make sure that variables of
the identical type are used at all three positions, especially when using user-
defined data types. The compiler checks for type identity and returns any com-
pile errors. The assignment of function block instances to interface variables is
specifically not supported.
G: BOOL
When G is TRUE, PLC Engineering does not compute
NOTICE
an expression that precedes IN0.When G is FALSE, PLC
Engineering does not compute an expression that pre-
cedes IN1.
Caution: In the case of graphical programming lan-
guages, the expressions at IN0 and IN1 are computed
independently of the G input when a “Box”, “Jump”,
“Return”, “Line Branch”, or “Edge Detection” precedes.

R911403764, Edition 08 Bosch Rexroth AG


470 / 1158 ctrlX PLC Engineering
Operators

Examples
ST:
Var1 := SEL(TRUE,3,4); (* Result: 4 *)
FBD:

32.3.35 Operator 'MAX'


This IEC operator is used for the maximum function. It yields the largest value
of two values.
OUT := MAX(IN0, IN1)
Permitted data types: all

Examples
ST:
Result: 90
Var1 := MAX(30,40);

Var1 := MAX(40,MAX(90,30));
FBD:
Result: 90

32.3.36 Operator 'MIN'


This IEC operator is used for the minimum function. It yields the smallest value
of two values.
OUT := MIN(IN0,IN1)
Permitted data types: all

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 471 / 1158
Operators

Examples
Result: 30
ST:
Var1:=MIN(90,30);

Var1 := MIN(MIN(90,30),40);
FBD:

Reference, programming
32.3.37 Operator 'LIMIT'
This IEC selection operator is used for limiting.
OUT := LIMIT(Min, IN, Max)
Means: OUT := MIN (MAX (IN, Min), Max)
Max is the upper limit and Min is the lower limit for the result. If the IN value is
above the Max upper limit, then LIMIT yields Max. If the value of IN is below the
Min lower limit, then the result is Min.
Permitted data types for IN and OUT: all

Examples
Result in Var1 is 80
ST:
Var1 := LIMIT(30,90,80);

32.3.38 Operator 'MUX'


This IEC operator is used as a multiplexer.
OUT := MUX(K, IN0,...,INn)
Means: OUT = IN_K
Permitted data type for K: BYTE, WORD, DWORD, LWORD, SINT, USINT, INT, UINT,
DINT, LINT, ULINT, oUDINT.
IN0, ..., INn, and OUT: Any identical data type. Make sure that variables of
the identical type are used at all three positions, especially when using user-
defined data types. The compiler checks for type identity and returns any com-
pile errors. The assignment of function block instances to interface variables is
specifically not supported.
MUX selects the K-th value from a set of values. The first value is K=0. If K is
greater than the number of other inputs (n), then PLC Engineering passes on
the last value (INn).
For runtime optimization, PLC Engineering computes
NOTICE
only the expression that precedes IN_K. However, PLC
Engineering computes all branches in simulation mode.

Examples
Result in Var1 is 30.
ST:
Var1 := MUX(0,30,40,50,60,70,80);

R911403764, Edition 08 Bosch Rexroth AG


472 / 1158 ctrlX PLC Engineering
Operators

32.3.39 Operator 'GT'


This IEC operator is used for the "greater than" function.
Permitted data types of the operands: any basic data type.
If the first operand is greater than the second operand, then the operator yields
the result TRUE; otherwise FALSE.

Examples
Result: FALSE
ST:
VAR1 := 20 > 30;
FBD:

32.3.40 Operator 'LT'


This IEC operator is used for the "less than" function.
Permitted data types of the operands: any basic data type.
If the first operand is less than the second operand, then the operator yields
the result TRUE; otherwise FALSE.

Examples
Result: TRUE
ST:
Var1 := 20 < 30;

32.3.41 Operator 'LE'


This IEC operator is used for the "less than or equal to" function.
Permitted data types of the operands: any basic data type.
If the first operand is less than or equal to the second operand, then the
operator yields the result TRUE; otherwise FALSE.

Examples
Result in Var1: TRUE
ST:
Var1 := 20 <= 30;

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 473 / 1158
Operators

32.3.42 Operator 'GE'


This IEC operator is used for the "greater than or equal to" function.
Permitted data types of the operands: any basic data type.
If the first operand is greater than or equal to the second operand, then the
operator yields the result TRUE; otherwise FALSE.

Examples
Result: TRUE
ST:

Reference, programming
VAR1 := 60 >= 40;
FBD:

32.3.43 Operator 'EQ'


This IEC operator is used for the "equals" function.
Permitted data types of the operands: any basic data type, depending on target
system and compiler version: structure data type.
If the operands are equal, then then the operator yields the result TRUE, other-
wise FALSE.

Examples
Result: TRUE
ST:
VAR1 := 40 = 40;
FBD:

32.3.44 Operator 'NE'


This IEC operator is used for the "does not equal" function.
Permitted data types of the operands: any basic data type, depending on target
system and compiler version: structure data type.
If the operands are not equal, then then the operator yields the result TRUE;
otherwise FALSE.
If the target system supports the data type, then as from compiler version >=
3.5.7.0 also operands of type STRIUCT (structure) can be compared. Example:
IF (stStruct1 := stStruct2) THEN....

R911403764, Edition 08 Bosch Rexroth AG


474 / 1158 ctrlX PLC Engineering
Operators

Examples
Result in Var1 is FALSE
ST:
Var1 := 40 <> 40;
FBD:

32.3.45 Operator 'ADR'


The operator is an extension of the IEC 61131-3 standard.
ADR yields the 32-bit address (or the 64-bit address, if possible) of its argu-
ment. You can pass this address to the manufacturer functions or assign them
to a pointer in the project.
Syntax

VAR
<address name> : DWORD | LWORD | POINTER TO < basis data
type>
END_VAR

<address name> := ADR( <variable name> );

Example

FUNCTION_BLOCK FB_Address
VAR
piAddress1: POINTER TO INT;
iNumber1: INT := 5;
lwAddress2
iNumber2: INT := 10;
END_VAR

piAddress1 := ADR(iNumber1); // piNumber is assigned to


address of iNumber1
lwAddress2 := ADR(iNumber2); // 64 bit runtime system

In contrast to CoDeSys V2.3, you can use the ADR oper-


NOTICE
ator with function names, program names, function block
names, and method names. Therefore, ADR replaces the
INDEXOF operator.
When using function pointers, note that you can pass
a function pointer to external libraries, but it is not
possible to call a function pointer from within PLC Engi-
neering. To enable a system call (runtime system), you
must set the respective object property (“Build” tab) for
the function object.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 475 / 1158
Operators

When you use an online change, the contents of


CAUTION
addresses can shift. As a result, POINTER TO variables
could point to an invalid memory area. To avoid prob-
lems, you should make sure that the value of pointers is
updated in every cycle.
Do not return Pointer-TO variables of functions and
CAUTION
methods to the caller or assign them to global variables.

See also
● ⮫ Chapter 32.5.16 Pointers on page 566

Reference, programming
32.3.46 Operator 'Content Operator'
This operator is an extension of the IEC 61131-3 standard.
You can use this operator to dereference pointers by appending the operator as
^ to the pointer identifier.
When using pointers to addresses, please note that
CAUTION
applying an online change can shift address contents.

Example
ST:
pt : POINTER TO INT;
var_int1 : INT;
var_int2 : INT;
pt := ADR(var_int1);
var_int2 := pt^;

32.3.47 Operator 'BITADR'


The operator is an extension of the IEC 61131-3 standard.
BITADR yields the bit offset within a segment in a DWORD.
The offset depends on whether the "Byte addressing"
NOTICE
option is selected or cleared in the target system set-
tings.
The highest value nibble (4 bits) in this DWORD defines the memory range:
Marker M: 16#40000000
Input I: 16#80000000
Output Q: 16#C0000000
When using pointers to addresses, note that applying an
CAUTION
online change can shift the contents of addresses.

Example
ST implementation language:

VAR
xVar AT %IX2.3 : BOOL;
dwBitoffset : DWORD;
END_VAR

dwBitoffset := BITADR(xVar); (* If byte addressing = TRUE,


result = 16#80000013; if byte addressing = FALSE, result =
16#80000023 *)

R911403764, Edition 08 Bosch Rexroth AG


476 / 1158 ctrlX PLC Engineering
Operators

32.3.48 Operator 'CAL'


This IEC operator is used for calling function blocks.
In IL, CAL calls the instance of a function block.
CAL <function block> (<input variable1> := <value>, <input
variableN> := <value>)

Example
Call of the Inst instance of a function block with assignment of the input
variables Par1 and Par2 with 0 or TRUE.
CAL Inst(Par1 := 0, Par2 := TRUE);

32.3.49 Overload
If the operand value for a type conversion operator is
NOTICE
outside of the value range of the target data type, then
the result output depends on the processor type and is
therefore undefined. This is the case, for example, when
a negative operand value is converted from LREAL to the
target data type UINT.
Information can be lost when converting from larger data
types to smaller data types.
The rounding logic for borderline cases depends on the
NOTICE
target system or the FPU (floating point unit) of the
target system. A value such as -1.5 can be converted
differently on different controls.
Intercept value range overruns via the application to pro-
gram code independent of the target system.
IEC61131-3 does not detect overloaded functions.
If you want to program strictly according to IEC61131-3, please use the opera-
tors of the scheme <type> _TO_ <another type> described in the following
sections.
The rules for typed conversions also apply to overloading.

The operators convert values to other data types, explicitly specifying only
a target data type and no initial data type (data type of the operand) ("over-
loaded conversion"). Overcharges are not part of IEC 61131-3.

Call syntax

<variable name> := <TO operator> ( <operand> );


<operand> = <variable name> | <literal>
Operatoren

TO___UXINT
TO___XINT
TO___XWORD
TO_BIT
TO_BYTE
TO_BOOL
TO_DATE
TO_DINT
TO_DT
TO_DWORD

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 477 / 1158
Operators

TO_INT
TO_LDATE
TO_LDT
TO_LINT
TO_LREAL
TO_LTIME
TO_LTOD
TO_LWORD
TO_REAL
TO_SINT
TO_STRING

Reference, programming
TO_TIME
TO_TOD
TO_UDINT
TO_UINT
TO_ULINT
TO_USINT
TO_WORD
TO_WSTRING

Examples

ST implementation language:

VAR
iNumber_1 : INT;
rNumber_2 : REAL := 123.456;
iNumber_2 : INT;
xIsTrue : BOOL;
sOutputText : STRING;
sText : STRING := 'Hello World!';
wsText: WSTRING;
dateEvent : DATE := D#2019-9-3;
uiEvent : UINT;
uxiData : __UXINT;
END_VAR

iNumber_1 := TO_INT(4.22); (* Result: 4 *)


iNumber_2 := TO_INT(rNumber_2); (* Result: 123 *)
xIsTrue := TO_BOOL(1); (* Result: TRUE *)
sOutputText := TO_STRING(342); (* Result: '342' *)
wsText := TO_WSTRING(sText); (* Result: "Hello World!" *)
uiEvent := TO_UINT(dateEvent); (* Result: 44288 *)
uxiData := TO___UXINT(iNumber_2); (* Result: 123 *)

Also refer to
● ⮫ Chapter 32.3.10 Type conversion operators on page 457
● ⮫ Chapter 32.3.50 Boolean conversion on page 478
● ⮫ Chapter 32.3.51 Integer conversion on page 482
● ⮫ Chapter 32.3.52 Floating point number conversion on page 495
● ⮫ Chapter 32.3.53 String conversion on page 498
● ⮫ Chapter 32.3.55 Date and time conversion on page 511
● ⮫ Chapter 32.3.54 Time conversion on page 506

R911403764, Edition 08 Bosch Rexroth AG


478 / 1158 ctrlX PLC Engineering
Operators

32.3.50 Boolean conversion


String manipulation when converting to STRING or
NOTICE
WSTRING
When converting the type to STRING or WSTRING, the
typed value is left-aligned as a character string and trun-
cated if it is too long. Therefore, declare the return var-
iable for the type conversion operators <>_TO_STRING
and <>_TO_WSTRING long enough that the character
string has enough space without any manipulation.
The operators convert a Boolean value to the specified data type and return a
type-converted value.

Call syntax

<variable name> := <BOOL to operator> ( <operand> );


<operand> = <variable name> | <literal>
Operatoren

BOOL_TO___UXINT
BOOL_TO___XINT
BOOL_TO___XWORD
BOOL_TO_BIT
BOOL_TO_BYTE
BOOL_TO_DATE
BOOL_TO_DINT
BOOL_TO_DT
BOOL_TO_DWORD
BOOL_TO_INT
BOOL_TO_LDATE
BOOL_TO_LDT
BOOL_TO_LINT
BOOL_TO_LREAL
BOOL_TO_LTIME
BOOL_TO_LTOD
BOOL_TO_LWORD
BOOL_TO_REAL
BOOL_TO_SINT
BOOL_TO_STRING
BOOL_TO_TIME
BOOL_TO_TOD
BOOL_TO_UDINT
BOOL_TO_UINT
BOOL_TO_ULINT
BOOL_TO_USINT
BOOL_TO_WORD
BOOL_TO_WSTRING
If the operand value is TRUE, the following typed values are returned:
● BOOL_TO_DATE: D#1970-1-1 // The zeroth bit is set, but does
not effect the display.
● BOOL_TO_DT: DT#1970-01-01-0:0:1
● BOOL_TO_LTIME: LTIME#1NS
● BOOL_TO_REAL: '1'
● BOOL_TO_STRING: 'TRUE'
● BOOL_TO_TOD: TOD#0:0:0.001

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 479 / 1158
Operators

● BOOL_TO_TIME: T#1MS
● BOOL_TO_WSTRING: "TRUE"
If the operand value is FALSE, the following typed values are returned:
● BOOL_TO_DATE: D#1970-1-1
● BOOL_TO_DT: DT#1970-01-01-00:00:00
● BOOL_TO_LTIME: LTIME#0NS
● BOOL_TO_REAL: '0.0'
● BOOL_TO_STRING: 'FALSE'
● BOOL_TO_TOD: TOD#0:0:0

Reference, programming
● BOOL_TO_TIME: T#0MS
● BOOL_TO_WSTRING: "FALSE"

Examples

ST implementation language

FUNCTION_BLOCK FB_ConvertFromBool
VAR
VAR
uxiReturn_1: __UXINT;
uxiReturn_10: __UXINT;
iReturn_2: __XINT;
iReturn_20: __XINT;
xwReturn_3: __XWORD;
xwReturn_30: __XWORD;
bitReturn_4: BOOL;
bitReturn_40: BOOL;
bReturn_6: BYTE;
bReturn_60: BYTE;
dateReturn_7: DATE;
dateReturn_70: DATE;
dtReturn_8: DATE_AND_TIME;
dtReturn_80: DATE_AND_TIME;
diReturn_9: DINT;
diReturn_90: DINT;
dtReturn_10: DATE_AND_TIME;
dtReturn_100: DATE_AND_TIME;
dwReturn_11: DWORD;
dwReturn_110: DWORD;
iReturn_12: INT;
iReturn_120: INT;
liReturn_13: LINT;
liReturn_130: LINT;
lrReturn_14: LREAL;
lrReturn_140: LREAL;
lwReturn_15: LWORD;
lwReturn_150: LWORD;
rReturn_16: REAL;
rReturn_160: REAL;
siReturn_17: SINT;
siReturn_170: SINT;
sReturn_18: STRING;
sReturn_180: STRING;
todReturn_19: TIME_OF_DAY;
todReturn_190: TIME_OF_DAY;

R911403764, Edition 08 Bosch Rexroth AG


480 / 1158 ctrlX PLC Engineering
Operators

timReturn_20: TIME;
timReturn_200: TIME;
todReturn_21: TIME_OF_DAY;
todReturn_210: TIME_OF_DAY;
udiReturn_22: UDINT;
udiReturn_220: UDINT;
uiReturn_23: UINT;
uiReturn_230: UINT;
uliReturn_24: ULINT;
uliReturn_240: ULINT;
usiReturn_25: USINT;
usiReturn_250: USINT;
wReturn_26: WORD;
wReturn_260: WORD;
wsReturn_27: WSTRING;
wsReturn_270: WSTRING;
END_VAR

// Return value of operand = TRUE or FALSE


uxiReturn_1 := BOOL_TO___UXINT(TRUE);
uxiReturn_10 := BOOL_TO___UXINT(FALSE);

iReturn_2 := BOOL_TO___XINT(TRUE);
iReturn_20 := BOOL_TO___XINT(FALSE);

xwReturn_3 := BOOL_TO___XWORD(TRUE);
xwReturn_30 := BOOL_TO___XWORD(FALSE);

bitReturn_4 := BOOL_TO_BIT(TRUE);
bitReturn_40 := BOOL_TO_BIT(FALSE);

bReturn_6 := BOOL_TO_BYTE(TRUE);
bReturn_60 := BOOL_TO_BYTE(FALSE);

dateReturn_7 := BOOL_TO_DATE(TRUE);
dateReturn_70 := BOOL_TO_DATE(FALSE);

dtReturn_8 := BOOL_TO_DT(TRUE);
dtReturn_80 := BOOL_TO_DT(FALSE);

diReturn_9 := BOOL_TO_DINT(TRUE);
diReturn_90 := BOOL_TO_DINT(FALSE);

dwReturn_11 := BOOL_TO_DWORD(TRUE);
dwReturn_110 := BOOL_TO_DWORD(FALSE);

iReturn_12 := BOOL_TO_INT(TRUE);
iReturn_120 := BOOL_TO_INT(FALSE);

liReturn_13 := BOOL_TO_LINT(TRUE);
liReturn_130 := BOOL_TO_LINT(FALSE);

lrReturn_14 := BOOL_TO_LREAL(TRUE);
lrReturn_140 := BOOL_TO_LREAL(FALSE);

lwReturn_15 := BOOL_TO_LWORD(TRUE);
lwReturn_150 := BOOL_TO_LWORD(FALSE);

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 481 / 1158
Operators

rReturn_16 := BOOL_TO_REAL(TRUE);
rReturn_160 := BOOL_TO_REAL(FALSE);

siReturn_17 := BOOL_TO_SINT(TRUE);
siReturn_170 := BOOL_TO_SINT(FALSE);

sReturn_18 := BOOL_TO_STRING(TRUE);
sReturn_180 := BOOL_TO_STRING(FALSE);

Reference, programming
timReturn_20 := BOOL_TO_TIME(TRUE);
timReturn_200 := BOOL_TO_TIME(FALSE);

todReturn_21 := BOOL_TO_TOD(TRUE);
todReturn_210 := BOOL_TO_TOD(FALSE);

udiReturn_22 := BOOL_TO_UDINT(TRUE);
udiReturn_220 := BOOL_TO_UDINT(FALSE);

uiReturn_23 := BOOL_TO_UINT(TRUE);
uiReturn_230 := BOOL_TO_UINT(FALSE);

uliReturn_24 := BOOL_TO_ULINT(TRUE);
uliReturn_240 := BOOL_TO_ULINT(FALSE);

usiReturn_25 := BOOL_TO_USINT(TRUE);
usiReturn_250 := BOOL_TO_USINT(FALSE);

wReturn_26 := BOOL_TO_WORD(TRUE);
wReturn_260 := BOOL_TO_WORD(FALSE);

wsReturn_27 := BOOL_TO_WSTRING(TRUE);
wsReturn_270 := BOOL_TO_WSTRING(FALSE);

R911403764, Edition 08 Bosch Rexroth AG


482 / 1158 ctrlX PLC Engineering
Operators

FBD implementation language

Also refer to
● ⮫ Chapter 32.3.10 Type conversion operators on page 457
● ⮫ Chapter 32.3.49 Overload on page 476
● ⮫ Chapter 32.3.51 Integer conversion on page 482
● ⮫ Chapter 32.3.52 Floating point number conversion on page 495
● ⮫ Chapter 32.3.53 String conversion on page 498
● ⮫ Chapter 32.3.55 Date and time conversion on page 511
● ⮫ Chapter 32.3.54 Time conversion on page 506

32.3.51 Integer conversion


If the operand value for a type conversion operator is
NOTICE
outside of the value range of the target data type, then
the result output depends on the processor type and is
therefore undefined. This is the case, for example, when
a negative operand value is converted from LREAL to the
target data type UINT.
Information can be lost when converting from larger data
types to smaller data types.
The operators convert an integer value to the specified data type and return
this type-converted value. If the number to be converted exceeds the range
limit, the first bytes of the number are ignored.

Call syntax

<variable name> := <integer conversion type operator>


( <integer operand> );

<integer conversion type operator> = <integer data type> _TO_


<data type>
<integer operand> = <variable name> | <literal>

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 483 / 1158
Operators

<integer data type> =


__UXINT | __XINT | __XWORD | BIT | BYTE | DINT | DWORD | INT |
LINT | LWORD | SINT | UDINT | UINT | ULINT | USINT | WORD
Operatoren

__UXINT_TO___XINT
__UXINT_TO___XWORD
__UXINT_TO_BIT
__UXINT_TO_BOOL
__UXINT_TO_BYTE

Reference, programming
__UXINT_TO_DATE
__UXINT_TO_DINT
__UXINT_TO_DT
__UXINT_TO_DWORD
__UXINT_TO_INT
__UXINT_TO_LDATE
__UXINT_TO_LDT
__UXINT_TO_LINT
__UXINT_TO_LREAL
__UXINT_TO_LTIME
__UXINT_TO_LTOD
__UXINT_TO_LWORD
__UXINT_TO_REAL
__UXINT_TO_SINT
__UXINT_TO_STRING
__UXINT_TO_TIME
__UXINT_TO_TOD
__UXINT_TO_UDINT
__UXINT_TO_UINT
__UXINT_TO_ULINT
__UXINT_TO_USINT
__UXINT_TO_WORD
__UXINT_TO_WSTRING

__XINT_TO___UXINT
__XINT_TO___XWORD
__XINT_TO_BIT
__XINT_TO_BOOL
__XINT_TO_BYTE
__XINT_TO_DATE
__XINT_TO_DINT
__XINT_TO_DT
__XINT_TO_DWORD
__XINT_TO_INT
__XINT_TO_LDATE
__XINT_TO_LDT
__XINT_TO_LINT
__XINT_TO_LREAL
__XINT_TO_LTIME
__XINT_TO_LTOD
__XINT_TO_LWORD
__XINT_TO_REAL
__XINT_TO_SINT
__XINT_TO_STRING
__XINT_TO_TIME
__XINT_TO_TOD
__XINT_TO_UDINT

R911403764, Edition 08 Bosch Rexroth AG


__XINT_TO_UINT
__XINT_TO_ULINT
__XINT_TO_USINT
__XINT_TO_WORD
__XINT_TO_WSTRING

__XWORD_TO_UXINT
__XWORD_TO_XINT
__XWORD_TO_BIT
__XWORD_TO_BOOL
__XWORD_TO_BYTE
__XWORD_TO_DATE
__XWORD_TO_DINT
__XWORD_TO_DT
__XWORD_TO_DWORD
__XWORD_TO_INT
__XWORD_TO_LDATE
__XWORD_TO_LDT
__XWORD_TO_LINT
__XWORD_TO_LREAL
__XWORD_TO_LTIME
__XWORD_TO_LTOD
__XWORD_TO_LWORD
__XWORD_TO_REAL
__XWORD_TO_SINT
__XWORD_TO_STRING
__XWORD_TO_TIME
__XWORD_TO_TOD
__XWORD_TO_UDINT
__XWORD_TO_UINT
__XWORD_TO_ULINT
__XWORD_TO_USINT
__XWORD_TO_WORD
__XWORD_TO_WSTRING

BIT_TO___UXINT
BIT_TO___XINT
BIT_TO___XWORD
BIT_TO_BOOL
BIT_TO_BYTE
BIT_TO_DATE
BIT_TO_DINT
BIT_TO_DT
BIT_TO_DWORD
BIT_TO_INT
BIT_TO_LDATE
BIT_TO_LDT
BIT_TO_LINT
BIT_TO_LREAL
BIT_TO_LTIME
BIT_TO_LTOD
BIT_TO_LWORD
BIT_TO_REAL
BIT_TO_SINT
BIT_TO_STRING
BIT_TO_TIME
BIT_TO_TOD
BIT_TO_UDINT
ctrlX PLC Engineering 485 / 1158
Operators

BIT_TO_UINT
BIT_TO_ULINT
BIT_TO_USINT
BIT_TO_WORD
BIT_TO_WSTRING

BYTE_TO___UXINT
BYTE_TO___XINT
BYTE_TO___XWORD
BYTE_TO_BOOL
BYTE_TO_BIT

Reference, programming
BYTE_TO_DATE
BYTE_TO_DINT
BYTE_TO_DT
BYTE_TO_DWORD
BYTE_TO_INT
BYTE_TO_LDATE
BYTE_TO_LDT
BYTE_TO_LINT
BYTE_TO_LREAL
BYTE_TO_LTIME
BYTE_TO_LTOD
BYTE_TO_LWORD
BYTE_TO_REAL
BYTE_TO_SINT
BYTE_TO_STRING
BYTE_TO_TIME
BYTE_TO_TOD
BYTE_TO_UDINT
BYTE_TO_UINT
BYTE_TO_ULINT
BYTE_TO_USINT
BYTE_TO_WORD
BYTE_TO_WSTRING

DINT_TO___UXINT
DINT_TO___XINT
DINT_TO___XWORD
DINT_TO_BOOL
DINT_TO_BIT
DINT_TO_BYTE
DINT_TO_DATE
DINT_TO_DT
DINT_TO_DWORD
DINT_TO_INT
DINT_TO_LDATE
DINT_TO_LDT
DINT_TO_LINT
DINT_TO_LREAL
DINT_TO_LTIME
DINT_TO_LTOD
DINT_TO_LWORD
DINT_TO_REAL
DINT_TO_SINT
DINT_TO_STRING
DINT_TO_TIME
DINT_TO_TOD
DINT_TO_UDINT

R911403764, Edition 08 Bosch Rexroth AG


DINT_TO_UINT
DINT_TO_ULINT
DINT_TO_USINT
DINT_TO_WORD
DINT_TO_WSTRING

DWORD_TO___UXINT
DWORD_TO___XINT
DWORD_TO___XWORD
DWORD_TO_BIT
DWORD_TO_BOOL
DWORD_TO_BYTE
DWORD_TO_DATE
DWORD_TO_DINT
DWORD_TO_DT
DWORD_TO_INT
DWORD_TO_LDATE
DWORD_TO_LDT
DWORD_TO_LINT
DWORD_TO_LREAL
DWORD_TO_LTIME
DWORD_TO_LTOD
DWORD_TO_LWORD
DWORD_TO_REAL
DWORD_TO_SINT
DWORD_TO_STRING
DWORD_TO_TIME
DWORD_TO_TOD
DWORD_TO_UDINT
DWORD_TO_UINT
DWORD_TO_ULINT
DWORD_TO_USINT
DWORD_TO_WORD
DWORD_TO_WSTRING

INT_TO___UXINT
INT_TO___XINT
INT_TO___XWORD
INT_TO_BIT
INT_TO_BOOL
INT_TO_BYTE
INT_TO_DATE
INT_TO_DINT
INT_TO_DT
INT_TO_DWORD
INT_TO_LDATE
INT_TO_LDT
INT_TO_LINT
INT_TO_LREAL
INT_TO_LTIME
INT_TO_LTOD
INT_TO_LWORD
INT_TO_REAL
INT_TO_SINT
INT_TO_STRING
INT_TO_TIME
INT_TO_TOD
INT_TO_UDINT
INT_TO_UINT
INT_TO_ULINT
INT_TO_USINT
INT_TO_WORD
INT_TO_WSTRING

LINT_TO___UXINT
LINT_TO___XINT
LINT_TO___XWORD
LINT_TO_BIT
LINT_TO_BOOL
LINT_TO_BYTE
LINT_TO_DATE
LINT_TO_DINT
LINT_TO_DT
LINT_TO_DWORD
LINT_TO_INT
LINT_TO_LDATE
LINT_TO_LDT
LINT_TO_LREAL
LINT_TO_LTIME
LINT_TO_LTOD
LINT_TO_LWORD
LINT_TO_REAL
LINT_TO_SINT
LINT_TO_STRING
LINT_TO_TIME
LINT_TO_TOD
LINT_TO_UDINT
LINT_TO_UINT
LINT_TO_ULINT
LINT_TO_USINT
LINT_TO_WORD
LINT_TO_WSTRING

LWORD_TO___UXINT
LWORD_TO___XINT
LWORD_TO___XWORD
LWORD_TO_BIT
LWORD_TO_BOOL
LWORD_TO_BYTE
LWORD_TO_DATE
LWORD_TO_DINT
LWORD_TO_DT
LWORD_TO_DWORD
LWORD_TO_INT
LWORD_TO_LDATE
LWORD_TO_LDT
LWORD_TO_LINT
LWORD_TO_LREAL
LWORD_TO_LTIME
LWORD_TO_LTOD
LWORD_TO_REAL
LWORD_TO_SINT
LWORD_TO_STRING
LWORD_TO_TIME
LWORD_TO_TOD
LWORD_TO_UDINT
488 / 1158 ctrlX PLC Engineering
Operators

LWORD_TO_UINT
LWORD_TO_ULINT
LWORD_TO_USINT
LWORD_TO_WORD
LWORD_TO_WSTRING

SINT_TO___UXINT
SINT_TO___XINT
SINT_TO___XWORD
SINT_TO_BIT
SINT_TO_BOOL
SINT_TO_BYTE
SINT_TO_DATE
SINT_TO_DINT
SINT_TO_DT
SINT_TO_DWORD
SINT_TO_INT
SINT_TO_LDATE
SINT_TO_LDT
SINT_TO_LINT
SINT_TO_LREAL
SINT_TO_LTIME
SINT_TO_LTOD
SINT_TO_LWORD
SINT_TO_REAL
SINT_TO_STRING
SINT_TO_TIME
SINT_TO_TOD
SINT_TO_UDINT
SINT_TO_UINT
SINT_TO_ULINT
SINT_TO_USINT
SINT_TO_WORD
SINT_TO_WSTRING

UDINT_TO___UXINT
UDINT_TO___XINT
UDINT_TO___XWORD
UDINT_TO_BIT
UDINT_TO_BOOL
UDINT_TO_BYTE
UDINT_TO_DATE
UDINT_TO_DINT
UDINT_TO_DT
UDINT_TO_DWORD
UDINT_TO_INT
UDINT_TO_LDATE
UDINT_TO_LDT
UDINT_TO_LINT
UDINT_TO_LREAL
UDINT_TO_LTIME
UDINT_TO_LTOD
UDINT_TO_LWORD
UDINT_TO_REAL
UDINT_TO_SINT
UDINT_TO_STRING
UDINT_TO_TIME
UDINT_TO_TOD

Bosch Rexroth AG R911403764, Edition 08


UDINT_TO_UINT
UDINT_TO_ULINT
UDINT_TO_USINT
UDINT_TO_WORD
UDINT_TO_WSTRING

UINT_TO___UXINT
UINT_TO___XINT
UINT_TO___XWORD
UINT_TO_BIT
UINT_TO_BOOL
UINT_TO_BYTE
UINT_TO_DATE
UINT_TO_DINT
UINT_TO_DT
UINT_TO_DWORD
UINT_TO_INT
UINT_TO_LDATE
UINT_TO_LDT
UINT_TO_LINT
UINT_TO_LREAL
UINT_TO_LTIME
UINT_TO_LTOD
UINT_TO_LWORD
UINT_TO_REAL
UINT_TO_SINT
UINT_TO_STRING
UINT_TO_TIME
UINT_TO_TOD
UINT_TO_UDINT
UINT_TO_ULINT
UINT_TO_USINT
UINT_TO_WORD
UINT_TO_WSTRING

ULINT_TO___UXINT
ULINT_TO___XINT
ULINT_TO___XWORD
ULINT_TO_BIT
ULINT_TO_BOOL
ULINT_TO_BYTE
ULINT_TO_DATE
ULINT_TO_DINT
ULINT_TO_DT
ULINT_TO_DWORD
ULINT_TO_INT
ULINT_TO_LDATE
ULINT_TO_LDT
ULINT_TO_LINT
ULINT_TO_LREAL
ULINT_TO_LTIME
ULINT_TO_LTOD
ULINT_TO_LWORD
ULINT_TO_REAL
ULINT_TO_SINT
ULINT_TO_STRING
ULINT_TO_TIME
ULINT_TO_TOD
490 / 1158 ctrlX PLC Engineering
Operators

ULINT_TO_UDINT
ULINT_TO_UINT
ULINT_TO_USINT
ULINT_TO_WORD
ULINT_TO_WSTRING

USINT_TO___XINT
USINT_TO___XINT
USINT_TO___XWORD
USINT_TO_BIT
USINT_TO_BOOL
USINT_TO_BYTE
USINT_TO_DATE
USINT_TO_DINT
USINT_TO_DT
USINT_TO_DWORD
USINT_TO_INT
USINT_TO_LDATE
USINT_TO_LDT
USINT_TO_LINT
USINT_TO_LREAL
USINT_TO_LTIME
USINT_TO_LTOD
USINT_TO_LWORD
USINT_TO_REAL
USINT_TO_SINT
USINT_TO_STRING
USINT_TO_TIME
USINT_TO_TOD
USINT_TO_UDINT
USINT_TO_UINT
USINT_TO_ULINT
USINT_TO_WORD
USINT_TO_WSTRING

WORD_TO___XINT
WORD_TO___XINT
WORD_TO___XWORD
WORD_TO_BIT
WORD_TO_BOOL
WORD_TO_BYTE
WORD_TO_DATE
WORD_TO_DINT
WORD_TO_DT
WORD_TO_DWORD
WORD_TO_INT
WORD_TO_LDATE
WORD_TO_LDT
WORD_TO_LINT
WORD_TO_LREAL
WORD_TO_LTIME
WORD_TO_LTOD
WORD_TO_LWORD
WORD_TO_REAL
WORD_TO_SINT
WORD_TO_STRING
WORD_TO_TIME
WORD_TO_TOD

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 491 / 1158
Operators

WORD_TO_UDINT
WORD_TO_UINT
WORD_TO_ULINT
WORD_TO_USINT
WORD_TO_WSTRING

Converting to a string
String manipulation when converting to STRING or
NOTICE
WSTRING
When converting the type to STRING or WSTRING, the

Reference, programming
typed value is left-aligned as a character string and trun-
cated if it is too long. Therefore, declare the return var-
iable for the type conversion operators <>_TO_STRING
and <>_TO_WSTRING long enough that the character
string has enough space without any manipulation.
The operators that convert a value to a STRING or WSTRING type string need an
operand that matches the target data type.

Example

R911403764, Edition 08 Bosch Rexroth AG


492 / 1158 ctrlX PLC Engineering
Operators

Examples

ST implementation language
When a larger data type is converted to a smaller one, the higher order (front)
bytes are truncated. When a smaller data type is converted to a larger one, the
more significant bytes are completed with zeros.
FUNCTION_BLOCK FB_ConvertIntegersFromInt
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
uxiReturn: __UXINT;
xiReturn: __XINT;
xwReturn: __XWORD;
bitReturn: BIT;
xReturn: BOOL;
bReturn: BYTE;
dateReturn: DATE;
diReturn: DINT;
dtReturn: DATE_AND_TIME;
dwReturn: DWORD;
liReturn: LINT;
lrReturn: LREAL;
lwReturn: LWORD;
siReturn: SINT;
sReturn: STRING;
timReturn: TIME;
todReturn: TIME_OF_DAY;
udiReturn: UDINT;
uiReturn: UINT;
usiReturn: USINT;
wReturn: WORD;
wsReturn: WSTRING;
uliReturn: ULINT;
END_VAR

uxiReturn := INT_TO___UXINT(127);
xiReturn := INT_TO___XINT(127);
xwReturn := INT_TO___XWORD(127);
bitReturn := INT_TO_BIT(127);
xReturn := INT_TO_BOOL(127);
bReturn := INT_TO_BYTE(127);
dateReturn := INT_TO_DATE(127);
diReturn := INT_TO_DINT(127);
dtReturn := INT_TO_DT(127);
dwReturn := INT_TO_DWORD(127);
liReturn := INT_TO_LINT(127);
lrReturn := INT_TO_LREAL(127);
lwReturn := INT_TO_LWORD(127);
siReturn := INT_TO_SINT(127);
sReturn := INT_TO_STRING(127);
timReturn := INT_TO_TIME(127);
todReturn := INT_TO_TOD(127);
udiReturn := INT_TO_UDINT(127);
uiReturn := INT_TO_UINT(127);
uliReturn := INT_TO_ULINT(127);

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 493 / 1158
Operators

usiReturn := INT_TO_USINT(127);
wReturn := INT_TO_WORD(127);
wsReturn := INT_TO_WSTRING(127);

FUNCTION_BLOCK FB_ConvertIntegersToInt
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR

Reference, programming
iReturn_uxi: INT;
iReturn_xi: INT;
iReturn_xw: INT;
iReturn_bit: INT;
iReturn_bool: INT;
iReturn_b: INT;
iReturn_d: INT;
iReturn_di: INT;
iReturn_dt: INT;
iReturn_dw: INT;
iReturn_li: INT;
iReturn_lr: INT;
iReturn_lw: INT;
iReturn_r: INT;
iReturn_si: INT;
iReturn_s: INT;
iReturn_tim: INT;
iReturn_tod: INT;
iReturn_tod_0: INT;
iReturn_udi: INT;
iReturn_ui: INT;
iReturn_uli: INT;
iReturn_usi: INT;
iReturn_w: INT;
iReturn_ws: INT;
END_VAR

iReturn_uxi := __UXINT_TO_INT(18446744073709551615);
iReturn_xi := __XINT_TO_INT(9223372036854775807);
iReturn_xw := __XWORD_TO_INT(16#FFFF_FFFF_FFFF_FFFF);
iReturn_bit := BIT_TO_INT(1);
iReturn_bool := BOOL_TO_INT(TRUE);
iReturn_b := BYTE_TO_INT(2#1111_0000);
iReturn_d := DATE_TO_INT(DATE#2019-9-13);
iReturn_di := DINT_TO_INT(2147483647);
iReturn_dt := DT_TO_INT(DT#1979-1-1-00:00:00);
iReturn_dw := DWORD_TO_INT(16#FFFF_FFFF);
// iReturn_i := INT_TO_<>(iData_12);
iReturn_li := LINT_TO_INT(9223372036854775807);
iReturn_lr := LREAL_TO_INT(1.7976931348623157E+30);
iReturn_lw := LWORD_TO_INT(16#FFFF_FFFF_FFFF_FFFF);
iReturn_r := REAL_TO_INT(3.402823E+38);
iReturn_si := SINT_TO_INT(127);
iReturn_s := STRING_TO_INT('127');
iReturn_tim := TIME_TO_INT(T#49D17H2M47S295MS);
iReturn_tod := TOD_TO_INT(TOD#23:59:59.999);
iReturn_tod_0 := TOD_TO_INT(TOD#1:1:1.001);

R911403764, Edition 08 Bosch Rexroth AG


494 / 1158 ctrlX PLC Engineering
Operators

iReturn_udi := UDINT_TO_INT(4294967295);
iReturn_ui := UINT_TO_INT(65535);
iReturn_uli := ULINT_TO_INT(18446744073709551615);
iReturn_usi := USINT_TO_INT(255);
iReturn_w := WORD_TO_INT(16#FFFF);
iReturn_ws := WSTRING_TO_INT("1234567890");

PROGRAM PLC_PRG
VAR
fbConvertIntegersFromInt : FB_ConvertIntegersFromInt;
fbConvertIntegersToInt : FB_ConvertIntegersToInt;
END_VAR

fbConvertIntegersFromInt();
fbConvertIntegersToInt();

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 495 / 1158
Operators

FBD implementation language

Reference, programming
Also refer to
● ⮫ Chapter 32.3.10 Type conversion operators on page 457
● ⮫ Chapter 32.3.50 Boolean conversion on page 478
● ⮫ Chapter 32.3.49 Overload on page 476
● ⮫ Chapter 32.3.52 Floating point number conversion on page 495
● ⮫ Chapter 32.3.53 String conversion on page 498
● ⮫ Chapter 32.3.55 Date and time conversion on page 511
● ⮫ Chapter 32.3.54 Time conversion on page 506

32.3.52 Floating point number conversion


If the operand value for a type conversion operator is
NOTICE
outside of the value range of the target data type, then
the result output depends on the processor type and is
therefore undefined. This is the case, for example, when
a negative operand value is converted from LREAL to the
target data type UINT.
Information can be lost when converting from larger data
types to smaller data types.
If the floating point number is within the value range of
NOTICE
the target data type, the conversion is identical on all
systems.
If the floating point number exceeds the range limit, the
NOTICE
first bytes of the number are not considered.
The operators convert a floating point number to the specified data type and
return a type-converted value. During conversion, rounding is performed if nec-
essary.

Call
Syntax

<variable name> := <floating-point conversion operator>


( <floating-point operand> );

<floating-point operand> = <variable name> | <literal>

<floating-point type> =
REAL |
LREAL

R911403764, Edition 08 Bosch Rexroth AG


496 / 1158 ctrlX PLC Engineering
Operators

Operatoren

REAL_TO___UXINT
REAL_TO___XINT
REAL_TO___XWORD
REAL_TO_BIT
REAL_TO_BOOL
REAL_TO_BYTE
REAL_TO_DATE
REAL_TO_DINT
REAL_TO_DT
REAL_TO_DWORD
REAL_TO_INT
REAL_TO_LINT
REAL_TO_LREAL
REAL_TO_LTIME
REAL_TO_LWORD
REAL_TO_SINT
REAL_TO_STRING
REAL_TO_TIME
REAL_TO_TOD
REAL_TO_UDINT
REAL_TO_UINT
REAL_TO_ULINT
REAL_TO_USINT
REAL_TO_WORD
REAL_TO_WSTRING

LREAL_TO___UXINT
LREAL_TO___XINT
LREAL_TO___XWORD
LREAL_TO_BIT
LREAL_TO_BOOL
LREAL_TO_BYTE
LREAL_TO_DATE
LREAL_TO_DINT
LREAL_TO_DT
LREAL_TO_DWORD
LREAL_TO_INT
LREAL_TO_LINT
LREAL_TO_LTIME
LREAL_TO_LWORD
LREAL_TO_REAL
LREAL_TO_SINT
LREAL_TO_STRING
LREAL_TO_TIME
LREAL_TO_TOD
LREAL_TO_UDINT
LREAL_TO_UINT
LREAL_TO_ULINT
LREAL_TO_USINT
LREAL_TO_WORD
LREAL_TO_WSTRING

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 497 / 1158
Operators

Rounding
When converting to an integer, the operand is rounded up or down to an
integer value. For 1 to 4 after the point, round down, for 5 to 9 round up.
Then the rounded number is converted to the specified integer type. In case
the rounded value is outside the value range of the integer, an undefined, target
system dependent value is returned. An exception is possible.
The rounding logic for borderline cases depends on the
NOTICE
target system or the FPU (floating point unit) of the
target system. A value such as -1.5 can be converted
differently on different controls.

Reference, programming
To program target system-independent code, intercept
exceedances of the value range via the application.

Converting to a string
String manipulation when converting to STRING or
NOTICE
WSTRING
When converting the type to STRING or WSTRING, the
typed value is left-aligned as a character string and trun-
cated if it is too long. Therefore, declare the return var-
iable for the type conversion operators <>_TO_STRING
and <>_TO_WSTRING long enough that the character
string has enough space without any manipulation.
For a floating point number conversion to a string, the number of decimal
places of the mantissa is limited to 6. If the number < is 1, the mantissa is m:
1 <= m < 10. If the mantissa has more digits after the decimal point, it is
rounded to the 6th digit and then converted.
Also, the string variable may be declared too short for the return value. Then
the return string is truncated on the right.

R911403764, Edition 08 Bosch Rexroth AG


498 / 1158 ctrlX PLC Engineering
Operators

Examples

ST implementation language

Also refer to
● ⮫ Chapter 32.3.10 Type conversion operators on page 457
● ⮫ Chapter 32.3.50 Boolean conversion on page 478
● ⮫ Chapter 32.3.49 Overload on page 476
● ⮫ Chapter 32.3.51 Integer conversion on page 482
● ⮫ Chapter 32.3.53 String conversion on page 498
● ⮫ Chapter 32.3.55 Date and time conversion on page 511
● ⮫ Chapter 32.3.54 Time conversion on page 506

32.3.53 String conversion


If the operand value for a type conversion operator is
NOTICE
outside of the value range of the target data type, then
the result output depends on the processor type and is
therefore undefined. This is the case, for example, when
a negative operand value is converted from LREAL to the
target data type UINT.
Information can be lost when converting from larger data
types to smaller data types.
The operators convert a string(STRING or WSTRING) to the specified target data
type and return a type-converted value.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 499 / 1158
Operators

Only if the operand matches the target data type according to the IEC 61131-3
standard, a conversion with meaningful result is possible. This is the case if the
value of the operand corresponds to a valid constant (literal) of the target data
type.
Convertible strings include:
● Number with type prefix (for example '16#FFFFFF')
● Number with grouping character (for example '2#1111_1111')
Note: The international weight and measure grouping character (thinspace)
is not accepted, only the underscore.
● Floating point number, also in exponential notation (for example '9.876'

Reference, programming
or '1.2E-34')
Note: Floating point numbers are not convertible. The comma is treated as a
trailing character and truncated.
● Time- time and date information with prefix and size (for example 'T#2h',
'DT#2019-9-9-12:30:30.9')
● Infinite values (for example '1.7E+400')
● Additional characters after a number (for example '2m' or '3.14'). These
characters are cut off. Additional characters in front of a number are not
permitted.
● Space in front of it (for example ' 3.14')

Call syntax

<variable name> := <string to operator> ( <operand> );

<operand> = <variable name> | <literal>


Operatoren

STRING_TO___UXINT
STRING_TO___XINT
STRING_TO___XWORD
STRING_TO_BIT
STRING_TO_BOOL
STRING_TO_BYTE
STRING_TO_DATE
STRING_TO_DINT
STRING_TO_DT
STRING_TO_DWORD
STRING_TO_INT
STRING_TO_LDATE
STRING_TO_LDT
STRING_TO_LINT
STRING_TO_LREAL
STRING_TO_LTIME
STRING_TO_LWORD
STRING_TO_LTIME
STRING_TO_LTOD
STRING_TO_REAL
STRING_TO_SINT
STRING_TO_TIME
STRING_TO_TOD
STRING_TO_UDINT
STRING_TO_UINT
STRING_TO_ULINT
STRING_TO_USINT

R911403764, Edition 08 Bosch Rexroth AG


500 / 1158 ctrlX PLC Engineering
Operators

STRING_TO_WORD
STRING_TO_WSTRING

WSTRING_TO___UXINT
WSTRING_TO___XINT
WSTRING_TO___XWORD
WSTRING_TO_BIT
WSTRING_TO_BOOL
WSTRING_TO_BYTE
WSTRING_TO_DATE
WSTRING_TO_DINT
WSTRING_TO_DT
WSTRING_TO_DWORD
WSTRING_TO_INT
WSTRING_TO_LDATE
WSTRING_TO_LDT
WSTRING_TO_LINT
WSTRING_TO_LREAL
WSTRING_TO_LTIME
WSTRING_TO_LTOD
WSTRING_TO_LWORD
WSTRING_TO_LTIME
WSTRING_TO_REAL
WSTRING_TO_SINT
WSTRING_TO_STRING
WSTRING_TO_TIME
WSTRING_TO_TOD
WSTRING_TO_UDINT
WSTRING_TO_UINT
WSTRING_TO_ULINT
WSTRING_TO_USINT
WSTRING_TO_STRING
WSTRING_TO_WORD

Conversion to a Boolean value


Operator STRING_TO_BOOL: Only if the operand value is 'TRUE' or 'true', a
TRUE is returned. On the other hand, 'True' returns a FALSE.
Operator WSTRING_TO_BOOL: Only if the operand value is "TRUE" or "true", a
TRUE is returned. In contrast, a FALSE is returned for "True".

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 501 / 1158
Operators

Reference, programming
Examples

ST implementation language

FUNCTION_BLOCK FB_ConvertStrings
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
xReturn_0: BOOL;
xReturn_1: BOOL;
dateReturn: DATE;
dtReturn: DATE_AND_TIME;
iReturn: INT;
lrReturn: LREAL;
lrReturn_0: LREAL;
lwReturn: LWORD;
lwReturn_0: LWORD;
lwReturn_1: LWORD;
ltReturn: LTIME;
ltReturn_0: LTIME;
ltReturn_1: LTIME;
ltReturn_2: LTIME;
rReturn: REAL;
rReturn_0: REAL;
timReturn: TIME;

R911403764, Edition 08 Bosch Rexroth AG


502 / 1158 ctrlX PLC Engineering
Operators

timReturn0: TIME;
timReturn1: TIME;
timReturn2: TIME;
todReturn: TIME_OF_DAY;
todReturn0: TIME_OF_DAY;
todReturn1: TIME_OF_DAY;
todReturn2: TIME_OF_DAY;
uliReurn: ULINT;
uliReurn_0: ULINT;
uliReurn_1: ULINT;
wReturn: WORD;
wReturn_0: WORD;
wReturn_1: WORD;
wstrReturn: WSTRING;
wstrReturn_0: WSTRING;
END_VAR
xReturn_0 := STRING_TO_BOOL('FALSE');
xReturn_1 := STRING_TO_BOOL('TRUE');
dateReturn := STRING_TO_DATE('DATE#2019-9-9');
dtReturn := STRING_TO_DT('DT#2019-9-9-1:1:1.1');
iReturn := STRING_TO_INT('123abc');
lrReturn := STRING_TO_LREAL('4.94E-323');
lrReturn_0 := STRING_TO_LREAL('1.7E+308');
lwReturn := STRING_TO_LWORD('16#FFFF_FFFF_FFFF_FFFF');
lwReturn_0 := STRING_TO_LWORD('16#0123456789ABCDEF');
lwReturn_1 := STRING_TO_LWORD('16#0123456789ABCDEF');
ltReturn :=
STRING_TO_LTIME('LTIME#213503d23h34m33s709ms551us615ns');
ltReturn_0 := STRING_TO_LTIME('LTIME#0ns');
ltReturn_1 := STRING_TO_LTIME('LTIME#1ms');
ltReturn_2 := STRING_TO_LTIME('LTIME#2s');
rReturn := STRING_TO_REAL('6.543e21');
rReturn_0 := STRING_TO_REAL('1.234');
timReturn := STRING_TO_TIME('T#5d4h3m2s');
timReturn0 := STRING_TO_TIME('TIME#1s');
timReturn1 := STRING_TO_TIME('1s');
timReturn2 := STRING_TO_TIME('TIME#5s');
todReturn := STRING_TO_TOD('TOD#12:0:0.1');
todReturn0 := STRING_TO_TOD('TOD#0:0:0.0');
todReturn1 := STRING_TO_TOD('20:15');
todReturn2 := STRING_TO_TOD('TOD#20:15');
uliReurn := STRING_TO_ULINT('18446744073709551615');
uliReurn_0 := STRING_TO_ULINT('1');
uliReurn_1 := STRING_TO_ULINT('0');
wReturn := STRING_TO_WORD('16#FFFF_0000');
wReturn_0 := STRING_TO_WORD('34abc');
wReturn_1 := STRING_TO_WORD('16#34abc');
wstrReturn := STRING_TO_WSTRING('Hello World!');
wstrReturn_0 := STRING_TO_WSTRING('123456789');

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 503 / 1158
Operators

Reference, programming
WSTRING conversion in ST

FUNCTION_BLOCK FB_ConvertWstrings
VAR
xReturn_0: BOOL;
xReturn_1: BOOL;
dateReturn: DATE;
dtReturn: DATE_AND_TIME;
iReturn: INT;
lrReturn: LREAL;
lrReturn_0: LREAL;
lwReturn: LWORD;
lwReturn_0: LWORD;
lwReturn_1: LWORD;
ltReturn: LTIME;
ltReturn_0: LTIME;
ltReturn_1: LTIME;
ltReturn_2: LTIME;
rReturn: REAL;
rReturn_0: REAL;
timReturn: TIME;
timReturn0: TIME;
timReturn1: TIME;
timReturn2: TIME;
todReturn: TIME_OF_DAY;
todReturn0: TIME_OF_DAY;
todReturn1: TIME_OF_DAY;
todReturn2: TIME_OF_DAY;
uliReurn: ULINT;
uliReurn_0: ULINT;
uliReurn_1: ULINT;

R911403764, Edition 08 Bosch Rexroth AG


504 / 1158 ctrlX PLC Engineering
Operators

wReturn: WORD;
wReturn_0: WORD;
wReturn_1: WORD;
wstrReturn: WSTRING;
wstrReturn_0: WSTRING;
END_VAR

xReturn_0 := WSTRING_TO_BOOL("FALSE");
xReturn_1 := WSTRING_TO_BOOL("TRUE");
dateReturn := WSTRING_TO_DATE("DATE#2019-9-9");
dtReturn := WSTRING_TO_DT("DT#2019-9-9-1:1:1.1");
iReturn := WSTRING_TO_INT("123abc");
lrReturn := WSTRING_TO_LREAL("4.94E-323");
lrReturn_0 := WSTRING_TO_LREAL("1.7E+308");
lwReturn := WSTRING_TO_LWORD("16#FFFF_FFFF_FFFF_FFFF");
lwReturn_0 := WSTRING_TO_LWORD("16#0123456789ABCDEF");
lwReturn_1 := WSTRING_TO_LWORD("16#0123456789ABCDEF");
ltReturn :=
WSTRING_TO_LTIME("LTIME#213503d23h34m33s709ms551us615ns");
ltReturn_0 := WSTRING_TO_LTIME("LTIME#0ns");
ltReturn_1 := WSTRING_TO_LTIME("LTIME#1ms");
ltReturn_2 := WSTRING_TO_LTIME("LTIME#2s");
rReturn := WSTRING_TO_REAL("6.543e21");
rReturn_0 := WSTRING_TO_REAL("1.234");
timReturn := WSTRING_TO_TIME("T#5d4h3m2s");
timReturn0 := WSTRING_TO_TIME("TIME#1s");
timReturn1 := WSTRING_TO_TIME("1s");
timReturn2 := WSTRING_TO_TIME("TIME#5s");
todReturn := WSTRING_TO_TOD("TOD#12:0:0.1");
todReturn0 := WSTRING_TO_TOD("TOD#0:0:0.0");
todReturn1 := WSTRING_TO_TOD("20:15");
todReturn2 := WSTRING_TO_TOD("TOD#20:15");
uliReurn := WSTRING_TO_ULINT("18446744073709551615");
uliReurn_0 := WSTRING_TO_ULINT("1");
uliReurn_1 := WSTRING_TO_ULINT("0");
wReturn := WSTRING_TO_WORD("16#FFFF_0000");
wReturn_0 := WSTRING_TO_WORD("34abc");
wReturn_1 := WSTRING_TO_WORD("16#34abc");

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 505 / 1158
Operators

Reference, programming
FBD implementation language

Also refer to
● ⮫ Chapter 32.3.10 Type conversion operators on page 457
● ⮫ Chapter 32.3.50 Boolean conversion on page 478
● ⮫ Chapter 32.3.49 Overload on page 476
● ⮫ Chapter 32.3.51 Integer conversion on page 482
● ⮫ Chapter 32.3.52 Floating point number conversion on page 495
● ⮫ Chapter 32.3.55 Date and time conversion on page 511
● ⮫ Chapter 32.3.54 Time conversion on page 506

R911403764, Edition 08 Bosch Rexroth AG


506 / 1158 ctrlX PLC Engineering
Operators

32.3.54 Time conversion


If the operand value for a type conversion operator is
NOTICE
outside of the value range of the target data type, then
the result output depends on the processor type and is
therefore undefined. This is the case, for example, when
a negative operand value is converted from LREAL to the
target data type UINT.
Information can be lost when converting from larger data
types to smaller data types.
The operators convert time information(TIME or LIME) into the specified data
type and return this type-converted value.

Call syntax

<variable name> := <time conversion operator> ( <operand> );

<operand> = <variable name> | <literal>


Operatoren

TIME_TO___UXINT
TIME_TO___XINT
TIME_TO___XWORD
TIME_TO_BIT
TIME_TO_BOOL
TIME_TO_BYTE
TIME_TO_DATE
TIME_TO_DINT
TIME_TO_DT
TIME_TO_DWORD
TIME_TO_INT
TIME_TO_LDATE
TIME_TO_LDINT
TIME_TO_LINT
TIME_TO_LREAL
TIME_TO_LTIME
TIME_TO_LTOD
TIME_TO_LWORD
TIME_TO_REAL
TIME_TO_SINT
TIME_TO_STRING
TIME_TO_TOD
TIME_TO_UDINT
TIME_TO_UINT
TIME_TO_ULINT
TIME_TO_USINT
TIME_TO_WORD
TIME_TO_WSTRING

LTIME_TO___UXINT
LTIME_TO___XINT
LTIME_TO___XWORD
LTIME_TO_BIT
LTIME_TO_BOOL
LTIME_TO_BYTE
LTIME_TO_DATE
LTIME_TO_DINT

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 507 / 1158
Operators

LTIME_TO_DT
LTIME_TO_DWORD
LTIME_TO_INT
LTIME_TO_LDATE
LTIME_TO_LDINT
LTIME_TO_LINT
LTIME_TO_LREAL
LTIME_TO_LTOD
LTIME_TO_LWORD
LTIME_TO_REAL
LTIME_TO_SINT

Reference, programming
LTIME_TO_STRING
LTIME_TO_TIME
LTIME_TO_TOD
LTIME_TO_UDINT
LTIME_TO_UINT
LTIME_TO_ULINT
LTIME_TO_USINT
LTIME_TO_WORD
LTIME_TO_WSTRING

Convert to Boolean values.


Exactly when the operand value can be interpreted as "0", the operator returns
a FALSE.
xTime := TIME_TO_BOOL(T#0MS); xTime = FALSE
xLongTime := xLongTime = FALSE
TIME_TO_BOOL(T#0NS);
xTime := TIME_TO_BOOL(T#1MS); xDate = TRUE
xLongTime := xLongTime = TRUE
TIME_TO_BOOL(T#1NS);

Converting to a string
String manipulation when converting to STRING or
NOTICE
WSTRING
When converting the type to STRING or WSTRING, the
typed value is left-aligned as a character string and trun-
cated if it is too long. Therefore, declare the return var-
iable for the type conversion operators <>_TO_STRING
and <>_TO_WSTRING long enough that the character
string has enough space without any manipulation.
sTime := TIME_TO_STRING(T#0MS); sTime = 'T#0MS'

wsLongTime := wsLongTime = "T#0US"


LTIME_TO_WSTRING(T#0US);

R911403764, Edition 08 Bosch Rexroth AG


508 / 1158 ctrlX PLC Engineering
Operators

Examples

ST implementation language

FUNCTION_BLOCK FB_ConvertTimeAndDate
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
ltReturn_1: LTIME;
lwReturn_2: LWORD;
rReturn_3: REAL;
strReturn_4: STRING;
timReturn_5: TIME;
todReturn_6: TIME_OF_DAY;
uliReurn_7: ULINT;
wstrReturn_8: WSTRING;
wstrReturn_80: WSTRING;
uliReurn_70: ULINT;
todReturn_60: TIME_OF_DAY;
timReturn_50: TIME;
strReturn_40: STRING;
rReturn_30: REAL;
lwReturn_20: LWORD;
ltReturn_10: LTIME;
ltReturn_11: LTIME;
lwReturn_21: LWORD;
rReturn_31: REAL;
strReturn_41: STRING;
timReturn_51: TIME;
todRedurn_61: TIME_OF_DAY;
uliReurn_71: ULINT;
wstrReturn_81: WSTRING;
ltReturn_12: LTIME;
xReturn_9: BOOL;
xReturn_90: BOOL;
xReturn_91: BOOL;
xReturn_92: BOOL;
dateReturn_6: DATE;
timReturn_60: TIME;
wReturn_61: WORD;
todReturn_61: TIME_OF_DAY;
END_VAR

ltReturn_1 := DT_TO_LTIME(DT#2019-9-9-23:59:59);
ltReturn_10 := DT_TO_LTIME(DT#1970-1-1-0:0:0);
ltReturn_11 := DT_TO_LTIME(DT#1970-1-2-0:0:1);
ltReturn_12 := DT_TO_LTIME(DT#1970-1-3-12:30:30);

lwReturn_2 := TIME_TO_LWORD(T#5D4H2M3S2MS);
lwReturn_20 := TIME_TO_LWORD(T#0D0H0M0S0MS);

rReturn_3 := TIME_TO_REAL(T#5D4H2M3S2MS);
rReturn_30 := TIME_TO_REAL(T#0D0H0M0S0MS);

strREturn_4 := TIME_TO_STRING(T#5D4H2M3S2MS);

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 509 / 1158
Operators

strREturn_40 := TIME_TO_STRING(T#0D0H0M0S0MS);

timReturn_5 := TOD_TO_TIME(TOD#23:59:59.999);
timReturn_50 := TOD_TO_TIME(TOD#0:0:0.000);
timReturn_51 := TOD_TO_TIME(TOD#0:0:0.001);

dateReturn_6 := TOD_TO_DATE(TOD#23:59:59.999);
timReturn_60 := TOD_TO_TIME(TOD#0:0:0.000);
wReturn_61 := TOD_TO_WORD(TOD#0:0:0.001);

Reference, programming
uliReurn_7 := DATE_TO_ULINT(D#2019-9-9);
uliReurn_70 := DATE_TO_ULINT(D#1970-1-1);
uliReurn_71 := DATE_TO_ULINT(D#1970-1-2);

wstrReturn_8 := DATE_TO_WSTRING(D#2019-9-9);
wstrReturn_80 := DATE_TO_WSTRING(D#1970-1-1);
wstrReturn_81 := DATE_TO_WSTRING(D#1970-1-2);

xReturn_9 := DATE_TO_BOOL(D#2019-9-9);
xReturn_90 := DATE_TO_BOOL(D#1970-1-1);
xReturn_91 := DATE_TO_BOOL(D#1970-1-2);
xReturn_92 := DATE_TO_BOOL(D#1970-1-3);

R911403764, Edition 08 Bosch Rexroth AG


510 / 1158 ctrlX PLC Engineering
Operators

FBD implementation language

Also refer to
● ⮫ Chapter 32.3.10 Type conversion operators on page 457
● ⮫ Chapter 32.3.50 Boolean conversion on page 478
● ⮫ Chapter 32.3.49 Overload on page 476
● ⮫ Chapter 32.3.51 Integer conversion on page 482
● ⮫ Chapter 32.3.52 Floating point number conversion on page 495

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 511 / 1158
Operators

● ⮫ Chapter 32.3.53 String conversion on page 498


● ⮫ Chapter 32.3.55 Date and time conversion on page 511

32.3.55 Date and time conversion


If the operand value for a type conversion operator is
NOTICE
outside of the value range of the target data type, then
the result output depends on the processor type and is
therefore undefined. This is the case, for example, when
a negative operand value is converted from LREAL to the
target data type UINT.

Reference, programming
Information can be lost when converting from larger data
types to smaller data types.
The operators convert a date and time specification to the specified data type
and return a type-converted value.

Call syntax

<variable name> := <date and time conversion operator>


( <operand> );

<operand> = <variable name> | <literal>


The data types DATE and DT use internally the same memory format and are
stored as DWORD. The resolution for DATE is 1 day. The resolution for DT is
1 second. Both start from January 1, 1970. TOD is stored as DWORD with a
resolution of 1 millisecond.
Operatoren

DATE_TO___UXINT
DATE_TO___XINT
DATE_TO___XWORD
DATE_TO_BIT
DATE_TO_BOOL
DATE_TO_BYTE
DATE_TO_DINT
DATE_TO_DT
DATE_TO_DWORD
DATE_TO_INT
DATE_TO_LINT
DATE_TO_LREAL
DATE_TO_LTIME
DATE_TO_LWORD
DATE_TO_REAL
DATE_TO_SINT
DATE_TO_STRING
DATE_TO_TIME
DATE_TO_TOD
DATE_TO_UDINT
DATE_TO_UINT
DATE_TO_ULINT
DATE_TO_USINT
DATE_TO_WORD
DATE_TO_WSTRING

DT_TO___UXINT
DT_TO___XINT

R911403764, Edition 08 Bosch Rexroth AG


512 / 1158 ctrlX PLC Engineering
Operators

DT_TO___XWORD
DT_TO_BIT
DT_TO_BOOL
DT_TO_BYTE
DT_TO_DATE
DT_TO_DINT
DT_TO_DWORD
DT_TO_INT
DT_TO_LINT
DT_TO_LREAL
DT_TO_LTIME
DT_TO_LWORD
DT_TO_REAL
DT_TO_SINT
DT_TO_STRING
DT_TO_TIME
DT_TO_TOD
DT_TO_UDINT
DT_TO_UINT
DT_TO_ULINT
DT_TO_USINT
DT_TO_WORD
DT_TO_WSTRING

TOD_TO___UXINT
TOD_TO___XINT
TOD_TO___XWORD
TOD_TO_BOOL
TOD_TO_BIT
TOD_TO_BYTE
TOD_TO_DATE
TOD_TO_DINT
TOD_TO_DT
TOD_TO_DWORD
TOD_TO_INT
TOD_TO_LINT
TOD_TO_LREAL
TOD_TO_LTIME
TOD_TO_LWORD
TOD_TO_REAL
TOD_TO_SINT
TOD_TO_STRING
TOD_TO_TIME
TOD_TO_UDINT
TOD_TO_UINT
TOD_TO_ULINT
TOD_TO_USINT
TOD_TO_WORD
TOD_TO_WSTRING
Long-Operatoren

LDATE_TO___UXINT
LDATE_TO___XINT
LDATE_TO___XWORD
LDATE_TO_BIT
LDATE_TO_BOOL
LDATE_TO_BYTE

Bosch Rexroth AG R911403764, Edition 08


LDATE_TO_DATE
LDATE_TO_DINT
LDATE_TO_DT
LDATE_TO_DWORD
LDATE_TO_INT
LDATE_TO_LDT
LDATE_TO_LINT
LDATE_TO_LREAL
LDATE_TO_LTIME
LDATE_TO_LTOD
LDATE_TO_LWORD
LDATE_TO_REAL
LDATE_TO_SINT
LDATE_TO_STRING
LDATE_TO_TIME
LDATE_TO_TOD
LDATE_TO_UDINT
LDATE_TO_UINT
LDATE_TO_ULINT
LDATE_TO_USINT
LDATE_TO_WORD
LDATE_TO_WSTRING

LDT_TO___UXINT
LDT_TO___XINT
LDT_TO___XWORD
LDT_TO_BIT
LDT_TO_BOOL
LDT_TO_BYTE
LDT_TO_DATE
LDT_TO_DINT
LDT_TO_DWORD
LDT_TO_INT
LDT_TO_LDATE
LDT_TO_LINT
LDT_TO_LREAL
LDT_TO_LTIME
LDT_TO_LTOD
LDT_TO_LWORD
LDT_TO_REAL
LDT_TO_SINT
LDT_TO_STRING
LDT_TO_TIME
LDT_TO_TOD
LDT_TO_UDINT
LDT_TO_UINT
LDT_TO_ULINT
LDT_TO_USINT
LDT_TO_WORD
LDT_TO_WSTRING

LTOD_TO___UXINT
LTOD_TO___XINT
LTOD_TO___XWORD
LTOD_TO_BOOL
LTOD_TO_BIT
LTOD_TO_BYTE
LTOD_TO_DATE
514 / 1158 ctrlX PLC Engineering
Operators

LTOD_TO_DINT
LTOD_TO_DT
LTOD_TO_DWORD
LTOD_TO_INT
LTOD_TO_LDATE
LTOD_TO_LDT
LTOD_TO_LINT
LTOD_TO_LREAL
LTOD_TO_LTIME
LTOD_TO_LWORD
LTOD_TO_REAL
LTOD_TO_SINT
LTOD_TO_STRING
LTOD_TO_TIME
LTOD_TO_UDINT
LTOD_TO_UINT
LTOD_TO_ULINT
LTOD_TO_USINT
LTOD_TO_WORD
LTOD_TO_WSTRING

Converting to a Boolean value


Exactly when the operand value can be interpreted as "0", the operator returns
a FALSE.
xDate := xDate = FALSE
DATE_TO_BOOL(D#1970-1-1);
xDateAndTime := xDateAndTime = FALSE
DT_TO_BOOL(DT#1970-1-1-0:0:0);
xTimeOfDay := xTimeOfDay = FALSE
TOD_TO_BOOL(TOD#0:0:0);
xDate := xDate = TRUE
DATE_TO_BOOL(D#2019-9-1);
xDateAndTime := xDateAndTime = TRUE
DT_TO_BOOL(DT#2019-9-1-12:0:0);

xTimeOfDay := xTimeOfDay = TRUE


TOD_TO_BOOL(TOD#12:0:0);

Converting to an integer
The data types DATE and DT use the same memory format internally, namely a
DWORD. The resolution for DATE is 1 day. The resolution for DT is 1 second. Both
start from January 1, 1970.
TOD is stored as DWORD with a resolution of 1 millisecond.
diReturn_0 := diReturn_0 = 0
DT_TO_DINT(DT#1970-1-1-0:0:0);
diReturn_1 := diReturn_1 = 0
DATE_TO_DINT(D#1970-1-1);
diReturn_2 := diReturn_2 = 0
TOD_TO_DINT(TOD#0:0:0);
diReturn_1 := diReturn_3 = 1
DT_TO_DINT(DT#1970-1-1-0:0:1);
diReturn_3 := diReturn_4 = 86400
DATE_TO_DINT(D#1970-1-2);

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 515 / 1158
Operators

diReturn_5 := diReturn_5 = 1567339200


DT_TO_DINT(DT#2019-9-1-12:0:0.0
);
diReturn_6 := diReturn_6 = 1567339200
DATE_TO_DINT(D#2019-9-1);
diReturn_7 := diReturn_7 = 43200000
TOD_TO_DINT(TOD#12:0:0);

Converting to a string
String manipulation when converting to STRING or

Reference, programming
NOTICE
WSTRING
When converting the type to STRING or WSTRING, the
typed value is left-aligned as a character string and trun-
cated if it is too long. Therefore, declare the return var-
iable for the type conversion operators <>_TO_STRING
and <>_TO_WSTRING long enough that the character
string has enough space without any manipulation.
The operands of type DATE, DATE_AND_TIME, TIME_OF_DAY, DT or TOD, which
are passed to an operator for a date and time conversion, are converted in their
constant notation (literal notation). The generated string contains the keywords
D#, DT# or TOD# and then the quantity with its date and time unit as specified
in the IEC 61131-3 standard.

Examples

Examples

FBD implementation language


The control is in online mode to monitor the variables.

R911403764, Edition 08 Bosch Rexroth AG


516 / 1158 ctrlX PLC Engineering
Operators

Also refer to
● ⮫ Chapter 32.3.10 Type conversion operators on page 457
● ⮫ Chapter 32.3.50 Boolean conversion on page 478
● ⮫ Chapter 32.3.49 Overload on page 476
● ⮫ Chapter 32.3.51 Integer conversion on page 482
● ⮫ Chapter 32.3.52 Floating point number conversion on page 495
● ⮫ Chapter 32.3.53 String conversion on page 498
● ⮫ Chapter 32.3.54 Time conversion on page 506

32.3.56 Operator 'TRUNC'


The IEC operator is used to convert from type REAL to type DINT. PLC Engi-
neering uses only the integer part of the number.
In CoDeSys V2.3, the TRUNC operator converts REAL into INT. If you import
a V2.3 project, then PLC Engineering automatically replaces TRUNC with
TRUNC_INT.
If PLC Engineering cannot represent the input value by a DINT or INT, then the
result of this function is undefined. The behavior of such input values depends
on the platform.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 517 / 1158
Operators

If the operand value for a type conversion operator is


NOTICE
outside of the value range of the target data type, then
the result output depends on the processor type and is
therefore undefined. This is the case, for example, when
a negative operand value is converted from LREAL to the
target data type UINT.
Information can be lost when converting from larger data
types to smaller data types.

Examples

Reference, programming
Result in diVar: 1
ST
diVar := TRUNC(1.9); (* Result: 1 *)

diVar := TRUNC(-1.4); (* Result: -1 *)

Also refer to
● ⮫ Chapter 32.3.10 Type conversion operators on page 457

32.3.57 Operator 'TRUNC_INT'


The IEC operator is used to convert from type REAL to type INT. PLC Engi-
neering only uses the amount of the integer part of the number.
TRUNC_INT corresponds to the TRUNC operator in CoDeSys V2.3, and it is
used automatically at this point when importing V2.3 projects. Please note the
changed function of TRUNC.
If PLC Engineering cannot represent the input value by a DINT or INT, then the
result of this function is undefined. The behavior of such input values depends
on the platform.
If the operand value for a type conversion operator is
NOTICE
outside of the value range of the target data type, then
the result output depends on the processor type and is
therefore undefined. This is the case, for example, when
a negative operand value is converted from LREAL to the
target data type UINT.
Information can be lost when converting from larger data
types to smaller data types.

Examples
Result in iVAR: 1
ST:
iVar := TRUNC_INT(1.9); (* Result: 1 *)

iVar := TRUNC_INT(-1.4); (* Result: -1 *)

Also refer to
● ⮫ Chapter 32.3.10 Type conversion operators on page 457

32.3.58 Operator 'ABS'


This IEC operator yields the absolute value of a number.
Permitted data types for input and output variables and numeric constants: any
numeric basic data type

R911403764, Edition 08 Bosch Rexroth AG


518 / 1158 ctrlX PLC Engineering
Operators

Examples
Result in i: 2
ST:
i := ABS(-2);
FBD:

32.3.59 Operator 'SQRT'


This IEC of course yields the square root of a number.
Permitted data types for input variables: any numeric basic data type
Permitted data types for output variables: REAL or LREAL

Examples
Result in q: 4
ST:
q := SQRT(16);
FBD:

32.3.60 Operator 'LN'


This IEC operator yields the natural logarithm of a number.
Permitted data types for input variables: any numeric basic data type
Permitted data types for output variables: REAL and LREAL

Examples
Result: 3.80666
ST:
q := LN(45);
FBD:

32.3.61 Operator 'LOG'


This IEC operator yields the base-10 logarithm of a number.
The input variable can be any numeric basic data type, but the output variable
must be the data type REAL or LREAL.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 519 / 1158
Operators

Examples
Result in q: 2.49762
ST:
q := LOG(314.5);
FBD:

Reference, programming
32.3.62 Operator 'EXP'
This IEC operator yields the exponential function.
Permitted data types for input variables: any numeric basic data type
Permitted data types for output variables: REAL and LREAL

Examples
Result in q: 7.389056099
ST:
q := EXP(2);
FBD:

32.3.63 Operator 'EXPT'


This IEC operator raises a number to a higher power and returns the power
of the base raised to the exponent: power = base exponent. The input values
(parameters) are the base and the exponent. The power function is undefined if
the base is zero and the exponent is negative. However, the behavior depends
on the platform in this case.
Syntax:
EXPT(<base>,<exponent>)
Permitted data types for the input values: Numeric base data types (SINT,
USINT, INT, UINT, DINT, UDINT, LINT, ULINT, REAL, LREAL, BYTE, WORD, DWORD,
and LWORD)
Permitted data types for the return value: Floating-point number types (REAL
and LREAL)

Example
Power function with literals
Var1 := EXPT(7,2);
FBD:

Return value: Var1 = 49

R911403764, Edition 08 Bosch Rexroth AG


520 / 1158 ctrlX PLC Engineering
Operators

Example
Power function with variables

PROGRAM PLC_PRG
VAR
lrPow : LREAL;
iBase : INT := 2;
iExponent : INT := 7;
END_VAR

lrPow := EXPT(iBase, iExponent);


Return value: lrPow = 128

32.3.64 Operator 'SIN'


The IEC operator yields the sine value of a number.
Permitted data types for input variables that measure the angle in radians: any
numeric basic data type
Permitted data types for output variable: REAL and LREAL
The permitted range for the input value is -263 to +263. On x86 and x64 systems:
If the input value is outside of the permitted range, the function returns the
input value

Examples
Result in q: 0.479426
ST:
q := SIN (0.5);
FBD:

32.3.65 Operator 'COS'


The IEC operator yields the cosine value of a number.
Permitted data types for input variables that measure the angle in radians: any
numeric basic data type
Permitted data types for output variables: REAL and LREAL
The permitted range for the input value is -263 to +263. On x86 and x64 systems:
If the input value is outside of the permitted range, the function returns the
input value

Examples
Result in q: 0.877583
ST:
q := COS(0.5);
FBD:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 521 / 1158
Operators

32.3.66 Operator 'TAN'


This IEC operator yields the tangent value of a number.
Permitted data types for input variables that measure the angle in radians: any
numeric basic data type
Permitted data types for output variables: REAL and LREAL

Examples
Result in q: 0.546302
ST:

Reference, programming
q := TAN(0.5);
FBD:

32.3.67 Operator 'ASIN'


This IEC operator yields the arcsine value of a number.
Permitted data types for input variables: any numeric basic data type
Permitted data types for output variables: REAL and LREAL

Examples
Result in q: 0.523599
ST:
q := ASIN(0,5);

FBD:

32.3.68 Operator 'ACOS'


This IEC operator yields the arccosine value of a number. The value is com-
puted in radians.
Permitted data types for input variables that measure the angle in radians: any
numeric basic data type
Permitted data types for output variables: REAL and LREAL

Examples
Result in q: 1.0472
ST:
q := ACOS(0.5);
FBD:

R911403764, Edition 08 Bosch Rexroth AG


522 / 1158 ctrlX PLC Engineering
Operators

32.3.69 Operator 'ATAN'


This IEC operator yields the arctangent value of a number. The value is com-
puted in radians.
Permitted data types for input variables that measure the angle in radians: any
numeric basic data type
Permitted data types for output variables: REAL and LREAL

Examples
Result in q: 0.463648
ST:
q := ATAN(0.5);

FBD:

32.3.70 Operator '__DELETE'


This operator is an extension of the IEC 61131-3 standard.
For compatibility, the compiler version must be >=
NOTICE
3.3.2.0.
The operator releases the memory of instances that the "__NEW" operator gen-
erated dynamically. The __DELETE operator does not have a return value and
the operand is set to zero after this operation.
Requirement: In the properties dialog of the application, the “Use dynamic
memory allocation” check box is selected in the “Application Build Options”
tab.
__DELETE (<pointer>)
Two tasks should not call __DELETE simultaneously.
NOTICE
Either you use a semaphore (SysSemEnter) or com-
parable method to prevent any concurrent calling of
__DELETE , or you use __DELETE in one tasks only (rec-
ommended).
You can use a semaphore (SysSemEnter) to prevent two tasks from allocating
memory at the same time. As a consequence, the extensive use of __DELETE
causes higher jitter.
If Pointer references a function block, then PLC Engineering calls the associ-
ated FB_EXIT method before the pointer is set to zero.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 523 / 1158
Operators

Examples
FUNCTION_BLOCK FBDynamic

VAR_INPUT
in1, in2 : INT;
END_VAR

VAR_OUTPUT
out : INT;
END_VAR

Reference, programming
VAR
test1 : INT := 1234;
_inc : INT := 0;
_dut : POINTER TO DUT;
neu : BOOL;
END_VAR

out := in1 + in2;

METHOD FB_Exit : BOOL

VAR_INPUT
bInCopyCode : BOOL;
END_VAR

__Delete(_dut);

METHOD FB_Init : BOOL

VAR_INPUT
bInitRetains : BOOL;
bInCopyCode : BOOL;
END_VAR

_dut := __NEW(DUT);

METHOD INC : INT

VAR_INPUT
END_VAR

_inc := _inc + 1;
INC := _inc;

PLC_PRG(PRG)

VAR
pFB : POINTER TO FBDynamic;
bInit: BOOL := TRUE;
bDelete: BOOL;
loc : INT;

R911403764, Edition 08 Bosch Rexroth AG


524 / 1158 ctrlX PLC Engineering
Operators

END_VAR

IF (bInit) THEN
pFB := __NEW(FBDynamic);
bInit := FALSE;
END_IF

IF (pFB <> 0) THEN


pFB^(in1 := 1, in2 := loc, out => loc);
pFB^.INC();
END_IF

IF (bDelete) THEN
__DELETE(pFB);
END_IF

32.3.71 Operator '__ISVALIDREF'


This operator is an extension of the IEC 61131-3 standard.
The operator is used for checking whether a reference refers to a valid value.
For a description of use and an example, refer to the description for the
REFERENCE data type.
See also
● ⮫ Chapter 32.5.17 Reference on page 567

32.3.72 Operator '__NEW'


The operator is an extension of the IEC 61131-3 standard.
The __NEW operator reserves dynamic memory to instantiate function blocks,
user-defined data types, or arrays of standard types. The operator returns a
matching typed pointer.
Requirement: In the properties dialog of the parent application, on the
“Application Build Options” tab, the “Use dynamic memory allocation” option is
selected.
Syntax

<pointer name> := __NEW( <type> ( , <size> )? );


__DELETE( <pointer name> );

<type> : <function block> | <data unit type> | <standard data


type>
The operator generates an instance of the type <type> and returns a pointer
to this instance. Then the initialization of the instance is called. If <type> is a
scalar standard data type, then the optional operand <size> is also evaluated.
Then the operator generates an array of type <standard data type> and size
<size>. If the attempt to allocate memory fails, then __NEW returns the value 0.
Use the operator within the assignment ":=". Otherwise an error message is
displayed.
A function block or a user-defined data type whose instance is created dynami-
cally with __NEW uses a fixed memory area. Here it is required that you mark
the objects with the pragma {attribute 'enable_dynamic_creation'}. It
is not required for function blocks that are part of a library.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 525 / 1158
Operators

If you change the data layout of the function block in online mode, then you
cannot execute a login with an online change afterwards. This is because the
memory area of the function block instance has been invalidated. You change
the data layout when you add new variables to the function block, delete
existing variables, or change the data types of variables.

Example
Array (DWORD):

PROGRAM PLC_PRG

Reference, programming
VAR
pdwScalar : POINTER TO DWORD; //Typed pointer
xInit : BOOL := TRUE;
xDelete : BOOL;
END_VAR

IF (xInit) THEN
pdwScalar := __NEW(DWORD, 16); // Allocates memory (16
dwords) and assigns them to pointer pdwScalar
END_IF
IF (xDelete) THEN
__DELETE(pdwScalar); // Frees memory of pointer
END_IF
Function block:

{attribute 'enable_dynamic_creation'}
FUNCTION_BLOCK FBComputeGamma
VAR_INPUT
iAlpha : INT;
iBeta : INT;
END_VAR
VAR_OUTPUT
iGamma : INT;
END_VAR
VAR
END_VAR

iGamma := iAlpha + iBeta;

PROGRAM PLC_PRG
VAR
pComputeGamma : POINTER TO FBComputeGamma; // Typed pointer
xInit : BOOL := TRUE;
xDelete : BOOL;
iResult : INT;
END_VAR

IF (xInit) THEN
pComputeGamma := __NEW(FBComputeGamma); // Allocates memory
xInit := FALSE;
END_IF
pComputeGamma^.iAlpha := (pComputeGamma^.iAlpha + 1)MOD
100; // Sets first input of pComputeGamma
pComputeGamma^.iBeta := 10; // Sets second input of
pComputeGamma

R911403764, Edition 08 Bosch Rexroth AG


526 / 1158 ctrlX PLC Engineering
Operators

pComputeGamma^(); // Calls the FB pComputeGamma is pointing to


iResult := pComputeGamma^.iGamma; // Reads output of
pComputeGamma
IF (xDelete) THEN
__DELETE(pComputeGamma); // Frees memory
END_IF
User-defined data type (DUT):

{attribute 'enable_dynamic_creation'}
TYPE ABCDATA :
STRUCT
iA, iB, iC, iD : INT;
END_STRUCT
END_TYPE

PROGRAM PLC_PRG
VAR
pABCData : POINTER TO ABCDATA; // Typed pointer
xInit : BOOL := TRUE;
xDelete : BOOL;
END_VAR

IF (xInit) THEN
pABCData := __NEW(ABCDATA); // Allocates memory
xInit := FALSE;
END_IF
IF (xDelete) THEN
__DELETE(pABCData); // Frees memory
END_IF
Array (BYTE):

PROGRAM PLC_PRG
VAR
pbDataAlpha : POINTER TO BYTE;
pbDataBeta : POINTER TO BYTE;
xInit : BOOL := TRUE;
xDelete : BOOL;
usiCnt : USINT;
bTestC: BYTE;
END_VAR

IF (xInit) THEN
pbDataAlpha := __NEW(BYTE, 16); // Allocates 16 bytes for
pbDataAlpha
pbDataBeta := __NEW(BYTE); // Allocates memory for
pbDataBeta
xInit := FALSE;

FOR usiCnt := 0 TO 15 DO
pbDataAlpha[usiCnt] := usiCnt; // Writes to new array
END_FOR
pbDataBeta^:= 16#FF; // Writes to new data
END_IF

bTestC := pbDataAlpha[12]; // Reads new array by index access

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 527 / 1158
Operators

IF (xDelete) THEN // Frees memory


__DELETE(pbDataAlpha);
__DELETE(pbDataBeta);
END_IF

We do not recommend the simultaneous execution of


NOTICE
two tasks that both call the __NEW operator. You use
either a semaphore (SysSemEnter) or a comparable
technique to prevent a concurrent call of __NEW. How-
ever, this results in a higher jitter when __NEW is applied

Reference, programming
extensively.
We recommend that you call __NEW operators in one task
only.

See also
● ⮫ Chapter Dialog 'Properties - Application Build Options' on page 1053
● ⮫ Chapter Object 'DUT' on page 815
● ⮫ Chapter ‘Function block’ object on page 823
● ⮫ Chapter Attribute 'enable_dynamic_creation' on page 614
● ⮫ Chapter 32.11.160 Compiler Error C0509 on page 732

32.3.73 Operator '__QUERYINTERFACE'


This operator is an extension of the IEC 61131-3 standard.
At runtime, the operator executes a type conversion of an interface reference
into another type. The operator returns a BOOL result. TRUE means that PLC
Engineering has performed the conversion successfully.
__QUERYINTERFACE(<ITF_Source>,<ITF_Dest>);
1.Operand: Interface reference or FB interface
2.Operand: Interface reference with required target type
The requirement for the explicit conversion is that both the ITF_Source and
ITF_Dest are derived from Interface __System.IQueryInterface. This
interface is implicitly available does not require a library.

Example
INTERFACE ItfBase EXTENDS __System.IQueryInterface
METHOD mbase : BOOL
END_METHOD

INTERFACE ItfDerived1 EXTENDS ItfBase


METHOD mderived1 : BOOL
END_METHOD

INTERFACE ItfDerived2 EXTENDS ItfBase


METHOD mderived2 : BOOL
END_METHOD

FUNCTION_BLOCK FB1 IMPLEMENTS ItfDerived1


METHOD mbase : BOOL
mbase := TRUE;
END_METHOD
METHOD mderived1 : BOOL
mderived1 := TRUE;
END_METHOD

R911403764, Edition 08 Bosch Rexroth AG


528 / 1158 ctrlX PLC Engineering
Operators

END_FUNCTION_BLOCK

FUNCTION_BLOCK FB2 IMPLEMENTS ItfDerived2


METHOD mbase : BOOL
mbase := FALSE;
END_METHOD
METHOD mderived2 : BOOL
mderived2 := TRUE;
END_METHOD
END_FUNCTION_BLOCK

PROGRAMM POU
VAR
inst1 : FB1;
inst2 : FB2;
itfbase1 : ItfBase := inst1;
itfbase2 : ItfBase := inst2;
itfderived1 : ItfDerived1 := 0;
itfderived2 : ItfDerived2 := 0;
xResult1, xResult2, xResult3, xResult4: BOOL;
END_VAR

xResult1 := __QUERYINTERFACE(itfbase1, itfderived1); //


xResult = TRUE, itfderivedi1 <>0
//
references the instance inst1
xResult2 := __QUERYINTERFACE(itfbase1, itfderived2); //
xResult = FALSE, itfderived2 = 0
xResult3 := __QUERYINTERFACE(itfbase2, itfderived1); //
xResult = FALSE, itfderived1 = 0
xResult4 := __QUERYINTERFACE(itfbase2, itfderived2); //
xResult = TRUE, itfderived2 <> 0
//
references the instance inst2

32.3.74 Operator '__QUERYPOINTER'


This operator is an extension of the IEC 61131-3 standard.
At runtime, the operator makes it possible to convert the type of an interface
reference of a function block to a pointer. The operator returns a BOOL result.
TRUE means that PLC Engineering has performed the conversion successfully.
For compatibility, the definition of the pointer to be
NOTICE
converted must be an extension of the base interface
"__SYSTEM.IQueryInterface".
__QUERYPOINTER (<ITF_Source>, <Pointer_Dest>)
The operator receives an interface reference or a FB instance with the required
target types as the first operand and a pointer as the second operand. After
processing __QUERYPOINTER, Pointer_Dest receives the pointer to the refer-
ence or instance of a function block that the ITF_Source interface reference
currently refers to. Pointer_Dest is not typed and can be cast to any type. You
have to make sure of the type. For example, the interface could offer a method
that returns a type code.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 529 / 1158
Operators

32.3.75 Operators '__TRY', '__CATCH', '__FINALLY', '__ENDTRY'


These operators are extended from the IEC 61131-3 standard and they are used
for specific exception handling in IEC code.
Syntax

__TRY
<statements_try>
__CATCH(exec)
<statements_catch>
__FINALLY

Reference, programming
<statements_finally>
__ENDTRY
<statements_next>
When a statement in the __Try operator throws an exception, the application
does not stop. Instead, the application executes the statements in __Catch,
starts the exception handling, and then executes the statements in __FINALLY.
The exception handling ends with __ENDTRY, and the application executes the
subsequent statements.
An IEC variable for an exception has the data type __System.ExceptionCode.

Example
If the statement in __TRY throws an exception, then program execution is
not stopped. Instead, the statement in __CATCH is executed. Therefore, in
this example, the application executes the exc function, then the statement in
__FINALLY, and finally the statement in __ENDTRY.

FUNCTION Tester : UDINT


VAR_INPUT
count : UDINT;
END_VAR
VAR_OUTPUT
strExceptionText : STRING;
END_VAR
VAR
exc : __SYSTEM.ExceptionCode;
END_VAR

__TRY
Tester := tryFun(count := count, testcase := g_testcase); //
This statement is tested. If it throws an exception, then the
statement in __CATCH is executed first, and then the
statement in __FINALLY.
__CATCH(exc)
HandleException(exc, strExceptionText => strExceptionText);
__FINALLY
GVL.g_count := GVL.g_count + 2;
__ENDTRY

See also
● ⮫ Chapter Command 'Stop Execution on Handled Exceptions' on page 952

Data Type '__System.ExceptionCode'


TYPE ExceptionCode :
(
RTSEXCPT_UNKNOWN := 16#FFFFFFFF,

R911403764, Edition 08 Bosch Rexroth AG


530 / 1158 ctrlX PLC Engineering
Operators

RTSEXCPT_NOEXCEPTION := 16#00000000,
RTSEXCPT_WATCHDOG := 16#00000010,
RTSEXCPT_HARDWAREWATCHDOG := 16#00000011,
RTSEXCPT_IO_CONFIG_ERROR := 16#00000012,
RTSEXCPT_PROGRAMCHECKSUM := 16#00000013,
RTSEXCPT_FIELDBUS_ERROR := 16#00000014,
RTSEXCPT_IOUPDATE_ERROR := 16#00000015,
RTSEXCPT_CYCLE_TIME_EXCEED := 16#00000016,
RTSEXCPT_ONLCHANGE_PROGRAM_EXCEEDED := 16#00000017,
RTSEXCPT_UNRESOLVED_EXTREFS := 16#00000018,
RTSEXCPT_DOWNLOAD_REJECTED := 16#00000019,
RTSEXCPT_BOOTPROJECT_REJECTED_DUE_RETAIN_ERROR :=
16#0000001A,
RTSEXCPT_LOADBOOTPROJECT_FAILED := 16#0000001B,
RTSEXCPT_OUT_OF_MEMORY := 16#0000001C,
RTSEXCPT_RETAIN_MEMORY_ERROR := 16#0000001D,
RTSEXCPT_BOOTPROJECT_CRASH := 16#0000001E,
RTSEXCPT_BOOTPROJECTTARGETMISMATCH := 16#00000021,
RTSEXCPT_SCHEDULEERROR := 16#00000022,
RTSEXCPT_FILE_CHECKSUM_ERR := 16#00000023,
RTSEXCPT_RETAIN_IDENTITY_MISMATCH := 16#00000024,
RTSEXCPT_IEC_TASK_CONFIG_ERROR := 16#00000025,
RTSEXCPT_APP_TARGET_MISMATCH := 16#00000026,
RTSEXCPT_ILLEGAL_INSTRUCTION := 16#00000050,
RTSEXCPT_ACCESS_VIOLATION := 16#00000051,
RTSEXCPT_PRIV_INSTRUCTION := 16#00000052,
RTSEXCPT_IN_PAGE_ERROR := 16#00000053,
RTSEXCPT_STACK_OVERFLOW := 16#00000054,
RTSEXCPT_INVALID_DISPOSITION := 16#00000055,
RTSEXCPT_INVALID_HANDLE := 16#00000056,
RTSEXCPT_GUARD_PAGE := 16#00000057,
RTSEXCPT_DOUBLE_FAULT := 16#00000058,
RTSEXCPT_INVALID_OPCODE := 16#00000059,
RTSEXCPT_MISALIGNMENT := 16#00000100,
RTSEXCPT_ARRAYBOUNDS := 16#00000101,
RTSEXCPT_DIVIDEBYZERO := 16#00000102,
RTSEXCPT_OVERFLOW := 16#00000103,
RTSEXCPT_NONCONTINUABLE := 16#00000104,
RTSEXCPT_PROCESSORLOAD_WATCHDOG := 16#00000105,
RTSEXCPT_FPU_ERROR := 16#00000150,
RTSEXCPT_FPU_DENORMAL_OPERAND := 16#00000151,
RTSEXCPT_FPU_DIVIDEBYZERO := 16#00000152,
RTSEXCPT_FPU_INEXACT_RESULT := 16#00000153,
RTSEXCPT_FPU_INVALID_OPERATION := 16#00000154,
RTSEXCPT_FPU_OVERFLOW := 16#00000155,
RTSEXCPT_FPU_STACK_CHECK := 16#00000156,
RTSEXCPT_FPU_UNDERFLOW := 16#00000157,
RTSEXCPT_VENDOR_EXCEPTION_BASE := 16#00002000
RTSEXCPT_USER_EXCEPTION_BASE := 16#00010000
) UDINT ;
END_TYPE

32.3.76 Operator '__VARINFO'


This operator is an extension of the IEC 61131-3 standard.
The operator yields information about a variable. You can save the information
as data structure in a variable of data type __SYSTEM.VAR_INFO.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 531 / 1158
Operators

Syntax in the declaration:

<name of the info variable> : __SYSTEM.VAR_INFO; // Data


structure for info variable
Syntax for the call:

<name of the info variable> := __VARINFO( <variable


name> ); // Call of the operator

Example

Reference, programming
FUNCTION_BLOCK FB_Velocity
VAR_INPUT
rVelocity: REAL := 1.2;
END_VAR
VAR_OUTPUT
END_VAR
VAR
infoVelocity: __SYSTEM.VAR_INFO; //Info of Velocity
END_VAR

infoVelocity := __VARINFO(rVelocity); // Gets the info of


Velocity locally

PROGRAM PLC_PRG
VAR
iCounter : INT := 0; // Counts the calls
infoCounter : __SYSTEM.VAR_INFO; //Info of Counter
arrA : ARRAY [1..2, 1..2, 1..2] OF INT := [0, 1, 2, 3, 4,
5, 6, 7]; // Stores the A data
infoA : __SYSTEM.VAR_INFO; //Info of A
fbVel : FB_Velocity;
END_VAR

iCounter := iCounter + 1;
infoCounter := __VARINFO(iCounter);
infoA := __VARINFO(arrA);
fbVel();
The iCounter and arrA variables are recognized in the application code.
The variable information is saved in the infoCounter and infoA variables.
Moreover, the FB_Velocity function block is instantiated.

Data type __SYSTEM.VAR_INFO


Name Data type Initialization Description
ByteAddres DWORD 0 Address of the variable
s Example: 16#072E35EC
Note: For bit access of a variable
<variable name>.<bit index>, the
address of the variable that contains
the bit is given.

R911403764, Edition 08 Bosch Rexroth AG


532 / 1158 ctrlX PLC Engineering
Operators

Name Data type Initialization Description


ByteOffset DWORD 0 Offset of the variable address (in
bytes).
Example: 13936 bytes.
Note: If the variable is global, then the
offset is relative to the beginning of
the area. If the variable is a local vari-
able in a function or method, then the
offset is relative to the current stack
frame. If the variable is a local variable
in a function block, then the offset is
relative to the function block instance.
Area DINT 0 Memory area number Area in the run-
time system.
Example: -1: Means that the variable is
not global in the memory, but relative
to an instance or on the stack.
Note: The memory areas are device-
dependent.
BitNr INT 0 Number of bits (in bytes)
Example: 16#00FF bytes
Note: If the variable is not an integer
data type, then: BitNr = -1 =
16#FFFF.
BitSize INT 0 Memory size of the variable (in bits)
Example: 16 bits
BitAddress UDINT 0 Bit address of the variable
Requirement: The variable is located
in the input memory area I, output
memory area Q, or marker memory
area M. Otherwise the value is unde-
fined.
TypeClass TYPE_CLASS TYPE_BOOL Data type class of the variable
Example: TYPE_INT, TYPE_ARRAY
Note: For user-defined data types
or function block instances,
TYPE_USERDEF is output as the data
type class.
TypeName STRING(79) '' Date type name of the variable as
STRING(79)
Note: For user-defined data types, the
function block name or the DUT name
is output.
Example: 'INT', 'ARRAY'
NumElement UDINT 0 Number of array elements
s Requirement: The variable has the data
type ARRAY.
Example: 8

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 533 / 1158
Operators

Name Data type Initialization Description


BaseTypeCl TYPE_CLASS TYPE_BOOL Elementary basic data type of the array
ass elements.
Requirement: The variable has the data
type ARRAY.
Example: TYPE_INT for arrA : ARRAY
[1..2,1..2,1..2] OF INT;
ElemBitSiz UDINT 0 Memory size of the array element (in
e bits)

Reference, programming
Requirement: The variable has the data
type ARRAY.
Example: 16 bits for arrA : ARRAY
[1..2,1..2,1..2] OF INT;
MemoryArea MEMORY_ARE MEM_MEMORY Information about the memory area
A ● MEM_GLOBAL: Global memory area
For example in Area 0
● MEM_LOCAL: Local memory area
in Area -1
● MEM_MEMORY: Marker memory area
%M
For example in 16#10 in Area 1
● MEM_INPUT: Input memory area %I
For example in 16#04 in Area 2
● MEM_OUTPUT: Output memory area
%Q
For example in 16#08 in Area 3
● MEM_RETAIN: Retain memory area
For example in 16#20 in Area 0
Example: MEM_GLOBAL
Note: The memory area configuration
is device-dependent.
Symbol STRING(39) '' Variable name as STRING(39)
Example: 'iCounter', 'arrA'
Comment STRING(79) '' Comment of the variable declaration
Example: 'Counts the calls' or
'Stores the A data'

32.3.77 Operator '__CURRENTTASK'


This operator is an extension of the IEC 61131-3 standard.
In runtime mode, the operator provides information about the IEC task that is
currently running.
The operator is supported only on target systems in which the target system
setting memory-layout\max-stack-size is set to a value > 0.
The operator allows for access to a structure with two variables:
● TaskIndex: Zero-based index that identifies the task
● pTaskInfo: Detailed information about the currently running task. It can be
assigned to a POINTER TO Task_Info2 from the library CmpIecTask.
The operator cannot be used in the declaration of a POU. This would result
in an error message. If the current task cannot be determined, then the
TaskIndex -1 and the pTaskInfo are zero.

R911403764, Edition 08 Bosch Rexroth AG


534 / 1158 ctrlX PLC Engineering
Operators

Example
//Declaration
VAR
idx : INT;
pInfo : POINTER TO Task_Info2;
END_VAR

//Program code

idx := __CURRENTTASK.TaskIndex;
pInfo := __CURRENTTASK.pTaskInfo;

32.3.78 Operator '__COMPARE_AND_SWAP


The multicore operator is an extension of the IEC 61131-3 standard.
The operator can be used for implementing a semaphore, for example to guar-
antee exclusive access to a variable written to by different tasks.
__COMPARE_AND_SWAP gets a pointer to a data type __XWORD variable,
an old value, and a new value as its input (example: bMutex :=
__COMPARE_AND_SWAP(ADR(dwSynch), dwOld, dwNew);). The old and new
values can also be data type __XWORD variables. The referenced __XWORD vari-
able is compared with the old value and if both are equal, then the new value
is written. The result of the function is TRUE when the new value could be
written.
The compiler automatically replaces the data type __XWORD with DWORD on
32-bit systems and LWORD on 64-bit systems.
This operation is atomic, so it cannot be interrupted by another task, even on
multicore platforms.

Example
The following example shows a typical usage. Exclusive access to a type
STRING variable, which is addressed via the pstrOutput pointer, should be
implemented.
The access to a string is not atomic. If multiple tasks write to the same string
at the same time, then the contents may be inconsistent.
With this function, it is now possible to write the same STRING variable in
different tasks.
FUNCTION ExclusiveStringWrite : BOOL
VAR_INPUT
strToWrite : STRING;
pstrOutput : POINTER TO STRING;
END_VAR
VAR_STAT
dwSynch : __XWORD;
END_VAR
VAR
bMutex: BOOL;
END_VAR

bMutex:= __COMPARE_AND_SWAP(ADR(dwSynch), 0, 1);


(* compare with 0 and write 1 as atomic operation *)
IF bMutex THEN // bMutex is TRUE if write could
be done
pstrOutput^ := strToWrite; // Now you can write
safely on the string

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 535 / 1158
Operators

dwSynch := 0; // The __XWORD


variable must be reset.
ExclusiveStringWrite := TRUE; // Writing was successful
ELSE
ExclusiveStringWrite := FALSE; // Writing was not
successful
END_IF

Also refer to
● ⮫ Chapter 32.3.13 Multicore operators on page 458

Reference, programming
● ⮫ Chapter 32.3.82 Operator 'TEST_AND_SET' on page 537

32.3.79 Operator '__XADD'


The multicore operator is an extension of the IEC 61131-3 standard.
The operator can be used for implementing an atomic counter. If an integer
variable is incremented by means of ordinary addition, for example iTest :=
iTest + 1;, then this operation is not executed atomically. Another access to
the variable could take place between reading and writing the variable.
If the counter is incremented in multiple tasks, then the counter result can be
less than the number of counting cycles. So if two tasks execute the above
code one time and the variable previously had the value 0, then the variable
can then have the value 1. This is especially problematic if arrays are being
processed in multiple tasks and a unique index is required for the array in each
processing cycle.
When the __XADD operator is called, it gets a pointer to a type DINT variable
as the first summand and a type DINT value as the second summand. __XADD
returns the old value of the first summand and in the same step adds the
second summand to the first summand.
For example, the function call can be: diOld := __XADD(ADR(diVar),
deAdd);

Example
The following example shows a typical usage. An array should be populated
from two tasks. In the process, all positions in the array should be used and
no position should be overwritten.
With this function, multiple tasks can populate a Boolean array.
FUNCTION WriteToNextArrayPosition : BOOL
VAR_EXTERNAL
g_diIndex : DINT; // Index and array are globally defined
and used by multiple tasks
g_boolArray : ARRAY [0..1000] OF BOOL;
END_VAR
VAR_INPUT
bToWrite : BOOL;
END_VAR
VAR
diIndex : DWORD;
END_VAR

diIndex := __XADD(ADR(g_diIndex), 1); // Returns a unique


index
WriteToNextArrayPosition := FALSE;
IF (diIndex >= 0 AND diIndex <= 1000) THEN
g_boolArray[diIndex] := bToWrite; //Writes to

R911403764, Edition 08 Bosch Rexroth AG


536 / 1158 ctrlX PLC Engineering
Operators

unique index
WriteToNextArrayPosition := TRUE; // TRUE: Array
was not full yet
END_IF

Also refer to
● ⮫ Chapter 32.3.13 Multicore operators on page 458

32.3.80 Operator '__POSITION'


The operator is an extension of the IEC 61131-1 standard.
At runtime, the operator yields the position of a variable in the declaration part
or in the implementation part of a POU. The operator has to be assigned the
variables of type STRING in the declaration part or in the implementation part.
Result of __POSITION
● Declaration part: 'Line <line number> (Decl)'
● Implementation part: 'Line <line number>, Column <column number>
(Impl)'

Example
PROGRAM PROG1
VAR
strPOS : STRING := __POSITION(); //Yields the line number
of this declaration
strlocalPOS : STRING;
END_VAR

strlocalPOS := __POSITION(); //Yields the line and


column number of this assignment

32.3.81 Operator '__POUNAME'


The operator is an extension of the IEC 61131-1 standard.
At runtime, the operator yields the name of the POU that contains the operator
__POUNAME. The result is of type STRING.
The result of __POUNAME depends where it is used:
● In a program: program name
● In a function name: function name
● In a function block: function block name
● In a method: the method name qualified with the FB name
● In a Get/Set accessor of a property: the property name + Get/Set qualified
with the FB name
● In a GVL: GVL name
● In a structure: structure name
● In a data structure UNION: union name

Example
PROGRAM PROG1
VAR
strPOU : STRING := __POUNAME(); //Yields 'PROG1'
strlocalPOU : STRING;
END_VAR

strlocalPOU := __POUNAME(); //Yields 'PROG1'

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 537 / 1158
Operators

32.3.82 Operator 'TEST_AND_SET'


The multicore operator is an extension of the IEC 61131-3 standard.
The operator can be used to implement a semaphore, for example to guarantee
exclusive access to a variable written by different tasks.
TEST_AND_SET gets a type DWORD variable as its input. Write access to this
variable must be possible. The variable is set to 1 and the previous value is
returned as the result.
The operation is atomic, which means that it cannot be interrupted by another
task. This also applies to multicore platforms.

Reference, programming
For example, the call in the program is dwOldValue := TEST_AND_SET(dw);,
in which the variables dwOldValue and dw must be of data type DWORD.

Example
The following example shows a typical usage. An exclusive access to a variable
of type STRING is to be implemented, which is addressed via the pointer
pstrOutput. The access to a string is not atomic. If multiple tasks write to the
same string at the same time, then the contents may be inconsistent. With the
TEST_AND_SET function, it is now possible to write the same STRING variable
in different tasks.
FUNCTION ExclusiveStringWrite : BOOL
VAR_INPUT
strToWrite : STRING;
pstrOutput : POINTER TO STRING;
END_VAR
VAR_STAT
dwSynch : DWORD;
END_VAR
VAR
dwOldValue: DWORD;
END_VAR

dwOldValue := TEST_AND_SET(dwSynch); // Write the 1 and read


the old value at the same time
IF dwOldValue = 0 THEN // 0 means: no other task is
currently writing
pstrOutput^ := strToWrite; // Now you can write
safely on the string
dwSynch := 0; // The DWORD must be reset
ExclusiveStringWrite := TRUE; // Writing was successful
ELSE
ExclusiveStringWrite := FALSE; // Writing was not
successful

Also refer to
● ⮫ Chapter 32.3.78 Operator '__COMPARE_AND_SWAP on page 534
● ⮫ Chapter 32.3.13 Multicore operators on page 458

32.3.83 Operator - Global Namespace


This operator is an extension of the IEC 61131-3 standard.
An instance path that begins with a dot (.) always opens a global namespace.
If there is a local variable that has the same name <varname> as a global
variable, then you refer to the global variable as .<varname>.

R911403764, Edition 08 Bosch Rexroth AG


538 / 1158 ctrlX PLC Engineering
Operators

32.3.84 Operator - Namespace for Global Variables Lists


This operator is an extension of the IEC 61131-3 standard.
You can use the name of a global variables list (GVL) as a namespace identifier
for the variables that are defined in the list. This makes is possible to use
variables with the same name in different global variables lists and still access
specific variables uniquely. You use a dot (.) to prepend the name of the global
variables list to the variable name.
<global variable list name>.<variable>

Example
globlist1.varx := globlist2.varx;
The globlist1 and globlist2 global variables lists each contain a varx
variable. PLC Engineering copies the varx global variable from the globlist2
list to varx in the globlist1 list.

If you reference a variable that is declared in several global variables lists


without referencing the prepended list name, then an error message is printed.

32.3.85 Operator - Library Namespace


The operator is an extension of the IEC 61131-3 standard.
Sxntax: <Library namespace>.<Library function block identifier>
Example: LIB_A.FB_A
A library module identifier is appended with the library namespace (as a prefix
separated by a dot) for unique and qualified access to the library module. The
namespace usually coincides with the library name.

Example
A library is included in a project and contains the module FB_A. However,
the function block with the same name is already available locally in the
project. Identify the library module as LIB_A.FB_A in order to access the
library module, not the local function block.

var1 := FB_A(in := 12); // Call of the project function FB_A


var2 := LIB_A.FB_A(in := 22); // Call of the library function
FB_A

You can define another identifier for the namespace. To do this, specify a name-
space in the project information (library developers: when creating a library
project). As an alternative, you can specify a specific namespace for a library
in the Library Manager in the “Properties” dialog (application developers: when
creating an application).
Also refer to
● ⮫ Chapter 27 Using libraries on page 329
● ⮫ Chapter 'Placeholder' command on page 1010
● ⮫ Chapter 33.2.19 "Library manager” object on page 780

32.3.86 Operator - Enumeration Namespace


This operator is an extension of the IEC 61131-3 standard.
You can use the TYPE name of an enumeration for unique access to an enumer-
ation constant. In this way, you can use the same constant names in different
enumerations.
The enumeration name is prepended to the constant name with a dot (.).
<enumeration name>.<constant name>

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 539 / 1158
Operators

Example
The constant Blue is a component of both the enumeration Colors and the
enumeration Feelings.
color := Colors.Blue; // Access to component blue in
enumeration Colors

feeling := Feelings.Blue; // Access to component blue in


enumeration Feelings

Reference, programming
32.3.87 Operator '__POOL'
The operator is an extension of the IEC 61131-3 standard.
The operator is used to reference objects which are managed in the global
POU pool (in the “POUs” view). The operator directly accesses objects in the
“POUs” view.

Example

PROGRAM PLC_PRG
VAR
svar_pou : STRING;
END_VAR

svar_pou := __POOL.POU();

See also
● ⮫ Chapter 32.8 Shadowing rules on page 656

32.3.88 'INI’ operator


The INI operator is a CoDeSys V2.3 operator. In PLC Engineering V3, the
FB_init method replaces the INI operator. You can still use this operator in
projects that are imported from CoDeSys V2.3.
The INI operator is used for initializing retain variables of a function block
instance used in a POU.
Assign the operator to a Boolean variable.
Syntax:
<boolean variable name> := INI <FB instance name> , <boolean
value> );
<boolean value> : TRUE | FALSE
If the second parameter of the operator is TRUE, PLC Engineering initializes all
retain variables defined in the <FB instance name> function block.

R911403764, Edition 08 Bosch Rexroth AG


540 / 1158 ctrlX PLC Engineering
Operands

Examples
fbinst is the instance of the function block fb1, where the retain variable
retvar is defined.
ST:

Deklaration im Baustein:

VAR
fbinst : fb1;
b : BOOL;
END_VAR

Programmteil:

b := INI(fbinst, TRUE);
ivar := fbinst.retvar; (* => retvar is initialized *)
FDB

Also refer to
● ⮫ Chapter 32.10.1 Methods 'FB_Init', 'FB_Reinit', and 'FB_Exit' on page 660
● ⮫ Chapter 18.22 Data persistence on page 211

32.4 Operands
32.4.1 Operands – General information
Constants and literals
Constants are identifiers for unchanging values. You can declare constants
locally within a programming block or globally within a global variable list. The
declaration section is extended with the keyword CONSTANT for this purpose.
Constants are also strings that represent the value of a base type such as inte-
gers or floating point numbers, for example, 16#FFFF_FFFF, T#5s, or -1.234
E-5. To distinguish them, such constants are also called literals, literal con-
stants, or unnamed constants. There are logical (TRUE, FALSE) or numeric
literals(3.1415, T#5s), but also character literals ('Hello world!', "black").
Syntax Deklaration

<scope> CONSTANT
<identifier> : <data type> := <initial value> ;
END_VAR

<scope> : VAR | VAR_INPUT | VAR_STAT | VAR_GLOBAL


<data type>: <elementary data type | user defined data type |
function block >
<initial value> : literal value | identifier | expression

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 541 / 1158
Operands

Allowed initial values:


● Literal, for example TRUE, FALSE, 16#FFFF_FFFF
● Specified constant declared elsewhere
● Simple expression from literals, also combined with simple operators such
as + - *
Inputs or function calls cannot be specified as initial values.

Example

VAR_GLOBAL CONSTANT

Reference, programming
g_ciMAX_A : INT := 100;
g_ciSPECIAL : INT := g_ciMAX_A - 10;
END_VAR

Constants are only described in the declaration. The assignment of an initial


value is mandatory. Within an implementation, constants are read only and
therefore always appear to the right of the assignment operator in an instruc-
tion.
The constants are replaced by the initial value when the code is compiled. It
also has to be possible to calculate the initial value at compile time.
Constants of structured or user-defined types are calculated only at runtime.
Structured constants in programs or GVLs are calculated once at program
start. Structured constants in functions or methods are calculated each time
the function or method is called. The initialization of structured constants can
thus depend on inputs or execute function calls.
Also refer to
● ⮫ Chapter 32.4.4 BOOL Constants on page 541
● ⮫ Chapter 32.4.5 Numerical constants on page 542
● ⮫ Chapter 32.4.6 REAL/LREAL Constants on page 542
● ⮫ Chapter 32.4.7 String Constants on page 543
● ⮫ Chapter 32.4.9 Date and Time Constants on page 546
● ⮫ Chapter 32.4.8 TIME/LTIME Constant on page 544
● ⮫ Chapter 32.4.10 Typed Literals on page 549

32.4.2 Operands – Variables


You declare variables as local or global in the declaration part of a POU or in a
global variable list. The position where a variable can be used depends on its
data type.
Also refer to
● ⮫ Chapter 32.4.11 Access to Variables in Arrays, Structures, and Blocks
on page 550
● ⮫ Chapter 32.4.12 Bit Access in Variables on page 550

32.4.3 Operands – Other


● ⮫ Chapter 32.4.13 Addresses on page 552
● ⮫ Chapter 32.4.14 Functions on page 554

32.4.4 BOOL Constants


BOOL constants are the truth values TRUE (1) and FALSE (0).
See also
● ⮫ Chapter 32.5.5 Data Type 'BOOL' on page 556

R911403764, Edition 08 Bosch Rexroth AG


542 / 1158 ctrlX PLC Engineering
Operands

32.4.5 Numerical constants


Numeric values can be binary, octal, decimal, and hexadecimal numbers. If an
integer value is not a decimal number, then you must write its base followed
by the number sign (#) before the integer constant. You enter the hexadecimal
digit values for the numbers 10 to 15 as usual with the letters A-F.
You can use an underscore within a numeric value.

Examples:
14 Decimal number
2#1001_0011 Binary number
8#67 octal number
16#A Hexadecimal number
DINT#16#A1 Combined typed data type DINT# and base 16#

The type of numeric value can be BYTE, WORD, DWORD, SINT, USINT, INT, UINT,
DINT, UDINT, REAL, or LREAL.
Implicit conversions from "larger" to "smaller" types are not permitted. You
cannot simply use a DINT variable as an INT variable. For this, you have to use a
type conversion function.
Also refer to
● ⮫ Chapter 32.3 Operators on page 454
● ⮫ Chapter 32.4.10 Typed Literals on page 549

As number constants basically are treated as integers, in divisions you must


enter a constant in the format of a floating-point number in order not to loose
the remainder. For example: Division 1/10 results in 0, division 1.0/10 results
in 0.1.

32.4.6 REAL/LREAL Constants


You can specify floating-point numbers as REAL and LREAL constants either
in decimal notation or exponential notation with mantissa and exponent The
decimal point serves as the decimal separator according to the International
System of Units (English).
Syntax of exponential notation

<significand> e | E <exponent>

exponent : -44..38 // REAL


exponent : -324..308 // LREAL

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 543 / 1158
Operands

Example
Table 14: REAL literal
7.4 Decimal number. 7,4 with a comma returns a com-
piler error
1/3.0 Decimal fraction for 0.333333343
Note: In the case of division of integer types, the
result remains an integer type. In this case, the
value is rounded. For example, 1/3 yields 0 as the
result.

Reference, programming
1.64e+009 Exponential notation
-3.402823e+38 Smallest number
-1E-44 Largest negative number
1.0E-44 Smallest positive number
3.402823e+38 Largest number
Table 15: LREAL literal
-1.7976931348623157E+3 Smallest number
08
-4.94065645841247E-324 Largest negative number
4.94065645841247E-324 Smallest positive number
1.7976931348623157E+3 Largest number
08

See also
● ⮫ Chapter 32.5.7 Data Type 'REAL' / 'LREAL' on page 557

32.4.7 String Constants


A string constant is a character string enclosed in single straight quotation
marks. The characters are coded according to the character set specified in
ISO/IEC 8859-1. Therefore, a string constant can include spaces and accented
characters, as these belong to this character set. This is also referred to as a
string literal, or simply a string.
Example: 'Hello world!'
When a dollar sign ($) is in a string constant, the following two characters are
interpreted as a hexadecimal code according to the coding in ISO/IEC 8859-1.
The code also corresponds to ASCII code. In addition, please note the special
cases.
Table 16: Hexadecimal code
String with $ code Interpretation
'$<8-bit code>' 8-bit code: Two-digit hexadecimal number that is
interpreted according to ISO/IEC 8859-1.
'$41' A
'$A9' ©
'$40' @
'$0D' Control character: Line break (corresponds to
'$R')
'$0A' Control character: New line (corresponds to '$L'
and '$N')

R911403764, Edition 08 Bosch Rexroth AG


544 / 1158 ctrlX PLC Engineering
Operands

Table 17: Special cases


String with $ code Interpretation
'$L', ' $l' Control character: Line feed (corresponds to
'$0A')
'$N', '$n' Control character: New line (corresponds to
'$0A')
'$P', '$p' Control character: Form feed
'$R', '$r' Control character: Line break (corresponds to
'$0D')
'$T', '$t' Control character: Tab
'$$' Dollar sign: §
'$'' Single straight quotation mark: '

Example
Constant declaration

VAR CONSTANT
constA : STRING := 'Hello world';
constB : STRING := 'Hello world $21'; // Hello world!
END_VAR

32.4.8 TIME/LTIME Constant


You can use TIME constants to operate the standard timer modules. The con-
stant has a size of 32 bits and a resolution in milliseconds.
In addition, the time constant LTIME is available as a time basis for high-resolu-
tion timers. The LTIME constant has a dimension of 64 bits and a resolution in
nanoseconds.

TIME constant
Syntax

<time keyword> # <length of time>

<time keyword> : TIME | time | T | t


<length of time> : ( <number of days>d )? ( <number of
hours>h )? ( <number of minutes>m )? ( <number of seconds>s )?
(<number of milliseconds>ms)? // ( ...)? Optional
The order of time units must not be changed. However, it is not required to
specify all units. It is permitted to specify the units in uppercase.
Time units
● D | d: Days
● H | h: Hours
● M | m: Minutes
● s | s: Seconds
● MS | ms: Milliseconds

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 545 / 1158
Operands

Examples
Correct time constants of an ST assignment

VAR
timLength : TIME := T#14ms;
timLength1 : TIME := T#100s12ms; // Overflow in the highest
unit is allowed.
timLength2 : TIME := T#12h34m15s;
timCompare : TIME;
xIsOK: BOOL;

Reference, programming
timLongest := T#49D17H2M47S295MS; // 4294967295
END_VAR

IF timLength < T#15MS THEN


IF timCompare < timLength1 THEN
xIsOK := TRUE;
END_IF;
END_IF
Table 18: Incorrect usage:
timIncorrect := t#5m68s; Overflow at a lower position
timIncorrect1 := 15ms; Time marker T# missing
timIncorrect2 := t#4ms13d; Incorrect order of time units

LTIME constant
Syntax

<long time keyword> # <length of high resolution time>

<long time keyword> : LTIME | ltime


<length of high resolution time> : <length of time> ( <number
of microseconds>us )? ( <number of nanoseconds>ns )? //
( ...)? Optional
You can use the same units for LTIME constants as for TIME constants. You
can also specify microseconds and nanoseconds because the specified time is
calculated in higher time resolution. LTIME literals are treated internally as data
type LWORD and therefore the value resolved in nanoseconds.
Additional time units
● US | us: Microseconds
● NS | ns: Nanoseconds

Examples of correct usage of an ST assignment:

PROGRAM PLC_PRG
VAR
ltimLength := LTIME#1000d15h23m12s34ms2us44ns;
ltimLength1 := LTIME#3445343m3424732874823ns;
END_VAR

See also
● ⮫ Chapter 32.5.9 Data Type 'TIME' on page 559
● ⮫ Chapter 32.4.9 Date and Time Constants on page 546

R911403764, Edition 08 Bosch Rexroth AG


546 / 1158 ctrlX PLC Engineering
Operands

32.4.9 Date and Time Constants


32-bit date specifications 'DATE'
Use the keyword DATE (D) to specify a date.
Syntax

<date keyword>#<year>-<month>-<day>

<date keyword> : DATE | date | D | d


<year> : 1970-2106
<month> : 1-12
<day> : 1-31

DATE literals are treated internally as data type DWORD, which corresponds to an
upper limit of DATE#2106-2-7.

Example

PROGRAM PRG_Date
VAR
dateStart : DATE := DATE#2018-8-8;
dateEnd : DATE := D#2018-8-31;
dateCompare: DATE := date#1996-05-06;
xIsDuringTheTime: BOOL;

dateEarliest : DATE := d#1970-1-1; // = 0


dateLatest : DATE := DATE#2106-2-7; // = 4294967295
END_VAR

IF dateStart < dateCompare THEN


IF dateCompare < dateEnd THEN
xIsDuringTheTime := TRUE;
END_IF;
END_IF

64-bit date specifications 'LDATE'


Use the keyword LDATE (LD) to specify a date.
Syntax

<date keyword>#<year>-<month>-<day>

<date keyword> : LDATE | ldate | LD | ld


<year> : 1970-2262
<month> : 1-12
<day> : 1-31

LDATE literals are treated internally as data type LWORD, which corresponds to
an upper limit of DATE#2554-7-21.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 547 / 1158
Operands

Example

PROGRAM PRG_Ldate
VAR
ldateStart : LDATE := LDATE#2018-8-8;
ldateEnd : LDATE := ldate#2018-8-31;
ldateCompare: LDATE := LD#1996-05-06;
xIsDuringTheTime: BOOL;

ldateEarliest : LDATE := ld#1970-1-1; // = 0

Reference, programming
ldateLatest : LDATE := LDATE#2262-4-10; // =
16#7FFF63888C620000

lwValue: LWORD;
END_VAR

IF ldateStart < ldateCompare THEN


IF ldateCompare < ldateEnd THEN
xIsDuringTheTime := TRUE;
END_IF;
END_IF
lwValue := LDATE_TO_LWORD(ldateCompare);

32-bit date and time specifications 'DATE_AND_TIME'


Use the keyword DATE_AND_TIME (DT) to specify a date and time.
Syntax

<date and time keyword>#<date and time value>

<date and time keyword> : DATE_AND_TIME | date_and_time | DT |


dt
<date and time value> : <year>-<month>-<day>-
<hour>:<minute>:<second>
<year> : 1970-2106
<month> : 1-12
<day> : 1-31
<hour> : 0-24
<minute> : 0-59
<second> : 0-59
DATE_AND_TIME literals are treated internally as data type DWORD. The time is
processed in seconds and as a result can take on values from January 1, 1970
00:00 to February 7, 2106 06:28:15.

R911403764, Edition 08 Bosch Rexroth AG


548 / 1158 ctrlX PLC Engineering
Operands

Example

PROGRAM PLC_PRG
VAR
dtDate : DATE_AND_TIME := DATE_AND_TIME#1996-05-06-15:36:30;
dtDate1: DATE_AND_TIME := DT#1972-03-29-00:00:00;
dtDate2: DATE_AND_TIME := DT#2018-08-08-13:33:20.5;

dtEarliest : DATE_AND_TIME :=
DATE_AND_TIME#1979-1-1-00:00:00; // 0
dtLatest : DATE_AND_TIME :=
DATE_AND_TIME#2106-2-7-6:28:15; // 4294967295
END_VAR

64-bit date and time specifications 'LDATE_AND_TIME'


Use the keyword LDATE_AND_TIME (LDT) to specify a date and time.
Syntax

<date and time keyword>#<long date and time value>

<date and time keyword> : LDATE_AND_TIME | ldate_and_time |


LDT | ldt
<date and time value> : <year>-<month>-<day>-
<hour>:<minute>:<second>
<year> : 1970-2106
<month> : 1-12
<day> : 1-31
<hour> : 0-24
<minute> : 0-59
<second> : 0-59 LDATE_AND_TIME#2262-4-10-23:59:59.99999999
DATE_AND_TIME literals are treated internally as data type LWORD. The time is
processed in seconds and as a result can take on values from January 1, 1970
00:00 to July 21, 2554 23:59:59.999999999.

Example

PROGRAM PLC_PRG
VAR
ldtDate : LDATE_AND_TIME :=
LDATE_AND_TIME#1996-05-06-15:36:30;
ldtDate1: LDATE_AND_TIME := LDT#1972-03-29-00:00:00;
ldtDate2: LDATE_AND_TIME := LDT#2018-08-08-13:33:20.5;

dtEarliest : LDT := LDT#1979-1-1-00:00:00; // 0


dtLatest : LDT := LDT#2266-4-10-23:59:59; // =
16#7FFF63888C620000
END_VAR

32-bit time specifications 'TIME_OF_DAY'


Use the keyword TIME_OF_DAY (TOD) to specify a time.
Syntax

<time keyword>#<time value>

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 549 / 1158
Operands

<time keyword> : TIME_OF_DAY | time_of_day | TOD | tod


<time value> : <hour>:<minute>:<second>
<hour> : 0-23
<minute> : 0-59
<second> : 0.000-59.999
You can also specify fractions of a second. TIME_OF_DAY literals are treated
internally as DWORD and the value is resolved in milliseconds.

Examples

PROGRAM POU

Reference, programming
VAR
todClockTime : TIME_OF_DAY := TIME_OF_DAY#15:36:30.123;
todEarliest : TIME_OF_DAY := TIME_OF_DAY#0:0:0.000;
todLatest : TOD := TOD#23:59:59.999;
END_VAR

64-bit time specifications 'LTIME_OF_DAY'


Use the keyword LTIME_OF_DAY (LTOD) to specify a time.
Syntax

<time keyword>#<time value>

<time keyword> : LTIME_OF_DAY | ltime_of_day | LTOD | ltod


<time value> : <hour>:<minute>:<second>
<hour> : 0-23
<minute> : 0-59
<second> : 0.000-59.999999999
You can also specify fractions of a second. LTIME_OF_DAY literals are treated
internally as LWORD and the value is resolved in nanoseconds.

Examples

PROGRAM POU
VAR
ltodClockTime : LTIME_OF_DAY :=
TIME_OF_DAY#15:36:30.123456789;
todEarliest : TIME_OF_DAY := TIME_OF_DAY#0:0:0;
todLatest : TOD := TOD#23:59:59.999999999;
END_VAR

See also
● ⮫ Chapter 32.5.11 Date and Time Data Types on page 559

32.4.10 Typed Literals


With the exception of REAL/LREAL constants (LREAL is always used here), PLC
Engineering uses the smallest possible data type when calculating with IEC
constants. If you want to use another data type, then you can use typed literals
without having to declare the constants explicitly. When doing this, provide the
constants with a prefix that indicates the type.
Syntax:
<type>#<literal>

R911403764, Edition 08 Bosch Rexroth AG


550 / 1158 ctrlX PLC Engineering
Operands

<type> defines the desired data type; possible values: BOOL, SINT, USINT,
BYTE, INT, UINT, WORD, DINT, UDINT, DWORD, REAL, LREAL. You must capitalize
the entire type name.
<literal> defines the constants. The entry must match the data type defined
in <Type>.

Example:
var1 := DINT#34;

If PLC Engineering cannot convert the constant into the target type without
data loss, then an error message is issued.
You can use typed constants wherever you can use normal constants.

32.4.11 Access to Variables in Arrays, Structures, and Blocks


Syntax for access to
● Two-dimensional array component: <array name> [ <1st dimension> ,
<2nd dimension> ]
● Structural variable: <structure name> . <component name>
● Function block and program variable: <function block name> |
<program name> . <variable name>
See also
● ⮫ Chapter 32.5.18 Data Type 'ARRAY' on page 569
● ⮫ Chapter 32.5.20 Structure on page 583
● ⮫ Chapter ‘Function block’ object on page 823
● ⮫ Chapter 'Program’ object on page 822

32.4.12 Bit Access in Variables


Implement concurrent bit access by two tasks only if
NOTICE
the processor can execute bit access directly on the
memory. All x86 and x64 systems have commands for
bit access in memory. Systems such as ARM and PPC
cannot access bits directly in the memory.
If two tasks execute bit access simultaneously, even
though the processor cannot perform bit access directly
in the memory, then proceed as follows. Use a sema-
phore (SysSemEnter) or a similar technique to prevent
competing bit access. However, it is best to execute the
bit access within a task.
With index access, individual bits can be addressed in integer variables. Using a
structure variable or a function block instance, individual bits can be addressed
symbolically.

Index access to bits integer variables


You can address individual bits in integer variables. To do this, append the
variable with a dot and the index of the addressed bit. The bit-index can be
given by any constant. Indexing is 0-based.
Syntax
<integer variable name> . <index>
<integer data type> = BYTE | WORD | DWORD | LWORD | SINT |
USINT | INT | UINT | DINT | UDINT | LINT | ULINT

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 551 / 1158
Operands

Example
In the program, the third bit of the variable wA is set to the value of variable
xB. The constant c_usiENABLE acts as an index to access the third bit of the
variable iX.
Index access

PROGRAM PLC_PRG
VAR
wA : WORD := 16#FFFF;

Reference, programming
xB : BOOL := 0;
END_VAR

// Index access in an integer variable


wA.2 := xB;
Result: wA = 2#1111_1111_1111_1011 = 16#FFFB
Constant as index

// GVL declaration
VAR_GLOBAL CONSTANT
gc_usiENABLE : USINT := 2;
END_VAR

PROGRAM PLC_PRG
VAR
iX : INT := 0;
END_VAR

// Constant as index
iX.gc_usiENABLE := TRUE; // Third bit in iX is set TRUE
Result: iX = 4

Symbolic bit access in structure variables


With the BIT data type, you can combine individual bits into a structure and
then access them individually. Then the bit is addressed with the component
name.

Example
Type declaration of the structure:

TYPE S_CONTROLLER :
STRUCT
bitOperationEnabled : BIT;
bitSwitchOnActive : BIT;
bitEnableOperation : BIT;
bitError : BIT;
bitVoltageEnabled : BIT;
bitQuickStop : BIT;
bitSwitchOnLocked : BIT;
bitWarning : BIT;
END_STRUCT
END_TYPE

R911403764, Edition 08 Bosch Rexroth AG


552 / 1158 ctrlX PLC Engineering
Operands

Declaration and write access to a bit:

PROGRAM PLC_PRG
VAR
ControlDriveA : S_CONTROLLER;
END_VAR

// Symbolic bit access to bitEnableOperation


ControlDriveA.bitEnableOperation := TRUE;

Symbolic bit access in function block instances


In function blocks, you can declare variables for individual bits.

Example
FUNCTION_BLOCK FB_Controller
VAR_INPUT
bitSwitchOnActive : BIT;
bitEnableOperation : BIT;
bitVoltageEnabled : BIT;
bitQuickStop : BIT;
bitSwitchOnLocked : BIT;
END_VAR
VAR_OUTPUT
bitOperationEnabled : BIT;
bitError : BIT;
bitWarning : BIT;
END_VAR
VAR
END_VAR
;

PROGRAM PLC_PRG
VAR
fbController : FB_Controller;
END_VAR
// Symbolic bit access to bitSwitchOnActive
fbController(bitSwitchOnActive := TRUE);

See also
● ⮫ Chapter 32.5.6 Integer Data Types on page 556
● ⮫ Symbolic bit access in structure variables on page 585
● ⮫ Chapter 32.5.14 Data Type 'BIT' on page 565

32.4.13 Addresses
If you use pointers to addresses, then the contents of
CAUTION
addresses can be moved during an online change. If you
use absolute addresses, then the contents of addresses
does not change during an online change.
Syntax:
%<memory area prefix> ( <size prefix> )? <memory position>

<memory area prefix> : I | Q | M

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 553 / 1158
Operands

<size prefix> : X | B | W | D
<memory position> : <number> ( .<number> )* // Depends on the
target system
When defining an address, you use specific character strings to express
memory position and size. An address is marked with the percent sign (%),
followed by the memory range prefix, the optional size prefix, and the memory
range position. The numbering that you use for addressing the memory position
depends on the target system.
Memory
Range

Reference, programming
Prefix
I Input memory range for "Inputs"
For physical inputs via input drivers, "Sensors"
Q Output memory range for "Outputs"
For physical outputs via output drivers, "Actuators"
M Flag memory range
Size Prefix Data Type Data Width
No size prefix Single bit
X Single bit
B BYTE 8 bits
W WORD 16 bits
D DWORD 32 bits

Examples
%QX7.5 Single bit address of the output bit 7.5
%Q7.5
%IW215 Word address of the input word 215
%QB7 Byte address of the output byte 7
%MD48 Address of a double word at memory position
48 in flag memory
%IW2.5.7.1 Word address of an input word; interpretation
dependent on the current controller configura-
tion
VAR wVar AT %IW0 : WORD; END_VAR Variable declaration with address information of
an input word
VAR xActuator AT %QW0 : BOOL; END_VAR Boolean variable declaration
Note: For Boolean variables, one byte is allo-
cated internally if a single bit address is not
specified. A change in the value of xActuator
affects the range from QX0.0 to QX0.7.
VAR xSensor AT IX7.5 : BOOL; END_VAR Boolean variable declaration with explicit speci-
fication of a single bit address. On access, only
the input bit 7.5 is read.

Memory position
Make sure that the address is valid as follows:

R911403764, Edition 08 Bosch Rexroth AG


554 / 1158 ctrlX PLC Engineering
Operands

To map a valid address in an application, you must know the required posi-
tion (applicable memory range) in the process image: input memory range (I),
output memory range (Q), and flag memory range (M) — see above. Further-
more, you have to specify the required size prefix: bit, BYTE, WORD, DWord (see
above: X, B, W, D)
The current device configuration and device settings (hardware structure,
device description, I/O settings) play a decisive part. Note specifically the dif-
ferences in the interpretation of bit addresses for devices with "byte addressing
mode" and devices with "word-oriented IEC addressing mode". For example, in
a byte addressing device, the number before the point of bit address %IX5.5
addresses byte 5. On the other hand, in a word-addressed device, it addresses
word 5. In contrast, addressing with a word or byte address is independent of
the device type: with %IW5 always word 5 is addressed and with byte address
%IB5 always byte 5. Regardless of size and addressing mode, you can address
different memory cells therefore with the same address information.
The following table shows the comparison of byte addressing and word-ori-
ented IEC addressing for bits, bytes, words, and double words. It also shows
the overlapping memory ranges that are present in the case of byte addressing
(see also the example below the table).
Regarding syntax, note that the IEC addressing mode is always word-oriented.
In this case, the word number is located before the point and the bit number
ofter the point.

n = byte number

Example of memory range overlapping in the case of the byte addressing


mode
D0 contains B0 - B3, W0 contains B0 and B1, W1 contains B1 and B2, and W2
contains B2 and B3. Consequently, in order to avoid overlap, you must not use
W1 (also D1, D2, and D3) for addressing.

See also
● ⮫ Chapter 18.18.3 AT Declaration on page 200

32.4.14 Functions
In ST, you can use a function call as an operand.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 555 / 1158
Data types

Example:
Result := Fct(7) + 3;

TIME() function
This function yields the time (in milliseconds) that has elapsed since system
boot.
The data type is TIME.

Example in ST:

Reference, programming
systime := TIME();

See also
● ⮫ Chapter Object 'Function' on page 825

32.5 Data types


32.5.1 Data types – General information
In programming, a variable is identified by its name and has an address in
the target system's memory. Variable names are therefore identifiers under
which the allocated memory space is addressed. The size of the variable is
determined by its data type. This specifies how much memory is reserved for
the variable and how the values in memory are to be interpreted. The data type
also determines which operations are allowed.
In PLC Engineering it is also possible to instantiate function blocks. Function
block instances then occupy memory in a similar way to variables. The memory
requirement is determined by the function block.
The following group of data types are provided.

32.5.2 Standard data types


A default data type is an elementary data type or a string data type.
<standard data type> : __UXINT | __XINT | __XWORD | BIT | BOOL
| BYTE | DATE | DATE_AND_TIME | DINT | DT | DWORD | INT | LDATE
| LDATE_AND_TIME | LDT | LINT | LREAL | LTIME | LTOD | LWORD |
REAL | SINT |STRING | TIME | TOD | TIME_OF_DAY | UDINT | UINT |
ULINT | USINT | WORD | WSTRING
Also refer to
● ⮫ Chapter 32.5.14 Data Type 'BIT' on page 565
● ⮫ Chapter 32.5.5 Data Type 'BOOL' on page 556
● ⮫ Chapter 32.5.6 Integer Data Types on page 556
● ⮫ Chapter 32.5.15 Special Data Types '__UXINT', __XINT, and '__XWORD'
on page 565
● ⮫ Chapter 32.5.7 Data Type 'REAL' / 'LREAL' on page 557
● ⮫ Chapter 32.5.8 “STRING” data type on page 558
● ⮫ Chapter 32.5.13 “WSTRING” data type on page 564
● ⮫ Chapter 32.5.9 Data Type 'TIME' on page 559
● ⮫ Chapter 32.5.10 Data Type 'LTIME' on page 559
● ⮫ Chapter 32.5.11 Date and Time Data Types on page 559

R911403764, Edition 08 Bosch Rexroth AG


556 / 1158 ctrlX PLC Engineering
Data types

32.5.3 Data types – Extensions to the IEC 61131-3 standard


Also refer to
● ⮫ Chapter 32.5.14 Data Type 'BIT' on page 565
● ⮫ Chapter 32.5.16 Pointers on page 566
● ⮫ Chapter 32.5.23 Data Type 'UNION' on page 592
● ⮫ Chapter 32.5.19 Data Type '__VECTOR' on page 575

32.5.4 User-defined data types


You can declare your own data types based on the default predefined ones or
on existing data types.
Such data types are called user-defined or user-specific. The data types are
either organized as a separate DUT object or declared within the declaration
part of a programming object. They are also distinguished based on their pur-
pose and syntax.
user-defined Declaration Also refer to
data type
Alias DUT object ⮫ Chapter 32.5.22 Alias on page 591
Arrays Programming ⮫ Chapter 32.5.18 Data Type 'ARRAY'
object on page 569
Enumeration DUT object, ⮫ Chapter 32.5.21 Enumerations on page 586
programming
object
Reference Programming ⮫ Chapter 32.5.17 Reference on page 567
Book object
pointers Programming ⮫ Chapter 32.5.16 Pointers on page 566
object
Structure DUT object ⮫ Chapter 32.5.20 Structure on page 583
Subrange type Programming ⮫ Chapter 32.5.24 Subrange Types
object on page 592
Union DUT object ⮫ Chapter 32.5.23 Data Type 'UNION'
on page 592
vector DUT object ⮫ Chapter 32.5.19 Data Type '__VECTOR'
on page 575
Please note the recommendations for naming identifiers.
NOTICE
Also refer to
● ⮫ Chapter 32.7 Identifier on page 651

32.5.5 Data Type 'BOOL'


Data Type Values Memory
BOOL TRUE (1), FALSE (0) 8 bit
See also
● ⮫ Chapter 32.4.4 BOOL Constants on page 541

32.5.6 Integer Data Types


PLC Engineering provides the following integer data types.
Data Type Lower Limit Upper Limit Memory
BYTE 0 255 8 bit
WORD 0 65535 16 bit

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 557 / 1158
Data types

Data Type Lower Limit Upper Limit Memory


DWORD 0 4294967295 32 bit
LWORD 0 264-1 64 bit
SINT -128 127 8 bit
USINT 0 255 8 bit
INT -32768 32767 16 bit
UINT 0 65535 16 bit
DINT -2147483648 2147483647 32 bit
UDINT 0 4294967295 32 bit

Reference, programming
LINT -263 263-1 64 bit
ULINT 0 264-1 64 bit
Information can be lost when converting from larger to
NOTICE
smaller types.
See also
● ⮫ Chapter 32.4.5 Numerical constants on page 542

32.5.7 Data Type 'REAL' / 'LREAL'


The data types REAL and LREAL are floating-point types according to IEEE 754.
They are necessary when using decimal numbers and floating-point numbers in
decimal notation or exponential notation.
Table 19: Target system: ctrlX CORE
Data type Smallest value Largest value number Storage space
number
REAL 1.0E-44 3.402823E+38 32 bit
LREAL 4.94065645841247E- 1.7976931348623157E+308 64 bit
324

Example

PROGRAM PLC_PRG
VAR
rMax: REAL := 3.402823E+38; // Largest number
rPosMin : REAL := 1.0E-44; // Smallest positive number
rNegMax: REAL := -1.0E-44; // Largest negative number
rMin: REAL := -3.402823E+38; // Smallest number

lrMax: LREAL := 1.7976931348623157E+308; // Largest number


lrPosMin : LREAL := 4.94065645841247E-324; // Smallest
positve number
lNegMax: LREAL := -4.94065645841247E-324; // Largest
negative number
lrMin: LREAL := -1.7976931348623157E+308; // Smallest number
END_VAR

Support for the LREAL data type depends on the target


NOTICE
device in use. Refer to the respective documentation as
to whether or not the 64-bit type LREAL is converted to
REAL or remains as LREAL when compiling the applica-
tion. Conversion may result in the loss of information.

R911403764, Edition 08 Bosch Rexroth AG


558 / 1158 ctrlX PLC Engineering
Data types

If the value of the REAL/LREAL number is outside of the


NOTICE
value range of the integer, then an undefined result is
yielded from a data type conversion from REAL or LREAL
to SINT, USINT, INT, UINT, DINT, UDINT, LINT, or ULINT.
The result depends on the target system. An exception
error is also possible. To get code that is independent of
the target system, the application must catch value range
violations.
If the REAL/LREAL number is within the value range of
the integer data type, then the conversion operates the
same way on all systems.

See also
● ⮫ Chapter 32.4.6 REAL/LREAL Constants on page 542

32.5.8 “STRING” data type


With Latin-1 encoding, the memory required for a
NOTICE
STRING variableis always 1 byte per character plus
one additional byte. For example, this results in 81 bytes
in the case of a standard STRING(80)declaration.
With UTF-8 encoding, a character can be up to 4 bytes
long. However, the length of the string always indicates
the number of bytes that are reserved for the STRING.
Thus, there is no 1 : 1 Relation more between number of
characters and string length.
The STRING data type is interpreted as Latin-1 or UTF-8: If the compile option
UTF8 encoding for STRING is enabled, all string literals will be interpreted in
UTF-8 format.

Declaration
<varible name> : STRING( <size> ) := ' <text> ';
<varible name> : STRING[ <size> ] := ' <text> ';
The memory size <size> and initialization are optional.

Example
sVar : STRING(46):= 'This is a string with memory for 46
characters.';
sVar_µ : STRING[10] := 'µ (Mü)';
sVar_ß : STRING[10] := 'Eszett';

A variable of the STRING data type can include any character string. The size
specification <size> for memory reservation in the declaration refers to the
number of bytes and is in round or square brackets. If no size is specified, 80
characters are reserved by default. If a variable is initialized with a literal that
is too long for the variable's data type, the literal is truncated accordingly from
the back.
However, the length of the strings is not limited in principle. If you run string
manipulations with the functions of the Standard library, strings up to a length
of 255 are processed correctly. If you run string manipulations with the func-
tions of the StringUtils library, you can also use longer strings (>255 charac-
ters).

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 559 / 1158
Data types

If a variable of the data type STRING is reinitialized by a reset of the applica-


tion, the content of the (old) string existing after the terminating null character
of the initial value is not overwritten. This applies both to initialization with the
initialization value and to initialization with the default initialization value 0.
From compiler version 3.5.18.0 you have the possibility to select the encoding
format of strings. You have the possibility to specify project-wide whether
strings are interpreted in Latin-1 format or in UTF-8 format. For UTF-8 encoding,
enable the compile option UTF8 encoding for STRING.
Before you change the encoding format, it is advisable to have your code stati-
cally analyzed for rule SA0175.

Reference, programming
For further information, see: ⮫ Dialog 'Project Settings' - 'Static Analysis Light'
Add the pragma {attribute 'monitoring_encoding' := 'UTF8'} to the declaration of
a variable, you can monitor the content of the variable in UTF8 encoding.
For further information, see: ⮫ Attribute 'monitoring_encoding'

32.5.9 Data Type 'TIME'


The data type is treated internally as DWORD. TIME is resolved in milliseconds.
Data type Lower limit Upper limit Storage space Resolution
TIME T#0d0h0m0s0ms 32 bit Milliseconds
T#49d17h2m47s2
95ms

See also
● ⮫ Chapter 32.5.10 Data Type 'LTIME' on page 559
● ⮫ Chapter 32.4.8 TIME/LTIME Constant on page 544
● ⮫ Chapter 32.4.9 Date and Time Constants on page 546

32.5.10 Data Type 'LTIME'


Data Type 'LTIME'
You can use the data type LTIME as a time base for high-resolution timer. A
high-resolution timer has a resolution in nanoseconds.
Data Type Lower Limit Upper Limit Memory
LTIME LTIME#0NS LTIME#213503D23H34M 64 bits
33S709MS551US615NS
Syntax:
LTIME#<long time declaration>
The time declaration can include units of time that apply for the TIME constant
as well as:
● "US": microseconds
● "NS": nanoseconds

Example:
LTIME1 := LTIME#1000D15H23M12S34MS2US44NS

See also
● ⮫ Chapter 32.5.9 Data Type 'TIME' on page 559
● ⮫ Chapter 32.3.54 Time conversion on page 506

32.5.11 Date and Time Data Types


The data types DATE, DATE_AND_TIME (DT), and TIME_OF_DAY (TOD) are han-
dled internally like a DWORD (32-bit value).

R911403764, Edition 08 Bosch Rexroth AG


560 / 1158 ctrlX PLC Engineering
Data types

The data types LDATE, LDATE_AND_TIME (LDT), and LTIME_OF_DAY (LTOD) are
treated internally like an LWORD (64-bit value).
The values of these data types are measured in seconds, milliseconds, and
nanoseconds since 01/01/1970.
Data Type Lower Limit Upper Limit Memory Resolution
DATE DATE#1970-01-01 DATE#2106-02-07 32-bit Seconds
D#1970-01-01 D#2106-02-07 (although
only the
day is dis-
played)
DATE_AND_TIME DATE_AND_TIME#1970- DATE_AND_TIME#2106- 32-bit Seconds
DT 1-1-0:0:0 02-07-06:28:15
DT#1970-1-1-0:0:0 DT#2106-02-07-06:28
:15
TIME_OF_DAY TIME_OF_DAY#0:0:0 TIME_OF_DAY#23:59:5 32-bit Millisec-
TOD TOD#0:0:0 9.999 onds
TOD#23:59:59.999

LDATE LDATE#1970-1-1 LDATE#2554-7-21 64-bit Nanosec-


LD#1970-1-1 LD#2554-7-21 onds
(although
only the
day is dis-
played)
LDATE_AND_TIME LDATE_AND_TIME#1970 LDATE_AND_TIME#2554 64-bit Nanosec-
LDT -1-1-0:0:0 -7-21:23:59:59.9999 onds
LDT#1970-1-1-0:0:0 9999
LDT#2554-7-21-23:59
:59.99999999
LTIME_OF_DAY LTIME_OF_DAY#0:0:0 LTIME_OF_DAY#23:59: 64-bit Nanosec-
LTOD LTOD#0:0:0 59.999999999 onds
LTOD#23:59:59.99999
9999
Example

VAR
//Date
dateBottom : DATE := DATE#1970-1-1;
dateTop : DATE := DATE#2106-2-7;
dateAppointment : DATE := D#2020-2-7; // D prohibited

//Date and time


dtBottom : DATE_AND_TIME := DATE_AND_TIME#1970-1-1-0:0:0;
dtTop : DT := DATE_AND_TIME#2106-02-07-06:28:15;
dtAppointment : DT := DT#2020-2-7-12:55:1.234;

//Time of day
todBottom : TIME_OF_DAY := TIME_OF_DAY#0:0:0;
todTop : TOD := TIME_OF_DAY#23:59:59.999;
todAppointment : TOD := TOD#12:3:4.567;

// Long date
ldateBottom : LDATE := LDATE#1970-1-1;
ldateTop : LDATE := LDATE#2106-2-7;

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 561 / 1158
Data types

ldateAppointment : LDATE := LD#2020-2-7; // LD prohibited

// Long date and time


ldtBottom : LDATE_AND_TIME := LDATE_AND_TIME#1970-1-1-0:0:0;
ldtTop : LDT := LDATE_AND_TIME#2262-4-10-23:59:59.99999999;
ldtAppointment : LDT := LDT#2020-2-7-12:55:1.234567891;

//Long time of day


ltodBottom : LTIME_OF_DAY := LTIME_OF_DAY#0:0:0;
ltodTop : LTOD := LTIME_OF_DAY#23:59:59.999999999 ;
ltodAppointment : LTOD := LTOD#12:3:4.567890123;

Reference, programming
END_VAR

See also
● ⮫ Chapter 32.4.9 Date and Time Constants on page 546

32.5.12 Data Type 'ANY' and 'ANY_<type>'


The data types ANY or ANY_<type> are used in interfaces of functions, function
blocks, or methods in order to type input parameters whose type is unknown
or unspecified: The input variables (VAR_INPUT) have a generic data type.
The compiler replaces the type of input variable internally with the data struc-
ture described below, whereby the value is not passed directly. Instead, a
pointer is passed to the actual value so only a variable can be passed. There-
fore, the data type is only specified when it is called. As a result, calls of such
POUs can be made using arguments which each have different data types.
Literals, replaced constants, and results of function calls or expressions cannot
be passed to input variables (VAR_IN_OUT).

Internal data structure for 'ANY' and 'ANY_<type>'


When code is compiled, the input variables are typed internally with ANY data
type by the following structure. When the POU is called (at runtime), the argu-
ment is passed to a reference parameter.

TYPE AnyType :
STRUCT
// the type of the actual parameter
typeclass : __SYSTEM.TYPE_CLASS ;
// the pointer to the actual parameter
pvalue : POINTER TO BYTE;
// the size of the data, to which the pointer points
diSize : DINT;
END_STRUCT
END_TYPE
You can access the input variable within the POU via this structure by means of
this structure, and for example query the passed value.

R911403764, Edition 08 Bosch Rexroth AG


562 / 1158 ctrlX PLC Engineering
Data types

Example
This compares whether or not two input variables have the same type and the
same value.

FUNCTION funGenericCompare : BOOL


VAR_INPUT
any1 : ANY;
any2 : ANY;
END_VAR
VAR
pTest : POINTER TO ARRAY [0..100] OF POINTER TO DWORD;
diCount: DINT;
END_VAR

pTest := ADR(any1);
Generic_Compare := FALSE;
IF any1.typeclass <> any2.typeclass THEN
RETURN;
END_IF
IF any1.diSize <> any2.diSize THEN
RETURN;
END_IF
// Byte comparison
FOR iCount := 0 TO any1.diSize-1 DO
IF any1.pvalue[iCount] <> any2.pvalue[iCount] THEN
RETURN;
END_IF
END_FOR
Generic_Compare := TRUE;
RETURN;
// END_FUNCTION

Declaration
The syntax descriptions refer to a POU with exactly one parameter (an input
variable).
Syntax

FUNCTION | FUNCTION_BLOCK | METHOD <POU name> ( : <return data


type> )?
VAR_INPUT
<input variable name> : <generic data type>;
END_VAR

<generic data type> = ANY | ANY_BIT | ANY_DATE | ANY_NUM |


ANY_REAL | ANY_INT | ANY_STRING

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 563 / 1158
Data types

Example

FUNCTION funComputeAny : BOOL


VAR_INPUT
anyInput1 : ANY; // valid data type see table
END_VAR
// END_FUNCTION

FUNCTION_BLOCK FB_ComputeAny
VAR_INPUT

Reference, programming
anyInput1 : ANY;
END_VAR
// END_FUNCTION_BLOCK

FUNCTION_BLOCK FB_ComputeMethod
METHOD methComputeAnny : BOOL
VAR_INPUT
anyInput1 : ANY_INT; // valid data types are SINT, INT,
DINT, LINT, USINT, UINT, UDINT, ULINT
END_VAR
//END_METHOD

With compiler versions > 3.5.1.0, the generic IEC data types in the table are
supported.
The table represents the hierarchy of the generic data types and provides infor-
mation as to which generic data type of the formal parameter (declaration)
allows which elementary data types of the argument (call).
Generic data type in the case of a Permitted elementary data type in the
formal parameter case of an actual parameter (argument)
ANY ANY_BIT ● BYTE
● WORD
● DWORD
● LWORD
ANY_DATE ● DATE
● DATE_AND_TIME, DT
● TIME_OF_DAY, TOD
● LDATE
● LDATE_AND_TIME, LDT
● LTIME_OF_DAY, LTOD
ANY_NUM ANY_REAL REAL, LREAL
ANY_INT USINT, UINT, UDINT, ULINT
SINT, INT, DINT, LINT
ANY_STRIN STRING, WSTRING
G

Call
The syntax descriptions refer to a POU with exactly one parameter, to which
an argument is passed. As a result, the data type of the argument specifies
the generic data type of the input variable. For example, arguments of the type
BYTE, WORD, DWORD, LWORD can be passed to a type ANY_BIT input variable.

R911403764, Edition 08 Bosch Rexroth AG


564 / 1158 ctrlX PLC Engineering
Data types

Syntax of function call

<variable name> := <function name> ( <argument name> );


<argument name> : variable with valid data type
Syntax of function block call

<function block name> ( <input variable name> := <argument


name> );
Syntax of method call

<function block name> . <method name> ( <input variable


name> := <argument name> );

Example

PROGRAM PLC_PRG
VAR
byValue : BYTE := 16#AB;
iValue : INT := -1234;
xResultByte : BOOL;
xResultInt : BOOL;

fbComputeAnyByte : FB_ComputeAny;
fbComputeAnyInt : FB_ComputeAny;

fbComputeM1 : FB_ComputeMethod;
fbComputeM2 : FB_ComputeMethod;

byN : BYTE := 1;
wBitField1 : WORD := 16#FFFF;
wBitField2 : WORD := 16#0001;
xInit : BOOL;
xResult : BOOL;
END_VAR

xResultByte := funComputeAny(byValue);
xResultInt := funComputeAny(iValue);

xResult := funGenericCompare(wBitField1, wBitField2);

fbComputeAnyByte(anyInput1 := byValue);
fbComputeAnyInt(anyInput1 := iValue);

fbComputeM1.methComputeAnny(anyInput1 := byValue);
fbComputeM2.methComputeAnny(anyInput1 := iValue);
// END_PRG

32.5.13 “WSTRING” data type


According to the IEC 61131-3 standard, the WSTRING data type follows the
UCS-2 encoding.
UCS-2 encoding means that a character is encoded exactly with the fixed
length of 2 bytes. UCS-2 includes the characters of the code points from
U+0000 to U+D7FF and from U+E000 to U+FFFF. The string is terminated with 0.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 565 / 1158
Data types

Declaration
<variable name> : WSTRING( <size> ) := " <text> "
The size <size> determines the string length. The initialization is done with the
string " <text> ".
The marking of the string as WSTRING is done with double quotes. The size
specification and initialization are optional.
If a variable of the data type WSTRING is reinitialized by a reset of the applica-
tion, the byte pairs of the (old) string existing after the terminating null word
(WORD) of the initial value are not overwritten. This applies both to initialization
with the initialization value and to initialization with the default initialization

Reference, programming
value 0.

Example
Strings of the data type WSTRING require 2 bytes per character. With data type
STRING only 1 byte per character is reserved.
wsString : WSTRING := "This is a WSTRING";
sString : STRING := 'This is a STRING';
wsEmpty is the empty string. The variable wsMoney with the euro sign € has the
size 10. Cut off after 10 characters. The wsHan variable is assigned the Chinese
character (U+7BE6).

Example
PROGRAM PRG_Money
VAR
wsEmpty : WSTRING := ""; // The empty string
wsMoney : WSTRING(10) := "12345678 € 123"; // String will
be truncated
wsMoney_2 : WSTRING(10) := "12345678 €";
wsHan : WSTRING(10) := "篦"; // Chinese character U+/BE6
END_VAR

Also refer to
● ⮫ Chapter 32.5.8 “STRING” data type on page 558
● ⮫ Chapter 32.4.7 String Constants on page 543

32.5.14 Data Type 'BIT'


The data type BIT is valid only in structures for the declaration of structure
members or in a function block for the declaration of variables. A BIT variable
can have the values TRUE (1) and FALSE (0). In this case, the variable requires
exactly one bit of memory.
As a result, you can symbolically address individual bits by a name. BIT varia-
bles that are declared in succession are bundled in bytes. In this way, you can
optimize memory use as opposed to BOOL types, which reserve 8 bits each.
On the other hand, bit access is significantly more time-consuming. Therefore,
you should use the BIT data type only when you need to define data in a
predefined format.
See also
● ⮫ Chapter 32.4.12 Bit Access in Variables on page 550
● ⮫ Chapter 32.5.20 Structure on page 583

32.5.15 Special Data Types '__UXINT', __XINT, and '__XWORD'


Variables with these data types are converted to a platform-compliant data
type, depending on the target system.

R911403764, Edition 08 Bosch Rexroth AG


566 / 1158 ctrlX PLC Engineering
Data types

PLC Engineering supports systems with address registers of 32-bit and 64-bit
widths. For making the IEC code as independent from the target system as
possible, you use the pseudo data types __UXINT, __XINT, and __XWORD. The
compiler checks which target system types are current and then converts these
data types into the appropriate standard data types.
Moreover, type conversion operators are provided for variables of these data
types.
Type conversion on 64-bit Type conversion on 32-bit
platforms platforms
__UXINT ULINT UDINT
__XINT LINT DINT
__XWORD LWORD DWORD

See also
● ⮫ Chapter 32.3.51 Integer conversion on page 482
● ⮫ Chapter 32.3.49 Overload on page 476

32.5.16 Pointers
A pointer stores the memory address of objects, such as variables or function
block instances, at runtime.
Syntax of the pointer declaration:
<pointer name>: POINTER TO <data type | data unit type |
function block>;

Example

FUNCTION_BLOCK FB_Point
VAR
piNumber: POINTER TO INT;
iNumber1: INT := 5;
iNumber2: INT;
END_VAR

piNumber := ADR(iNumber1); // piNumber is assigned to address


of iNumber1
iNumber2 := piNumber^; // value 5 of iNumber1 is assigned to
variable iNumber2 by dereferencing of pointer piNumber

Dereferencing a pointer means obtaining the value to which the pointer points.
A pointer is dereferenced by appending the content operator ^ to the
pointer identifier (for example, piNumber^ in the example above). To assign
the address of an object to a pointer, the address operator ADR is applied to
the object: ADR(iNumber1).
In online mode, you can click “Edit 🠂 Browse 🠂 Go to Reference” to jump from
a pointer to the declaration location of the referenced variable.
When a pointer points to an I/O input, write access
NOTICE
applies. This leads to the compiler warning “'<pointer
name >' is not a valid assignment target” when the code
is generated. Example: pwInput := ADR(wInput);
If you require a construct of this kind, you have to first
copy the input value (wInput) to a variable with write
access.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 567 / 1158
Data types

Index access to pointers


PLC Engineering permits the index access [] to variables of type POINTER TO,
as well as to the data types STRING or WSTRING.
The data, which the pointer points to, can also be accessed by appending
the bracket operator [] to the pointer identifier(for example, piData[i]). The
base data type of the pointer determines the data type and the size of the
indexed component. In this case, the index access to the pointer is done arith-
metically by adding the index dependent offset i * SIZEOF( <base type> )
to the address of the pointer. The pointer is dereferenced implicitly at the same
time.

Reference, programming
Calculation: piData[i] := (piData + i * SIZEOF(INT))^;
This is not: piData[i] != (piData + i)^.
Index access STRING
When you use the index access with a variable of the type STRING, you get the
character at the offset of the index expression. The result is of type BYTE. For
example, sData[i] returns the i-th character of the character string sData as
SINT (ASCII).
Index access WSTRING
When you use the index access with a variable of the type WSTRING, you get the
character at the offset of the index expression. The result is of type WORD. For
example, wsData[i] returns the i-th character of the character string as INT
(Unicode).

Subtracting pointers
The result of the difference between two pointers is a value of type DWORD,
even on 64-bit platforms when the pointers are 64-bit pointers.

Using references provides the advantage of guaranteeing type safety. That is


not the case with pointers.
The memory access of pointers can be checked at runtime by the implicit
monitoring function CheckPointer.

See also
● ⮫ Chapter Command 'Go To Reference' on page 893
● ⮫ Chapter 'Properties' dialog - 'Build' on page 1048
● ⮫ Chapter 32.3.46 Operator 'Content Operator' on page 475
● ⮫ Chapter 32.3.45 Operator 'ADR' on page 474
● ⮫ Chapter POU 'CheckPointer' on page 859

32.5.17 Reference
A reference implicitly refers to another object. When accessed, the reference is
implicitly dereferenced, and therefore does not need a special content operator
^ such as a pointer.
Syntax
<identifier> : REFERENCE TO <data type> ;
<data type>: base type of the reference

R911403764, Edition 08 Bosch Rexroth AG


568 / 1158 ctrlX PLC Engineering
Data types

Example

PROGRAM PLC_PRG
VAR
rspeA : REFERENCE TO DUT_SPECIAL;
pspeA : POINTER TO DUT_SPECIAL;
speB : DUT_SPECIAL;
END_VAR

rspeA REF= speB; // Reference rspeA is alias for speB. The


code corresponds to pspeA := ADR(speB);
rspeA := speD; // The code corresponds to pspeA^ := speB;

The readability of a program is made difficult when the same memory cell is
accessed simultaneously by means of an identifier and its alias (for example,
speB and rspeA).
With compiler version >= V3.3.0.0, references are initial-
NOTICE
ized (at 0).
If a reference refers to a device input, then the access
NOTICE
(for example, rInput REF= Input;) is applies as write
access. This leads to a compiler warning when the code
is generated: "...invalid assignment target".
If you require a construct of this kind, you have to first
copy the input value (rInput) to a variable with write
access.

Invalid declarations

ariTest : ARRAY[0..9] OF REFERENCE TO INT;


priTest : POINTER TO REFERENCE TO INT;
rriTest : REFERENCE TO REFERENCE TO INT;
rbitTest : REFERENCE TO BIT;
A reference type must not be used as the base type of an array, pointer, or
reference. Furthermore, a reference must not refer to a bit variable. These
kinds of constructs generate compiler errors.

Comparison of reference and pointer


A reference has the following advantages over a pointer:
● Easier to use:
A reference can access the contents of the referenced object directly and
without dereferencing.
● Finer and simpler syntax when passing values:
Call of a function block which passes a reference without an address oper-
ator instead of a pointer
Example: fbDoIt(riInput:=iValue);
Instead of: fbDoIt_1(piInput:=ADR(iValue));
● Type safety:
When assigning two references, the compiler checks whether their base
types match. This is not checked in the case of pointers.

Testing the validity of a reference


You can use the operator __ISVALIDREF to check whether or not a reference
points to a valid value (meaning a value not equal to 0).

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 569 / 1158
Data types

Syntax
<Boolean variable name> := __ISVALIDREF( <reference name> );
<reference name>: Identifier declared with REFERENCE TO
The Boolean variable is TRUE when the reference points to a valid value. Other-
wise it is FALSE.

Example

PROGRAM PLC_PRG
VAR

Reference, programming
iAlfa : INT;
riBravo : REFERENCE TO INT;
riCharlie : REFERENCE TO INT;
bIsRef_Bravo : BOOL := FALSE;
bIsRef_Charlie : BOOL := FALSE;
END_VAR

iAlfa := iAlfa + 1;
riBravo REF= iAlfa;
riCharlie REF= 0;
bIsRef_Bravo := __ISVALIDREF(riBravo); (* becomes TRUE,
because riBravo references to iAlfa, which is non-zero
*)
bIsRef_Charlie := __ISVALIDREF(riCharlie); (* becomes FALSE,
because riCharlie is set to 0 *)

In compiler version 3.5.7.40 and later, the implicit monitoring function


“CheckPointer” acts on variables of type REFERENCE TO in the same way as
for pointer variables.

See also
● ⮫ Chapter Assignment Operator 'REF=' on page 384
● ⮫ Chapter POU 'CheckPointer' on page 859

32.5.18 Data Type 'ARRAY'


An array is a collection of data elements of the same data type. PLC Engi-
neering supports one- and multi-dimensional arrays of fixed or variable length.

Array of fixed length


You can define arrays in the declaration part of a POU or in global variable lists.
Syntax of the declaration of a one-dimensional array

<variable name> : ARRAY[ <dimension> ] OF <data type> ( :=


<initialization> )? ;

<dimension> : <lower index bound>..<upper index bound>


<data type> : elementary data types | user defined data types
| function block types
// (...)? : Optional
Syntax of the declaration of a multi-dimensional array

<variable name> : ARRAY[ <1st dimension> ( , <next


dimension> )+ ] OF <data type> ( := <initialization> )? ;

<1st dimension> : <1st lower index bound>..<1st upper index

R911403764, Edition 08 Bosch Rexroth AG


570 / 1158 ctrlX PLC Engineering
Data types

bound>
<next dimension> : <next lower index bound>..<next upper index
bound>
<data type> : elementary data types | user defined data types
| function block types
// (...)+ : One or more further dimensions
// (...)? : Optional
The index limits are integers; maximum of the data type DINT.
Syntax for data access

<variable name>[ <index of 1st dimension> ( , <index of next


dimension> )* ]
// (...)* : 0, one or more further dimensions
Note the capability of using the implicit monitoring function CheckBounds() to
monitor the maintenance of the index limits at runtime.

Example
One-dimensional array of 10 integer elements

VAR
aiCounter : ARRAY[0..9] OF INT;
END_VAR
Lower index limit: 0
Upper index limit: 9
Initialization

aiCounter : ARRAY[0..9] OF INT := [0, 10, 20, 30, 40, 50, 60,
70, 80, 90];
Data access

iLocalVariable := aiCounter[2];
The value 20 is assigned to the local variable.

Example
2-dimensional array

VAR
aiCardGame : ARRAY[1..2, 3..4] OF INT;
END_VAR
1st dimension: 1 to 2
2nd dimension: 3 to 4
Initialization

aiCardGame : ARRAY[1..2, 3..4] OF INT := [2(10),2(20)]; //


Short notation for [10, 10, 20, 20]
Data access

iLocal_1 := aiCardGame[1, 3]; // Assignment of 10


iLocal_2 := aiCardGame[2, 4]; // Assignment of 20

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 571 / 1158
Data types

Example
3-dimensional array

VAR
aiCardGame : ARRAY[1..2, 3..4, 5..6] OF INT;
END_VAR
1st dimension: 1 to 2
2nd dimension: 3 to 4
3rd dimension: 5 to 6

Reference, programming
2 * 2 * 2 = 8 array elements
Initialization

aiCardGame : ARRAY[1..2, 3..4, 5..6] OF INT := [10, 20, 30,


40, 50, 60, 70, 80];
Data access

iLocal_1 := aiCardGame[1, 3, 5]; // Assignment of 10


iLocal_2 := aiCardGame[2, 3, 5]; // Assignment of 20
iLocal_3 := aiCardGame[1, 4, 5]; // Assignment of 30
iLocal_4 := aiCardGame[2, 4, 5]; // Assignment of 40
iLocal_5 := aiCardGame[1, 3, 6]; // Assignment of 50
iLocal_6 := aiCardGame[2, 3, 6]; // Assignment of 60
iLocal_7 := aiCardGame[1, 4, 6]; // Assignment of 70
iLocal_8 := aiCardGame[2, 4, 6]; // Assignment of 80
Initialization

aiCardGame : ARRAY[1..2, 3..4, 5..6] OF INT := [2(10), 2(20),


2(30), 2(40)]; // Short notation for [10, 10, 20, 20, 30, 30,
40, 40]
Data access

iLocal_1 := aiCardGame[1, 3, 5]; // Assignment of 10


iLocal_2 := aiCardGame[2, 3, 5]; // Assignment of 10
iLocal_3 := aiCardGame[1, 4, 5]; // Assignment of 20
iLocal_4 := aiCardGame[2, 4, 5]; // Assignment of 20
iLocal_5 := aiCardGame[1, 3, 6]; // Assignment of 30
iLocal_6 := aiCardGame[2, 3, 6]; // Assignment of 30
iLocal_7 := aiCardGame[1, 4, 6]; // Assignment of 40
iLocal_8 := aiCardGame[2, 4, 6]; // Assignment of 40

R911403764, Edition 08 Bosch Rexroth AG


572 / 1158 ctrlX PLC Engineering
Data types

Example
3-dimensional arrays of a user-defined structure

TYPE DATA_A
STRUCT
iA_1 : INT;
iA_2 : INT;
dwA_3 : DWORD;
END_STRUCT
END_TYPE

PROGRAM PLC_PRG
VAR
aData_A : ARRAY[1..3, 1..3, 1..10] OF DATA_A;
END_VAR
The array aData_A consists of a total of 3 * 3 * 10 = 90 array elements of data
type DATA_A.
Initialize partially

aData_A : ARRAY[1..3, 1..3, 1..10] OF DATA_A := [(iA_1 :=


1, iA_2 := 10, dwA_3 := 16#00FF),(iA_1 := 2, iA_2 := 20,
dwA_3 := 16#FF00),(iA_1 := 3, iA_2 := 30, dwA_3 := 16#FFFF)];
In the example, only the first 3 elements are initialized explicitly. Elements
to which no initialization value is assigned explicitly are initialized internally
with the default value of the basic data type. This initializes the structure
components at 0 starting with the element aData_A[2, 1, 1].
Data access

iLocal_1 := aData_A[1,1,1].iA_1; // Assignment of 1


dwLocal_2 := aData_A[3,1,1].dwA_3; // Assignment of 16#FFFF

Example
Array of a function block

FUNCTION BLOCK FBObject_A


VAR
iCounter : INT;
END_VAR
...

PROGRAM PLC_PRG
VAR
aObject_A : ARRAY[1..4] OF FBObject_A;
END_VAR
The array aObject_A consists of 4 elements. Each element instantiates a
FBObject_A function block.
Function call

aObject_A[2]();

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 573 / 1158
Data types

Example
Implementation of FB_Something with method FB_Init

FUNCTION_BLOCK FB_Something
VAR
_nId : INT;
_lrIn : LREAL;
END_VAR
...

Reference, programming
METHOD FB_Init : BOOL
VAR_INPUT
bInitRetains : BOOL;
bInCopyCode : BOOL;
nId : INT;
lrIn : LREAL;
END_VAR

_nId := nId;
_lrIn := lrIN;
The function block FB_Something has a method FB_Init that requires 2
parameters.
Instantiation of the array with initialization

PROGRAM PLC_PRG
VAR
fb_Something_1 : FB_Something(nId := 11, lrIn := 33.44);
a_Something : ARRAY[0..1, 0..1] OF FB_Something[(nId := 12,
lrIn := 11.22), (nId := 13, lrIn := 22.33), (nId := 14,
lrIn := 33.55),(nId := 15, lrIn := 11.22)];
END_VAR

Array of arrays
The declaration of an "array of arrays" is an alternative syntax for multidimen-
sional arrays. A collection of elements is nested instead of dimensioning the
elements. The nesting depth is unlimited.
Syntax for declaration

<variable name> : ARRAY[<first>] ( OF ARRAY[<next>] )+ OF


<data type> ( := <initialization> )? ;

<first> : <first lower index bound>..<first upper index bound>


<next> : <lower index bound>..<upper index bound> // one or
more arrays
<data type> : elementary data types | user defined data types
| function block types
// (...)+ : One or more further arrays
// (...)? : Optional
Syntax for data access

<variable name>[<index of first array>] ( [<index of next


array>] )+ ;
// (...)* : 0, one or more further arrays

R911403764, Edition 08 Bosch Rexroth AG


574 / 1158 ctrlX PLC Engineering
Data types

Example

PROGRAM PLC_PRG
VAR
aiPoints : ARRAY[1..2,1..3] OF INT := [1,2,3,4,5,6];
ai2Boxes : ARRAY[1..2] OF ARRAY[1..3] OF INT := [ [1, 2,
3], [ 4, 5, 6]];
ai3Boxes : ARRAY[1..2] OF ARRAY[1..3] OF ARRAY[1..4] OF
INT := [ [ [1, 2, 3, 4], [5, 6, 7, 8 ], [9, 10, 11, 12] ],
[ [13, 14, 15, 16], [ 17, 18, 19, 20], [21, 22, 23, 24] ] ];
ai4Boxes : ARRAY[1..2] OF ARRAY[1..3] OF ARRAY[1..4] OF
ARRAY[1..5] OF INT;
END_VAR

aiPoints[1, 2] := 1200;
ai2Boxes[1][2] := 1200;
The variables aiPoints and ai2Boxes collect the same data elements, how-
ever the syntax for the declaration differs from that of the data access.

Array of variable length


In function blocks, functions, or methods, you can declare arrays of variable
length in the VAR_IN_OUT declaration section.
The LOWER_BOUND and UPPER_BOUND operators are provided for determining
the index limits of the actual used array at runtime.
Only statically declared arrays (not arrays generated by means of the operator
__NEW) may be passed to an array with variable length.
Syntax of the declaration of a one-dimensional array of variable length

<variable name> : ARRAY[*] OF <data type> ( :=


<initialization> )? ;

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 575 / 1158
Data types

<data type> : elementary data types | user defined data types


| function block types
// (...)? : Optional
Syntax of the declaration of a multi-dimensional array of variable length

<variable name> : ARRAY[* ( , * )+ ] OF <data type> ( :=


<initialization> )? ;

<data type> : elementary data types | user defined data types


| function block types

Reference, programming
// (...)+ : One or more further dimensions
// (...)? : Optional
Syntax of the operators for calculating the limit index

LOWER_BOUND( <variable name> , <dimension number> )


UPPER_BOUND( <variable name> , <dimension number> )

Example
The SUM function adds the integer values of the array elements and returns
the calculated sum as a result. The sum is calculated across all array elements
available at runtime. As the actual number of array elements will only be
known at runtime, the local variable is declared as a one-dimensional array of
variable length.

FUNCTION SUM: INT;


VAR_IN_OUT
aiData : ARRAY[*] OF INT;
END_VAR
VAR
diCounter, diResult : DINT;
END_VAR

diResult := 0;
FOR diCounter := LOWER_BOUND(aiData, 1) TO
UPPER_BOUND(aiData, 1) DO // Calculates the length of the
current array
diResult := diResult + A[i];
END_FOR;
SUM := diResult;

See also
● ⮫ Chapter 18.16.5 Declaring Arrays on page 166
● ⮫ Chapter POU 'CheckBounds' on page 848

32.5.19 Data Type '__VECTOR'


Vector operations are supported natively only on 64-bit processors and offer
a performance advantage only on these processors. The data sheet of the con-
troller provides information about the processor used on the controller.
Currently, vector operations on the x86/64-bit platforms with SSE2 and ARM64
with NEON are supported natively. On all other platforms, vector operations
are translated into individual statements. For example, vector addition is then
executed with multiple single addition operations.

R911403764, Edition 08 Bosch Rexroth AG


576 / 1158 ctrlX PLC Engineering
Data types

The command set extensions of the processors are SIMD extensions. SIMD
(Single Instruction, Multiple Data) describes a computer architecture in which
multiple data sets of the same type are processed simultaneously in parallel
and therefore faster with one command call. In vector operations, for example,
4 pairs of numbers can then be added at the same time.

Syntax

<variable name> : __VECTOR[ <vector size> ] OF <element type>


( := <initialization> )? ;

<vector size> : 1 |2 | 3 | 4 | 5| 6 | 7| 8
<element type> : REAL | LREAL
// (...)? : Optional
A vector data type is an array of floating-point numbers with a maximum of
8 elements. The operators __vc<operator name> are available for this data
type. You can use these to implement vector operations without additional
function calls.
Syntax for index access

<variable name>[ <index> ]


<index> : 0 | 1 | 2| 3 | 4 | 5| 6 | 7
When indexing a vector variable, you can access a single element of the vector.
The index starts at 0 and goes until <vector size> - 1.

Example

PROGRAM PLC_PRG
VAR
vcA : __VECTOR[3] OF REAL;
END_VAR

vcA[0] := 1.1;
vcA[1] := 2.2;
vcA[2] := 3.3;

Determining the optimal vector size


Use the optimal vector size depending on your target system as the vector size
in order to program the most efficient code possible.
For target systems whose computer architecture is generally suitable for vector
processing, we do not recommend using vectors of arbitrary size. There is an
optimal vector size depending on the type of data processing of the processor.
Vectors that are declared with this array size are processed as quickly as pos-
sible. Vectors that are declared as a larger array do not have an advantage in
speed. Vectors that are declared as smaller arrays do not take full advantage of
the processor's capabilities.
You can query the optimal size at runtime. You can find the information in
the constants Constants.vcOptimalREAL (for vectors with REAL elements)
and Constants.vcOptimalLREAL (for vectors with LREAL elements). The con-
stants have the LREAL data type. If a constant returns the value 1 as the
optimal value, then this means that accelerated vector processing is not avail-
able for the target system.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 577 / 1158
Data types

Example

PROGRAM PLC_PRG
VAR
iOVS_REAL : INT; // Optimal vector size for REAL elements
iOVS_LREAL : INT; // Optimal vector size for LREAL elements
END_VAR

iOVS_REAL := Constants.vcOptimalREAL;
iOVS_LREAL := Constants.vcOptimalLREAL;

Reference, programming
An application that is loaded on the PLC Engineering Control Win V3 x64
target system returns the following values at runtime:

Operator __VCADD
The operator calculates the sum of two vectors.
Syntax

<vector variable> := <1st vector operand> __VCADD <2nd vector


operand>;

Example of addition

FUNCTION_BLOCK FB_ADD
VAR
vcA : __VECTOR[3] OF REAL := __VCSET_REAL(3, 3, 3);
vcB : __VECTOR[3] OF REAL := __VCSET_REAL(1, 2, 3);
vcResult : __VECTOR[3] OF REAL;
END_VAR

vcResult := vcA __VCADD vcB;

Operator __VCSUB
The operator calculates the difference between two vectors.
Syntax

<vector variable> := <vector minuend> __VCSUB <vector


subtrahend>;

R911403764, Edition 08 Bosch Rexroth AG


578 / 1158 ctrlX PLC Engineering
Data types

Example of subtraction

FUNCTION_BLOCK FB_SUB
VAR
vcA : __VECTOR[3] OF REAL := __VCSET_REAL(3, 3, 3);
vcB : __VECTOR[3] OF REAL := __VCSET_REAL(1, 2, 3);
vcResult0 : __VECTOR[3] OF REAL;
vcResult1 : __VECTOR[3] OF REAL;
END_VAR

vcResult0 := vcA __VCSUB vcB;


vcResult1 := vcB __VCSUB vcA;

Operator __VCMUL
The operator calculates the product of two vectors or a scalar (floating-point
number) and a vector.
Syntax

<vector variable> := <1st vector operand> __VCMUL <2nd vector


operand> | <scalar operand> __VCMUL <vector operand> | <vector
operand> __VCMUL <scalar operand> ;

Example of multiplication

FUNCTION_BLOCK FB_MUL
VAR
rScalar : REAL := 1.1;
vcA : __VECTOR[3] OF REAL;
vcB : __VECTOR[3] OF REAL;
vcResult0 : __VECTOR[3] OF REAL;
vcResult1 : __VECTOR[3] OF REAL;
vcResult2 : __VECTOR[3] OF REAL;
END_VAR

vcResult0 := vcA __VCMUL vcB;


vcResult1 := rScalar __VCMUL vcB;
vcResult2 := vcA __VCMUL 3.3;

Operator __VCDIV
The operator calculates the quotient of two vectors or a vector and a scalar.
Syntax

<vector variable> := <vector dividend> __VCDIV <vector


divisor> | < vector dividend> __VCMUL <scalar divisor> ;

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 579 / 1158
Data types

Example of division

FUNCTION_BLOCK FB_DIV
VAR
iScalar : INT := 3;
rScalar : REAL := 1.5;
vcA : __VECTOR[3] OF REAL := __VCSET_REAL(3, 3, 3);
vcB : __VECTOR[3] OF REAL := __VCSET_REAL(1, 2, 3);
vcResult0 : __VECTOR[3] OF REAL;
vcResult1 : __VECTOR[3] OF REAL;

Reference, programming
vcResult2 : __VECTOR[3] OF REAL;
END_VAR

vcResult0 := vcA __VCDIV vcB;


// ERROR CODE vcResult1 := rScalar __VCDIV vcB;
// ERROR CODE vcResult1 := iScalar __VCDIV vcB;
// ERROR CODE vcResult1 := 3.3 __VCDIV vcB;
vcResult2 := vcA __VCDIV 1.5;
vcResult2 := vcA __VCDIV iScalar;
vcResult2 := vcA __VCDIV rScalar;

Operator __VCDOT
The operator calculates the dot product (scalar product) of two vectors.
Syntax

<scalar variable> := <1st vector operand> __VCDOT <2nd vector


operand> ;

Example of a dot product

FUNCTION_BLOCK FB_DOT
VAR
rResult : REAL;
vcA : __VECTOR[3] OF REAL := __VCSET_REAL(3, 3, 3);
vcB : __VECTOR[3] OF REAL := __VCSET_REAL(1, 2, 3);
END_VAR

rResult := vcA __VCDOT vcB; // = 18

Operator __VCSQRT
The operator calculates the square root of each element in the vector.
Syntax

<vector variable> := __VCSQRT( <vector operand> );

Example of a square root

FUNCTION_BLOCK FB_SQRT
VAR
vcA : __VECTOR[3] OF REAL := __VCSET_REAL(4, 9, 16);
vcResult0 : __VECTOR[3] OF REAL;
END_VAR

vcResult0 := __VCSQRT(vcA);

R911403764, Edition 08 Bosch Rexroth AG


580 / 1158 ctrlX PLC Engineering
Data types

Operator __VCMAX
The operator calculates the maximum vector of two vectors. The maximum is
determined element by element.
Syntax

<vector variable> := __VCMAX( <1st vector operand>, <2nd


vector operand>);

Example of a maximum vector

FUNCTION_BLOCK FB_MAX
VAR
vcA : __VECTOR[3] OF REAL := __VCSET_REAL(3, 3, 3);
vcB : __VECTOR[3] OF REAL := __VCSET_REAL(1, 2, 6);
vcResult0 : __VECTOR[3] OF REAL;
END_VAR

vcResult0 := __VCMAX(vcA, vcB);

Operator __VCMIN
The operator calculates the minimum vector of two vectors. The minimum is
determined element by element.
Syntax

<vector variable> := __VCMIN( <1st vector operand>, <2nd


vector operand>);

Example of a minimum vector

FUNCTION_BLOCK FB_MIN
VAR
vcA : __VECTOR[3] OF REAL := __VCSET_REAL(3, 3, 3);
vcB : __VECTOR[3] OF REAL := __VCSET_REAL(1, 2, 6);
vcResult0 : __VECTOR[3] OF REAL;
END_VAR

vcResult0 := __VCMIN(vcA, vcB);

Operator __VCSET_REAL
The operator sets all elements of a vector in a statement. The elements have
the REAL data type.
Syntax

<vector variable> := __VCSET_REAL( <first literal>, ( < next


literal> )+ ) ;
( ... )+ // number of elements have to match

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 581 / 1158
Data types

Example

FUNCTION_BLOCK FB_SET
VAR
vcA : __VECTOR[3] OF REAL := __VCSET_REAL(3, 3, 3);
vcB : __VECTOR[3] OF REAL := __VCSET_REAL(1, 2, 3);
END_VAR

vcA := __VCSET_REAL(4, 4, 4);


vcB := __VCSET_REAL(1.1, 2.2, 3.3);

Reference, programming
Operator __VCSET_LREAL
The operator sets all elements of a vector at once in a statement. The elements
have the LREAL data type.
They can be used wherever variables are valid, such as in assignments in imple-
mentations or as parameters in function calls.
Syntax

<vector variable> := __VCSET_LREAL( <first literal>, ( < next


literal> )+ ) ;
( ... )+ // number of elements have to match

Example

FUNCTION_BLOCK FB_SET
VAR
vclA : __VECTOR[3] OF LREAL := __VCSET_LREAL(3, 3, 3);
vclB : __VECTOR[3] OF LREAL := __VCSET_LREAL(1, 2, 3);
END_VAR

vclA := __VCSET_LREAL(-1.7976931348623158E+308, 0.0,


1.7976931348623158E+308);
vclB := __VCSET_LREAL(-1.7976931348623158E+308, 0.0,
1.7976931348623158E+308);

Operator __VCLOAD_REAL
The operator interprets any arbitrary memory area as a vector. This is helpful
for connecting vector variables to existing code. The operator requires 2 param-
eters. The first parameter indicates the number of vector elements. The second
parameter is a pointer to the REAL data.
Syntax

<vector variable> := __VCLOAD_REAL( <vector size>, <pointer to


data of type REAL> ) ;
<vector size> : 2 | 3 | 4 | 5| 6 | 7| 8

R911403764, Edition 08 Bosch Rexroth AG


582 / 1158 ctrlX PLC Engineering
Data types

Example of vectorization

FUNCTION_BLOCK FB_LOAD
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
rData0 : REAL := 1.234;
rData1: REAL := 5.678;
rData2 : REAL := 9.123;
pData: POINTER TO REAL := ADR(rData0);

vcA : __VECTOR[3] OF REAL := __VCSET_REAL(3, 3, 3);


END_VAR

vcA := __VCLOAD_REAL(3, pData);

Operator __VCLOAD_LREAL
The operator interprets any arbitrary memory area as a vector. This is helpful
for connecting vector variables to existing code. The operator requires 2 param-
eters. The first parameter indicates the number of vector elements. The second
parameter is a pointer to the LREAL data.
Syntax

<vector variable> := __VCLOAD_REAL( <vector size>, <pointer to


data of type LREAL> );
<number of vector elements> : 1 | 2 | 3 | 4 | 5| 6 | 7| 8

Example of vectorization

FUNCTION_BLOCK FB_LOAD
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
lrData0 : LREAL := -1.7976931348623158E+308;
lrData1: LREAL := 1.6E+308;
lrData2 : LREAL := 1.7E+308;
lrData3 : LREAL := -1.6E+308;
plData: POINTER TO LREAL := ADR(lrData0);

vclA : __VECTOR[4] OF LREAL := __VCSET_LREAL(4, 4, 4, 4);


END_VAR
vclA := __VCLOAD_LREAL(4, plData);

Operator __VCSTORE
The operator saves/copies the contents of the vector to the specified memory
address. The number and the types of elements are automatically applied from
the vector variables.
Syntax

__VCSTORE( <pointer to data>, <vector variable> );

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 583 / 1158
Data types

Example of storage

FUNCTION_BLOCK FB_STORE
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
rData0 : REAL := 3;
rData1: REAL := 3;

Reference, programming
rData2 : REAL := 3;
pData: POINTER TO REAL := ADR(rData0);

lrData0 : LREAL := 4;
lrData1: LREAL := 4;
lrData2 : LREAL := 4;
lrData3 : LREAL := 4;
plData: POINTER TO LREAL := ADR(lrData0);

vcA : __VECTOR[3] OF REAL := __VCSET_REAL( 1.234, 5.678,


9.123);
vclA : __VECTOR[4] OF LREAL :=
__VCSET_LREAL(-1.7976931348623158E+308, 1.6E+308, 1.7E+308,
-1.6E+308);
END_VAR

__VCSTORE(pData, vcA);
__VCSTORE(plData, vclA);

See also
● ⮫ Chapter 18.16.5 Declaring Arrays on page 166
● ⮫ Chapter POU 'CheckBounds' on page 848

32.5.20 Structure
A structure is a user-defined data type, which combines multiple variables of
any data type into a logical unit. The variables declared within a structure are
called members.
You make the type declaration of a structure in a “DUT” object which you
create in the “Project 🠂 Add Object 🠂 DUT” menu or in the context menu of an
application.
Syntax

TYPE <structure name> :


STRUCT
( <variable declaration optional with initialization> )+
END_STRUCT
END_TYPE
<structure name> is an identifier which is valid in the entire project so
that you can use it like a standard data type. Moreover, you can declare any
number of variables (at least one) which are supplemented optionally by an
initialization.

R911403764, Edition 08 Bosch Rexroth AG


584 / 1158 ctrlX PLC Engineering
Data types

Structures can also be nested. This means that you declare a structure member
with an existing structure type. Then the only restriction is that you must not
assign any address to the variable (structure member). (The AT declaration is
not permitted here.)

Example
Type declaration
TYPE S_POLYGONLINE :
STRUCT
aiStart : ARRAY[1..2] OF INT := [-99, -99];
aiPoint1 : ARRAY[1..2] OF INT;
aiPoint2 : ARRAY[1..2] OF INT;
aiPoint3 : ARRAY[1..2] OF INT;
aiPoint4 : ARRAY[1..2] OF INT;
aiEnd : ARRAY[1..2] OF INT := [99, 99];
END_STRUCT
END_TYPE

Extension of a type declaration


An additional structure is declared from an existing structure. In addition to its
own members, the extended structure also has the same structure members as
the base structure.
Syntax

TYPE <structure name> EXTENDS <basis structure> :


STRUCT
( <variable declaration optional with initialization> )+
END_STRUCT
END_TYPE

Example
Type declaration
TYPE S_PENTAGON EXTENDS S_POLYGONLINE :
STRUCT
aiPoint5 : ARRAY[1..2] OF INT;
END_STRUCT
END_TYPE

Declaration and initialization of structure variables

Example
PROGRAM progLine
VAR
sPolygon : S_POLYGONLINE := (aiStart:=[1,1],
aiPoint1:=[5,2], aiPoint2:=[7,3], aiPoint3:=[8,5],
aiPoint4:=[5,7], aiEnd:=[1,1]);
sPentagon : S_PENTAGON := (aiStart:=[0,0], aiPoint1:=[1,1],
aiPoint2:=[2,2], aiPoint3:=[3,3], aiPoint4:=[4,4],
aiPoint5:=[5,5], aiEnd:=[0,0]);
END_VAR

You must not permitted to use initializations with variables. For an example of
initializing an array of a structure, see the help page for the data type ARRAY.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 585 / 1158
Data types

Access to a structure member


You access structure members with the following syntax:
<variable name> . <component name>

Example
PROGRAM prog_Polygon
VAR
sPolygon : S_POLYGONLINE := (aiStart:=[1,1],
aiPoint1:=[5,2], aiPoint2:=[7,3], aiPoint3:=[8,5],
aiPoint4:=[5,7], aiEnd:=[1,1]);

Reference, programming
iPoint: INT;
END_VAR

// Assigns 5 to aiPoint
iPoint := sPolygon.aiPoint1[1];
Result: iPoint = 5

Symbolic bit access in structure variables


You can declare a structure with variables of data type BIT to combine indi-
vidual bits into a logical unit. Then you can symbolically address individual bits
by a name (instead of by a bit index).
Syntax declaration

TYPE <structure name> :


STRUCT
( <bit name> : BIT; )+
END_STRUCT
END_TYPE
Syntax of bit access
<structure name> . <bit name>

Example
Type declaration

TYPE S_CONTROL :
STRUCT
bitOperationEnabled : BIT;
bitSwitchOnActive : BIT;
bitEnableOperation : BIT;
bitError : BIT;
bitVoltageEnabled : BIT;
bitQuickStop : BIT;
bitSwitchOnLocked : BIT;
bitWarning : BIT;
END_STRUCT
END_TYPE
Bit access

FUNCTION_BLOCK FB_Controller
VAR_INPUT
xStart : BOOL;
END_VAR
VAR_OUTPUT

R911403764, Edition 08 Bosch Rexroth AG


586 / 1158 ctrlX PLC Engineering
Data types

END_VAR
VAR
ControlDriveA : S_CONTROL;
END_VAR

IF xStart = TRUE THEN


// Symbolic bit access
ControlDriveA.bitEnableOperation := TRUE;
END_IF

PROGRAM PLC_PRG
VAR
fbController : FB_Controller;
END_VAR

fbController();
fbController.xStart := TRUE;

References and pointers to BIT variables are invalid declarations, as well as


array elements with base type BIT.
See also
● ⮫ Chapter 32.4.12 Bit Access in Variables on page 550

See also
● ⮫ Chapter 32.5.18 Data Type 'ARRAY' on page 569
● ⮫ Chapter 32.5.14 Data Type 'BIT' on page 565
● ⮫ Chapter Object 'DUT' on page 815

32.5.21 Enumerations
An enumeration is a user-defined data type composed of a series of comma-
separated components (enumeration values) for declaring user-defined varia-
bles. Moreover, you can use the enumeration components like constants whose
identifier <enumeration name>.<component name> is known globally in the
project.
You declare an enumeration in a DUT object, which you have already created in
the project by clicking “Add Object”.
In the application code, you can use the enumeration components like con-
stants whose identifier <enumeration name>.<component name> is known
globally in the project.

Declaration
Syntax

{attribute 'strict'}
Type <enmeration name> :
(
<component deklaration> ,
<component deklaration>
)<basic data type> := <default variable initialization>
;
END_TYPE

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 587 / 1158
Data types

{attribute 'strict'} Optional


The pragma causes a strict type test to be performed
as described below.
The pragma is optional, but recommended.
<enumeration name> Name of the enumeration that can be used as data
type in the code.
Example: COLOR_BASIC
<component declara- The values of the components are initialized automati-
tion> cally: Starting at 0, the values are incremented contin-
uously by 1. However, you can also explicitly assign

Reference, programming
fixed initial values to the individual components.
Example: yellow := 1
<basic data type> Optional
You can explicitly declare one of the following basic
data types:
UINT | SINT | USINT | DINT | UDINT | LINT |
ULINT | BYTE | WORD | DWORD | LWORD
If no explicit basic data type is declared, the basic data
type INT is used automatically.
<default variable initi- Optional
alization> One of the components can be explicitly declared as
initial component. If no explicit initialization is speci-
fied, the system automatically initializes with the top-
most component.
{attribute 'qualified_only'}
{attribute 'strict'}
TYPE COLOR_BASIC :
(
yellow,
green,
blue,
black
) // Basic data type is INT, default initialization for all
COLOR_BASIC variables is yellow
;
END_TYPE
In an enumeration declaration, at least 2 components are usually declared.
However, you can declare as many as you want. Every single component can
be assigned its own initialization. Enumerations automatically have the basic
data type INT, but you can specify another basic data type. Moreover, you can
specify a component in the declaration with which an enumeration variable is
then initialized.
The pragma {attribute 'strict'} causes a strict type test to be performed
as described below.

R911403764, Edition 08 Bosch Rexroth AG


588 / 1158 ctrlX PLC Engineering
Data types

Example

{attribute 'qualified_only'}
{attribute 'strict'}
TYPE COLOR_BASIC :
(
yellow,
green,
blue,
black
) // Basic data type is INT, default initialization for all
COLOR_BASIC variables is yellow
;
END_TYPE

Enumeration with explicit basic data type


Extensions to the IEC 61131-3 standard
The basic data type for an enumeration declaration is INT by default. However,
you can also declare enumerations that are based explicitly on another integer
data type.
<basic data type> : INT | UINT | SINT | USINT | DINT | UDINT |
LINT | ULINT | BYTE | WORD | DWORD | LWORD

Example
Enumeration mit Basisdatentyp DWORD

TYPE COLOR :
(
white := 16#FFFFFF00,
yellow := 16#FFFFFF00,
green := 16#FF00FF00,
blue := 16#FF0000FF,
black := 16#88000000
) DWORD := black
; // Basic data type is DWORD, default initialization for all
COLOR variables is black
END_TYPE

Strict programming rules


In PLC Engineering V3.5 SP7 and higher, the pragma
NOTICE
{attribute 'strict'} is added automatically in the
first line when declaring an enumeration.
The strict programming rules are activated when adding the pragma
{attribute 'strict'}.
The following code is considered a compiler error:
● Arithmetic operations with enumeration components
For example, an enumeration variable cannot be used as a counter variable
in a FOR loop.
● Assignment of a constant value, which does not correspond to an enumera-
tion value, to an enumeration component
● Assignment of a non-constant variable, which has another data type as the
enumeration, to an enumeration component

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 589 / 1158
Data types

Arithmetic operations can lead to undeclared values being assigned to enumer-


ation components. A better programming style is to use SWITCH/CASE state-
ments for processing component values.

Declaration and initialization of enumeration variables


Syntax

<variable name> : <enumeration name> ( := <initialization> )? ;


For a declaration of an enumeration variable with user-defined data type
<EnumerationName>, this can be initialized with an enumeration component.

Reference, programming
Example

PROGRAM PLC_PRG
VAR
colorCar: COLOR;
colorTaxi : COLOR := COLOR.yellow;
END_VAR
The variable colorCar is initialized with COLOR.black. That is the default
initialization for all enumeration variables of type COLOR and defined this way
in the type declaration. The variable colorTaxi has its own initialization.

If no initializations are specified, then the initialization value is 0.

Example

PROGRAM PLC_PRG
VAR
cbFlower : COLOR_BASIC;
cbTree: COLOR_BASIC := COLOR_BASIC.green;
END_VAR
The variable cbFlower is initialized with COLOR_BASIC.yellow. That is the
default initialization for all enumeration variables of type COLOR_BASIC.
Because the enumeration declaration does not specify a component for initial-
ization, the system automatically initializes with the component that has the
value 0. This is usually the first of the enumeration components. However, it
can also be another component that is not in the first position but explicitly
initialized with 0.
The variable cbTree has an explicit initialization.

If no value is specified for both the type and the variable, then the following
rule applies: If an enumeration contains a value for 0, then this value is the
default initialization, and if not, then the first component in the list.

R911403764, Edition 08 Bosch Rexroth AG


590 / 1158 ctrlX PLC Engineering
Data types

Example
Initialisierung mit der 0-Komponente

TYPE ENUM :
(
e1 := 2,
e2 := 0,
e3
)
;
END_TYPE

PROGRAM PLC_PRG
VAR
e : ENUM;
END_VAR
The variable e is initialized with ENUM.e2.
Initialisierung mit der ersten Komponente

TYPE ENUM2 :
(
e1 := 3,
e2 := 1,
e3
)
;
END_TYPE

PROGRAM PLC_PRG
VAR
e2 : ENUM2;
END_VAR

The variable e2 is initialized with ENUM.e1.

Unique access to enumeration components


Extensions to the IEC 61131-3 standard
The enumeration components can also be used as constant variables with
the identifier <enumeration name>.<component name>. Enumeration compo-
nents are recognized globally in the project and access to them is unique.
Therefore, a component name can be used in different enumerations.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 591 / 1158
Data types

Example
Komponente blue

PROGRAM PLC_PRG
VAR
cbFlower : COLOR_BASIC;
colorCar : COLOR;
END_VAR

(* unambiguous identifiers although the component names are

Reference, programming
identical *)
cbFlower := COLOR_BASIC.blue;
colorCar := COLOR.blue;

(* invalid code *)
cbFlower := blue;
colorCar := blue;

Also refer to
● ⮫ Chapter 32.3.86 Operator - Enumeration Namespace on page 538

32.5.22 Alias
A data type alias is the declaration of a user-defined data type that is used to
create an alternate name for a base type, data type, or function block.
You make the type declaration of an alias in a “DUT object”, which you can
create via the menu “Project 🠂 Add object 🠂 DUT” menu or via the context
menu of an application.
Syntax
TYPE <DUT name> : <type name> ;
END_TYPE

Permitted types
<type name> <basic type name>
<data type name>
<function block name>

Example
Alias data type for variables of type STRING or ARRAY, if they need a certain
length.
Deklaration

TYPE FRAME : ARRAY[0..1499] OF BYTE; END_TYPE


TYPE SYMBOL : STRING(512); END_TYPE
Aufruf
PROGRAM PLC_PRG
VAR
frameF : FRAME;
symbolS : SYMBOL;
END_VAR

R911403764, Edition 08 Bosch Rexroth AG


592 / 1158 ctrlX PLC Engineering
Data types

Example
Alias data type for variables that require a different initial value than the one
provided by the compiler.

TYPE INDEX : DINT := -1; END_TYPE

Example
Alias data type for variables of a specific type that are to hold only a specific
subset of values of the original type.

{attribute 'qualified_only'}
VAR_GLOBAL CONSTANT
c_diMaxRune : DINT := DINT#16#0010FFFF;
END_VAR
TYPE RUNE : DINT(0..GVL.c_diMaxRune); END_TYPE

Example
Alias data type for types from another namespace, for example, for types from
a subordinate library that should be available in the current namespace.

TYPE ENCODING: SBB.ENCODING; END_TYPE (*ENUM*)


TYPE RUNE : UTF8.RUNE; END_TYPE (*SUBTYPE*)
TYPE INFO : STR.IFNFO; END_TYPE (*STRUCT*)
TYPE IBuilder : SBB.IBuilder; END_TYPE (*INTERFACE*)
TYPE Tange: SBB.Range; END_TYPE (*FUNCTION_BLOCK*)
This means that in many cases a container library can be dispensed with, as
all types of subordinate libraries become part of their own library in this way.

32.5.23 Data Type 'UNION'


A UNION is a data structure that usually contains different data types.
In a union, all components have the same offset and therefore the same
amount of memory. In the following declaration example of a union, an assign-
ment to name.a will also affect name.b.

Example

TYPE name:
UNION
a : LREAL;
b : LINT;
END_UNION
END_TYPE

32.5.24 Subrange Types


A subrange type is a data type whose value range is a subset of a base type.
Syntax for the declaration:

<name> : <int type> (<lower limit>..<upper limit>);

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 593 / 1158
Data types

<name> valid IEC identifier


<int data type of the subrange
type> (SINT, USINT, INT, UINT, DINT, UDINT, BYTE, WORD, DWORD, LINT,
ULINT, LWORD).
<lower Lower limit of the range: constants that have to be compatible with
limit> the basic data type. The lower limit is also included in this range.
<upper Upper limit of the range: constants that have to be compatible with
limit> the base data type. The upper limit is also included in this range.

Examples:

Reference, programming
VAR
i : INT (-4095..4095);
ui : UINT (0..10000);
END_VAR

If you assign a value to a subrange type in the declaration or implementation


section that is not within this range (example: i:=5000), then PLC Engineering
issues an error message.
Please note: In runtime mode, it is possible to monitor the range limits of a
subrange type by using the implicit monitoring functions CheckRangeSigned
and CheckRangeUnsigned.
See also
● ⮫ Chapter POU 'CheckRangeSigned' on page 854
● ⮫ Chapter POU 'CheckRangeUnsigned' on page 857

32.5.25 Redundancy Area Types


By assigning a redundancy area type to objects of the application, you can
influence which data is determined for the synchronization. The redundancy
area types can be assigned only to variables of POUs of type PROGRAM or of
type “Global Variable List”, and are then valid for all variables of the object.
The assignment is done programmatically in the IEC code. The respective
redundancy area type (synchronization type) determines whether and when the
redundancy data is aligned.
Objects which are activated in the “Redundancy Configuration” editor on
the “Registered Areas” tab automatically get the redundancy area type
AREA_INPUT. As a result, these objects are registered one time. Afterwards, its
synchronization type can be changed programmatically by means of a function
call.
Redundancy Description
Area Type
AREA_INPUT Data with this type is synchronized one time when the second
PLC is booted up. After the alignment of this data, the second
PLC goes into passive mode and the first PLC switches from
standalone mode to active mode.
Hint: In the “Redundancy Configuration” object, on the
“Registered Areas” tab, you can assign this redundancy area type
by activating variables or addresses. Data activated there is reg-
istered as AREA_INPUT (default) and synchronized when booted
up.

R911403764, Edition 08 Bosch Rexroth AG


594 / 1158 ctrlX PLC Engineering
Data types

Redundancy Description
Area Type
AREA_NONE No synchronization
Assigned by function call
Hint: In the “Redundancy Configuration” object, on the
“Registered Areas” tab, you can assign this redundancy area type
by deactivating variables or addresses.
AREA_OUTPU No synchronization, but a CRC is performed.
T
AREA_PASSI Synchronizes before writing of the outputs (limited data size)
VE Assigned by function call
AREA_SYNCH Synchronizes at each task cycle start (limited data size)
RO Configuration in the CFG file of the RTS
Assigned by function call

See also
● ⮫ Chapter 32.5.26 Redundancy State on page 594

32.5.26 Redundancy State


The library Redundancy provides the structure RedundancyState with the
components describes below.
● By calling GetRedundancyState(ADR(<RedundancyState name>));, the
state of the redundancy system is read and stored. As a result, you get
programmatic access to the redundancy state and can display it, for example
in a visualization.
● The redundancy state is also automatically displayed in the “Redundancy
Configuration” editor, on the “Redundancy State” tab. There in the system
graphic in the lower right corner of the respective PLC, the redundancy state
is displayed symbolically by circle symbols. Moreover, the state is output as
text below in the “Redundancy State” field. In this way, you can monitor the
state of the redundancy system.
The following table compares these two options.
Circle Output text STRUCT Description
Symbol under Redundancy
“Redundanc State
y State”
RS_START Initial state
Tries (when configured correctly) to
synchronize with the other PLC
If not correctly configured, then the
state is set to RS_SIMULATION_START.
RS_SYNCHRO Boot application downloaded, data
synchronized, and task started
Fieldbus deactivated
“Active” RS_CYCLE_A Works in redundant synchronized
CTIVE mode as active PLC
Fieldbus activated
“Passive” RS_CYCLE_S Works in redundant synchronized
TANDBY mode as passive PLC
Fieldbus deactivated

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 595 / 1158
Data types

Circle Output text STRUCT Description


Symbol under Redundancy
“Redundanc State
y State”
“Standalone RS_CYCLE_S Works in standalone mode, not
” TANDALONE synchronized with the other PLC
Fieldbus activated
“Error” RS_CYCLE_E Fieldbus error, occurred in redundant
RROR synchronized mode as active PLC
Fieldbus deactivated

Reference, programming
“Simulation RS_SIMULAT If not configured
” ION Works in standalone mode, not
synchronized with the other PLC
Fieldbus deactivated
RS_BOOTUP_ If in state RS_CYCLE_ACTIVE
ERROR The other PLC will become active
because the PROFIBUS displays a
problem with the active PLC (us).
Fieldbus deactivated
RS_SHUTDOW Ends the runtime systems in state
N_ACTIVE RS_CYCLE_STANDALONE
Note: Leave the fieldbus activated on
download.
RS_SHUTDOW Ends the runtime systems in state
N_STANDBY RS_CYCLE_STANDBY
Note: Deactivate the fieldbus on down-
load.
RS_SYNCHRO Error occurred during the state
_ERROR RS_SYNCHRO
Fieldbus deactivated
RS_SIMULAT With setting Simulation=1
ION_START Works in standalone mode after the
start, not synchronized with the other
PLC
Fieldbus deactivated
Note: A synchronization can be trig-
gered later with library functions.
RS_NO_LICE If no license is installed and the demo
NCE time has expired.
No operation
“Unknown” No assign- Indicates that the connection to the
ment PLC is not online

See also
● ⮫ Chapter 32.5.25 Redundancy Area Types on page 593

R911403764, Edition 08 Bosch Rexroth AG


596 / 1158 ctrlX PLC Engineering
Pragmas

32.6 Pragmas
32.6.1 Pragmas – General information
Pragma statements affect the properties of one or multiple variables with
regard to the compilation or pre-compilation. Various categories of pragmas
are available.

32.6.2 Message Pragmas


Message pragmas serve to force the display of messages in the Message
window during the compilation process.
Insertion position: separate or already existing line in the text editor of a POU.
Table 20: 4 types of message pragmas
Pragma Message type
{text “Text”: display of <textstring>.
<'textstring
'>}
{info “Information ”: display of <textstring>.
<'textstring
'>}
{warning “Warning”: display of <textstring>.
<'textstring Unlike the attribute pragma 'obsolete', you define the
'>} warning locally for the current position.
{error “Error ”: display of <textstring>.
<'textstring
'>}
In the PLC Engineering Message window you can jump with the help of the
commands “Next Message” and “Previous Message” from a message of the
category “Information”, “Warning” and “Error” to the source position of the
message. This means you jump to the position where the pragma is added in
the source code.

Example
VAR
var : INT; {info 'TODO: should get another name'}
bvar : BOOL;
arrTest : ARRAY [0..10] OF INT;
i:INT;

END_VAR
arrTest[i] := arrTest[i]+1;
ivar:=ivar+1;

{warning 'This is a warning'}


{text 'Part xy has been compiled completely'}
Display in the Message window:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 597 / 1158
Pragmas

Reference, programming
See also
● ⮫ Chapter 32.6.3 Conditional pragmas on page 597

32.6.3 Conditional pragmas


The purpose of conditional pragmas is to influence the generation of code
in the pre-compilation process or the compilation process. The ST implementa-
tion language supports these pragmas.
They use conditional pragmas in the implementations of
NOTICE
ST-POUs. PLC Engineering does not evaluate these con-
ditional pragmas if you use them in the declaration part.
With conditional pragmas you affect whether implementation code is taken into
account for the compilation. For example, this can depend on whether a certain
variable is declared, whether a certain function block exists, etc.
Pragma Description
The value can be queried and compared later with
{define <identifier> <string>}
hasvalue.
The {define} statement of the identifier <identifier>
is cancelled. The identifier is now “undefined” again. The
{undefine <identifier>}
pragma is ignored if the specified identifier is not defined
at all.
{IF <expr>}... These are pragmas for the conditional compilation.
{ELSIF The specified expressions <expr> must be constant at the
<expr>}... time of compilation; they are evaluated in the order in
{ELSE}... which they appear here until one of the expressions indi-
END_IF} cates a non-zero value. The text linked to the statement
is compiled. The other lines are ignored. The order of
the sections is fixed. The ELSIF and ELSE sections are
optional. The ELSIF-segments may occur any number of
times. You can use several conditional compilation opera-
tors within the constants <expr>.
<expr> One or more operators can be used within the constant
expression <expr> within the conditional compilation
pragma {IF} or {ELSIF}.
Expressions and define definitions can be entered as “compiler definitions” in
the “Compile” tab in the “Properties” dialog of POUs. If you enter define defi-
nitions in the properties dialog, you must omit the term {define}, contrary to
the definition in the implementation code. In addition, you can specify several
define definitions in the properties dialog, separated by commas.

R911403764, Edition 08 Bosch Rexroth AG


598 / 1158 ctrlX PLC Engineering
Pragmas

Also refer to
● ⮫ Chapter 32.1.4 Structured text and Extended Structured text (ExST)
on page 379

Operator defined (<identifier>)


This operator causes that the expression obtains the value TRUET. It is required
that the identifier <Identifier> was defined using a {define} statement
and not undefined again afterwards with an {undefine} statement. Otherwise,
FALSE is returned.

Example
Prerequisite: There are the applications App1 and App2. The variable pdef1 is
defined by a {define} instruction in App1, but not in App2.

{IF defined (pdef1)}


(* This code is processed in App1 *)
{info 'pdef1 defined'}
hugo := hugo + SINT#1;
{ELSE}
(* the following code is only processed in App2 *)
{info 'pdef1 not defined'}
hugo := hugo - SINT#1;
{END_IF}
There is an additional example of a message pragma: Only the message pdef1
defined is displayed in the message window when the application is com-
piled, as pdef1 is actually defined. The message pdef1 not defined is
displayed if pdef1 is not defined.

Operator defined (variable: <variable>)


With this operator, the expression becomes TRUE if the variable <variable> is
declared within the current scope of validity. Otherwise, FALSE is returned.

Example
Prerequisite: There are two applications App1 and App2. The variable g_bTest
is declared in App1, but not in App2.

{IF defined (variable: g_bTest)}


(* the following code is only processed in App2*)
g_bTest := x > 300;
{END_IF}

Operator defined (type: <identifier>)


The operator causes the expression to receive the value TRUE if a data type
with the identifier <identifier> is declared; otherwise FALSE is returned.

Example
Prerequisite: There are two applications App1 and App2. Data type DUT is
declared in App1, but not in App2.

{IF defined (type: DUT)}


(* the following code is only processed in App1*)
bDutDefined := TRUE;
{END_IF}

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 599 / 1158
Pragmas

Operator defined (pou: <pou name>)


The operator causes the expression to receive the value TRUE if one of the
following objects named <pou-name> is present:
● Function block
● Function
● Program
● Action
● Method
● Interface

Reference, programming
Otherwise, the expression FALSE is returned.

Example
Prerequisite: There are two applications App1 and App2. The CheckBounds
function block is present in App1, but not in App2.

{IF defined (pou: CheckBounds)}


(* the following code is only processed in App1 *)
arrTest[CheckBounds(0,i,10)] :=
arrTest[CheckBounds(0,i,10)] + 1;
{ELSE}
(* the following code is only processed in App2 *)
arrTest[i] := arrTest[i]+1;
{END_IF}

Operator defined (task: <identifier>)


Not yet implemented!
With this operator, the expression becomes TRUE if a task is defined with the
name <identifier>. Otherwise, FALSE is returned.

Example
Prerequisite: There are two applications App1 and App2. Task PLC_PRG_Task
is defined in App1, but not in App2.

IF defined (task: PLC_PRG_Task)}


(* the following code is only processed in App1 *)
erg := plc_prg.x;
{ELSE}
(* the following code is only processed in App2 *)
erg := prog.x;
{END_IF}

Operator defined (resource: <identifier>)


Not yet implemented!
The operator causes the expression to return TRUE if a resource object named
<identifier> exists for the application; otherwise it returns FALSE.

R911403764, Edition 08 Bosch Rexroth AG


600 / 1158 ctrlX PLC Engineering
Pragmas

Example
Prerequisite: There are the two applications App1 and App2. There is a
resource object glob_var1 of the Global Variable List App1, but not for App2.

{IF defined (resource:glob_var1)}


(* the following code is only processed in App1 *)
gvar_x := gvar_x + ivar;
{ELSE}
(* the following code is only processed in App2 *)
x := x + ivar;
{END_IF}

Operator defined (IsSimulationMode)


The operator causes the expression to be given the value TRUE if the applica-
tion runs on a simulated device, i.e. in simulation mode.
Also refer to
● ⮫ Chapter 21.2 Testing in Simulation Mode on page 271

Operator defined (IsLittleEndian)


The operator causes the expression to be given the value FALSE, if the CPU
memory is organized in Big Endian (Motorola byte order).

Operator defined (IsFPUSupported)


If the expression returns the value TRUE, the code generator produces an FPU
code (for the floating-point unit processor) when calculating with REAL values.
Otherwise PLC Engineering emulates FPU operations, which is much slower.

Operator hasvalue (RegisterSize, '<register size>')


<RegisterSize>: Size of a CPU register in bits
The operator causes the expression to return the value TRUE if the size of a
CPU register is equal to <register size>.
Possible values for <RegisterSize>
● 16 for C16x,
● 64 for X86-64 bit
● 32 for X86-32 Bit

Operator hasvalue (PackMode, '<pack mode value>')


The checked pack mode depends on the device description, not on the pragma
that can be specified for individual DUTs.

Operator hasattribute (pou: <pou name>, '<attribute>')


The operator causes the expression to return TRUE if the <attribute> is speci-
fied in the first line of the declaration part of the <pou name> function block;
otherwise it returns FALSE.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 601 / 1158
Pragmas

Example
Prerequisite: There are the two applications App1 and App2. The function
fun1 is declared in App1 and App2, but it is additionally provided with the
pragma {attribute 'vision'} in App1.
In App1:

{attribute 'vision'}
FUNCTION fun1 : INT
VAR_INPUT

Reference, programming
i : INT;
END_VAR
VAR
END_VAR
In App2:

FUNCTION fun1 : INT


VAR_INPUT
i : INT;
END_VAR
VAR
END_VAR

Pragmaanweisung:

{IF hasattribute (pou: fun1, 'vision')}


(* the following code is only processed in App1 *)
ergvar := fun1(ivar);
{END_IF}

Also refer to
● ⮫ Chapter User-defined attributes on page 605

Operator hasattribute (variable: <variable>, '<attribute>')


The operator causes the expression to return TRUE if the variable is assigned
the pragma {attribute '<attribute>'} in the line before the variable decla-
ration; otherwise it returns FALSE.

Example
Prerequisite: There are the two applications App1 and App2. The variable
g_globalInt is used in App1 and App2, but the attribute 'DoCount' is
assigned additionally in App1.
Deklaration g_GlobalInt in App1

VAR_GLOBAL
{attribute 'DoCount'}
g_globalInt : INT;
g_multiType : STRING;
END_VAR

R911403764, Edition 08 Bosch Rexroth AG


602 / 1158 ctrlX PLC Engineering
Pragmas

Deklaration g_GlobalInt in App2:

VAR_GLOBAL
g_globalInt : INT;
g_multiType : STRING;
END_VAR
Pragmaanweisung:

{IF hasattribute (variable: g_globalInt, 'DoCount')}


(* the following code is only processed in App1 *)
g_globalInt := g_globalInt + 1;
{END_IF}

Also refer to
● ⮫ Chapter User-defined attributes on page 605

Operator hastype (variable: <variable>, <type-spec>)


With this operator, the expression becomes TRUE if the variable <variable> is
of the data type <type-spec>. Otherwise, FALSE is returned.
Possible data types for <type-spec>:
● BOOL
● BYTE
● DATE
● DATE_AND_TIME (DT)
● DINT
● DWORD
● INT
● LDATE
● LDATE_AND_TIME (LDT)
● LINT
● LREAL
● LTIME
● LTIME_OF_DAY (LTOD)
● LWORD
● REAL
● SINT
● STRING
● TIME
● TIME_OF_DAY (TOD)
● ULINT
● UDINT
● UINT
● USINT
● WORD
● WSTRING

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 603 / 1158
Pragmas

Example
Prerequisite: There are two applications, App1 and App2. The variable
g_multitype is declared in App1 with data type LREAL, in App2 with data
type STRING.

{IF (hastype (variable: g_multitype, LREAL))}


(* the following code is only processed in App1 *)
g_multitype := (0.9 + g_multitype) * 1.1;
{ELSIF (hastype (variable: g_multitype, STRING))}
(* the following code is only processed in App2 *)

Reference, programming
g_multitype := 'this is a multitalent';
{END_IF}

Operator hasvalue (<define-ident>, '<char-string>')


With this operator, the expression becomes TRUE if a variable is defined with
the identifier <define-ident> and has the value <char-string>. Otherwise,
FALSE is returned.

Example
Prerequisite: There are the two applications App1 and App2. The variable test
is used in the applications App1 and App2. In App1, it obtains 1, in App2 , it
obtains 2.

{IF hasvalue(test,'1')}
(* the following code is only processed in App1 *)
x := x + 1;
{ELSIF hasvalue(test,'2')}
(* the following code is only processed in App2 *)
x := x + 2;
{END_IF}

Operator hasconstantvalue(<variable>, <literal expression>)


You can use this operator to query the declared value of a constant.

Example
Voraussetzung:

{IF hasconstantvalue(test,'1')}
(* the following code is only processed in App1 *)
x := x + 1;
{ELSIF hasconstantvalue(test,'2')}
(* the following code is only processed in App2 *)
x := x + 2;
{END_IF}

Operator NOT <operator>


The expression becomes TRUE if the reciprocal of <operator> returns TRUE.
<Operator> can be one of the operators described in this chapter.

R911403764, Edition 08 Bosch Rexroth AG


604 / 1158 ctrlX PLC Engineering
Pragmas

Example
Prerequisite: There are two applications, App1 and App2. PLC_PRG1 exists in
App1 and App2, and the POU CheckBounds exists only in App1.

{IF defined (pou: PLC_PRG1) AND NOT (defined (pou:


CheckBounds))}
(* the following code is only processed in App2 *)
bANDNotTest := TRUE;
{END_IF}

Operator <operator> AND <operator>


The expression becomes TRUE if both operators specified return TRUE.
<Operator> can be one of the operators described in this chapter.

Example
Prerequisite: There are the applications, App1 and App2. PLC_PRG1 exists in
App1 and App2, the POU CheckBounds only in App1.

{IF defined (pou: PLC_PRG1) AND (defined (pou: CheckBounds))}


(* the following code is only processed in App1 *)
bANDTest := TRUE;
{END_IF}

Operator <operator> OR <operator>


The expression returns TRUE if one of the specified operators returns TRUE.
<Operator> can be one of the operators described here.

Example
Prerequisite: There are two applications, App1 and App2. The POU PLC_PRG1
exists in App1 and App2, and the POU CheckBounds exists only in App1.

{IF defined (pou: PLC_PRG1) OR (defined (pou: CheckBounds))}


(* the following code is only processed in App1 and in App2 *)
bORTest := TRUE;
{END_IF}

Operator (<operator>)
() parenthesizes the operators.

Also refer to
● ⮫ Chapter 18.6 Using pragmas on page 134
● ⮫ Chapter User-defined attributes on page 605

32.6.4 Region Pragma


This pragma is used for grouping several lines into one block in a text editor.
The block can be named. Region pragmas can also be nested.
Code with region pragma: Expanded and collapsed views

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 605 / 1158
Pragmas

The pragma can be used in the ST editor and all declaration editors. Syntax
highlighting can be customized in the options.
See also
● ⮫ Chapter Command 'Collapse All Folds' on page 886

Reference, programming
● ⮫ Chapter Command 'Expand All Folds' on page 886

32.6.5 Attribute pragmas


Attribute pragmas – General information
Attribute pragmas are used to influence compilation and precompilation.
PLC Engineering supports a number of predefined attribute pragmas. In addi-
tion, user-defined pragmas can be used. These pragmas can be queried using
conditional pragmas before the compilation of the project.
Attributes are defined in the declaration. Exception: For the objects “Action”
and “Transition” without an own declaration, attributes can be defined at the
beginning of the implementation.
When defining own attributes, ensure that these are unambiguous. This is for
example the case if the attribute name has a prefix. The OEM can be used as
vendor prefix.

User-defined attributes
User-defined attributes are any application-defined or user-defined attributes
that you can apply to POUs, actions, data type definitions and variables. You
can query a user-defined attribute with the help of conditional pragmas before
the compilation of the application.
You can query user-defined attributes with conditional pragmas with the oper-
ator hasattribute.
More detailed information and examples can be found in the chapter 'Condi-
tional pragmas'.
Syntax:
{attribute 'attribute'}

Example for POUs and actions

Attribute 'vision' for function “fun1”


{attribute 'vision'}
FUNCTION fun1 : INT
VAR_INPUT
i : INT;
END_VAR

R911403764, Edition 08 Bosch Rexroth AG


606 / 1158 ctrlX PLC Engineering
Pragmas

Example for variables

Attribute 'DoCount' for variable ivar :


PROGRAM PLC_PRG
VAR
{attribute 'DoCount'};
ivar:INT;
bvar:BOOL;
END_VAR

Example for data types

Attribute 'aType' for data type DUT_1:


{attribute 'aType'}
TYPE DUT_1 :
STRUCT
a:INT;
b:BOOL;
END_STRUCT
END_TYPE

See also
● ⮫ Chapter 32.6.3 Conditional pragmas on page 597

Attribute 'call_after_global_init_slot'
VAR_INPUT declarations in functions or methods that
NOTICE
use the attribute lead to compile errors. Reason: Input
variables are unknown in this case at the time of the call,
which occurs implicitly during the online change.
The effect of this pragma is that all functions and programs containing this
attribute are called after the global initialization. You define the order of calling
by means of the attribute value.
Syntax:
{attribute 'call_after_global_init_slot' := '<slot>'}
<slot>: Integer value that defines the ranking in the order of the calls; the
lower the value, the earlier the call takes place. If several function blocks have
the same ranking for the attribute, then the order of their calls remains indefi-
nite.
Insert location: First line above the declaration part of functions and programs
If a method possesses the attribute, PLC Engineering determines all instances
of the corresponding function block and calls all instances in the specified
slot. In this case you have no influence on the order of the instances among
themselves.
See also
● ⮫ Chapter 32.10.1 Methods 'FB_Init', 'FB_Reinit', and 'FB_Exit' on page 660

Attribute 'call_after_init'
VAR_INPUT declarations in functions or methods that
NOTICE
use the attribute lead to compile errors. Reason: Input
variables are unknown in this case at the time of the call,
which occurs implicitly during the online change.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 607 / 1158
Pragmas

The effect of this pragma is that a method is called implicitly after the initializa-
tion of a function block instance. For reasons of performance you must add
the attribute both to the function block and to the method in its own first line
above the declaration part.
Syntax:
{attribute 'call_after_init'}
Call: First line above the declaration part of the method and the function block.
PLC Engineering calls the method after the method FB_init and after the var-
iable values of an initialization expression in the instance declaration have
become valid.

Reference, programming
This functionality is supported from compiler version 3.4.1.0.

Example
Definition:
{attribute 'call_after_init'}
FUNCTION_BLOCK FB
... <function block definition>

{attribute 'call_after_init'}
METHOD FB_AfterInit
... <method definition>

The definition implements, for example, the following declaration in the sub-
sequent code processing:
inst : FB := (in1 := 99);
Code processing:
inst.FB_Init();
inst.in1 := 99;
inst.FB_AfterInit();
This allows a reaction to the user-defined initialization in FB_AfterInit.

See also
● ⮫ Chapter 32.10.1 Methods 'FB_Init', 'FB_Reinit', and 'FB_Exit' on page 660

Attribute 'call_after_online_change_slot'
VAR_INPUT declarations in functions or methods that
NOTICE
use the attribute lead to compile errors. Reason: Input
variables are unknown in this case at the time of the call,
which occurs implicitly during the online change.
The effect of this pragma is that all functions and programs containing this
attribute are called after an online change. You define the order of calling by
means of the attribute <slot>.
Syntax:
{attribute 'call_after_online_change_slot' := '<slot>'}
<slot>: Integer value that defines the ranking in the order of the calls; the
lower the value, the earlier the call takes place. If several function blocks have
the same ranking for the attribute, then the order of their calls remains indefi-
nite.
Call: First line above the declaration part of functions and programs.
If a method possesses the attribute, then PLC Engineering determines all
instances of the function block concerned. PLC Engineering calls all instances
in the specified slot. In this case you have no influence on the order of the
instances among themselves.

R911403764, Edition 08 Bosch Rexroth AG


608 / 1158 ctrlX PLC Engineering
Pragmas

Since the application cannot run during the online


NOTICE
change, each code executed in this situation can lead to
a jitter. Therefore, keep the extent of the executive code
as small as possible.
See also
● ⮫ Chapter "Online change" command on page 943

Attribute 'call_before_global_exit_slot'
VAR_INPUT declarations in functions or methods that
NOTICE
use the attribute lead to compile errors. Reason: Input
variables are unknown in this case at the time of the call,
which occurs implicitly during the online change.
The effect of this pragma is that all functions and programs containing this
attribute in a dedicated first line of their declaration are called before the Glob-
alExit. The GlobalExit takes place before a new download or a reset. Function
blocks provided with an FB_Exit method are affected. The order of calling is
defined by means of the attribute value.
Syntax:
{attribute 'call_before_global_exit_slot' := '<slot>'}
Insert location: First line above the declaration part of functions and programs.
<slot>: Integer value that defines the ranking in the order of the calls; the
lower the value, the earlier the call takes place. If several function blocks have
the same ranking for the attribute, then the order of their calls remains indefi-
nite.
If a method possesses the attribute, then the method is called for all instances
of the function block concerned. PLC Engineering calls all instances in the
specified slot. In this case you have no influence on the order of the instances
among themselves.
See also
● ⮫ Chapter 32.10.1 Methods 'FB_Init', 'FB_Reinit', and 'FB_Exit' on page 660

Attribute 'call_on_type_change'
With this pragma, you can mark a method of a function block A that should be
called when the data type changes for one or more function blocks B, C, etc.
that are referenced by A. The referencing can be defined by a pointer variable
or a REFERENCE variable.
Syntax:
{attribute 'call_on_type_change':= '<name of the first
referenced function block>|<name of the second referenced
function block>|<name of the ... referenced function block>'}
Insert location: Line above the first line in the method declaration.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 609 / 1158
Pragmas

Example
Function blocks with references
FUNCTION_BLOCK FB_A
...
VAR
var_pt: POINTER TO FB_B;
var_ref: REFERENCE TO FB_C;
END_VAR
...

Reference, programming
Method for reaction to a type change in the references FB_B and FB_C

{attribute 'call_on_type_change' := 'FB_B, FB_C'}


METHOD METH_react_on_type_change : INT
VAR_INPUT
...

Attribute 'conditionalshow'
The pragma has the effect that the identifiers of an integrated compiled library
<library name> .compiled-library, which are decorated with the pragma,
are hidden before programming an application. The POUs can be called but the
variables are invisible in the PLC Engineering user interface.
Affected features
● Library management
● Debugging
● Input Assistant
● Function "List components"
● Monitoring
● Symbol configuration
This is useful when you develop libraries. As the library developer, you decorate
function blocks or variables with the pragma. As a result, you determine which
identifiers are hidden in an application after integration. If you want to show
the hidden identifiers later, for example for debugging or further development
of the library, you can reactivate its visibility.
Syntax
{attribute 'conditionalshow' ( := ' <some text> ' )? }
<some text>: Optional string literal to control the visibility of the identifiers
decorated with this kind of pragma by means of a command-line command
and this literal. When the pragma is specified without a literal, the variables in
the PLC Engineering development environment are always hidden, regardless of
how PLC Engineering was started. For more help about this, see the document
"Library Development Summary".
Insert location: Top line in the declaration part of a function block, above a
variable

R911403764, Edition 08 Bosch Rexroth AG


610 / 1158 ctrlX PLC Engineering
Pragmas

Example
For more examples, see the document "Library Development Summary".
Hiding a variable
FUNCTION_BLOCK FB_DataManager
VAR
{attribute 'conditionalshow' := 'Library_Developer'}
iLocal : INT;
iCounter : INT;
END_VAR
The variable iLocal is invisible.
Hiding a function block
{attribute 'conditionalshow' := 'Library_Developer'}
FUNCTION_BLOCK FB_DataManager
VAR
iLocal : INT;
iCounter : INT;
END_VAR
The identifiers FB_DataManager, iLocal, and iCounter are invisible.

Visibility in case of existing source code file


When the source code file <library name> .library from an integrated
library also exists at the same memory location (repository), the identifiers are
visible despite the pragmas. That is regardless of whether or not an attribute
value has been specified in the declaration.

Command-line call to activate visibility


You can also enable the visibility of the hidden variable without a source
code file by starting PLC Engineering with the command-line option
conditionalshowsymbols. To enable the visibility, specify the attribute values
of the pragma which are separated by commas.
Syntax
codesys.exe --conditionalshowsymbols=" <some text> ( ,<next
text> )* "

Example
codesys.exe --conditionalshowsymbols="Library_Developer"
codesys.exe --conditionalshowsymbols="Group_A,Group_B"

See also
● ⮫ Chapter Attribute 'hide' on page 620
● ⮫ Chapter Attribute 'conditionalshow_all_locals' on page 610
● "Library Development Summary", "Visibility Control" Chapter

Attribute 'conditionalshow_all_locals'
The pragma has the effect that all local variables of a library POU decorated
with the pragma are hidden from application programmers. The POUs of an
integrated compiled library <library name> .compiled-library can be
called, but the variables are invisible in the PLC Engineering user interface.
Affects features:
● Library management
● Debugging

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 611 / 1158
Pragmas

● Input Assistant
● Function "List components"
● Monitoring
● Symbol configuration
This is useful when you develop libraries. As the library developer, you deco-
rate function blocks with the pragma. As a result, you determine that their
identifiers are hidden in an application after integration. If you want to show
these identifiers later, for example for debugging or further development of the
library, you can reactivate its visibility.
Syntax

Reference, programming
{attribute 'conditionalshow_all_locals' ( := ' <some text>
' )? }
<some text>: Optional string literal to control the visibility of the identifiers
decorated with this kind of pragma by means of a command-line command
and this literal. When the pragma is specified without a literal, the variables in
the PLC Engineering development environment are always hidden, regardless of
how PLC Engineering was started. For more help about this, see the document
"Library Development Summary".
Insert location: Top line in the declaration part of the function block.

Example
Hiding all local variables
{attribute 'conditionalshow_all_locals' :=
'Library_Developer'}
FUNCTION_BLOCK FB_DataManager
VAR
iLocal : INT;
iCounter : INT;
END_VAR
For more examples, see the document "Library Development Summary".

Visibility in case of existing source code file


When the source code file <library name> .library from an integrated
library also exists at the same memory location (repository), the library POU
variables are visible despite the pragmas. That is regardless of whether or not
an attribute value has been specified in the declaration.

Command-line call to activate visibility


You can also enable the visibility of the hidden variable without a source
code file by starting PLC Engineering with the command-line option
conditionalshowsymbols. To enable the visibility, specify the attribute values
of the pragma which are separated by commas.
Syntax
codesys.exe --conditionalshowsymbols=" <some text> ( ,<next
text> )* "

Example
codesys.exe --conditionalshowsymbols="Library_Developer"
codesys.exe --conditionalshowsymbols="Group_A,Group_B"

R911403764, Edition 08 Bosch Rexroth AG


612 / 1158 ctrlX PLC Engineering
Pragmas

See also
● ⮫ Chapter Attribute 'hide_all_locals' on page 622
● ⮫ Chapter Attribute 'conditionalshow' on page 609
● "Library Development Summary", chapter "Visibility Control"

Attribute 'const_replaced', Attribute 'const_non_replaced'


The attribute 'const_replaced' has the effect that the constant is replaced
in the code, independently of the setting of the “Replace constants” compiler
option. The attribute has an effect for variables of scalar types only, but not for
compound types like arrays and structures.
You insert the pragma {attribute 'const_non_replaced'} accordingly in
order to explicitly deactivate the “Replace constants” compiler option. This
has the effect, for example in the symbol configuration, that the constant is
available and can be exported despite the compiler option.
The “Replace constants” option in the “Compile Options” category of the
“Project Settings” dialog is preset for the entire project, because replacing
constants generally leads to faster code and less memory usage.
Syntax:
{attribute 'const_replaced'}
{attribute 'const_non_replaced'}
Insert location: Line above the declaration line of the global variables.

Example
The constants iTestCon and xTestCon are available in the symbol configura-
tion because the “Replace constants” option deactivated.
{attribute 'qualified_only'}
VAR_GLOBAL CONSTANT
{attribute 'const_non_replaced'}
iTestCon : INT := 12;
{attribute 'const_non_replaced'}
xTestCon : BOOL := TRUE;
rTestCon : REAL := 1.5;
END_VAR

VAR_GLOBAL
iTestVar : INT := 12;
xTestVar : BOOL := TRUE;
END_VAR

See also
● ⮫ Chapter 'Project settings' dialog - 'Compiler options' on page 1062
● ⮫ Chapter 19.2 Symbol Configuration on page 229

Attribute 'dataflow'
With this pragma you control the data flow in the processing of function blocks
in the FBD/LD/IL editor. The attribute defines the input or output of a function
block to which the continuing connection to the next or previous function block
is connected.
You may provide only 1 input and 1 output with the attribute in the declaration
of a function block.
Syntax:
{attribute 'dataflow'}

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 613 / 1158
Pragmas

Insertion position: line above the line with the declaration of the corresponding
variables.
In the case of function blocks without the attribute 'dataflow', PLC Engi-
neering determines the data flow as follows: first of all the connection is placed
between an output and an input of same data type. The highest input or output
variable of the function blocks is always taken. If there are no variables of a
corresponding data type, PLC Engineering connects the highest output with the
highest input of the neighboring function blocks.

Example
The connection between FB and the preceding function block is established

Reference, programming
via the input variable i1. The connection between FB and the following func-
tion block is established via the output variable outRes1.
FUNCTION_BLOCK FB
VAR_INPUT
r1 : REAL;
{attribute 'dataflow'}
i1 : INT;
i2 : INT;
r2 : REAL;
END_VAR

VAR_OUTPUT
{attribute 'dataflow'}
outRes1 : REAL;
out1 : INT;
g1 : INT;
g2 : REAL;
END_VAR

See also
● ⮫ Chapter Programming in a function block diagram (FBD) on page 174

Attribute 'displaymode'
With this pragma you define the display mode of an individual variable. This
definition overwrites the global setting for the display of the monitoring var-
iable, which takes place via the commands in the menu “Debug 🠂 Display
Mode”.
Syntax:
{attribute 'displaymode':=<displaymode>}
The following definitions are possible
● Binary format
– {attribute 'displaymode':='bin'}
– {attribute 'displaymode':='binary'}
● Decimal format
– attribute 'displaymode':='dec'}
– {attribute 'displaymode':='decimal'}
● Hexadecimal format
– {attribute 'displaymode':='hex'}
– attribute 'displaymode':='hexadecimal'}
Insertion position: line above the line with the declaration of the corresponding
variables.

R911403764, Edition 08 Bosch Rexroth AG


614 / 1158 ctrlX PLC Engineering
Pragmas

Example
VAR
{attribute 'displaymode':='hex'}
dwVar1: DWORD;
END_VAR

See also
● ⮫ Chapter Command 'Display Mode' - 'Binary', 'Decimal', 'Hexadecimal'
on page 961

Attribute 'enable_dynamic_creation'
The pragma enable_dynamic_creation is needed for using the __NEW oper-
ator for function blocks.
Syntax:
{attribute 'enable_dynamic_creation'}
Insert location: First line in the declaration of the function block.
See also
● ⮫ Chapter 32.3.72 Operator '__NEW' on page 524

Attribute 'estimated-stack-usage'
The pragma provides an estimated value for the stack size requirement.
Methods with recursive calls cannot pass a stack check because stack usage
cannot be determined. As a result, a warning is issued. To prevent this warning,
you can give the method an estimated value (in bytes) for the stack size
requirement. Then the method passes the stack check successfully.
Syntax

{attribute 'estimated-stack-usage' := '<estimated stack size


in bytes>'}

Example

{attribute 'estimated-stack-usage' := '127'} // 127 bytes


METHOD PUBLIC DoIt : BOOL
VAR_INPUT
END_VAR

Insertion position: First line above the declaration part of the method
The "Method call" chapter includes an example that uses this pragma.

Recursive method call


Within its implementation, a method can call itself: either directly using the
THIS pointer, or using a local variable for the associated function block.
Use recursions mainly for processing recursive data types such as linked lists.
In general, we recommend to be careful when using recursion, as unexpectedly
deep recursions can cause stack overflow and machine downtime.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 615 / 1158
Pragmas

Example

Calculation of the factorial


The following program PLC_PRG calculates the factorial of a number in the
FB_Factorial function block in a different way, each in its own method.
● Method m_Iterative: Iterative
● Method m_Pragmaed: Recursive with warning suppression
● Method m_Recursive: Recursive
● Method m_Temp: Temporary with warning suppression

Reference, programming
A warning is issued for the m_Recursive method only.

// Contains the data of the factorial calculation of uiNumber


TYPE FACTORIAL_RESULT :
STRUCT
uiNumber : UINT;
udiIterative : UDINT;
udiRecursive : UDINT;
udiPragmaed : UDINT;
udiTemp : UDINT;
END_STRUCT
END_TYPE

PROGRAM PLC_PRG
VAR
fb_Factorial_A : FB_Factorial;
factorial_A : FACTORIAL_RESULT := (uiNumber := 9,
udiIterative := 0, udiRecursive := 0, udiPragmaed := 0 );
END_VAR
fb_Factorial_A.p_Number := factorial_A.uiNumber;
factorial_A.udiIterative := fb_Factorial_A.m_Iterative();
factorial_A.udiRecursive := fb_Factorial_A.m_Recursive(uiN :=
factorial_A.uiNumber);

R911403764, Edition 08 Bosch Rexroth AG


factorial_A.udiPragmaed := fb_Factorial_A.m_Pragmaed(uiN :=
factorial_A.uiNumber);
factorial_A.udiTemp := fb_Factorial_A.m_Temp(uiN :=
factorial_A.uiNumber);

//Factorial calculation in different ways


FUNCTION_BLOCK FB_Factorial
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
uiN : UINT;
udiIterative : UDINT;
udiPragmaed : UDINT;
udiRecursive : UDINT;
END_VAR

// Iterative calculation
METHOD PUBLIC m_Iterative : UDINT
VAR
uiCnt : UINT;
END_VAR
m_Iterative := 1;
IF uiN > 1 THEN
FOR uiCnt := 1 TO uiN DO
m_Iterative := m_Iterative * uiCnt;
END_FOR;
RETURN;
ELSE
RETURN;
END_IF;

//Recursive calculation with suppressed warning


{attribute 'estimated-stack-usage' := '99'}
METHOD PUBLIC m_Pragmaed : UDINT
VAR_INPUT
uiN : UINT;
END_VAR
VAR
END_VAR
m_Pragmaed := 1;
IF uiN > 1 THEN
m_Pragmaed := uiN * THIS^.m_Pragmaed(uiN := (uiN - 1));
RETURN;
ELSE
RETURN;
END_IF;

//Recursive calculation
METHOD PUBLIC m_Recursive : UDINT
VAR_INPUT
uiN : UINT;
END_VAR
VAR
END_VAR
ctrlX PLC Engineering 617 / 1158
Pragmas

m_Recursive := 1;
IF uiN > 1 THEN
m_Recursive := uiN * THIS^.m_Recursive(uiN := (uiN - 1) );
RETURN;
ELSE
RETURN;
END_IF;

// Called by temporary FB instance


{attribute 'estimated-stack-usage' := '99'}

Reference, programming
METHOD PUBLIC m_Temp : UDINT
VAR_INPUT
uiN : UINT;
END_VAR
VAR
fb_Temp : FB_Factorial;
END_VAR
m_Temp := 1;
IF uiN > 1 THEN
m_Temp := uiN * fb_Temp.m_Temp(uiN := (uiN - 1));
RETURN;
ELSE
RETURN;
END_IF;

PROPERTY p_Number : UINT


uiN := p_Number; //Setter method
Only the m_Recursive issues a warning when the program is executed.

Also refer to
● ⮫ Chapter 18.24.5 Calling Methods on page 224
● ⮫ Chapter 18.24 Object-oriented programming on page 219
● ⮫ Chapter 'Method’ object on page 829
● ⮫ Chapter Object 'Property' on page 839

R911403764, Edition 08 Bosch Rexroth AG


618 / 1158 ctrlX PLC Engineering
Pragmas

Attribute 'ExpandFully'
The effect of this pragma is that the components of an array used as an input
variable for referenced visualizations are made visible in the Properties dialog
box of the visualization.
Syntax:
{attribute 'ExpandFully'}
Insertion position: the line above the line with the declaration of the array.

Example
The visualization “visu” is to be inserted into a frame inside the visualization
“visu_main”. arr is defined as an input variable in the interface editor of
“visu” and will thus be available later for assignments in the Properties dialog
box of the frames in “visu_main”. In order to also make the individual com-
ponents of arr available in this Properties dialog box, you must insert the
attribute 'ExpandFully' directly before arr in the interface editor of visu.
Declaration in the interface editor of “visu”:
VAR_INPUT
{attribute 'ExpandFully'}
arr : ARRAY[0..5] OF INT;
END_VAR

Attribute 'global_init_slot'
The pragma defines the initialization order of programming blocks and global
variable lists.
Variables in a list (GVL or POU) are initialized from top to bottom.
If there are several global variable lists, then the initialization order is not
defined.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 619 / 1158
Pragmas

The initialization does not apply for the initialization of literal values, for
example 1, 'hello', 3.6, or constants of base data types. However, you must
define the initialization order yourself if there are dependencies between the
lists. You can assign a defined initialization slot to a GVL or POU with the
'global_init_slot' attribute.
Constants are initialized before the variables and in the same order as the
variables. During initialization, the POUs are sorted according to the value for
<slot>. Then the code for initializing the constants is generated and afterwards
the code for initializing the variables.
Syntax:

Reference, programming
{attribute 'global_init_slot' := '<slot>'}
<slot>: Integer value that defines the position in the call order. The default
value for a POU (program, function block) is 50000. The default value for a GVL
is 49990. A lower value means an earlier initialization. Caution: If several blocks
or GVLs receive the same value for the 'global_init_slot' attribute, then
the initialization order remains undefined.
Insert location: The pragma always affects the entire GVL or POU and therefore
it must be located above the VAR_GLOBAL or POU declaration.
If several programming blocks have got assigned the same value for the
attribute 'global_init_slot', the order of their initialization remains unde-
fined.

Example
The program includes two global variable lists GVL_1 and GVL_2, as well as a
PLC_PRG program that uses variables from both lists. GVL_1 uses the variable
B for initializing a variable A, which is initialized in GVL_2 with a value of 1000.
GVL_1
VAR_GLOBAL //49990
A : INT := GVL_2.B*100;
END_VAR
GVL_2
VAR_GLOBAL //49990
B : INT := 1000;
C : INT := 10;
END_VAR
PLC_PRG
PROGRAM PLC_PRG //50000
VAR
ivar: INT := GVL_1.A;
ivar2: INT;
END_VAR

ivar:=ivar+1;
ivar2:=GVL_2.C;
In this case, the compiler prints an error because GVL_2.B is used for initi-
alizing GVL_1.A before GVL_2 has been initialized. You can prevent this by
using the global_init_slot attribute to position GVL_2 before GVL_1 in the
initialization sequence.
In this example, GVL_1 must have at least one slot value of 49989 in order to
achieve the earliest initialization within the program. Every lower value has the
same effect:

R911403764, Edition 08 Bosch Rexroth AG


620 / 1158 ctrlX PLC Engineering
Pragmas

GVL_2
{attribute 'global_init_slot' := '100'}
VAR_GLOBAL
B : INT := 1000;
END_VAR
Using GVL_2.C in the implementation part of PLC_PRG is also not critical even
without using a pragma because both GVLs are initialized before the program
in either case.

Attribute 'hide'
Using the pragma {attribute 'hide'} to hide variables and POUs does not
have the desired effect in most cases. Instead, you should use the pragma
{attribute 'conditionalshow'}.
The pragma prevents the variables and POUs defined with it from being shown
in the PLC Engineering user interface. As a result, you can intentionally hide
these identifiers without restricting the access. This can be useful when you
develop libraries.
Affected features:
● Library management
● Debugging
● Input Assistant
● Function "List components"
● Monitoring
● Symbol configuration
The variables or POUs defined with the pragma are neither visible in the
Library Manager nor are they suggested in the Input Assistant or in the "List
components" function. The pragma prevents those marked variables from being
displayed in the symbol configuration. As a result, you cannot export these
kinds of variables as symbols. The variables are also invisible in online mode,
and therefore their values cannot be monitored. Moreover, you cannot use any
debugging functionalities and you do not have any support when checking for
bugs.
Syntax:
{attribute 'hide'}
Insert location: For variables, above the line with the declaration of the varia-
bles. For POUs, in the first line.
If you, the application developer, know the exact instance path of the hidden
POUs and variables, then you can access them in the code.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 621 / 1158
Pragmas

Example of hidden variable


The function block FB_MyA contains the attribute pragma {attribute
'hide'} to hide the local variable xInvisibleIn.
FUNCTION_BLOCK FB_MyA
VAR_INPUT
iInA : INT;
{attribute 'hide'}
xInvisibleIn : BOOL;
xInit: BOOL;
END_VAR

Reference, programming
VAR_OUTPUT
iOutA : INT;
END_VAR
VAR
iCounter : INT;
END_VAR
Two instances of the function block FB_MyA are defined in the main program.
PROGRAM PLC_PRG
VAR
fbMyA1, fbMyA2 : FB_MyA;
xVar2 : BOOL;
iVar1 : INT;
iVar2 : INT;
END_VAR
fbMyA1(iInA := 1, xInit := TRUE, xInvisibleIn := TRUE, iOutA
=> iVar1);
fbMyA2(iInA := 1, xInit := TRUE, iOutA => iVar2);
When the input value for fbMyA1 is implemented, the "List components" func-
tion, which opens when you type fbMyA1. (in the implementation part of
PLC_PRG), displays the variables iInA, xInit, and iOutA, but not the hidden
variable xInvisibleIn.

Example of hidden library POU


FB_A is a function block of the library HiddenFunctionality with the default
namespace HIDDEN. To hide the identifier and the POU code from applica-
tion developers, begin the declaration of the POU with the attribute pragma
{attribute 'hide'}. To hide the subordinate POUs (actions, methods,
properties, and transitions) in the same way, also begin their declarations
with {attribute 'hide'}.
{attribute 'hide'}
FUNCTION_BLOCK FB_A
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
iA : INT;
iCount : INT;
iInvisible : INT;
END_VAR

{attribute 'hide'}
METHOD METH_Count : INT
VAR_INPUT

R911403764, Edition 08 Bosch Rexroth AG


622 / 1158 ctrlX PLC Engineering
Pragmas

END_VAR
iCount := iCount + 1;

{attribute 'hide'}
METHOD METH_Invisible : BOOL
VAR_INPUT
END_VAR
iInvisible := iInvisible + 1;

{attribute 'hide'}
PROPERTY PUBLIC prop_iA : INT
For you as the application developer, all POUs are invisible. You can use them
only if you know the instance path.
PROGRAM PLC_PRG
VAR
fbHidden : HIDDEN.FB_A; // Hidden function block from
library HiddenFunctionality
iCounter : INT;
END_VAR
fbHidden.METH_Invisible();
iCounter := fbHidden.iInvisible;
In online mode, no monitoring is performed.

With the pragma hide_all_locals you can hide all local variables of a POU.

See also
● ⮫ Chapter Attribute 'hide_all_locals' on page 622
● ⮫ Chapter Attribute 'conditionalshow' on page 609
● ⮫ Chapter Attribute 'conditionalshow_all_locals' on page 610

Attribute 'hide_all_locals'
The pragma prevents all local variables of a signature from being visible in the
display of the 'List components' function, in the Input Assistant or in the decla-
ration part in online mode. Moreover, these variables are hidden in the symbol
configuration and therefore cannot be exported as symbols. The pragma is
especially useful in library POUs to hide POU variables from users.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 623 / 1158
Pragmas

Affected features
● Library management
● Debugging
● Input Assistant
● Function "List components"
● Monitoring
● Symbol configuration
Syntax:
{attribute 'hide_all_locals'}

Reference, programming
Insert location: First line above the declaration part of the POU

Example
The function block FB_MyB uses the attribute:
{attribute 'hide_all_locals'}
FUNCTION_BLOCK FB_MyB
VAR_INPUT
iInB : INT;
{attribute 'hide'}
xInvisibleIn : BOOL;
xInit: BOOL;
END_VAR
VAR_OUTPUT
iOutB : INT;
END_VAR
VAR
iCounter : INT;
xVar : BOOL;
END_VAR
Two instances of the function block FB_MyB are defined in the main program.
PROGRAM PLC_PRG
VAR
fbMyB1, fbMyB2: FB_MyB;
iVar3: INT;
iVar4: INT;
END_VAR

fbMyB1(iInB := 2, xInvisibleIn := TRUE, iOutB => iVar3);


fbMyB2(iInB := 2, iOutB => iVar4);
IF fbMyB2.iCounter > 100 THEN
fbMyB2.xInit := TRUE;
END_IF
Now when you download the program to the controller, start it, and switch
to online mode, the variables iInB, xInit, iOutB, and xReset are displayed
in the declaration editor. However, the hidden local variables iCounter and
xVar are not displayed.

See also
● ⮫ Chapter Attribute 'hide' on page 620

Attribute 'initialize_on_call'
The pragma causes input variables of a function block to be initialized on
each call of the function block. If an input variable is affected which expects
a pointer and this pointer has been removed during an online change, then the
variable is initialized to zero.

R911403764, Edition 08 Bosch Rexroth AG


624 / 1158 ctrlX PLC Engineering
Pragmas

Syntax:
{attribute 'initialize_on_call'}
Insert location: Always in the first line of the declaration part for the entire
function block, and also in a line above the declaration of the individual input
variable.

Example
{attribute 'initialize_on_call'}
FUNCTION_BLOCK fb
VAR_INPUT
{attribute 'initialize_on_call'}
pInt : POINTER TO INT := 0;
{attribute 'initialize_on_call'}
iVal : INT := 0;
END_VAR

Attribute 'init_namespace'
The effect of this pragma is that a variable of the type STRING or WSTRING,
which is declared in a library function block with this pragma, is initialized
when used in the project with the current namespace of the library.
Syntax
{attribute 'init_namespace'}
Insertion position: the line above the line with the declaration of the variables
in a library function block.

Example
The function block “POU” is provided with the necessary attributes:
FUNCTION_BLOCK POU
VAR_OUTPUT
{attribute 'init_namespace'}
myStr: STRING;
END_VAR
An instance fb of the function block POU is defined within the main program
PLC_PRG:
PROGRAM PLC_PRG
VAR
fb:POU;
newString: STRING;
END_VAR
newString := fb.myStr;
The variable myStr is initialized with the current namespace, for example
MyLib. This value is assigned to newString in the main program.

See also
● ⮫ Chapter 33.2.19 "Library manager” object on page 780

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 625 / 1158
Pragmas

Attribute "init_on_onlchange"
No initialization code with fast online change
NOTICE
Since compiler version>=3.5.0.0, a "fast online change" is
performed for small changes. With a fast online change,
only the changed block is compiled and reloaded. In par-
ticular, no initialization code is generated.
For variables with the init_on_onlchange attribute,
this also results in no initialization code being gener-
ated. In the usual scenarios this will have no effect:
The attribute is usually used to initialize variables with

Reference, programming
addresses. However, the fast online change does not
cause a variable to change its address.
To ensure the effect of the init_on_onlchange
attribute on the entire application code nevertheless,
you can generally switch off the fast online change
for the application with the help of the compiler
define no_fast_online_change. To do this, select your
application object in the device tree and choose the
Properties context command. Add the compiler define
no_fast_online_change under the Build tab.
For further information, see: ⮫ 'Properties' dialog - 'Build'
The effect of this pragma is that the variable to which the pragma is applied is
initialized with each online change.
Syntax:
{attribute 'init_on_onlchange' }
Insertion position: The line above the line with the declaration of the variables.

Example
VAR_GLOBAL
{attribute 'init_on_onlchange'}
g_fastOnlineChange : BOOL := FALSE;
END_VAR
{attribute 'call_after_online_change_slot' := '4567'}
FUNCTION FUNC_OnlineChangeDetection : BOOL
VAR_INPUT
END_VAR
VAR
END_VAR

IF GVL_OnlineChangeDetection.g_fastOnlineChange THEN
// here you know that you are inside a FastOnlineChange
END_IF
// reset for next detection
GVL_OnlineChangeDetection.g_fastOnlineChange := TRUE;

Also refer to
● ⮫ Chapter 'Properties' dialog - 'Build' on page 1048

Attribute 'instance-path'
This pragma can be applied to a local STRING variable and causes this local
STRING variable to be initialized in sequence with the device tree path of the
POU to which it belongs. This can be useful for error messages. The application
of the pragma requires the application of the attribute 'reflection' to the
associated POU, as well as the application of the additional attribute 'noinit'
to the STRING variable.

R911403764, Edition 08 Bosch Rexroth AG


626 / 1158 ctrlX PLC Engineering
Pragmas

Syntax:
{attribute 'instance-path'}
Insertion position: the line above the line with the declaration of the STRING
variable.

Example
The following function block contains the attributes 'reflection',
'instance-path' and 'noinit'.
{attribute 'reflection'}
FUNCTION_BLOCK POU
VAR
{attribute 'instance-path'}
{attribute 'noinit'}
str: STRING;
END_VAR
An instance “myPOU” of the function block “POU” is defined within the main
program “PLC_PRG”:
PROGRAM PLC_PRG
VAR
myPOU:POU;
myString: STRING;
END_VAR
myPOU();
myString:=myPOU.str;
Following the initialization of the instance myPOU, the path of the
instance myPOU is assigned to the string variable str, in the example
PLCWinNT.Application.PLC_PRG.myPOU. This path is assigned in the main
program to the variable myString.

You can define the length of a string to be whatever you


NOTICE
like (even >255), but you must consider that the string
will be truncated at the end if it is assigned to a variable
whose data type is too small for it.
See also
● ⮫ Chapter Attribute 'reflection' on page 645
● ⮫ Chapter Attribute 'noinit' on page 634

Attribute 'io_function_block', 'io_function_block_mapping'


With the 'io_function_block' attribute, you mark a function block in order
to prepare it for the assignment to a channel in the I/O mapping of the device
configuration. Then it is shown in the “Select function block” dialog.
With the 'io_function_block_mapping' attribute, you mark a parameter
that should be used when mapping the FB to a device channel in this kind
of function block. You can provide the attribute to multiple parameters of the
function block. For I/O mapping, the first one is used automatically whose type
matches the channel (input, output, data type).
Syntax:
{attribute 'io_function_block'}
{attribute 'io_function_block_mapping'}
Insert location: The line above the first line in the declaration of the function
block, or the line above the parameter declaration.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 627 / 1158
Pragmas

Example
{attribute 'io_function_block'}
FUNCTION_BLOCK Scale_Output_Int
VAR_INPUT
iInput : INT;
iNumerator : INT;
iDenominator : INT :=1;
iOffset : INT := 0;
END_VAR
VAR_OUTPUT

Reference, programming
{attribute 'io_function_block_mapping'}
iOutput : INT;
END_VAR
VAR

See also
● ⮫ Chapter 33.4.7 Dialog 'Select Function Block' on page 1039
● ⮫ Linking a device with a function block instance on page 122

Attribute 'is_connected'
You use the pragma 'is_connected' to mark a Boolean function block vari-
able which, when a function module instance is called, provides information
about whether the associated input of the POU has an assignment.
The use of the pragma requires the use of the attribute 'reflection' on the
affected function block.
Syntax:
{attribute 'is_connected' := '<input variable>'}

Example
In the function block FB, a local variable is declared for each input variable
(in1 and in2) and the attribute 'is connected' is prepended to it each
time with the name of the input variable. The func itself gets the pragma
attribute 'reflection'.
When an instance of the function block is called, the local variable is TRUE in
the case that the input assigned to it has received an assignment.
{attribute 'reflection'}
FUNCTION_BLOCK FB
VAR_INPUT
in1: INT;
in2: INT;
END_VAR
VAR
{attribute 'is_connected' := 'in1'}
in1_connection_info: BOOL;
{attribute 'is_connected' := 'in2'}
in2_connection_info: BOOL;
END_VAR
Assumption: When the function block instance is called, in1 receives an
external assignment and in 2 does not receive an assignment. This results
in the following code:
in1_connection_info := TRUE;
in2_connection_info := FALSE;

R911403764, Edition 08 Bosch Rexroth AG


628 / 1158 ctrlX PLC Engineering
Pragmas

See also
● ⮫ Chapter Attribute 'reflection' on page 645
● ⮫ Chapter ‘Function block’ object on page 823

Attribute 'linkalways'
The pragma {attribute 'linkalways'} instructs the compiler to always
include a POU or a library POU in the compile information. During the build,
the POU is compiled and is part of the application code. During the download,
the POU is downloaded to the PLC.
Syntax:
{attribute 'linkalways'}
Insertion location: The first line in the declaration part of the POU or library
POU
The POU may be valid throughout the project (saved in the “POUs” view) or
throughout the application (saved in the “Devices” view).
You can also select the “Link always” option in the “Build” tab of a POU's
object properties.

Example
The “MoreSymbols” GVL contains the pragma {attribute 'linkalways'}.
The variables declared there are also part of the application code, regardless
of any access.
GVL MoreSymbols

{attribute 'linkalways'}
VAR_GLOBAL
g_iAlpha: INT;
g_iBravo: INT;
g_iCharlie: INT;
END_VAR
The symbol configuration also accesses the compile information. As a result,
the variables of the MoreSymbols GVL are always provided for selection in the
“Symbol Configuration” editor.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 629 / 1158
Pragmas

See also
● ⮫ Chapter 'Properties' dialog - 'Build' on page 1048
● ⮫ Chapter 19.2 Symbol Configuration on page 229

Attribute 'monitoring'
The effect of this pragma is that you can monitor values of properties or func-
tion calls in the online view of the IEC editor or in a watch list. There are two
possible attribute values for this: 'variable' and 'call'
Syntax

Reference, programming
{attribute 'monitoring' := 'variable'}
{attribute 'monitoring' := 'call'}

Monitoring of programming objects and their properties


In the online view of a function block or program, you can monitor the subordi-
nate properties in addition to the local variables. This allows you to monitor the
values of the Get and Set methods.
Insert either the pragma {attribute 'monitoring' := 'variable'} or
{attribute 'monitoring' := 'call'} in the declaration of the property
block. The current values of the property are then displayed automatically in
the IEC editor or in a watch list.

Example
In online mode, the PLC_PRG object shows the value of the Minutes prop-
erty at the call location inline in the ST editor. This is because the pragma
{attribute 'monitoring' := 'variable'} is located in the declaration
of the Minutes property.

Check carefully for each application which attribute pragma is suitable for dis-
playing the desired value. This depends on whether further operations with the
variables are implemented within the property.
1. Pragma {attribute 'monitoring':='variable'}:
An implicit variable is created for the property, which is then always given the
current property value when the application calls the Set or Get method. The
value stored last in this variable is displayed in the monitoring.
2. Pragma {attribute 'monitoring':='call'}:

R911403764, Edition 08 Bosch Rexroth AG


630 / 1158 ctrlX PLC Engineering
Pragmas

You can use this attribute only for properties that return simple data types or
pointers, but not for structured types. The value to be monitored is read or
written by calling the property directly. This means that the monitoring service
of the runtime executes the Get or Set method of the property.
When you insert the pragma {attribute
NOTICE
'monitoring':='call'} for monitoring, you have to
pay attention to possible side effects. These kinds of
side effects can occur if additional operations are imple-
mented in the property.
The pragma {attribute 'monitoring'} is also evalu-
NOTICE
ated for the symbol configuration. Only read access is
possible for the value 'variable'.
With the context menu command “Add Watch”, a variable on which the cursor
is currently positioned is applied directly into the monitoring list in online
mode.
The forcing or writing of functions is not supported. However, you can implicitly
implement forcing by adding an additional input parameter for the respective
function, which serves as an internal force flag.
Function monitoring is not possible in the compact runtime.

See also
● ⮫ Chapter Object 'Property' on page 839

Attribute 'monitoring_display'
The pragma in the declaration of a function module or a structure causes the
current value of the specified component (property or variable) to be displayed
in the monitoring as well.
The value of the module or structure component is then displayed in the top
line of the monitoring for variables of the type of the function module or struc-
ture.

Syntax

{attribute 'monitoring_display' := '<component name>'=}


Insertion position: Above of the variable declaration.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 631 / 1158
Pragmas

Example

Reference, programming
{attribute 'monitoring_display' := 'stMonitoring'}
TYPE ADUT :
STRUCT
val1: INT;
val2: INT;
stMonitoring: STRING := 'to be monitored';
END_STRUCT
END_TYPE
PROGRAM PLC_PRG
VAR
mydut: ADUT;
nTest: INT;
END_VAR
nTest:= iCounter + 1;
mydut.stMonitoring := INT_TO_STRING(nTest);

Attribute 'monitoring_encoding'
The attribute pragma is allowed for string variables and aliases. The attribute
causes the values of the variables marked with it to be decoded in UTF-8
format during monitoring.

Syntax

{attribute 'monitoring_encoding' := 'UTF8'}


Insertion position: Above of the variable declaration.

R911403764, Edition 08 Bosch Rexroth AG


632 / 1158 ctrlX PLC Engineering
Pragmas

Example
PROGRAM PLC_PRG
VAR
{attribute 'monitoring.encoding' := 'UTF8'}
strDat : STRING := 'abc';
attribute 'monitoring_encoding' := 'UTF-8'}
strVarUtf8: STRING := UTF8#'你好,世界!ÜüÄäÖö';
{attribute 'monitoring_encoding' := 'UTF-8'}
str1: STRING := UTF8#'AÄyyy';
{attribute 'monitoring_encoding' := 'UTF-8'}
str2: STRING := UTF8#'AÄxxxÜÜÜ';

strVarUtf8_1: STRING := '你好,世界!ÜüÄäÖö';


str1_1: STRING := 'AÄyyy';
str2_1: STRING := 'AÄxxxÜÜÜ';
END_VAR

Attribute 'no_assign', Attribute 'no_assign_warning'


The pragma 'no_assign' results in compiler errors being displayed if an
instance of the function block is assigned to another instance of the same
function block. Such assignments are often to be avoided if the function block
contains pointers and pointers lead to problems, because they are copied as
well during the value assignment.
The pragma 'no_assign_warning' results in the same as for the pragma
'no_assign' with compiler warnings instead of compiler errors.
Syntax:
{attribute 'no_assign'}
Insert location: First line in the declaration part of a function block.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 633 / 1158
Pragmas

Example
Assignment of function block instances containing pointers.
In this example the value assignment of the function block instances will lead
to problems during the execution of fb_exit:
VAR_GLOBAL
inst1 : TestFB;
awsBufferLogFile : ARRAY [0..9] OF WSTRING(66);(* Area: 0,
Offset: 0x1304 (4868)*)
LogFile : SEDL.LogRecord := (sFileName := 'LogFile.log',

Reference, programming
pBuffer := ADR(awsBufferLogFile), udiMaxEntriesFile :=
UDINT#10000, udiMaxBuffered := UDINT#10, uiLineSize :=
UINT#64, wsSep := " ", xCircular := TRUE, siDateFormat :=
SINT#0, siTimeFormat := SINT#0);
END_VAR

PROGRAM PLC_PRG
VAR
inst2 : TestFB := inst1;
LogFileNew
END_VAR
In this case LogRecord manages a list of pointers, for which various actions
are executed in the case of fb_exit. Problems result due to the assignment,
because fb_exit will be executed twice. You should prevent this by adding
the attribute 'no_assign' in the declaration of the function block “TestFB”:
{attribute 'no_assign'}
FUNCTION_BLOCK TestFB
VAR_INPUT
...
The following compiler errors are then displayed:
C0328: Assignment not allowed for type TestFB
C0328: Assignment not allowed for type LogRecord
If the pragma no_assign_warning is used instead of the pragma no_assign
for the function block “TestFB ”, then the C0328 message is issued as com-
piler warning, not as a compiler error.

Attribute 'no_check
The pragma causes no check function (POUs for implicit checks) to be called
for the POU. Since the check functions can affect the processing speed of the
program, it can be useful to apply the attribute to function blocks that have
already been checked or are frequently called.
You add the pragma to the declaration of a POU.
Syntax:
{attribute 'no_check'}
Insertion position: first line in the declaration part of the POU.
The attribute also automatically affects the child objects
NOTICE
of a POU!
Example: If the attribute is entered in a program, check
functions will also not be performed for actions that are
assigned to this program.
Also refer to
● ⮫ Chapter 33.2.30 "POUs for implicit checks” object on page 846

R911403764, Edition 08 Bosch Rexroth AG


634 / 1158 ctrlX PLC Engineering
Pragmas

Attribute 'no_copy'
In general an online change requires a re-allocation of instances, for example
of a POU. In the process, the value of the variable contained in the instance is
copied.
The pragma prevents the value of the variable contained in the instance from
being copied in the course of an online change; instead, the variable is re-ini-
tialized in the course of an online change. This can be useful for a local pointer
variable that points to a variable that has just been shifted by the online change
and thus has a changed address.
You insert the attribute in the declaration part above the line of the declaration
of the variables concerned.
Syntax:
{attribute 'no_copy'}

Attribute 'no-exit'
This attribute suppresses the call of the FB_exit method of a function block for
a certain one of its instances. To do this you insert the attribute in the line
before the declaration of the function block instance.
Syntax:
{attribute 'no-exit'}

Example
The method “FB_exit” is added to the function block “POU_ex”. Two instances
of the function block “POU_ex” are created in the main program “PLC_PRG”.
PROGRAM PLC_PRG
VAR
POU1 : POU_ex;
{attribute 'no-exit'}
POU2 : POU_ex;
END_VAR
POU1 is called, POU2 is not called.

See also
● ⮫ Chapter 32.10.1 Methods 'FB_Init', 'FB_Reinit', and 'FB_Exit' on page 660

Attribute 'noinit'
This pragma is applied to variables that should not be implicitly initialized.
Syntax:
{attribute 'no_init'}
{attribute 'no-init'}
{attribute 'noinit'}
Insertion position: line above the declaration line of the variables concerned in
the declaration part.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 635 / 1158
Pragmas

Example
PROGRAM PLC_PRG
VAR
A : INT;

{attribute 'no_init'}
B : INT;
END_VAR
When the associated application is reset, the integer variable A is implicitly
re-initialized with 0, whereas the variable B retains its current value.

Reference, programming
Attribute 'no_instance_in_retain'
This pragma allows you to prevent the instance of a function block from being
stored in the retain memory area.
Syntax:
{attribute 'no_instance_in_retain'}
Insertion position:
Line above the FUNCTION_BLOCK declaration in the declaration part of the
function block.
If you now declare an instance declaration of the function module as a RETAIN
variable, an error message is reported.

Also refer to
● ⮫ Chapter 18.22 Data persistence on page 211

Attribute 'no_virtual_actions'
The pragma is used for function blocks that are derived from a function block
implemented in SFC and use the fundamental SFC sequence of this base
class. The actions called from it exhibit the same virtual behavior as methods.
This means that the implementations of the actions in the base class can be
replaced by the derived class with its own specific implementations.
If you apply the pragma to the base class, then its actions are protected against
overloading.
Syntax:
{attribute 'no_virtual_actions'}
Insert location: Top line in the declaration part of the function block

Example
The function block POU_SFC is the base class for the derived function block
POU_child. The derived class POU_child calls the sequence of the base class
written in SFC with the special variable SUPER.

R911403764, Edition 08 Bosch Rexroth AG


636 / 1158 ctrlX PLC Engineering
Pragmas

The exemplary implementation of this sequence is limited to the initial step,


followed by a single step with a linked step action ActiveAction. This step
with a linked step action takes care of the configuration of the output varia-
bles.
an_int:=an_int+1; // Counting the action calls
test_act:='father_action';
METH(); // Call of the method METH in order to
set the string variable test_meth
In the case of the derived class POU_child the step action is replaced by a
special implementation of ActiveAction. Active Action differs from the
original only by the assignment of the string 'child_action' in place of
'father_action' at the variable test_act.
Likewise, the method METH, which assigns the string 'father_method' to the
variable test_meth in the base class, is overwritten so that test_meth now
gets the value 'child_method'. The main program PLC_PRG calls an instance
of the function block POU_child, named Child. As expected, the value of the
strings reflects the call of the action and method of the derived class:

Now, however, you place the pragma {attribute 'no_virtual_actions'}


in front of the base class:
{attribute 'no_virtual_actions'}

FUNCTION_BLOCK POU_SFC...

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 637 / 1158
Pragmas

This changes the behavior: While the implementation of the derived class is
still used for the method METH, the call of the step action now results in a
call of the action ActiveAction of the base class. Therefore test_act is now
given the value 'father_action':

Reference, programming
Attribute 'pingroup'
The effect of this pragma is that the input pins or output pins (parameters)
are grouped in the declaration of a function block. In the FBD/LD editor a pin
group defined in this way can be displayed as an enlarged or reduced unit on
the inserted function block. Several groups are possible and are distinguished
by their names. PLC Engineering saves the respective state (reduced) per func-
tion block box with the project options.
Syntax:
{attribute 'pingroup' := '<group name>'}
Insertion position: line above the declaration of the input or output variables
concerned in the declaration part of a function block.

Example
Two groups are defined: general (i1, out1) and group1 (i2, g1). r1,
r2, outRes1 and g2 are always displayed
FUNCTION_BLOCK FB
VAR_INPUT
r1 : REAL;
{attribute 'pingroup' := 'general'}
i1 : INT;
{attribute 'pingroup' := 'group1'}
i2 : INT;
r2 : REAL;
END_VAR

VAR_OUTPUT
outRes1 : REAL;
{attribute 'pingroup' := 'general'}
out1 : INT;
{attribute 'pingroup' := 'group1'}
g1 : INT;
g2 : REAL;
END_VAR

R911403764, Edition 08 Bosch Rexroth AG


638 / 1158 ctrlX PLC Engineering
Pragmas

Attribute 'pin_presentation_order_inputs/outputs'
The pragmas are evaluated in the CFC, FBD, and LD graphical editors, causing
the order of inputs/outputs of the affected function block to be displayed as
specified. You program the order by assigning the names of the inputs/outputs
to the attribute in the desired order.
Syntax

{attribute 'pin_presentation_order_inputs' :=
'<First_Input_Name>, (<Next_Input_Name>, )* ( *, )?
(<Next_Input_Name>,)* <Last_Input_Name>'}
{attribute 'pin_presentation_order_outputs' :=
'<First_Output_Name>, (<Next_Output_Name>,)* ( *, )?
(<Next_Output_Name>,)* <Last_Output_Name>'}
● *
The terminal character serves as a wildcard for all inputs/outputs that are
not specified in the display order. If the terminal character is missing, then
the missing inputs/outputs are appended at the end.
● ( ... )?
The contents of the parentheses are optional.
● ( ... )*
The contents of the parentheses are optional again and can therefore occur
not at all, one time, or several times.
● Insert location: First line in the declaration part of a function block.
This pragma is not evaluated when pragma {attribute
NOTICE
'pingroup' := '<Group_Name>'} is used.

Example

{attribute 'pin_presentation_order_inputs' :=
'input_2,*,input_1'}
{attribute 'pin_presentation_order_outputs' := 'output_2,
output_1'}
FUNCTION_BLOCK POU_BASE
VAR_INPUT
input_1 : BOOL;
input_2 : INT;
input_3 : INT;
input_4 : INT;
END_VAR

VAR_OUTPUT
output_1 : BOOL;
output_2 : INT;
output_3 : INT;
output_4 : BOOL;
END_VAR

FUNCTION_BLOCK PLC_PRG
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 639 / 1158
Pragmas

VAR
pouBase_A: POU_BASE;
END_VAR
In the representation of function module instance pouBase_A, the pragmas
result in the following arrangement of input and output pins:

Reference, programming
See also
● ⮫ Chapter Attribute 'pingroup' on page 637

Attribute 'obsolete'
The effect of this pragma is that a defined warning is displayed for a data type
definition during compilation if the data type (structure, function block, etc.)
is used in the project. This enables you, for example, to draw attention to the
fact that a data type is no longer valid because, for example, an interface has
changed and this should also be implemented in the project.
In contrast to a message pragma this warning is defined centrally for all
instances of a data type.
Syntax:
{attribute 'obsolete' := 'user defined text'}
Insertion position: line of the data type definition or in a line above it.

Example
The pragma is inserted in the definition function block fb1:
{attribute 'obsolete' := 'datatype fb1 not valid!'}
FUNCTION_BLOCK fb1
VAR_INPUT
i:INT;
END_VAR
If you use fb1 as a data type, for example in fbinst:fb1, the following
warning will be displayed when compiling the project: "datatype fb1 not
valid".

See also
● ⮫ Chapter 32.6.2 Message Pragmas on page 596

Attribute 'pack_mode'
The pragma defines how a data structure is packed during the allocation. The
attribute has to be inserted above the data structure and affects the packing of
the entire structure.
Syntax:
{attribute 'pack_mode' := ' <pack mode value>' }
Insert location: above the declaration of the data structure

R911403764, Edition 08 Bosch Rexroth AG


640 / 1158 ctrlX PLC Engineering
Pragmas

Table 21: Possible values for <value>:


<pack mode Associated Description
value> packing
method
0 Aligned All variables are allocated to byte addresses. There are no memory
1 1-byte- gaps.
aligned
2 2-byte- There are
aligned ● 1-byte variables at byte addresses
● 2-byte variables at addresses divisible by 2. A maximum gap of 1
byte results.
● 4-byte variables at addresses divisible by 2. A maximum gap of 1
byte results.
● 8-byte variables at addresses divisible by 2. A maximum gap of 1
byte results.
● Strings always at byte addresses. No gaps result.
4 4-byte- There are
aligned ● 1-byte variables at byte addresses
● 2-byte variables at addresses divisible by 2. A maximum gap of 1
byte results.
● 4 byte variables at addresses divisible by 4. A maximum gap of 3
byte results.
● 8-byte variables at addresses divisible by 4. A maximum gap of 3
byte results.
● Strings always at byte addresses. No gaps result.
8 8-byte- There are
aligned ● 1-byte variables at byte addresses
● 2-byte variables at addresses divisible by 2. A maximum gap of 1
byte results.
● 4 byte variables at addresses divisible by 4. A maximum gap of 3
byte results.
● 8 byte variables at addresses divisible by 8. A maximum gap of 7
byte results.
● Strings always at byte addresses. No gaps result.
Depending on the structure, there may be no difference in the memory map-
ping of the individual modes. Therefore, the memory allocation of a structure
with <pack mode value> = 4 can correspond to that of <pack mode value>
= 8.
Arrays of structures: If the structures are combined in arrays, then bytes are
added at the end of the structure so that the next structure is aligned.
If the “Compatibility layout” option is selected in the
NOTICE
symbol configuration and at the same time the attribute
'pack_mode' is used in the code, then problems can
occur due to unintentional memory misalignment.
See also
● ⮫ Chapter 33.2.25 "Symbol configuration” object on page 788

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 641 / 1158
Pragmas

Example 1

Example
{attribute 'pack_mode' := '1'}

TYPE myStruct:
STRUCT
Enable: BOOL;
Counter: INT;
MaxSize: BOOL;
MaxSizeReached: BOOL;

Reference, programming
END_STRUCT
END_TYPE

The memory range for a variable of the data type myStruct is allocated
'aligned'. If the storage address of its component Enable is 0x0100, for
example, then the component Counter follows at the address 0x0101,
MaxSize at address 0x0103 and MaxSizeReached at address 0x0104. In the
case of 'pack_mode':=2, Counter would be at 0x0102, MaxSize at 0x0104
and MaxSizeReached at 0x0106.

R911403764, Edition 08 Bosch Rexroth AG


642 / 1158 ctrlX PLC Engineering
Pragmas

Example 2

Example

STRUCT
Var1 : BOOL := 16#01;
Var2 : BYTE := 16#11;
Var3 : WORD := 16#22;
Var4 : BYTE := 16#44;
Var5 : DWORD := 16#88776655;
Var6 : BYTE := 16#99;
Var7 : BYTE := 16#AA;
Var8 : DWORD := 16#AA;
END_TYPE
pack_mode = 0 pack_mode = 1 pack_mode = 2 pack_mode = 4 pack_mode = 8
Variable Value Variable Value Variable Value Variable Value Variable Value
0 Var1 01 Var1 01 Var1 01 Var1 01 Var1 01
1 Var2 11 Var2 11 Var2 11 Var2 11 Var2 11
2 Var3 22 Var3 22 Var3 22 Var3 22 Var3 22
3 ... 00 ... 00 ... 00 ... 00 ... 00
4 Var4 44 Var4 44 Var4 44 Var4 44 Var4 44
5 Var5 55 Var5 55
6 ... 66 ... 66 Var5 55
7 ... 77 ... 77 ... 66
8 ... 88 ... 88 ... 77 Var5 55 Var5 55
9 Var6 99 Var6 99 ... 88 ... 66 ... 66
10 Var7 AA Var7 AA Var6 99 ... 77 ... 77
11 Var8 AA Var8 AA Var7 AA ... 88 ... 88
12 ... 00 ... 00 Var8 AA Var6 99 Var6 99
13 ... 00 ... 00 ... 00 Var7 AA Var7 AA
14 ... 00 ... 00 ... 00
15 ... 00
16 Var8 AA Var8 AA
17 ... 00 ... 00
18 ... 00 ... 00
19 ... 00 ... 00
20
21
22
23
24
25
26
27
28
29
30
31

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 643 / 1158
Pragmas

Example 3

Example

STRUCT
Var1 : BYTE := 16#01;
Var2 : LWORD := 16#11;
Var3 : BYTE := 16#22;
Var4 : BYTE := 16#44;
Var5 : DWORD := 16#88776655;
Var6 : BYTE := 16#99;

Reference, programming
Var7 : BYTE := 16#AA;
Var8 : WORD := 16#AA;
END_TYPE
pack_mode = 0 pack_mode = 1 pack_mode = 2 pack_mode = 4 pack_mode = 8
Variable Value Variable Value Variable Value Variable Value Variable Value
0 Var1 01 Var1 01 Var1 01 Var1 01 Var1 01
1 Var2 11 Var2 11
2 ... 00 ... 00 Var2 11
3 ... 00 ... 00 ... 00
4 ... 00 ... 00 ... 00 Var2 11
5 ... 00 ... 00 ... 00 ... 00
6 ... 00 ... 00 ... 00 ... 00
7 ... 00 ... 00 ... 00 ... 00
8 ... 00 ... 00 ... 00 ... 00 Var2 11
9 Var3 22 Var3 22 ... 00 ... 00 ... 00
10 Var4 44 Var4 44 Var3 22 ... 00 ... 00
11 Var5 55 Var5 55 Var4 44 ... 00 ... 00
12 ... 66 ... 66 Var5 55 Var3 22 ... 00
13 ... 77 ... 77 ... 66 Var4 44 ... 00
14 ... 88 ... 88 ... 77 ... 00
15 Var6 99 Var6 99 ... 88 ... 00
16 Var7 AA Var7 AA Var6 99 Var5 55 Var3 22
17 Var8 AA Var8 AA Var7 AA ... 66 Var4 44
18 ... 00 ... 00 Var8 AA ... 77
19 ... 00 ... 88
20 Var6 99 Var5 55
21 Var7 AA ... 66
22 Var8 AA ... 77
23 ... 00 ... 88
24 Var6 99
25 Var7 AA
26 Var8 AA
27 ... 00
28
29
30
31

R911403764, Edition 08 Bosch Rexroth AG


644 / 1158 ctrlX PLC Engineering
Pragmas

Behavior without pack mode


If pack mode is not used, then the compiler typically uses pack mode 4 or
8, depending on the device description. In each case, a pack mode which is
particularly beneficial for the processor is used so that memory access can be
performed. This is also called natural alignment or a natural alignment of data.

Negative effects when using pack mode


Unaligned memory access can be the result of using the attribute
'pack_mode'. This means, for example, that a data type with a size of 4 bytes
is then located at an address which is not divisible by 4. Normally, on a 32-bit
system a 32-bit data type can be read and written with a single memory access.
On some platforms, for example on ARM platforms, this is possible only when
this value is aligned in the memory. On other platforms, it can be that the
access is possible but it is performed much more slowly.

Example

{attribute 'pack_mode':=1}

TYPE DUT
STRUCT
by1 : BYTE;
dw1 : DWORD;
END_STRUCT
END_TYPE

On an ARM platform, the value dw1 cannot be read with a single access. When
an attempt is made to access this element directly, the ARM processor will
throw an exception.
Assumption: The following read access is performed: dwTest := dut1.dw1;
For this access to the DWORD dw1, four memory accesses are required
because each byte is read, shifted, and disjuncted individually. The flow is
somewhat the same as in the following example in which a DWORD is generated
from an array of four bytes:
dwHelp := bytes[0];
dwResult := dwHelp;
dwHelp := bytes[1];
dwHelp := SHL(dwHelp, 8);
dwResult := dwResult OR dwHelp;
dwHelp := bytes[2];
dwHelp := SHL(dwHelp, 16);
dwResult := dwResult OR dwHelp;
dwHelp := bytes[3];
dwHelp := SHL(dwHelp, 24);
dwResult := dwResult OR dwHelp;
Obviously, this kind of access is much slower than access to a DWORD, which is
aligned appropriately in the memory.
pdw := ADR(dut1.dw1);
dwTest := pdw^;

However, the compiler will not generate the access of the example when this
kind of member is accessed by means of a pointer. This means that the fol-
lowing code results in an exception on an ARM platform.
pdw := ADR(dut1.dw1);
dwTest := pdw^;

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 645 / 1158
Pragmas

For performance reasons, you should therefore avoid working with structures
which are not naturally aligned.
A packed structure must not contain an unpacked structure.

Attribute 'ProcessValue'
With the 'ProcessValue' attribute, you mark a component of a structure. In
the CFC editor, you can then use the command “Use attributed member as
input” in order to connect this structure to an input of scalar type.
Syntax:
{attribute 'ProcessValue'}

Reference, programming
Insert location: Line above the affected structure variable.

Example

TYPE QINT :
STRUCT
Status : STRING;
{attribute 'ProcessValue'}
Value1 : INT;
Value2 : INT;
END_STRUCT
END_TYPE

See also
● ⮫ Chapter Command 'Use Attributed Member as Input' on page 996

Attribute 'qualified_only'
The effect of this pragma is that variables of a global variable list are only
addressed by specifying the global variable name, for example gvl.g_var. This
also applies to variables of the type Enumeration and can be helpful in avoiding
being mistaken for local variables.
Syntax:
{attribute 'qualified_only'}
Insertion position: line above VAR_GLOBAL in a GVL

Example
Global Variable List “GVL”:
{attribute 'qualified_only'}
VAR_GLOBAL
iVar:INT;
END_VAR
Within a POU, for example “PLC_PRG”, the global variable iVar can only be
addressed using the prefix GVL:
GVL.iVar:=5;
Conversely, the following incomplete call of the variable will create an error:
iVar:=5;

Attribute 'reflection'
The pragma is used to identify POUs in which some variables require spe-
cial treatment and are tagged with a specific attribute for this purpose. Cur-
rently, this applies to the attributes 'instance-path' and 'is-connected'

R911403764, Edition 08 Bosch Rexroth AG


646 / 1158 ctrlX PLC Engineering
Pragmas

for function block variables. The compiler searches only blocks marked with
'reflection' for variables with these attributes and therefore needs less
time.
Syntax:
{attribute 'reflection'}
For examples, see the description of the attributes 'instance-path' and 'is-
connected'.
See also
● ⮫ Chapter Attribute 'instance-path' on page 625
● ⮫ Chapter Attribute 'is_connected' on page 627

Attribute 'subsequent'
The pragma is used to allocate consecutive variables in memory. When the list
changes, the entire variable list is allocated to a new memory area. This pragma
is used in programs and global variable lists.
Syntax:
{attribute 'subsequent'}
VAR_TEMP in a program with attribute 'subsequent'
NOTICE
leads to a compiler error.
When a variable in the list is qualified with RETAIN, all variables of the declara-
tion part are stored in the memory area for RETAIN.

Attribute 'symbol'
The pragma {attribute 'symbol'} defines which variables of a program or a
global variable list are to be adopted into the symbol configuration. This means
that the variables are exported as symbols to a symbol list. This symbol list is
then available for external access both as an XML file in the project directory
and as a file that is invisible to the user on the target system. For example,
the symbol list is then available for access by an OPC server. The variables
thus equipped with a symbol are loaded by PLC Engineering to the controller,
even if they are not explicitly configured or visible in the editor of the symbol
configuration.
In any case, however, an object “Symbol configuration” must be created below
the application concerned in the device tree.
Syntax:
{attribute 'symbol' := '<access possibilities>'}
<access possibilities>: none, read, write, readwrite. The default value
readwrite applies if no parameter is specified.
Insertion position:
● in order to affect only an individual variable, you must place the pragma in
the line before the variable declaration.
● In order to be effective for all variables in the declaration part of a program,
you must place the pragma in the first line of the declaration editor. In this
case, too, you can still set instructions for individual variables explicitly in
the respective line.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 647 / 1158
Pragmas

Example
With the following configuration the variables A and B are exported with read
and write permission. Variable D is exported with read permission.
{attribute 'symbol' := 'readwrite'}
PROGRAM PLC_PRG
VAR
A : INT;
B : INT;
{attribute 'symbol' := 'none'}
C : INT;

Reference, programming
{attribute 'symbol' := 'read'}
D : INT;
END_VAR

See also
● ⮫ Chapter 18.6 Using pragmas on page 134
● ⮫ Chapter 19.2 Symbol Configuration on page 229

Attribute 'to_string'
The pragma affects how the result of converting an enumeration component
with the TO_STRING operator is output. If the enumeration declaration has the
pragma, then the name of the enumeration component appears as a string
instead of the numeric value.
Syntax:
{attribute 'to_string'}
Insert location: First line above the declaration part of the enumeration.

Example
Declaration of the enumeration color:
{attribute 'to_string'}
TYPE color :
(
red := 0,
blue := 1,
green := 2
);
END_TYPE
Conversion with TO_STRING:
PROGRAM PLC_PRG
VAR
i_color: Color;
s_show_color: STRING;
END_VAR
i_color := 1;
s_show_color := TO_STRING(i_color);
In this case, str_show_color gets the value 'blue' instead of '1' as the
conversion result.

See also
● ⮫ Chapter 32.5.21 Enumerations on page 586

Attribute 'warning disable', attribute 'warning restore'


This pragma causes certain warnings to be suppressed. The warning restore
pragma causes a suppressed message to be reactivated.

R911403764, Edition 08 Bosch Rexroth AG


648 / 1158 ctrlX PLC Engineering
Pragmas

Syntax:
{warning disable <compiler ID>}
{warning restore <compiler ID>}
<compiler ID>: ID located at the beginning of an error or a warning message.

Example
Compiler message:
typify code ...
C0196: Implicit conversion from unsigned Type 'UINT' to
signed Type 'INT' : possible change of sign
Compile complete -- 0 errors
Applying the pragma to a variable declaration:
VAR
{warning disable C0195}
test1 : UINT := -1;
{warning restore C0195}
test2 : UINT := -1;
END_VAR
test1 does not generate an error message, test2 generates an error mes-
sage.

Effects of Pragmas on Symbols


POUs and variables can change their behavior with respect to the symbol con-
figuration as a result of pragmas. A detailed description can be found on the
help page of each pragma.

Pragma with attribute Effect See


also
{attribute None
'call_after_global_init_slo
t' := ' <slot> '}
{attribute None
'call_after_init'}
{attribute None
'call_after_online_change_s
lot' := ' <slot> '}
{attribute None
'call_before_global_exit_sl
ot' := ' <slot> '
{attribute None
'call_on_type_change':= '
comma separated list of
referenced function blocks>
'}

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 649 / 1158
Pragmas

Pragma with attribute Effect See


also
{attribute The marked variables are hidden ⮫ Chapt
'conditionalshow' := ' and therefore cannot be exported. er
<some text> '} However, if the source code Attribut
{attribute file from the compiled library e 'con-
'conditionalshow'} is available, or if PLC Engi- ditional-
neering has been started show'
{attribute
with the command-line option on page 609
'conditionalshow_all_locals
' := ' <some text> '} conditionalshowsymbols, then ⮫ Chapt

Reference, programming
the marked variables are visible er
{attribute
despite the pragma. Attribut
'conditionalshow_all_locals
e 'con-
'}
ditional-
show_al
l_locals'
on page 610
{attribute Replaced constants are not avail- ⮫ Chapt
'const_replaced'} able in the symbol configuration er
{attribute editor and therefore cannot be Attribut
'const_non_replaced'} exported. e
A constant being replaced 'const_r
depends on whether or not epla-
the “Replace constants” compiler ced',
option has been selected for all Attribut
constants and whether or not e
pragmas overwrite the compiler 'const_n
option for individual constants. on_repl
aced'
on page 612
{attribute 'dataflow'} None
{attribute 'displaymode':= None
<displaymode> }
{attribute None
'enable_dynamic_creation'}
{attribute 'estimated- None
stack-usage' := '
<estimated stack size in
bytes> '}
{attribute 'ExpandFully'} None
{attribute None
'global_init_slot' :=
'<slot>'}
{attribute 'hide'} Variables are hidden and therefore ⮫ Chapt
cannot be exported. er
Attribut
e 'hide'
on page 620
{attribute Variables are hidden and therefore ⮫ Chapt
'hide_all_locals'} cannot be exported. er
Attribut
e
'hide_all
_locals'
on page 622

R911403764, Edition 08 Bosch Rexroth AG


650 / 1158 ctrlX PLC Engineering
Pragmas

Pragma with attribute Effect See


also
{attribute None
'initialize_on_call'}
{attribute None
'init_namespace'}
{attribute None
'init_on_onlchange' }
{attribute 'instance-path'} None

{attribute None
'io_function_block'}
{attribute
'io_function_block_mapping'
}
{attribute None
'is_connected' := ' <input
variable> '}
{attribute 'linkalways'} POUs and library POUs are inte- ⮫ Chapt
grated in the compile list and er
therefore cannot be exported. Attribut
e 'linkal-
ways'
on page 628
{attribute 'monitoring' := Properties PROPERTY or functions ⮫ Chapt
'variable'} (FUNCTION) are provided as sym- er
{attribute 'monitoring' := bols. Attribut
'call'} e 'moni-
toring'
on page 629
{'no_assign' } None
{'no_assign_warning' }
{attribute 'no_check'} None
{attribute 'no_copy'} None
{attribute 'no-exit'} None
{attribute 'no_init'} None
{attribute 'no-init'}
{attribute 'noinit'}
{attribute None
'no_instance_in_retain'}
{attribute None
'no_virtual_actions'}
{attribute 'pingroup' := ' None
<group name> '}

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 651 / 1158
Identifier

Pragma with attribute Effect See


also
{attribute None
'pin_presentation_order_inp
uts' := '< input name >
'( , <next input name> )* }
{attribute
'pin_presentation_order_out
puts' := '< output name >
'( , <next output

Reference, programming
name> )* }
{attribute 'obsolete' := None
'user defined text'}
{attribute 'pack_mode' := ' Can lead to intentional memory ⮫ Chapt
<pack mode value> '} misalignment er
33.2.25
"Symbo
l config-
uration”
object
on page 788
{attribute 'ProcessValue'} None
{attribute None
'qualified_only'}

{attribute 'reflection'} None


{attribute 'subsequent'} None
{attribute 'symbol' := Variable is exported as symbol. ⮫ Chapt
'<access possibilities>'} The variable is displayed in the er
symbol list only when the “View”, Attribut
“Symbols Exported via Attribute” e 'sym-
option is selected in the symbol bol'
configuration editor. The access on page 646
rights, which have been defined
with the pragma, are displayed In
the “Attribute” column.
{attribute 'to_string'} None
{warning disable <compiler None
ID> }
{warning restore <compiler
ID> }

See also
● ⮫ Chapter 19.2 Symbol Configuration on page 229
● ⮫ Chapter 33.2.25 "Symbol configuration” object on page 788

32.7 Identifier
Rules for identifier specification
Rules for identifiers of variables
● An identifier may not contain any spaces or special characters.
● Capitalization is ignored. For example, VAR1 and var1 refer to the same
variable.

R911403764, Edition 08 Bosch Rexroth AG


652 / 1158 ctrlX PLC Engineering
Identifier

● The underscore is recognized. For example, A_BCD and AB_CD are treated
as two different identifiers. Multiple consecutive underscores are not per-
mitted.
● The length of an identifier is unlimited.
Rules for multiple use of identifiers (namespaces)
● An identifier must not be declared two times locally.
● An identifier can be used more than one time globally. If a local variable has
the same name as a global variable, the local variable has priority within the
POU.
● An identifier must not be identical to a keyword, such as the VAR_Global
scope.
● A variable declared in a global variable list can have the same name as
a variable defined in another GVL. PLC Engineering provides the following
standard-extending functionalities regarding the namespace or scope of vari-
ables:
– Global namespace operator:
An instance path that begins with a dot always opens a global name-
space. If there is a local variable (e.g. ivar) that has the same name as a
global variable, address the global variable with .ivar.
– The name of a Global Variable List can define the namespace uniquely
for the included variables. Thus, variables with the same name can be
declared in different Global Variable lists, but still be uniquely addressed
by preceding the list name.
For example, globlist1.ivar := globlist2.ivar; (* ivar from
GVL globlist2 is copied to ivar in GVL globlist1 *)
– Variables that are defined in the global variable list of a library included
in the project can be addressed uniquely according to the following
syntax:
<name scope library>.< GVL name>.<variable name>
For example, globlist1.ivar := lib1.globlist1.ivar (* ivar
from GVL globlist1 in library lib1 is copied to ivar in GVL
globlist1 *)
● When inserting a library using the library manager, a namespace is also
defined. This allows you to uniquely address a library function block
or a library variable via <Namenspace library>.<Fuction block name|
Variable name> Note that when libraries are nested, the namespaces of all
libraries involved, have to be specified successively.
Example: If Lib1 is referenced by Lib0, the block func contained in
Lib1 is addressed via Lib0.Lib 1.fun: ivar := Lib0.Lib1.fun(4, 5);
(* return value of func is copied to variable ivar in the
project *)
We recommend to apply the following rules in addition to the items considered
specifically for the variables declaration. Thereby, the name specification is
standardized the best possible.

Recommendations for variable names


Whenever possible, you should name variables in Hungarian notation in applica-
tions and libraries. Find a meaningful, short, English name for each variable
as a base name, which can consist of several words. Write the first letter of
each word in uppercase, the remaining letters in lowercase. In front of the base
name, append a prefix in lowercase to indicate the data type of the variable.
Example: iFileSize : INT;

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 653 / 1158
Identifier

Data type Prefix Description


BOOL x We intentionally recommend x as the prefix for
Boolean variables in order to distinguish them
from identifiers of the data type BYTE. The prefix
indicates the view of an IEC programmer.
b Reserved
BYTE by Bit string; not for arithmetic operations
WORD w Bit string; not for arithmetic operations
DWORD dw Bit string; not for arithmetic operations

Reference, programming
LWORD lw Bit string; not for arithmetic operations

SINT si Arithmetic integer data type, 8 bit


USINT usi Arithmetic integer data type, 8 bit
INT i Arithmetic integer data type, 16 bit
UINT ui Arithmetic integer data type, 16 bit
DINT di Arithmetic integer data type, 32 bit
UDINT udi Arithmetic integer data type, 32 bit
LINT li Arithmetic integer data type, 64 bit
ULINT uli Arithmetic integer data type, 64 bit

REAL r Arithmetic floating point data type, 32 bit


LREAL lr Arithmetic floating point data type, 64 bit

STRING s Single-byte string of variable length (default 80


characters)
WSTRING ws Double-byte string of variable length (default 80
characters)

TIME tim Duration, 32 bit


LTIME ltim Duration, 64 bit

● TIME_OF_DAY tod Time (daytime), 32 bit


● TOD
● LTIME_OF_DAY ltod Time (daytime), 64 bit
● LTOD
● DATE_AND_TIME dt Date and time
● DT
● LDATE_AND_TIME ldt
● LDT
DATE ● dat Calendar date
● d
LDATE ● ldat Calendar date
● ld

POINTER p
ARRAY a
Enumeration e

R911403764, Edition 08 Bosch Rexroth AG


654 / 1158 ctrlX PLC Engineering
Identifier

Example

VAR
bySubIndix: BYTE;
xFlag: BOOL;
udiCounter: UDINT;
END_VAR

Identifier Description Example


Nested declaration Prefixes are attached in pabyTelegramData: POINTER TO ARRAY
the order of declaration [0..7] OF BYTE;
function block instance Prefix: Abbreviation for cansdoReceivedTelegram:
Variable of user-defined the name of the func- CAN_SDOTelegram;
data type tion block or data type. TYPE CAN_SDOTelegram : (* prefix: sdo
*)
STRUCT
ᅠwIndex: WORD;
ᅠbySubIndex:BYTE;
ᅠbyLen:BYTE;
ᅠaby: ARRAY [0..3] OF BYTE;
END_STRUCT
END_TYPE
Local constant Prefix: c_, followed by VAR CONSTANT
Local constant variable the type prefix and the ᅠc_uiSyncID: UINT := 16#80;
variable name
END_VAR
Global variable An additional prefix is VAR_GLOBAL
attached to the library ᅠCAN_g_iTest: INT;
prefix
END_VAR
g_
Global constants An additional prefix is VAR_GLOBAL CONSTANT
Global constant variable attached to the library ᅠCAN_gc_dwExample: DWORD;
prefix
END_VAR
gc_

Recommendations for variable names PLC Engineering V3.x libraries


Identifier Description Example
Variable Corresponds to the pre- g_iTest: INT; // Declaration
vious description on var- CAN.g_iTest; // Implementation; call in
iable names, with the the program
exception that global
variables and constants
do not require library
prefixes, as the name-
space replaces the func-
tion.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 655 / 1158
Identifier

Recommendations for identifiers for user-defined data types (DUT)


Identifier for Description Example
Structures Library prefix followed TYPE CAN_SDOTelegram : (* prefix: sdo
by an underscore and *)
a short, informative STRUCT
description of the struc-
ᅠwIndex : WORD;
ture. The corresponding
prefix for variables cre- ᅠbySubIndex : BYTE;
ated with this structure ᅠbyLen : BYTE;
should follow as a com- ᅠabyData: ARRAY [0..3] OF BYTE;

Reference, programming
ment directly after the
colon. END_STRUCT
END_TYPE
Enumerations Library prefix followed TYPE CAL_Day :
by an underscore and (
the identifier in upper-
ᅠCAL_MONDAY,
case letters.
ᅠCAL_TUESDAY,
Please note: In past PLC
Engineering versions, ᅠCAL_WEDNESDAY,
enumeration values > ᅠCAL_THURSDAY,
16#7FFF caused errors
ᅠCAL_FRIDAY,
because they were not
automatically converted ᅠCAL_SATURDAY,
to INT. For this reason, ᅠCAL_SUNDAY
enumerations should );
always be declared with
Declaration:
correct INT values.
eToday: CAL_Day;

Recommendations for identifiers for user-defined data types (DUT) in PLC Engineering V3 libraries
Identifier for Description Example
DUT names in PLC Engi- The namespace Library with namespace CAL
neering V3 libraries replaces the function TYPE DAY :
of the library prefix.
(
Therefore, it is omitted.
Enumeration values are ᅠMONDAY
also defined without a ᅠTUESDAY,
library prefix. ᅠWEDNESDAY,
ᅠTHURSDAY,
ᅠFRIDAY,
ᅠSATURDAY,
ᅠSUNDAY
);
Declaration:
eToday: CAL.Day;
Use in the application
IF eToday = CAL.Day.MONDAY THEN

R911403764, Edition 08 Bosch Rexroth AG


656 / 1158 ctrlX PLC Engineering
Shadowing rules

Recommendations for identifiers for POUs Functions, function blocks and programs
Identifier for Description Example
POUs: Func- Library prefix followed by an underscore FUNCTION_BLOCK CAN_SendTelegram
tions, func- and a short, informative POU name. As (* prefix: canst *)
tion blocks for variables, the first letter of each word
and pro- should be in uppercase letters, all others,
grams in lowercase letters. It is recommended to
use a combination of a verb and a noun in
the POU name.
For function blocks, the respective prefix
for created instances should follow the
name as a comment.
Actions Only actions called by the function block
beginning with prv_. Otherwise, actions
do not contain prefixes

Recommendations for identifiers for POUs in PLC Engineering V3 libraries


Identifier for Description Example
POU The library prefix is omitted as the name- FUNCTION_BLOCK SendTelegram (*
space replaces the function of the library prefix: canst *)
prefix
Method Only methods called by the function block
start with prv_
Otherwise, methods do not contain pre-
fixes
Interface I ICANDevice
Interface

Recommendations for identifiers for visualizations


Ensure that a visualization is not named like another
NOTICE
function block in the project, as problems can result
when changing visualizations.

Also refer to
● ⮫ Chapter 18.16 Declaring variables on page 160
● ⮫ Chapter 32.5 Data types on page 555
● ⮫ Chapter 32.2 Variables on page 438

32.8 Shadowing rules


In PLC Engineering, you are generally allowed to use the same identifier for
different elements. For example, a POU and a variable can be named the same.
However, you should avoid this practice in order to prevent confusion.

Negative example
In the following code section, a local function block instance has the same
name as a function. In such a case as this, it is unclear whether the instance or
the function is called in the program.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 657 / 1158
Shadowing rules

Example
FUNCTION YYY : INT
;
END_FUNCTION

FUNCTION_BLOCK XXX
;
END_FUNCTION_BLOCK

PROGRAM PLC_PRG

Reference, programming
VAR
YYY : XXX;
END_VAR
YYY();
END_PROGRAM

Compiler behavior in case of shadowing


The compiler basically reports neither errors nor warnings when the same iden-
tifier is used for different elements. Instead, the compiler searches the code in
a specific order for the declaration of the identifier. If a declaration is found,
then the compiler does not search for any other declarations elsewhere. If
other declarations do exist, then they are "shadowed" for the compiler. The fol-
lowing section describes the shadowing rules (that is, the search order that the
compiler uses when searching for the declaration for identifiers). The section
"Ambiguous access and qualified access" provides ways to prevent ambiguous
access and bypass shadowing rules.

Avoiding shadowing
To make sure that names are always unique, you should follow naming conven-
tions, such as certain prefixes for variables. Rules for assigning identifiers can
be found in the "Identifiers" chapter of the help.
Naming conventions can be checked automatically using the static code anal-
ysis of PLC Engineering. Static code analysis could also detect the duplicate
use of the name YYY and report it as an error.
The consistent use of the attribute qualified_only for enumerations and
global variable lists and the use of qualified libraries can also prevent ambig-
uous situations.
To ensure that when a programming function block of the “POUs” view is
called, a programming block of the same name of the “Devices” view is
not called, the operator __POOL should be prefixed to the name of the
programming function block when it is called, for example svar_pou :=
__POOL.POU();

Search order in the application


When the compiler encounters a single identifier in the code of an application,
it searches for the corresponding declaration in the following order:
1. Local variables
● Local variables of a method.
● Local variables in the function block, program, or function, and in any basic
function blocks.
● Local methods of the POU.

R911403764, Edition 08 Bosch Rexroth AG


658 / 1158 ctrlX PLC Engineering
Shadowing rules

2. Global variables
● Global variables in the application if the qualified_only attribute is not
set in the variable list in which the global variables are declared.
● Global variables in a parent application if the qualified_only attribute is
not set in the variable list in which the global variables are declared.
● Global variables in referenced libraries when neither the library nor the
variable list requires qualified access.
3. Function blocks or type names
● POU or type names of the application (i.e. Names of global variable lists,
function blocks, etc.).
● Function block or type names from a parent application.
● Function block or type names from a library.
4. Libraries
● Namespaces of locally referred libraries and libraries that are published by
libraries.
5. View POUs
● Global variables in the “POUs” view, unless the qualified_only attribute is
not set in the variable list in which they are declared.
● POU or type names of the “POUs” view (i.e. Names of global variable lists,
function blocks, etc.).
● Libraries from POUs.
Libraries that are inserted in the Library Manager of the “POUs” view are mir-
rored in the Library Manager in all applications in the project with the appro-
priate placeholder resolution. These libraries then form a common namespace
with the libraries in the application. Therefore, there is no shadowing of libra-
ries in the pool by libraries in the application.

Search order in the library


When the compiler encounters a single identifier in the code of a library, it
searches for the corresponding declaration in the following order:
1. Local variables
● Local variables of a method.
● Local variables in the function block, program, or function, and in any basic
function blocks.
● Local methods of the POU.
2. Global variables
● Global variables in the local library if the qualified_only attribute is not
set in the variable list in which the global variables are declared.
● Global variables in referenced libraries when neither the library nor the
variable list requires qualified access.
3. Libraries
● POU or type names of the local library (i.e. Names of Global Variable Lists,
function blocks, etc.).
● Function block or type names from a referenced library.
● Namespaces of locally referenced libraries and libraries that are published
by locally referenced libraries.

Ambiguous access and qualified access


Despite these search orders, ambiguous access can still occur. For example,
this is the case when a variable with the same name exists in two global vari-
able lists that do not require qualified access. Such a case is reported by the
compiler as an error (for example: ambiguous use of the name XXX).

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 659 / 1158
Keywords

This kind of ambiguous use can be made unique by means of qualified access,
for example by accessing via the name of the global variable list (example:
GVL.XXX).
Qualified access can also always be used to avoid shadowing rules.
● The name of the global variable list can be used to uniquely access a vari-
able in the list.
● The name of a library can be used to uniquely access elements in the library.
● The THIS pointer be used to uniquely access variables in a function block,
even if a local variable with the same name exists in a method of the func-
tion block.

Reference, programming
To find the declaration location of an identifier at any time, use the command
“Edit 🠂 Browse 🠂 Go to Definition”. This can be especially helpful if the com-
piler produces an apparently obscure error message.

Searching in instance paths


The search orders described above do not apply to identifiers that exist as
components in an instance path or to identifiers that are used as inputs in
calls.
For access of the following type yy.component, it depends on the entity
described by yy where the declaration of component is searched for.
If yy denotes a variable with a structured data type (that is, type STRUCT or
UNION), then component is searched for in the following order:
● Local variables of the function block.
● Local variables of the base function block.
● Methods of the function block.
● Methods of the base function block.
If yy denotes a global variable list or a program, then component is searched
for in this list only.
If yy denotes a namespace of a library, then component is searched for in this
library exactly as described in the section above "Search order in the library".
Only in the second instance does the compiler decide whether access to the
found element is granted (that is, whether the variable is only locally acces-
sible, or whether a method is private). If access is not allowed, an error is
issued.

Also refer to
● ⮫ Chapter 32.7 Identifier on page 651
● ⮫ Chapter Attribute 'qualified_only' on page 645
● ⮫ Chapter 32.2.16 THIS on page 451
● ⮫ Chapter 32.3.87 Operator '__POOL' on page 539

32.9 Keywords
In all editors, you must capitalize keywords that for example denote scopes,
data types, or operators.
Keywords cannot be used as variable names.

R911403764, Edition 08 Bosch Rexroth AG


660 / 1158 ctrlX PLC Engineering
Methods

Examples

VAR
END_VAR
BOOL_TO_INT
IF
THEN
ELSE
LTIME
MUL
XOR
PERSISTENT
PROGRAM

PLC Engineering checks the correct use of keywords automatically and high-
lights errors immediately during input with a wavy underline.
When PLC Engineering creates implicit code, variables and functions are gen-
erally given a name that is prepended with two underscores (__). The use of
double underscores in the implementation code is prevented automatically.
This eliminates conflicts between internal system identifiers and identifiers
assigned by the programmer.
The following keywords are used in the PLC Engineering export format. There-
fore, you may not use them as identifiers:
● ACTION
● END_ACTION
● END_FUNCTION
● END_FUNCTION_BLOCK
● END_PROGRAM
Other valid keywords:
● VAR_ACCESS
● READ_ONLY
● READ_WRITE
● PARAMS

32.10 Methods
32.10.1 Methods 'FB_Init', 'FB_Reinit', and 'FB_Exit'
You can declare the methods explicitly in order to influence the initialization of
function block variables, as well as the behavior when exiting function blocks.
The type of the return value for the implicit methods is BOOL. The value is not
evaluated by the system, but the type should not be changed.
FB_Init is always available implicitly and it is used primarily for initialization.
For a specific influence, you can also declare the methods explicitly and pro-
vide additional code there with the standard initialization code.
FB_Reinit must be implemented explicitly. If this method exists, then it is
called after the instance of the affected function block is copied. That happens
during an online change after changes to the function block declaration (signa-
ture change) in order to reinitialize the new instance module. To reinitialize the
basic implementation of the function block, you must call FB_Reinit explicitly.
FB_Exit must be implemented explicitly. If there is an implementation, then
the method is called before the controller removes the code of the function
block instance (implicit call).

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 661 / 1158
Methods

The following shows some use cases of these methods for different operating
conditions.

Operating condition "First download"


When downloading an application to a PLC with factory settings, the memory
of all variables must be offset to the required initial state. In this way, the
data areas of function block instances are assigned the required values. By
the explicit implementation of FB_Init for function blocks, you can react spe-
cifically to this situation in the application code. By evaluating the method
parameters bInCopyCode (FALSE) and bInitRetains (TRUE), you can detect

Reference, programming
this operating condition clearly. (See "Operating condition "Online Change""
and "Operating condition "Re-download"".)

Operating condition "Online Change"


Within the scope of the online change, you can influence the initialization of
function block instances by means of the methods FB_Exit, FB_Init, and
FB_Reinit. During the online change, the changes to the application that were
made in offline mode are applied in the running PLC. This is the reason that the
old instances of the function blocks are replaced by new instances as much as
possible without incident. If no changes were made to the declaration part of
a function block in the application before login, but in the implementation only,
then the data areas are not replaced. Only code blocks are replaced. Then the
methods FB_Exit , FB_Init, and FB_Reinit are not called.
If you have made changes to the declaration of a function block that lead to
the copying operation described above, then you receive a message during
the online change about possible unintended effects. In the “Details” of the
message view, you see a list of all instances to be copied.
In the code of the FB_Init method, the parameter bInCopyCode (TRUE) can
be evaluated to detect whether or not an online change is being executed.
The following calls occur in succession during an online change:
1. FB_Exit
old_inst.FB_Exit(bInCopyCode := TRUE);
You can call FB_Exit when exiting the old instance in order to trigger
specific cleanup tasks before the copy operation. In this way, you can
prepare the data for the following copy operation and influence the state
of the new instance. You can notify other parts of the application about
the pending change in location in the memory. Pay special attention to
the variables of type POINTER and REFERENCE. These may no longer refer
to the required memory locations after the online change. Interface varia-
bles (INTERFACE) are handled separately by the compiler and they are
adapted accordingly during the online change. External resources such
as sockets, files, or other handles can be applied by the new instance,
in some case unchanged. Often they do not have to be treated specially
during an online change. (See "Operating condition "Re-download"")
2. FB_Init
new_inst.FB_Init(bInitRetains := FALSE, bInCopyCode :=
TRUE);
FB_Init is called before the copy operation and can be used in order to
execute specific operations for the online change. For example, you can
initialize variables accordingly at the new location in the memory, or notify
other parts of the application about the new location of specific variables
in the memory.

R911403764, Edition 08 Bosch Rexroth AG


662 / 1158 ctrlX PLC Engineering
Methods

3. Copy operation: copy


copy(&old_inst, &new_inst);
Existing values remain unchanged. For this purpose, they are copied from
the old instance into the new instance.
4. FB_Reinit
new_inst.FB_Reinit();
This method is called after the copy operation and should set defined
values for the variables of the instance. For example, you can initialize
variables accordingly at the new location in the memory, or notify other
parts of the application about the new location of specific variables in the
memory. Design the implementation independent of the online change.
The method can also be called from the application at any time in order to
reset a function block instance to its original state.
With the {attribute 'no_copy'} attribute, you can prevent that this is
copied during the online change for a single variable of the function block.
It always retains the initial value.
See also
● ⮫ Chapter Command 'Settings of Memory Reserve for Online Change'
on page 911

Operating condition "New download"


When downloading an application, an existing application may be replaced on
the PLC. Therefore, the provision of memory for the present function blocks
must be regulated. You can use the FB_Exit method for implementing the
required steps for this. For example, you can offset external resources (with
socket and file handles) in a defined state.
You can detect this operating condition by checking whether or not the param-
eter bInCopyCode = FALSE for the FB_Exit method.

Operating condition "Start of application"


The initial assignments are processed before the first cycle of the application
tasks.

Example
T1 : TON := (PT:=t#500ms);

These kinds of assignments are executed only after calling FB_Init. In order
to control the effects of these assignments, you can provide a function block
or a method of a function block with the {attribute ‘call_after_init‘}
attribute. You must add the attribute above the declaration part of the
function block body and above the declaration part of the corresponding
method. A POU that extends another POU which uses the {attribute
'call_after_init'} attribute must also have the attribute. For the benefit
of clarity, we recommend that the corresponding methods are overwritten with
the same name, the same signature, and the same attribute. This requires
calling SUPER^.MyInit. The name of the method can be chosen without
restriction. (Exceptions: FB_Init, FB_Reinit, and FB_Exit). The method is
called after processing the initial assignments and before starting the applica-
tion tasks. Therefore, the method can react to user input.
When using FB_Init or {attribute 'call_after_init'}, remember that
detecting errors in the FB_Init method or in methods decorated with the
{attribute 'call_after_init'} attribute is tedious, because the setting of
breakpoints may not have the expected effect.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 663 / 1158
Methods

If the explicitly defined initialization code is reached


NOTICE
during execution, then the function block instance is
already completely initialized via the implicit initialization
code. Therefore, there must not be a SUPER^.FB_Init
call.
FB_Init replaces the INI operator used in CoDeSys
NOTICE
V2.3. The methods cannot be compared to the design of
a constructor, such as in C#, C++, or Java. This has con-
sequences for function blocks that extend other function
blocks. (See below: "Derived function blocks")

Reference, programming
Interface of method FB_Init
METHOD FB_Init : BOOL
VAR_INPUT
bInitRetains : BOOL; // TRUE: the retain variables are
initialized (reset warm / reset cold)
bInCopyCode : BOOL; // TRUE: the instance will be copied to
the copy code afterward (online change)
END_VAR
You can declare additional function block inputs in an FB_init method. Then
you have to set these inputs in the declaration of the function block instance.

Example
Method FB_Init for the serialdevice function block

METHOD PUBLIC FB_Init : BOOL


VAR_INPUT
bInitRetains : BOOL; // initializing of retain variable
bInCopyCode : BOOL; // instance is copied to copy code
iCOMnum : INT; // additional input: number of the COM
interface, that is to be observed
END_VAR

Instantiation of the serialdevice function block:

com1: serialdevice(iCOMnum:=1);
com0: serialdevice(iCOMnum:=0);

Interface of method FB_Reinit

METHOD FB_Reinit : BOOL

Interface of method FB_Exit


There is the mandatory parameter bInCopyCode.

METHOD FB_Exit : BOOL


VAR_INPUT
bInCopyCode : BOOL; // TRUE: the exit method is called in
order to leave the instance which will be copied afterwards
(online change).
END_VAR

R911403764, Edition 08 Bosch Rexroth AG


664 / 1158 ctrlX PLC Engineering
Errors and warnings

Behavior for derived function blocks


If a function block is derived from another function block, then the FB_Init
method of the derived function block must define the same parameters as the
FB_Init method of the basic function block. However, you can add further
parameters in order to set up a special initialization for the instance.

Example
The function blocks MainFB, SubFB, and SubSubFB are derived from each
other. Therefore, SubFB EXTENDS MainFB and SubSubFB EXTENDS SubFB
apply.
Calling order of methods FB_Exit and FB_Init:
1. fbSubSubFb.FB_Exit(...);
2. fbSubFb.FB_Exit(...);
3. fbMainFb.FB_Exit(...);
4. fbMainFb.FB_Init(...);
5. fbSubFb.FB_Init(...);
6. fbSubSubFb.FB_Init(...);

See also
● ⮫ Chapter 'Method’ object on page 829
● ⮫ Chapter Attribute 'call_after_init' on page 606
● ⮫ Chapter Attribute 'no_copy' on page 634
● ⮫ Chapter 32.2.15 SUPER on page 450

32.11 Errors and warnings


32.11.1 Compiler error C0001 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
32.11.2 Compiler error C0002 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
32.11.3 Compiler error C0003 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
32.11.4 Compiler Error C0004 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
32.11.5 Compiler error C0005 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
32.11.6 Compiler error C0006 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
32.11.7 Compiler error C0007 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
32.11.8 Compiler error C0008 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
32.11.9 Compiler error C0009 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
32.11.10Compiler error C0010 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
32.11.11Compiler error C0011 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
32.11.12Compiler error C0013 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
32.11.13Compiler error C0016 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
32.11.14Compiler error C0018 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
32.11.15Compiler Error C0020 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
32.11.16Compiler Error C0022 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
32.11.17Compiler Error C0023 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
32.11.18Compiler Error C0026 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
32.11.19Compiler Error C0027 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
32.11.20Compiler Error C0030 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
32.11.21Compiler Error C0031 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676
32.11.22Compiler error C0032 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676
32.11.23Compiler Error C0033 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 665 / 1158
Errors and warnings

32.11.24Compiler Error C0035 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677


32.11.25Compiler Error C0036 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
32.11.26Compiler Error C0037 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
32.11.27Compiler Error C0038 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
32.11.28Compiler Error C0039 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
32.11.29Compiler Error C0040 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
32.11.30Compiler Error C0041 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680
32.11.31Compiler Error C0042 (Compiler Version <= 3.4.10) . . . . . . . . . . . 680
32.11.32Compiler Error C0043 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681

Reference, programming
32.11.33Compiler Error C0044 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681
32.11.34Compiler error C0045 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
32.11.35Compiler Error C0046 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
32.11.36Compiler Error C0047 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
32.11.37Compiler Error C0048 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
32.11.38Compiler Error C0049 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
32.11.39Compiler Error C0050 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
32.11.40Compiler Error C0051 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
32.11.41Compiler Error C0053 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
32.11.42Compiler Error C0061 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
32.11.43Compiler Error C0062 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
32.11.44Compiler Error C0064 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
32.11.45Compiler Error C0065 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
32.11.46Compiler Error C0066 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
32.11.47Compiler Error C0068 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
32.11.48Compiler Error C0069 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
32.11.49Compiler Error C0070 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687
32.11.50Compiler Error C0072 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688
32.11.51Compiler Error C0074 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688
32.11.52Compiler Error C0075 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
32.11.53Compiler Error C0076 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
32.11.54Compiler Error C0077 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
32.11.55Compiler Error C0078 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690
32.11.56Compiler Error C0080 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690
32.11.57Compiler Error C0081 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691
32.11.58Compiler Error C0082 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691
32.11.59Compiler Error C0084 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691
32.11.60Compiler Error C0085 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692
32.11.61Compiler Error C0086 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692
32.11.62Compiler Error C0087 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693
32.11.63Compiler Error C0089 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693
32.11.64Compiler Error C0090 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694
32.11.65Compiler Error C0091 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694
32.11.66Compiler Error C0094 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695
32.11.67Compiler Error C0096 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695
32.11.68Compiler Error C0097 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696
32.11.69Compiler Error C0098 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696

R911403764, Edition 08 Bosch Rexroth AG


666 / 1158 ctrlX PLC Engineering
Errors and warnings

32.11.70Compiler Error C0099 (Compiler Version < 3.5.7.0) . . . . . . . . . . . . 696


32.11.71Compiler Error C0101 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
32.11.72Compiler Error C0102 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
32.11.73Compiler Error C0104 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
32.11.74Compiler error C0106 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698
32.11.75Compiler Error C0114 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698
32.11.76Compiler Error C0115 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698
32.11.77Compiler Error C0116 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698
32.11.78Compiler Error C0117 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699
32.11.79Compiler Error C0118 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699
32.11.80Compiler Error C0119 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699
32.11.81Compiler Error C0120 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700
32.11.82Compiler Error C0122 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700
32.11.83Compiler Error C0124 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701
32.11.84Compiler Error C0125 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701
32.11.85Compiler Error C0126 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701
32.11.86Compiler Error C0130 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702
32.11.87Compiler Error C0131 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702
32.11.88Compiler Error C0132 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
32.11.89Compiler Error C0136 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
32.11.90Compiler Error C0138 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
32.11.91Compiler Error C0139 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704
32.11.92Compiler Error C0140 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704
32.11.93Compiler Error C0141 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704
32.11.94Compiler Error C0142 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705
32.11.95Compiler Error C0143 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705
32.11.96Compiler Error C0144 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706
32.11.97Compiler Error C0145 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706
32.11.98Compiler Error C0149 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706
32.11.99Compiler Error C0161 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707
32.11.10
0 Compiler Error C0162 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707
32.11.10
1 Compiler Error C0164 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708
32.11.10
2 Compiler Error C0165 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708
32.11.10
3 Compiler Error C0168 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709
32.11.10
4 Compiler Error C0169 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 709
32.11.10
5 Compiler Error C0173 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710
32.11.10
6 Compiler Error C0174 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 710
32.11.10
7 Compiler Error C0175 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
32.11.10
8 Compiler Error C0177 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 667 / 1158
Errors and warnings

32.11.10
9 Compiler Error C0178 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711
32.11.11
0 Compiler Error C0179 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712
32.11.11
1 Compiler Error C0180 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 712
32.11.11
2 Compiler Error C0182 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713
32.11.11
3 Compiler Error C0183 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713

Reference, programming
32.11.11
4 Compiler Error C0185 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 713
32.11.11
5 Compiler Error C0186 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 714
32.11.11
6 Compiler Error C0188 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715
32.11.11
7 Compiler Error C0189 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715
32.11.11
8 Compiler Error C0190 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715
32.11.11
9 Compiler Error C0191 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
32.11.12
0 Compiler Error C0195 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
32.11.12
1 Compiler Error C0196 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
32.11.12
2 Compiler Error C0197 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 716
32.11.12
3 Compiler Error C0198 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717
32.11.12
4 Compiler Error C0199 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717
32.11.12
5 Compiler Error C0201 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718
32.11.12
6 Compiler Error C0203 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718
32.11.12
7 Compiler Error C0204 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718
32.11.12
8 Compiler Error C0205 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
32.11.12
9 Compiler Error C0206 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
32.11.13
0 Compiler Error C0207 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
32.11.13
1 Compiler Error C0208 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720
32.11.13
2 Compiler Error C0209 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720
32.11.13
3 Compiler Error C0211 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720
32.11.13
4 Compiler Error C0212 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721

R911403764, Edition 08 Bosch Rexroth AG


668 / 1158 ctrlX PLC Engineering
Errors and warnings

32.11.13
5 Compiler Error C0215 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721
32.11.13
6 Compiler Error C0216 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721
32.11.13
7 Compiler Error C0217 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722
32.11.13
8 Compiler Error C0218 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722
32.11.13
9 Compiler Error C0219 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722
32.11.14
0 Compiler Error C0221 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
32.11.14
1 Compiler Error C0222 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
32.11.14
2 Compiler Error C0224 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724
32.11.14
3 Compiler Error C0225 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724
32.11.14
4 Compiler Error C0227 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
32.11.14
5 Compiler Error C0228 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
32.11.14
6 Compiler Error C0230 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
32.11.14
7 Compiler Error C0232 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726
32.11.14
8 Compiler Error C0233 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726
32.11.14
9 Compiler Error C0234 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727
32.11.15
0 Compiler Error C0235 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727
32.11.15
1 Compiler Error C0236 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728
32.11.15
2 Compiler Error C0237 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728
32.11.15
3 Compiler Error C0238 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729
32.11.15
4 Compiler Error C0239 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729
32.11.15
5 Compiler Error C0240 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729
32.11.15
6 Compiler Error C0241 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730
32.11.15
7 Compiler Error C0242 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730
32.11.15
8 Compiler Error C0243 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
32.11.15
9 Compiler Error C0380 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
32.11.16
0 Compiler Error C0509 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 669 / 1158
Errors and warnings

32.11.16
1 Compiler Error C0511 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
32.11.16
2 Compiler Error C0542 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733
32.11.16
3 Compiler Error C0543 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734

32.11.1 Compiler error C0001


Message: Constant '<constant value>' too large for type '<data type>'
Possible error cause: A typed constant is too large for the given data type or a

Reference, programming
constant is too large for each possible data type.
Error correction: Use smaller constants or an appropriate data type for a typed
constant.

Example of the error:


PROGRAM PLC_PRG
VAR
test1: INT;
test2: INT;
test3: LREAL;
END_VAR

test1 := 12345678912345566991923939292939911;
test2 := INT#123456;
test3 := 10E500;

--> C0001: Constant '12345678912345566991923939292939911' too


large for type 'ANY_INT'
--> C0001: Constant 'INT#123456' too large for type 'INT'
--> C0001: Constant '10E500' too large for type 'ANY_REAL'

32.11.2 Compiler error C0002


Message: '<operator 1>' or '<operator 2>' expected instead of '<tag>'
Possible error cause: Syntax error
Error correction: Use the correct syntax.

Example of the error:


PROGRAM PLC_PRG
Fun(1;

--> C0002: ',' or ')' expected instead of ';'

32.11.3 Compiler error C0003


Message: '<value>' is not a valid bit number for '<variable>'
Possible error cause: Attempted access to a bit that is outside of the range for
a data type.
Error correction: Use a bit value for the bit access that is lower than the
number of bits in the data type of the variable.

Example of the error:


PROGRAM PLC_PRG
VAR
test1: WORD;

R911403764, Edition 08 Bosch Rexroth AG


670 / 1158 ctrlX PLC Engineering
Errors and warnings

test2: BOOL;
END_VAR

test1 := test2.17;

--> C0003: '17' is not a valid bit number for 'w'

32.11.4 Compiler Error C0004


Message: '<variable>' is not a component of '<structure>'
Possible error cause: Component access with "." to a variable that is not a
structured value or does not exist as a component of the structure.
Error correction: Access a defined component, or change the definition of the
component in the data type. The input assistance "List components" provides
all valid access to this position.

Example of the error:


TYPE DUT:
STRUCT
x, y : INT;
END_STRUCT
END_TYPE

PROGRAM PLC_PRG
VAR
test1 : DUT;
test2 : INT;
END_VAR

test2 := test1.z;

--> C0032: Type 'Unknown type: 'test1.z'' cannot be converted


to type 'INT'
--> C0004: 'z' is to a component of 'DUT'

32.11.5 Compiler error C0005


Message: Constant overflow in address '<address>'
Possible error cause: At least one component in the address does not fit into a
32-bit integer value.
Error correction: Use a valid address expression.

Example of the error:


PROGRAM PLC_PRG
VAR
X: BYTE;
END_VAR

X := %QB5555555555;

--> C0005: Constant overflow in address '%??'

32.11.6 Compiler error C0006


Message: '<operator>' expected instead of '<token>'
Possible error cause: Syntax error
Error correction: Use the correct syntax.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 671 / 1158
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
x: INT;
bTest : BOOL;
END_VAR

IF bTest
x := 9;
END_IF

Reference, programming
--> C0006: 'THEN' expected instead of 'x'

32.11.7 Compiler error C0007


Message: Expression expected instead of '<token>'
Possible error cause: Syntax error
Error correction: Use the correct syntax.

Example of the error:


PROGRAM PLC_PRG
VAR
x: INT;
bTest : BOOL;
END_VAR

IF THEN
x := 9;
END_IF

--> C0007: Expression expected instead of 'THEN'

32.11.8 Compiler error C0008


Message: Unexpected end-of-file found: '<operator 1>', '<operator 2>', or
'<operator 3>' expected
Possible error cause: Syntax error
Error correction: Use the correct syntax.

Example of the error:


PROGRAM PLC_PRG
VAR
x: INT;
bTest : BOOL;
END_VAR

IF bTest THEN
x := 9;

--> C0008: Unexpected end-of-file found: 'ELSIF', 'ELSE' or


'END_IF' expected

32.11.9 Compiler error C0009


Message: Unexpected token '<token>' found
Possible error cause: Syntax error
Error correction: Use the correct syntax.

R911403764, Edition 08 Bosch Rexroth AG


672 / 1158 ctrlX PLC Engineering
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR

END_FOR;

--> C0009: Unexpected token 'END_FOR' found

32.11.10 Compiler error C0010


Message: Unexpected end-of-file found: '<token>' expected
Possible error cause: Syntax error
Error correction: Use the correct syntax.

Example of the error:


PROGRAM PLC_PRG
VAR
i: INT;
END_VAR

FOR i := 0 TO 2 DO
;

--> C0010: Unexpected end-of-file 'END_FOR' found

32.11.11 Compiler error C0011


Message: No 'CASE' label found
Possible error cause: Syntax error in a CASE statement. A statement in a CASE
statement is not assigned to a CASE label.
Error correction: Add a CASE label.

Example of the error:


PROGRAM PLC_PRG
VAR
i: INT;
x: INT;
END_VAR

CASE i OF
x := 9;
END_CASE

--> C0011: No 'CASE' label found


Error correction:
CASE i OF
0:
x := 9;
END_CASE

32.11.12 Compiler error C0013


Message: At least one statement is expected.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 673 / 1158
Errors and warnings

Possible error cause: At least one statement is expected at some positions in


the code. For example, in the THEN and ELSE part of an IF statement, or in the
body of a FOR loop.
Error correction: Add at least one statement at the selected position. It is
enough to write a blank statement ";".

Example of the error:


PROGRAM PLC_PRG
VAR
bTest: BOOL;

Reference, programming
END_VAR

IF bTest THEN
END_IF

--> C0013: At least one statement is expected

32.11.13 Compiler error C0016


Message: Counter initialization expected
Possible error cause: Syntax error in a FOR loop. The counter variable is not
initialized correctly.
Error correction: Pay attention to the correct syntax of the FOR loop.
FOR i := 0 TO 10 DO
;
END_FOR

Example of the error:


PROGRAM PLC_PRG
VAR
i: INT;
END_VAR

FOR i TO 10 DO
;
END_FOR

--> C0015: Counter initialization expected


Error correction:
FOR i := 0 TO 10 DO
;
END_FOR

32.11.14 Compiler error C0018


Message: <expression> is not a valid assignment target
Possible error cause: An expression with no write permission is on the left side
of an assignment. Example: a constant.
Error correction: Assign only to variables that have write access.

Example of the error:


PROGRAM PLC_PRG
VAR
i: INT;
END_VAR
VAR CONSTANT

R911403764, Edition 08 Bosch Rexroth AG


674 / 1158 ctrlX PLC Engineering
Errors and warnings

j: INT := 0;
END_VAR

j := i;

--> C0018: 'j' is not a valid assignment target

32.11.15 Compiler Error C0020


Message: '<statement>' is no valid statement
Possible error cause: Syntax error (for example, too few or too many charac-
ters)
Error correction: Make sure that the syntax is correct.

Example of the error:


PROGRAM PLC_PRG
VAR
x : INT;
END_VAR

x = 2;

--> C0020: '(x = 2); ' is no valid statement


Error correction:
Example:
x := 2;

32.11.16 Compiler Error C0022


Message: '<operator>' needs exactly '<number of operands>' operands
Possible error cause: Too many or too few operands are assigned to an oper-
ator.
Error correction: Assign the required number of operands to the operator.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
pt: POINTER TO INT;
END_VAR

pt := ADR(i,1);

--> C0022: 'ADR' needs exactly '1' operands


Error correction:
Example:
pt := ADR(i);

32.11.17 Compiler Error C0023


Message: '<operator>' needs at least '<number of operands>' operands
Possible error cause: Too few operands are assigned to an operator.
Error correction: Assign the required number of operands to the operator.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 675 / 1158
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
END_VAR

i := MUX(30,40);

--> C0023: 'MUX' needs at least '3' operands


Error correction:

Reference, programming
Example:
i := MUX(30,40,50);

32.11.18 Compiler Error C0026


Message: Identifier expected instead of '<invalid identifier>'
Possible error cause: An invalid identifier is passed to a method.
Error correction: Use valid identifiers.

Example of the error:


METHOD 123
VAR_INPUT
END_VAR

--> C0243: The name used in the signature is not identical to


the object name
--> C0026: Identifier expected instead of '123'
Error correction:
Example:
METHOD METH123

32.11.19 Compiler Error C0027


Message: size of string expected after '('
Possible error cause: The length of the string is not specified.
Error correction: Specify a string length between the parentheses.

Example of the error:


PROGRAM PLC_PRG
VAR
str : STRING();
END_VAR

--> C0027: size of string expected after '('


--> C0006: ';, :=, REF=, ( or [' expected instead of ')'
Error correction:
Example:
str : STRING(100);

32.11.20 Compiler Error C0030


Message: Direct Address expected after 'AT' instead of '<identifier>'

R911403764, Edition 08 Bosch Rexroth AG


676 / 1158 ctrlX PLC Engineering
Errors and warnings

Possible error cause: Either an invalid address or no address is assigned after


'AT'.
Error correction: Specify a valid address.

Example of the error:


PROGRAM PLC_PRG
VAR
i AT ABC : INT;
END_VAR

--> C0030: Direct Address expected after 'AT' instead of 'ABC'


Error correction:
Example:
i AT %IW0 : INT;

32.11.21 Compiler Error C0031


Message: Type definition expected instead of '<no data type>'
Possible error cause: An invalid type definition is assigned to the identifier.
Error correction: Specify a valid type definition.

Example of the error:


PROGRAM PLC_PRG
VAR
i : 0;
END_VAR

--> C0031: Type definition expected instead of '0'


Error correction:
Example:
i : INT;

32.11.22 Compiler error C0032


Message: Type '<type 1>' can not be converted to type '<type 2>'
Possible error cause: A variable is assigned to another variable with an incom-
patible type.
Error correction: Use a type conversion.

Example of the error:


PROGRAM PLC_PRG
VAR
test1: INT;
test2: STRING;
END_VAR

test1 := test2;

-->C0032: Type 'STRING' cannot be converted to type 'INT'


Error correction:
Example:
test1 := TO_INT(test2);

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 677 / 1158
Errors and warnings

32.11.23 Compiler Error C0033


Message: Type '<pointer type>' possibly not convertible to type '<data type>' .
Possible error cause: This error occurs only when checking pool objects. An
attempt was made to convert a pointer to an integer. Because the size of
pointers in a library is unknown, errors may occur when using the library.
Error correction: Use the type __UXINT or __XWORD for platform-independent
calculations with pointers.

Example of the error:

Reference, programming
PROGRAM PLC_PRG
VAR
ptr : POINTER TO INT;
dw : DWORD;
END_VAR
dw := ptr;

--> C0033: Type 'POINTER TO INT‘ possibly not convertible to


type 'DWORD‘.

32.11.24 Compiler Error C0035


Message: Program name, function or function block instance expected instead
of '<invalid function>'
Possible error cause: A function is called that does not exist.
Error correction: Make sure that only program names, functions, and function
Block Instances that exist are called.

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR

PLC_PRG.METH1();

METHOD METH
VAR_INPUT
END_VAR

--> C0004: 'METH1' is no component of 'PLC_PRG'


--> C0035: Program name, function or function block instance
expected instead of 'PLC_PRG.METH1'
Error correction:
Example:
PLC_PRG.METH();

32.11.25 Compiler Error C0036


Message: Cannot call object of type <type>
Possible error cause: An attempt has been made to call an object that does not
support any calls.
Error correction: Only functions, function blocks, programs, methods, and
actions can be called.

R911403764, Edition 08 Bosch Rexroth AG


678 / 1158 ctrlX PLC Engineering
Errors and warnings

Example of the error:


VAR_GLOBAL GVL
value : INT;
END_VAR
PROGRAM PLC_PRG
GVL();

--> C0036: Cannot call object of type 'VAR_GLOBAL‘.

32.11.26 Compiler Error C0037


Message: '<invalid input>' is no input of '<function name>'
Possible error cause: A local variable is defined in a function call.
Error correction: Declare the variable as an input parameter.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
END_VAR
i := TEST(iVar := 1);

FUNCTION TEST : INT


VAR
iVar : INT;
END_VAR

--> C0037: 'iVar' is no input of 'TEST'


Error correction:
Example:
VAR_INPUT
iVar : INT;
END_VAR

32.11.27 Compiler Error C0038


Message: '<invalid output>' is no output of '<function name>'
Possible error cause: A local variable is handled as an output in a function call.
Error correction: Declare the variable as an output parameter.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
x : INT;
END_VAR
i := TEST(iVar => x);

FUNCTION TEST : INT


VAR
iVar : INT;
END_VAR

--> C0038: 'iVar' is no output of 'TEST'

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 679 / 1158
Errors and warnings

Error correction:
Example:
VAR_OUTPUT
iVar : INT;
END_VAR

32.11.28 Compiler Error C0039


Message: VAR_IN_OUT '<invalid variable>' must be assigned in call of '<function
block name>'
Possible error cause: An IN_OUT variable is not passed to a function block that

Reference, programming
requires an IN_OUT variable.
Error correction: Assign the IN_OUT variable.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
END_VAR
inst();

FUNCTION_BLOCK FB
VAR_IN_OUT
inout : INT;
END_VAR

--> C0039: VAR_IN_OUT 'inout' must be assigned in call of 'FB'


Error correction:
Example:
inst(inout := i);

32.11.29 Compiler Error C0040


Message: Function '<function name>' requires exactly '<number of inputs>'
input
Possible error cause: Too many or too few parameters are passed to the called
function.
Error correction: Pass exactly as many parameters to the function as are
expected.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
END_VAR
i := TEST(1,2);

FUNCTION TEST : INT


VAR_INPUT
IN: INT;
END_VAR

--> C0040: Function 'TEST' requires exactly '1' inputs

R911403764, Edition 08 Bosch Rexroth AG


680 / 1158 ctrlX PLC Engineering
Errors and warnings

Error correction:
Example:
i := Test(1);

32.11.30 Compiler Error C0041


Message: VAR_IN_OUT parameter '<parameter name>' of '<function name>'
needs variable with write access as input
Possible error cause: The passed parameter is not a variable with write access
(but a constant for example).
Error correction: Pass a VAR_IN_OUT parameter with write access to the func-
tion.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
x : INT;
END_VAR
i := Test(31415);

FUNCTION TEST : INT


VAR_IN_OUT
in_out: INT;
END_VAR

--> C0041: VAR_IN_OUT' parameter 'in_out' of 'TEST' needs


variable with write access as input
Error correction:
Example:
i := Test(x);

32.11.31 Compiler Error C0042 (Compiler Version <= 3.4.10)


Message: Either all or none formal parameter have to be denoted in function
call
Possible error cause: The parameters are explicitly assigned to the function in
the wrong order.
Error correction: Use uniform formal parameters or implicit parameters.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
END_VAR
i := Test(iPar1:=2, 5);

FUNCTION Test : INT


VAR_INPUT
iPar1 : INT;
iPar2 : INT;
END_VAR

--> Either all or none formal parameter have to be denoted in


function call

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 681 / 1158
Errors and warnings

32.11.32 Compiler Error C0043


Message: Wrong formal parameter: '<parameter name>' expected in this place
Possible error cause: The parameters are assigned to the function explicitly in
the wrong order.
Error correction: Specify the parameters in the correct order.

Example of the error:


PROGRAM PLC_PRG
VAR

Reference, programming
i : INT;
END_VAR
i := Test(iPar2 := 2, 5);

FUNCTION Test : INT


VAR_INPUT
iPar1 : INT;
iPar2 : INT;
END_VAR

--> C0043: Wrong formal parameter: 'iPar1' expected in this


place
--> C0412: Multiple input assignments for parameter ''
Error correction:
Example:
i := Test(5, iPar2 := 2);

32.11.33 Compiler Error C0044


Message: Assignment to input missing for parameter '<input variable name>' in
call of '<function block name>'
Possible error cause: A parameter is passed although an input variable is not
declared.
Error correction: Declare an input variable.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
END_VAR
inst(1);

FUNCTION_BLOCK FB
VAR_INPUT

END_VAR

--> C0044: Assignment to input missing for parameter '1' in


call of 'FB'

R911403764, Edition 08 Bosch Rexroth AG


682 / 1158 ctrlX PLC Engineering
Errors and warnings

Error correction:
Example:
VAR_INPUT
in : INT;
END_VAR

32.11.34 Compiler error C0045


Message: Use of 'THIS' is not allowed in this context
Possible error cause: In order to be assigned to the current instance, THIS can
be used only in a method, action, transition, or in the body of a function block.
This error message appears for all other positions.
Error correction: Use THIS in an allowed context only.

Example of the error:


PROGRAM PLC_PRG
VAR
test1: INT;
END_VAR

THIS^.test1 := 19;

--> C0018: 'THIS^.test1' is not a valid assignment target


--> C0062: 'THIS^' is not a structure variable
--> C0045: Use of 'THIS' is not allowed in this context

32.11.35 Compiler Error C0046


Message: Identifier '<identifier name>' not defined
Possible error cause: An identifier is used that is not declared.
Error correction: Declare the variables that you want to use.

Example of the error:


PROGRAM PLC_PRG
VAR

END_VAR

i := 1;

--> C0018: 'i' is no valid assignment target


--> C0046: Identifier 'i' not defined
Error correction:
Example:
VAR
i : INT;
END_VAR

32.11.36 Compiler Error C0047


Message: Cannot apply indexing with '[]' to an expression of type '<data type>'
Possible error cause: A data type that is not an array is indexed with '[]'.
Error correction: Index data types with '[]' only if they are declared as arrays.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 683 / 1158
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
END_VAR
i[1];

--> C0047: Cannot apply indexing with '[]' to an expression of


type 'INT'

32.11.37 Compiler Error C0048

Reference, programming
Message: Array requires exactly '<number>' indexes
Possible error cause: Too many or too few indexes are specified when using an
array.
Error correction: Specify as many indexes as there are dimensions assigned to
the array.

Example of the error:


PROGRAM PLC_PRG
VAR
arr1 : ARRAY[1..2,1..3] OF INT;
END_VAR
arr1[1] := 5;

--> C0048: Array requires exactly 2 indexes


Error correction:
Example:
arr1[1,2] := 5;

32.11.38 Compiler Error C0049


Message: The constant index '<index value>' is not within the range from '<start
index>' to '<end index>'
Possible error cause: An index is specified that is outside the size of the array.
Error correction: Use only indexes that are within the size of he array.

Example of the error:


PROGRAM PLC_PRG
VAR
arr1 : ARRAY[1..2] OF INT;
END_VAR
arr1[3] := 1;

--> C0049: The constant index '3' is not within the range from
'1' to '2'
Error correction:
Example:
arr1[2] := 1;

32.11.39 Compiler Error C0050


Message: Bitaccess requires literal or symbolic integer constant

R911403764, Edition 08 Bosch Rexroth AG


684 / 1158 ctrlX PLC Engineering
Errors and warnings

Possible error cause: No literal or an integer constant is specified in a bit


access.
Error correction: Use a literal or an integer constant.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
x : INT;
END_VAR

i.x := FALSE;

--> C0018: 'i.x' is no valid assignment target


--> C0050: Bitaccess requires literal or symbolic integer
constant
Error correction:
Example:
i := Test(x);

32.11.40 Compiler Error C0051


Message: Single byte string expected for an attribute value instead of '<value>‘.
Possible error cause: A character string does not appear at the displayed loca-
tion as expected.
Error correction: Replace the current value with a string.

Example of the error:


PROGRAM PLC_PRG
{IF hasattribute(pou: MyPOU, MyAttribute)}
{END_IF}

--> C0051: Single byte string expected for an attribute value


instead of 'MyAttribute'.
Error correction:
PROGRAM PLC_PRG
{IF hasattribute(pou: MyPOU, 'MyAttribute')}
{END_IF}

32.11.41 Compiler Error C0053


Message: Compiler version <version> has been withdrawn. Please use a higher
compiler version instead.
Possible error cause: The current compiler version cannot ne used.
Error correction: Adapt the current compiler version in the project (Project
Environment, Project Settings).

32.11.42 Compiler Error C0061


Message: Bitaccess on function call is not allowed
Possible error cause: Bit access is performed on a function.
Error correction: Use bit access only for supported data types.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 685 / 1158
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR

Test().2;

FUNCTION Test : INT


VAR_INPUT

Reference, programming
END_VAR

--> C0061: Bitaccess on function call is not allowed

32.11.43 Compiler Error C0062


Message: '<variable name>' is no structured variable
Possible error cause: A variable that is not a structure variable is treated like a
structure variable.
Error correction: Make sure that the variable is a structure variable.

Example of the error:


PROGRAM PLC_PRG
VAR
pt : PUNKT;
i : INT;
END_VAR

i.x := 1024;

TYPE Punkt :
STRUCT
x : REAL;
y : REAL;
END_STRUCT
END_TYPE

--> C0018: 'i.x' is no valid assignment target


--> C0062: 'Variable' is no structured variable
Error correction:
Example:
pt.x := 1024;

32.11.44 Compiler Error C0064


Message: Dereferencing requires a pointer
Possible error cause: A variable that is not a pointer variable is dereferenced.
Error correction: Dereference only variables that are pointer variables.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;

R911403764, Edition 08 Bosch Rexroth AG


686 / 1158 ctrlX PLC Engineering
Errors and warnings

pi : POINTER TO INT;
END_VAR
i^:=1;

--> C0018: 'i^' not a valid assignment target


--> C0064: Dereferencing requires a pointer
Error correction:
Example:
pi := ADR(i);
pi^ := 1;

32.11.45 Compiler Error C0065


Message: There is no global definition for '<name>'.
Possible error cause: The value searched for is not a global variable, global
POU, or other value that can be accessed globally.
Error correction: Declare '<name>' as a global variable.

Example of the error:


PROGRAM PLC_PRG
.someValue := 5;

--> C0065: There is no global definition for 'someValue‘


Error correction:
Example:
VAR_GLOBAL
someValue : INT;
END_VAR

32.11.46 Compiler Error C0066


Message: Cannot compare type '<data type>' with type '<data type>'
Possible error cause: Two data types are compared which cannot be compared
with each other.
Error correction: Compare only data types that can be compared with each
other.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
re : REAL;
str: STRING;
b : BOOL;
END_VAR

b := i > str;

--> C0066: Cannot compare type 'INT' with type 'STRING'


Error correction:
Example:
b := i > re;

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 687 / 1158
Errors and warnings

32.11.47 Compiler Error C0068


Message: Compare not possible on objects of type '<data type>'
Possible error cause: Objects are being compared in which a comparison is not
possible.
Error correction: Compare only data types in which a comparison is possible
(INT, REAL, etc.).

Example of the error:


PROGRAM PLC_PRG

Reference, programming
VAR
b : BOOL;
arr1 : ARRAY [1..2] OF INT;
arr2 : ARRAY [1..2] OF INT;
END_VAR

b := arr1 > arr2;

--> C0068: Compare not possible on objects of type 'ARRAY


[1..2]'

32.11.48 Compiler Error C0069


Message: Compare not possible on objects of type '<data type>' or '<data
type>'
Possible error cause: Two different objects are being compared in which a
comparison is not possible.
Error correction: Compare only data types in which a comparison is possible
(INT, REAL, etc.).

Example of the error:


PROGRAM PLC_PRG
VAR
b : BOOL;
arr1 : ARRAY [1..2] OF INT;
arr2 : ARRAY [1..3] OF INT;
END_VAR

b := arr1 > arr2;

--> C0069: Compare not possible on objects of type 'ARRAY


[1..2]' or 'ARRAY [1..3]'

32.11.49 Compiler Error C0070


Message: 'INI' operator needs function block instance or data unit type instance
Possible error cause: Neither a function block instance nor a DUT instance is
applied to the INI operator.
Error correction: Pass only function block instances or DUT instances to the INI
operator.

Example of the error:


PROGRAM PLC_PRG
VAR
b : BOOL;

R911403764, Edition 08 Bosch Rexroth AG


688 / 1158 ctrlX PLC Engineering
Errors and warnings

inst : FB;
END_VAR

b := INI(b, TRUE);

FUNCTION_BLOCK FB
VAR
END_VAR

--> C0070: 'INI' operator needs function block instance or


data unit type instance
Error correction:
Example:
b := INI(inst, TRUE);

32.11.50 Compiler Error C0072


Message: Operator <operator name>' is not possible on type '<data type>'
Possible error cause: An operator is applied to an incompatible type.
Error correction: Apply operators only on compatible types.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
str : STRING;
END_VAR

str := ABS(str);

--> C0072: Operator 'Abs' is not possible on type 'STRING'


Error correction:
Example:
i := ABS(i);

32.11.51 Compiler Error C0074


Message: Unexpected array initialisation
Possible error cause: Syntax error in the array initialization
Error correction: Correct the syntax

Example of the error:


PROGRAM PLC_PRG
VAR
arr1 : INT := [1,2,3,4,5,6];
END_VAR

--> C0074: Unexpected array initialisation


--> C0032: Cannot convert type 'Unknown type: [1,2,3,4,5,6]'
to type 'INT'

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 689 / 1158
Errors and warnings

Error correction:
Example:
arr1 : ARRAY [1..6] OF INT := [1,2,3,4,5,6];

32.11.52 Compiler Error C0075


Message: Too many initializers for array
Possible error cause: Too many values are specified for the size of the array.
Error correction: The number of assigned values must correspond to the size of
the array.

Reference, programming
Example of the error:
PROGRAM PLC_PRG
VAR
arr1 : ARRAY [1..5] OF INT := [1,2,3,4,5,6];
END_VAR

--> C0075: Unexpected array initialisation


Error correction:
Example:
arr1 : ARRAY [1..6] OF INT := [1,2,3,4,5,6];

32.11.53 Compiler Error C0076


Message:Unexpected structure initialisation
Possible error cause: Syntax error in the structure initialization
Error correction: Make sure that the syntax is correct.

Example of the error:


PROGRAM PLC_PRG
VAR
st1 : INT := (p1 := 1);
END_VAR

--> C0076: Unexpected structure initialisation


--> C0032: Cannot convert type 'STRUCT(p1:=1)' to type 'INT'
--> C0046: Identifier 'p1' not defined
--> C0018: 'p1' is no valid assignment target
Error correction:
Example:
st1 : STRUCT1 := (p1:=1,p2:=10);

32.11.54 Compiler Error C0077


Message: Unknown type: '<data type>'
Possible error cause: Invalid data type in the declaration (maybe a syntax error)
Error correction: Specify valid data types only.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INTEGER;
END_VAR

R911403764, Edition 08 Bosch Rexroth AG


690 / 1158 ctrlX PLC Engineering
Errors and warnings

--> C0077: Unknown type: 'INTEGER'


Error correction:
Example:
arr1 : ARRAY[1..2] OF STRUCT1 := (p1:=1,p2:=10);

32.11.55 Compiler Error C0078


Message: Unsupported type: '<data type>'
Possible error cause: The used type is not supported by the current device and
therefore cannot be used.
Error correction: If possible, use a different type. For example, REAL instead of
LREAL.

Example of the error:


PROGRAM PLC_PRG
VAR
value : LREAL;
END_VAR

--> C0078: Unsupported type: 'LREAL‘


Error correction:
Example:
PROGRAM PLC_PRG
VAR
value : REAL;
END_VAR

32.11.56 Compiler Error C0080


Message: Functionblock '<function block name>' must be instantiated to be
accessed
Possible error cause: Missing function Block Instantiation
Error correction: Instantiate the function block.

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR

FB();

FUNCTION_BLOCK FB
VAR
END_VAR

--> C0080: Functionblock 'FB' must be instantiated to be


accessed

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 691 / 1158
Errors and warnings

Error correction:
Example:
VAR
inst : FB;
END_VAR
inst();

32.11.57 Compiler Error C0081


Message: Unexpected Pragma: '<pragma name>' found without matching 'if'
Possible error cause: The IF condition is missing when using the pragma.

Reference, programming
Error correction: Complete the IF condition of the pragma.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
END_VAR

i := 5;
{END_IF}

--> C0081: Unexpected Pragma: 'END_IF' found without matching


'if'
Error correction:
Example:
{IF <expression>}
i := 5;
{END_IF}

32.11.58 Compiler Error C0082


Message: '<invalid pragma>' is no valid condition for pragma
Possible error cause: When using a pragma, an invalid expression is used in the
IF condition.
Error correction: Use valid pragma conditions.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
END_VAR

{IF abc}
i := 5;
{END_IF}

--> C0082: '!!!ERROR!!!' is no valid condition for pragma


Error correction:
Example:
{IF defined (abc)}

32.11.59 Compiler Error C0084


Message: '<pragma operand>' is no valid operand for pragma

R911403764, Edition 08 Bosch Rexroth AG


692 / 1158 ctrlX PLC Engineering
Errors and warnings

Possible error cause: Syntax error


Error correction: Use valid pragma operands.

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR

{IF defined(0)}
{END_IF}

--> C0084: 'defined(null)' is no valid operand for pragma


Error correction:
Example:
{IF defined (abc)}

32.11.60 Compiler Error C0085


Message: Define value expected instead of '<value>‘.
Possible error cause: A string is expected instead of the current value at the
displayed location of the pragma.
Error correction: Replace the current value with a string.

Example of the error:


PROGRAM PLC_PRG

{IF hasvalue(define, defineValue)}


{END_IF}

--> C0086: C:0085: Define value expected instead of


'defineValue‘
Error correction:
Example:
PROGRAM PLC_PRG

{IF hasvalue(define, '120')}


{END_IF}

32.11.61 Compiler Error C0086


Message: No definition found for interface '<interface name>'
Possible error cause: An undefined interface is used.
Error correction: Define the interface.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
END_VAR

FUNCTION_BLOCK FB IMPLEMENTS XY
VAR

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 693 / 1158
Errors and warnings

END_VAR

--> C0086: No definition found for interface 'XY'


Error correction:
Example:
INTERFACE XY

32.11.62 Compiler Error C0087


Message: There is no implementation for method '<method name>' defined in

Reference, programming
interface '<interface name>'.
Possible error cause: One of the methods specified by the interface has not be
provided by the implemented function block.
Error correction: Implement all methods that are specified by the interface.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
END_VAR

INTERFACE XY
METHOD METH1
VAR_INPUT
END_VAR

FUNCTION_BLOCK FB IMPLEMENTS XY
VAR
END_VAR
METHOD METH2
VAR_INPUT
END_VAR

--> C0087: There is no implementation for method 'METH1'


defined in interface 'XY'

32.11.63 Compiler Error C0089


Message: Interface of overridden method '{0}' of interface '{1}' does not match
declaration
Possible error cause: The signature of the implemented method does not match
the signature of the method in the interface.
Error correction: Make sure that the same return types and parameters are
declared.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
END_VAR

INTERFACE XY
METHOD METH1
VAR_INPUT

R911403764, Edition 08 Bosch Rexroth AG


694 / 1158 ctrlX PLC Engineering
Errors and warnings

iPar : INT;
END_VAR

FUNCTION_BLOCK FB IMPLEMENTS XY
VAR
END_VAR
METHOD METH1
VAR_INPUT
END_VAR

--> C0089: Interface of overridden method 'METH1' of interface


'XY' does not match declaration

32.11.64 Compiler Error C0090


Message: No definition found for base class '<function name>'
Possible error cause: The function block specified as the base does not exist or
is not a function block.
Error correction: Use a function block as the base.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
END_VAR

FUNCTION_BLOCK FB EXTENDS POU


VAR
END_VAR

FUNCTION POU
VAR
END_VAR

--> C00090: No definition found for base class 'POU'

32.11.65 Compiler Error C0091


Message: Recursion in base function block list: <function name>
Possible error cause: A base function block is extended by itself.
Error correction: Recursion in base function block lists is not possible.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
END_VAR

FUNCTION_BLOCK FB EXTENDS FB
VAR
END_VAR

--> C00091: Recursion in base function block list: FB -> FB

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 695 / 1158
Errors and warnings

32.11.66 Compiler Error C0094


Message: Interface of overridden method '<method name>' of interface '<func-
tion block name>' doesn't match declaration
Possible error cause: The signature of the method of the first interface does
not match the signature of the method in the second interface, which is
extended by the first.
Error correction: Align the signatures.

Example of the error:

Reference, programming
PROGRAM PLC_PRG
VAR
xyz : XY2;
END_VAR

FUNCTION_BLOCK XY
METHOD METH1
VAR_INPUT
END_VAR

FUNCTION_BLOCK XY2 EXTENDS XY


METHOD METH1
VAR_INPUT
iPar : BOOL;
END_VAR

--> C00094: Interface of the overridden method METH1 of


interface XY doesn't match declaration

32.11.67 Compiler Error C0096


Message: Only one base function block may be defined in EXTENDS-list.
Possible error cause: Two or more base function blocks are defined in the
EXTENDS list.
Error correction: Define only one base function block in the EXTENDS list.

Example of the error:


PROGRAM PLC_PRG
VAR
fb : FB;
END_VAR

FUNCTION_BLOCK FB EXTENDS FB2, FB3


VAR
END_VAR

FUNCTION_BLOCK FB2
VAR
END_VAR

FUNCTION_BLOCK FB3
VAR
END_VAR

--> C00096: Only one base function block may be defined in


EXTENDS-list

R911403764, Edition 08 Bosch Rexroth AG


696 / 1158 ctrlX PLC Engineering
Errors and warnings

32.11.68 Compiler Error C0097


Message: Duplicate definition of variable '<variable name>' in function block
'<function block name>' and in base '<base function block name>'
Possible error cause: A variable is declared with the same name in a function
block and its base.
Error correction: Use different variable names.

Example of the error:


PROGRAM PLC_PRG
VAR
fb : FB;
END_VAR

FUNCTION_BLOCK FB EXTENDS FB2


VAR
i : INT;
END_VAR

FUNCTION_BLOCK FB2
VAR
i : INT;
END_VAR

--> C00097: Duplicate definition of variable 'i' in function


block 'FB' and in base 'FB2'

32.11.69 Compiler Error C0098


Message: The keyword "FUNCTIONBLOCK" is no longer supported. Use "FUNC-
TION_BLOCK" instead.
Possible cause of error: Syntax error
Error correction: Use the keyword "FUNCTION_BLOCK".

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
END_VAR

FUNCTIONBLOCK FB
VAR
END_VAR

--> C00098: The keyword "FUNCTIONBLOCK" is no longer


supported. Use "FUNCTION_BLOCK" instead. Use "FUNCTION_BLOCK"
instead.

32.11.70 Compiler Error C0099 (Compiler Version < 3.5.7.0)


Message: Local defined enumeration are no longer supported. Use datatype
definition instead.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 697 / 1158
Errors and warnings

Possible error cause: A local enumeration declaration was used together with a
compiler version that does not support this.
Error correction: Use a later compiler version, or define the enumeration in a
DUT.

Example of the error:


PROGRAM PLC_PRG
VAR
localEnumVar : (RED, GREEN, BLUE) := RED;
END_VAR

Reference, programming
--> C0099: Local defined enumeration are no longer supported.
Use datatype definition instead.

32.11.71 Compiler Error C0101


Message: Data Recursion: '<recursion>'
Possible error cause: Recursive data initialization over two function blocks
Error correction: Avoid recursions for data initialization.

Example of the error:


PROGRAM PLC_PRG
VAR
inst0 : FB1;
END_VAR

FUNCTION_BLOCK FB1
VAR
inst1 : FB2;
END_VAR

FUNCTION_BLOCK FB2
VAR
inst2 : FB1;
END_VAR

--> C0101: Data Recursion: FB1->FB2->FB1

32.11.72 Compiler Error C0102


Message: Out of retain memory: Variable '<variable name>', <byte size> bytes.
Possible error cause: More retain memory is used than is available on the PLC.
It is also possible that the retain memory is too fragmented due to incremental
builds.
Error correction: Use the “Clean” for fragmenting the memory. This will force
the reallocation of all data at the next build.

32.11.73 Compiler Error C0104


Message: 'Out of global data memory: Variable '<variable name>', <byte size>
bytes.
Possible error cause: More memory for data is used than is available on the
PLC. It is also possible that the memory is too fragmented due to incremental
builds.

R911403764, Edition 08 Bosch Rexroth AG


698 / 1158 ctrlX PLC Engineering
Errors and warnings

Error correction: Use the “Clean” for fragmenting the memory. This will force
the reallocation of all data at the next build.

32.11.74 Compiler error C0106


Message: 'Out of retain memory': Variable '<variable name>', <byte size> bytes
(total available size >byte size> bytes)
Possible error cause: More retain memory is used than is available on the PLC.
It is also possible that the retain memory is too fragmented due to incremental
builds.
Troubleshooting: Use the “Clean” command for fragmenting the memory. This
allows you to force reallocation of all data and code on the next compile.

32.11.75 Compiler Error C0114


Message: Invalid destination <jump label> for 'JMP'
Possible error cause: Syntax error or typographical error in the JMP destination
Error correction: Correct the typographical or syntax error.

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR
JMP 0;

--> C0114: Invalid destination 0 for 'JMP'

32.11.76 Compiler Error C0115


Message: The second parameter of a conditional call (????ALWAYS CALC???? )
has to be a valid call statement.
Error correction: Specify the call of a function, method, or function block in the
second parameter of the conditional ????CALC??? call.

Example of the error:


PROGRAM PLC_PRG
VAR
condition : BOOL;
END_VAR
CALC(condition, 1+2);

--> C0115: The second parameter of a conditional call has to


be a valid call statement.
Error correction:
Example:
CALC(condition, MyFunction(1,2))

32.11.77 Compiler Error C0116


Message: The label '<jump label>' is a duplicate
Possible error cause: A label is defined multiple times.
Error correction: Define each label one time only.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 699 / 1158
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR
JMP label;
label:

label:

--> C0116: The label 'LABEL' is a duplicate

Reference, programming
32.11.78 Compiler Error C0117
Message: No such label '<jump label>' within the scope of the 'JMP' statement
Possible error cause: A jump is made to a label that does not exist.
Error correction: Define the label that you specify as the destination.

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR
JMP A;

--> C0117: No such label 'A' within the scope of the 'JMP'
statement

32.11.79 Compiler Error C0118


Message: The label '<jump label>' has not been referenced.
Possible error cause: A jump label is defined that is not referenced.
Error correction: Remove the unused jump labels.

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR
LABEL:

--> C0118: The label ' LABEL' has not been referenced

32.11.80 Compiler Error C0119


Message: An 'FB_init'-Method of a functionblock or struct needs two inputs
'bInitRetains' and 'bInCopyCode' of type BOOL
Possible error cause: One or both of the inputs 'bInitRetains' and 'bInCopy-
Code' of type BOOL is missing.
Error correction: Define the missing inputs.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
END_VAR

R911403764, Edition 08 Bosch Rexroth AG


700 / 1158 ctrlX PLC Engineering
Errors and warnings

FUNCTION_BLOCK FB
METHOD FB_init
VAR_INPUT
END_VAR

--> C0119: An 'FB_init'-Method of a functionblock or struct


needs two inputs 'bInitRetains' and 'bInCopyCode' of type BOOL
Error correction:
Example:
METHOD FB_init
VAR_INPUT
bInitRetains : BOOL;
bInCopyCode : BOOL;
END_VAR

32.11.81 Compiler Error C0120


Message: An 'FB_Exit'-Method of a functionblock or struct needs an input 'bIn-
CopyCode' of type BOOL.
Possible error cause: The input 'bInCopyCode' of type BOOL is missing.
Error correction: Define the input.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
END_VAR

FUNCTION_BLOCK FB
METHOD FB_exit
VAR_INPUT
END_VAR

--> C0120: An 'FB_Exit'-Method of a functionblock or struct


needs an input 'bInCopyCode' of type BOOL.
Error correction:
Example:
METHOD FB_exit
VAR_INPUT
bInCopyCode : BOOL;
END_VAR

32.11.82 Compiler Error C0122


Message: Expression 'SUPER' is not allowed in this context
Possible error cause: "SUPER^" is used outside of derived function blocks.
Error correction: Use "SUPER^" in function blocks only.

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 701 / 1158
Errors and warnings

SUPER^.METH(TRUE, TRUE);

--> C0122: Expression 'SUPER' is not allowed in this context

32.11.83 Compiler Error C0124


Message: 'Initialization' is no valid initialization for an enumeration
Possible error cause: A data type that is not ANY_INT is used for the enum
initialization.

Reference, programming
Error correction: Use only ANY_INT for enum initializations.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : DUT;
END_VAR

TYPE DUT :
(
enum_member := 1.5
) DWORD;
END_TYPE

--> C0032: Cannot convert type 'LREAL' to type 'DUT'


--> C0124: 'Initialization' is no valid initialization for an
enumeration

32.11.84 Compiler Error C0125


Message: The constant <constant value> is assigned to more than one enumera-
tion.
Possible error cause: The same value is assigned to two or more enumerations.
Error correction: Assign different values to the enumerations.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : DUT;
END_VAR

TYPE DUT :
(
enum_member := 0,
enum_member2 := 0
);
END_TYPE

--> C0125: The constant 0 is assigned to more than one


enumeration

32.11.85 Compiler Error C0126


Message: Variable of type '<data type>' requires exactly 1 Index

R911403764, Edition 08 Bosch Rexroth AG


702 / 1158 ctrlX PLC Engineering
Errors and warnings

Possible error cause: Multiple indexes are assigned to a variable with one
index.
Error correction: Assign only one index.

Example of the error:


PROGRAM PLC_PRG
VAR
pi : POINTER TO INT;
END_VAR
pi[0,1] := 0;

--> C0126: Variable of type 'POINTER TO INT' requires exactly


1 Index
Error correction:
Example:
pi[0] := 0;

32.11.86 Compiler Error C0130


Message: <object> '<object name>' referenced without parentheses '()'
Possible error cause: A method is referenced without parentheses.
Error correction: Always reference methods by means of parentheses.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
END_VAR
inst.METH1

--> C0130: METHOD 'METH1' referenced without parentheses '()'


Error correction:
Example:
inst.METH1();

32.11.87 Compiler Error C0131


Message: '<value>' is not allowed as operand for 'ADR'
Possible error cause: A constant is passed as an operand to the operator ADR.
Error correction: Use only valid operands for ADR.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
pt : POINTER TO INT;
END_VAR

pt := ADR(1);

--> C0131: '1' is not allowed as operand for 'ADR'

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 703 / 1158
Errors and warnings

Error correction:
Example:
pt := ADR(i);

32.11.88 Compiler Error C0132


Message: No enclosing loop of which to EXIT
Possible error cause: EXIT is used outside of a loop.
Error correction: Use EXIT inside of a loop only.

Reference, programming
Example of the error:
PROGRAM PLC_PRG
VAR
END_VAR

EXIT
;

--> C0132: No enclosing loop of which to EXIT

32.11.89 Compiler Error C0136


Message: ambiguous use of name '<variable name>'
Possible error cause: A variable is declared in multiple GVLs.
Error correction: Qualify the variable with the desired GVL.

Example of the error:


PROGRAM PLC_PRG
VAR
j : INT := g_i;
END_VAR

GVL1:
VAR_GLOBAL
g_i : INT;
END_VAR

GVL2:
VAR_GLOBAL
g_i : INT;
END_VAR

--> C0136: ambiguous use of name 'g_i'


Error correction:
Example:
j : INT := GVL1.g_i;

32.11.90 Compiler Error C0138


Message: No matching 'FB_Init' method found for instantiation of POU.
Possible error cause: No FB_Init method exists that accepts the passed
parameters.
Error correction: Check which arguments FB_Init has to receive and adjust
the passed arguments.

R911403764, Edition 08 Bosch Rexroth AG


704 / 1158 ctrlX PLC Engineering
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
myPOU : POU(arg1 := 1, arg2 := 2);
END_VAR

--> C0138: No matching 'FB_Init‘ method found for


instantiation of POU.

32.11.91 Compiler Error C0139


Message: The code <code> has no effect. Is this the intent?
Possible error cause: The written code is syntactically correct but does not do
anything.
Error correction: Write code that has a purpose.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
END_VAR

i;

--> C0139: The code 'i;' has no effect. Is this the intent?

32.11.92 Compiler Error C0140


Message: Reference assign is only allowed to variables of Reference type
Possible error cause: An attempt is made to assign a reference value to a
variable not defined as a reference type.
Error correction: Define the variable as a reference type.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
I_r : INT;
END_VAR

I_r REF= i;

--> C0140: Reference assign is only allowed to variables of


Reference type
Error correction:
Example:
I_r : REFERENCE TO INT;

32.11.93 Compiler Error C0141


Message: Reference assign needs variable with write access
Possible error cause: A constant is assigned to the reference assignment.
Error correction: Assign a writable variable.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 705 / 1158
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
I_r : REFERENCE TO INT;
END_VAR

I_r REF= 314;

--> C0141: Reference assign needs variable with write access

Reference, programming
Error correction:
Example:
I_r REF= i;

32.11.94 Compiler Error C0142


Message: A local variable named '<variable name>' is already defined in '<pou
name>'
Possible error cause: The same variable name is used two times.
Error correction: Use different variable names.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
i : INT;
END_VAR

--> C0142: A local variable named 'i' is already defined in


'PLC_PRG'

32.11.95 Compiler Error C0143


Message: The property '<property name>' cannot be used in this context
because it lacks the get accessor
Possible error cause: The property does not have Get access.
Error correction: Make sure that the property has a Get access definition.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
inst: FB;
END_VAR

i := inst.Prop;

FUNCTION_BLOCK FB
VAR
END_VAR

PROPERTY Prop : INT


Set;

--> C0143: The property 'Prop' cannot be used in this context


because it lacks the get accessor

R911403764, Edition 08 Bosch Rexroth AG


706 / 1158 ctrlX PLC Engineering
Errors and warnings

32.11.96 Compiler Error C0144


Message: Inheritance only allowed in Functionblocks, Interfaces and Structures
Possible error cause: An attempt is made to use inheritance in an object that
does not permit inheritance.
Error correction: Use EXTENDS in function blocks, interfaces, and structures
only.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : DUT_1;
END_VAR

TYPE DUT:
(
enum_member := 0
);
END_TYPE

TYPE DUT_1 EXTENDS DUT:


(
enum_memberX := 0
);
END_TYPE

--> C0144: Inheritance only allowed in Functionblocks,


Interfaces and Structures

32.11.97 Compiler Error C0145


Message: Interfaces can only be implemented by Functionblocks
Possible error cause: An attempt is made to implement an interface outside of
a function block.
Error correction: Implement interfaces only in function blocks.

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR

POU();

FUNCTION POU IMPLEMENTS ITF


VAR
END_VAR

--> C0145: Interfaces can only be implemented by Functionblocks

32.11.98 Compiler Error C0149


Message: Variable declarations are not allowed in interfaces
Possible error cause: An attempt is made to define a variable in an interface.
Error correction: Do not define variables in interfaces.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 707 / 1158
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
inst : ITF;
END_VAR

INTERFACE ITF
VAR_INPUT
i : INT;
END_VAR

Reference, programming
--> C0149: Variable declarations are not allowed in interfaces

32.11.99 Compiler Error C0161


Message: Border <array bound> of array is no constant value
Possible error cause: A variable is specified as an array bound.
Error correction: Use constants for the array bounds.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT := 3;
arr1 : ARRAY[1..i] OF INT;
END_VAR

--> C0161: Border 'i' of array is no constant value


Error correction:
Example:
arr1 : ARRAY[1..3] OF INT;

32.11.10
0 Compiler Error C0162
Message: Number <number of array values> of array initialisations is no con-
stant value
Possible error cause: The initialization [Wert1,AnzahlWert2(Wert2)] works
only with a constant for AnzahlWert2.
Error correction: Use constants only.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT := 3;
arr1 : ARRAY[1..4] OF INT := [1,i(7)];
END_VAR

--> C0162: Number 'i' of array initialisations is no constant


value
Error correction:
Example:
arr1 : ARRAY[1..4] OF INT := [1,3(7)];

R911403764, Edition 08 Bosch Rexroth AG


708 / 1158 ctrlX PLC Engineering
Errors and warnings

32.11.10
1 Compiler Error C0164
Message: POU <name> writes to output <name> and is called in several tasks.
Possible error cause: The device setting codegenerator\check-multiple-
task-output-write is set and multiple tasks access the same output.
Error correction: Do not call a program that changes outputs in multiple tasks.

Example of the error:

PROGRAM PLC_PRG
VAR
Output AT %QB7 : BYTE
END_VAR

Output := 0;

--> C0164: POU 'PLC_PRG' writes to output 'QB7' and is called


in several tasks

32.11.10
2 Compiler Error C0165
Message: Variable '<variable name>‘, which is mapped on address
'<address>‘ is written in different tasks.
Possible error cause: The device setting codegenerator\check-multiple-
task-output-write is set and multiple tasks access the same output.
Error correction: Write an output in one fixed task only. If multiple tasks need
to calculate data for one output, then you should try to transfer this information
by means of global variables to one fixed task, which then writes the data to
one output.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 709 / 1158
Errors and warnings

Reference, programming
Example of the error:
PROGRAM PLC_PRG_1
VAR
Output AT %QB7 : BYTE;
END_VAR
Output := 0;

PROGRAM PLC_PRG_2
VAR
Output AT %QB7 : BYTE;
END_VAR
Output := 1;

--> C0165: Variable 'Output‘, which is mapped on address


'QB7‘ is written in different tasks.

32.11.10
3 Compiler Error C0168
Message: 'VAR_CONFIG' declaration only allowed in VAR_CONFIG - list
Possible error cause: 'VAR_CONFIG' is used outside of a VAR_CONFIG list.
Error correction: Use 'VAR_CONFIG' only in VAR_CONFIG lists.

Example of the error:


PROGRAM PLC_PRG
VAR_CONFIG
i : INT;
END_VAR

--> C0168: 'VAR_CONFIG' declaration only allowed in VAR_CONFIG


- list

32.11.10
4 Compiler Error C0169
Message: 'VAR_GLOBAL' declaration only allowed in Global variable list
Possible error cause: 'VAR_GLOBAL' is used outside of global variable lists.
Error correction: Use 'VAR_GLOBAL' in global variable lists only.

R911403764, Edition 08 Bosch Rexroth AG


710 / 1158 ctrlX PLC Engineering
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR_GLOBAL
i : INT;
END_VAR

--> C0169: 'VAR_GLOBAL' declaration only allowed in Global


variable list

32.11.10
5 Compiler Error C0173
Message: '<keyword>' not allowed in this place
Possible error cause: A declaration keyword (example: VAR_INPUT,
VAR_OUTPUT, or VAR) is not allowed at this location.
Error correction: Correct the declaration: Inputs and outputs are not useful or
necessary in type definitions or global variable lists.
TYPE DUT :
STRUCT
member : INT;
END_STRUCT
END_TYPE

Example of the error:


TYPE DUT :
STRUCT
VAR_INPUT
member : INT;
END_VAR
END_STRUCT
END_TYPE

--> C0173: 'VAR_INPUT' not allowed in this place.


Error correction
Example:
TYPE DUT :
STRUCT
member : INT;
END_STRUCT
END_TYPE

32.11.10
6 Compiler Error C0174
Message: 'VAR_TEMP' declaration not allowed in this place
Possible error cause: 'VAR_TEMP' is used outside of a program or function
block.
Error correction: Use 'VAR_TEMP' inside of programs and function blocks only.

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 711 / 1158
Errors and warnings

FUN();

FUNCTION FUN
VAR_TEMP
END_VAR

--> C0174: 'VAR_TEMP' declaration not allowed in this place

32.11.10
7 Compiler Error C0175

Reference, programming
Message: 'RETAIN' or 'PERSISTENT' not allowed in this place
Possible error cause: 'RETAIN' or 'PERSISTENT' is used in a function.
Error correction: Use 'RETAIN' or 'PERSISTENT' at the intended locations.

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR

POU_1();

FUNCTION POU_1
VAR RETAIN
END_VAR

--> C0175: 'RETAIN' or 'PERSISTENT' not allowed in this place


See also
● ⮫ Chapter 32.2.14 Retain variable - RETAIN on page 449
● ⮫ Chapter 32.2.14 Retain variable - RETAIN on page 449

32.11.10
8 Compiler Error C0177
Message: '<object>' is of type 'type' and cannot be instantiated
Possible error cause: An attempt is made to instantiate a function.
Error correction: Instantiate only objects that can be instantiated.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : POU;
END_VAR

FUNCTION POU
VAR
END_VAR

--> C0177: 'POU' is of type 'FUNCTION' and cannot be


instantiated

32.11.10
9 Compiler Error C0178
Message: No external access to 'VAR_IN_OUT' parameter '<parameter name>' of
'<object name>'

R911403764, Edition 08 Bosch Rexroth AG


712 / 1158 ctrlX PLC Engineering
Errors and warnings

Possible error cause: An attempt is made to remotely access a 'VAR_IN_OUT'


parameter.
Error correction: Do not remotely access 'VAR_IN_OUT' parameters.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
i : INT;
END_VAR
i := inst.in_out;

FUNCTION_BLOCK FB
VAR_IN_OUT
in_out : INT;
END_VAR

--> C0178: No external access to 'VAR_IN_OUT' parameter


'in_out' of 'FB'

32.11.11
0 Compiler Error C0179
Message: '<identifier>' is no output of 'Function block'
Possible error cause: The initialization of a function block instance must not
contain VAR_IN_OUT variables.
Error correction: Use VAR_IN_OUT variables in function block calls only. When
initializing a function block instance, only assign the inputs of a function block.

Example of the error:


Example:
FUNCTION_BLOCK MyFB
VAR_IN_OUT
inOut : INT;
END_VAR

PROGRAM PLC_PRG
VAR
iValue : INT;
fb : MyFB := (inOut := iValue);
END_VAR

--> C0179: 'inOut' is no output of 'MyFB'

32.11.11
1 Compiler Error C0180
Message: Ambiguous namespace '<library 1>' defined by library '<library 2>'
Possible error cause: The namespace of the library <library 1> is not unique. It
is already used for <library 2>.
Error correction: Change the namespace of the library accordingly
(“Properties” button in the Library Manager).

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 713 / 1158
Errors and warnings

Example of the error:

--> C0180: Ambiguous namespace 'STANDARD' defined by library


'Standard, 3.5.15.0 (System)'

32.11.11
2 Compiler Error C0182

Reference, programming
Message: Return type is only possible for POUs of Type FUNCTION and
METHOD
Possible error cause: An attempt is made to define a return value in a program.
Error correction: Define a return value only in methods and functions.

Example of the error:


PROGRAM PLC_PRG : BOOL
VAR
END_VAR

--> C0182: Return type is only possible for POUs of Type


FUNCTION and METHOD

32.11.11
3 Compiler Error C0183
Message: Global scope operation '.' is not valid on expression '<expression>'
Possible error cause: The '.' operator is used to access a global variable. How-
ever, at this location it is not followed by a valid IEC identifier, but for example
a character such as ";" or a reserved identifier such as FUNCTION, or an oper-
ator such as TO_STRING.
Error correction: Use a valid IEC identifier for a global variable.

Example of the error:


PROGRAM PLC_PRG
...

iVar := .FUNCTION;// ERROR: C0183 because ; is not a valid


identifier
strVar := .TO_STRING;
--> C0183: Global scope operation '.' is not valid on
expression '<expression>'
Error correction
Example: globalValue is declared in a GVL.
PROGRAM PLC_PRG
iVar := .globalValue;

32.11.11
4 Compiler Error C0185
Message: It is not possible to perform component access '.', index access '[]' or
call '()' on result of function call. Assign result to help variable first.
Possible error cause: Component or index access to the result of a function call
is performed.

R911403764, Edition 08 Bosch Rexroth AG


714 / 1158 ctrlX PLC Engineering
Errors and warnings

Error correction: Assign the result to a variable in order to access.

Example of the error:


PROGRAM PLC_PRG
VAR
it : ITF;
END_VAR

POU_1()[0].METH1();

FUNCTION POU_1 : ARRAY[0..0] OF ITF

INTERFACE ITF

METHOD METH1

--> C0185: It is not possible to perform component access '.',


index access '[]' or call '()' on result of function call.
Assign result to help variable first.

32.11.11
5 Compiler Error C0186
Message: It is not possible to compare interface that is return value of call.
Assign to variable first.
Possible error cause: A comparison operation is applied to an interface that is
returned by a function.
Error correction: First assign the result of the function call to a variable and
then compare the value of the variable. This will also reduce the number of
function calls that are required.

Example of the error:


INTERFACE MyInterface

FUNCTION GetInterface : MyInterface

PROGRAM PLC_PRG
IF GetInterface() <> 0 THEN
// ...
END_IF

--> C0186: It is not possible to compare interface that is


return value of call. Assign to variable first.
Error correction:
Example:
PROGRAM PLC_PRG
VAR_TEMP
tempInterface : MyInterface;
END_VAR
tempInterface := GetInterface();
IF tempInterface <> 0 THEN
// ...
END_IF

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 715 / 1158
Errors and warnings

32.11.11
6 Compiler Error C0188
Message: Device not installed to the system. No code generation possible.
Possible error cause: The desired device is not installed.

Reference, programming
Error correction: Install the missing device in the device repository, or replace
the existing device already inserted in the device tree with another existing
device (“Update Device”).

32.11.11
7 Compiler Error C0189
Message: ';' expected instead of '<token>'
Possible error cause: Syntax error
Error correction: Make sure that the syntax is correct.

Example of the error:


PROGRAM PLC_PRG
VAR
INT
END_VAR

--> C0009: Unexpected Token '<Token>' found


--> C0189: ';' expected instead of 'INT'

32.11.11
8 Compiler Error C0190
Message: ';' expected instead of end of POU
Possible error cause: Syntax error in the POU
Error correction: Make sure that the syntax is correct.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
END_VAR
i := 5

--> C0190: ';' expected instead of end of POU

R911403764, Edition 08 Bosch Rexroth AG


716 / 1158 ctrlX PLC Engineering
Errors and warnings

32.11.11
9 Compiler Error C0191
Message: The operator 'INDEXOF' is no longer supported. Use ADR instead.
ADR on a POU-Name returns a Pointer to a Pointer to the function code.
Possible error cause: The outdated operator 'INDEXOF' is used.
Error correction: Use the operator 'ADR'.

32.11.12
0 Compiler Error C0195
Message: Implicit conversion from signed Type '<data type 1>' to unsigned Type
'<data type 2>' : possible change of sign
Possible error cause: A sign conflict may have been missed in the implicit
conversion.
Error correction: Convert only data types with the same sign implicitly.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
b : UINT;
END_VAR

b := i;

--> C0195: Implicit conversion from signed Type 'INT' to


unsigned Type 'UINT' : possible change of sign

32.11.12
1 Compiler Error C0196
Message: Implicit conversion from unsigned Type '<data type 1>' to signed type
'<data type 2>' : possible change of sign
Possible error cause: A sign conflict may have been missed in the implicit
conversion.
Error correction: Use explicit conversions.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
b : UINT;
END_VAR

i := b;

--> C0196: Implicit conversion from unsigned Type 'UINT' to


signed type 'INT' : possible change of sign

32.11.12
2 Compiler Error C0197
Message: Implicit conversion from '<data type 1>' to '<data type 2>': possible
loss of information
Possible error cause: An attempt is made to convert a variable from data type
DINT or LINT to data type REAL.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 717 / 1158
Errors and warnings

Error correction: For DINT, use the data type LREAL, and when converting from
LINT to LREAL make sure that the value of LINT does not exceed the capacity of
LREAL.

Example of the error:


PROGRAM PLC_PRG
VAR
i : DINT;
b : REAL;
END_VAR

Reference, programming
b := i;

--> C0197: Implicit conversion from 'DINT' to 'REAL': possible


loss of information

32.11.12
3 Compiler Error C0198
Message: String constant '<string value>' too long for destination type '<data
type>'
Possible error cause: The string constant has too many characters.
Error correction: Use shorter string constants or declare larger strings.

Example of the error:


PROGRAM PLC_PRG
VAR
str : STRING(4) := '12345';
END_VAR

--> C0198: String constant '12345' too long for destination


type 'STRING(4)'

32.11.12
4 Compiler Error C0199
Message: Interface '<interface name>' must be instantiated to be accessed
Possible error cause: An attempt is made to access an interface method
without the interface being instantiated.
Error correction: Instantiate the interface.

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR

ITF.METH();

INTERFACE ITF

METHOD METH
VAR_INPUT
END_VAR

--> C0199: Interface 'ITF' must be instantiated to be accessed

R911403764, Edition 08 Bosch Rexroth AG


718 / 1158 ctrlX PLC Engineering
Errors and warnings

Error correction:
Example:
itest: ITF;

32.11.12
5 Compiler Error C0201
Message: Type '<data type 1>' is not equal to type '<data type 2>' of
VAR_IN_OUT 'Variable'
Possible error cause: The data type that is passed to the function as a
VAR_IN_OUT parameter does not match the data type defined in it.
Error correction: Pass a variable with the correct data type.

Example of the error:


PROGRAM PLC_PRG
VAR
Inst: POU;
b : BOOL;
END_VAR

inst(in_out := b);

FUNCTION_BLOCK POU
VAR_IN_OUT
in_out : INT;
END_VAR

--> C0201: Type 'BOOL' is not equal to type 'INT' of


VAR_IN_OUT 'Variable'

32.11.12
6 Compiler Error C0203
Message: Only Structures and Function Blocks can contain variables of type
BIT.
Possible error cause: An attempt is made to declare a variable of type BIT
outside of structures and function blocks.
Error correction: Declare variables of type BIT only in structures and function
blocks.

Example of the error:


PROGRAM PLC_PRG
VAR
b : BIT;
END_VAR

--> C0203: Only Structures and Function Blocks can contain


variables of type BIT.

32.11.12
7 Compiler Error C0204
Message: Variables of type BIT must be declared within a VAR_INPUT-,
VAR_OUTPUT or VAR-block
Possible error cause: An attempt is made to define a variable of type BIT or as a
VAR_IN_OUT parameter.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 719 / 1158
Errors and warnings

Error correction: Define variables of type BIT only within a VAR_INPUT,


VAR_OUTPUT or VAR block.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
END_VAR

Reference, programming
FUNCTION_BLOCK FB
VAR_IN_OUT
b : BIT;
END_VAR

--> C0204: Variables of type BIT must be declared within a


VAR_INPUT-, VAR_OUTPUT or VAR-block

32.11.12
8 Compiler Error C0205
Message: POINTER TO BIT is not allowed
Possible error cause: An attempt is made to declare a POINTER TO BIT.
Error correction: Do not declare POINTER TO BIT.

Example of the error:


PROGRAM PLC_PRG
VAR
pt : POINTER TO BIT;
END_VAR

--> C0205: POINTER TO BIT is not allowed

32.11.12
9 Compiler Error C0206
Message: BIT is not allowed as base type of an array
Possible error cause: An attempt is made to declare a BIT array.
Error correction: Do not declare BIT arrays.

Example of the error:


PROGRAM PLC_PRG
VAR
arr : ARRAY[1..2] OF BIT;
END_VAR

--> C0206: BIT is not allowed as base type of an array

32.11.13
0 Compiler Error C0207
Message: There is no system definition for '<identifier>'
Possible error cause: An attempt was made to access a variable in __SYSTEM
that does not exist.
Error correction: Check and correct the specified identifier of the respective
variable.

R911403764, Edition 08 Bosch Rexroth AG


720 / 1158 ctrlX PLC Engineering
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
Value : INT;
END_VAR
Value := __SYSTEM.UnknownVariable;

--> C0207: There is no system definition for 'UnkownVariable‘

32.11.13
1 Compiler Error C0208
Message: 'MOD' is not defined for 'REAL'
Possible error cause: An attempt is made to perform a modulo operation with a
variable of type REAL.
Error correction: Modulo operations are only possible with variables of type
ANY_INT.

Example of the error:


PROGRAM PLC_PRG
VAR
r1 : REAL;
END_VAR
r1 := r1 MOD 2;

--> C0208: 'MOD' is not defined for 'REAL'

32.11.13
2 Compiler Error C0209
Message: You have defined '<number>' applications for device '<device name>'.
The maximum number is '<number>'. So you will not be able to download all
applications.
Possible error cause: Some devices only support a specific number of applica-
tions (device description). If a project contains more applications, then not all
will be downloaded to the device.
Error correction: Remove applications from your project or use another device.

32.11.13
3 Compiler Error C0211
Message: Variable declaration expected instead of <expression>
Possible error cause: Syntax error
Error correction: Make sure that the syntax is correct.

Example of the error:


PROGRAM PLC_PRG
VAR
VAR

END_VAR
END_VAR

--> C0211: Variable declaration expected instead of VAR END_VAR

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 721 / 1158
Errors and warnings

32.11.13
4 Compiler Error C0212
Message: VAR, VAR_INPUT, VAR_OUTPUT or VAR_INOUT expected instead of
<expression>
Possible error cause: Syntax error
Error correction: Make sure that the syntax is correct.

Example of the error:


PROGRAM PLC_PRG

Reference, programming
i : INT;

--> C0212: VAR, VAR_INPUT, VAR_OUTPUT or VAR_INOUT expected


instead of i : INT;

32.11.13
5 Compiler Error C0215
Message: Direct address declaration is not possible in persistent list
Possible error cause: Persistent variables are not allowed to have a direct
address.
Error correction: Remove the direct address assignment in the persistent vari-
able list.

Example of the error:


VAR_GLOBAL PERSISTENT RETAIN
directAddressVar AT %QB7 : BYTE;
END_VAR

--> C0215: Direct address declaration is not possible in


persistent list.

32.11.13
6 Compiler Error C0216
Message: Case label duplicate
Possible error cause: A CASE label is used multiple times.
Error correction: Use each CASE label only one time.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
END_VAR

CASE i OF
1: i := i+1;
1: i := i+2;
ELSE
i := i+10;
END_CASE;

--> C0216: Case label duplicate

R911403764, Edition 08 Bosch Rexroth AG


722 / 1158 ctrlX PLC Engineering
Errors and warnings

32.11.13
7 Compiler Error C0217
Message: Case label <case label> also contained in range <case range begin> ..
<case range end>
Possible error cause: A CASE label is part of the range of another CASE label.
Error correction: Make sure that there is no intersecting.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
END_VAR
CASE i OF
3..5: i := i+2;
4: i := i+2;
ELSE
i := i+10;
END_CASE;

--> C0217: Case label 4 also contained in range 3 .. 5

32.11.13
8 Compiler Error C0218
Message: Case label requires literal or symbolic integer constant
Possible error cause: An attempt is made to use a variable as a CASE label.
Error correction: Use only literals and symbolic integer constants.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
a : INT := 2;
END_VAR

CASE i OF
1: i := i+1;
a: i := i+2;
ELSE
i := i+10;
END_CASE;

--> C0218: Case label requires literal or symbolic integer


constant

32.11.13
9 Compiler Error C0219
Message: Case contains overlapping range <case range 1 begin> .. <case range
1 end> and <case range 2 begin> .. <case range 2 end>
Possible error cause: Two branches of CASE markers have the same elements
or subsets.
Error correction: Make sure that there is no intersecting.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 723 / 1158
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
END_VAR
CASE i OF
3..5: i := i+2;
1..4: i := i+2;
ELSE
i := i+10;

Reference, programming
END_CASE;

--> C0219: Case contains overlapping range 1 .. 4 and 3 .. 5

32.11.14
0 Compiler Error C0221
Message: Direct Address '<address>' malformed
Possible error cause: An address is not displayed completely.
Error correction: Make sure that the address is displayed correctly.

Example of the error:


PROGRAM PLC_PRG
VAR
xVar : BOOL;
END_VAR;
xVar := %IX0;

--> C0221: Direct Address '%IXO' malformed


Error correction:
Example:
xVar := %IX0.2;

32.11.14
1 Compiler Error C0222
Message: Outputs can't be of type 'REFERENCE TO'
Possible error cause: An attempt is made to define REFERNCE TO as an output
parameter.
Error correction: Do not use REFERENCE TO as an output parameter.

Example of the error:


PROGRAM PLC_PRG
VAR
inst : FB;
END_VAR

FUNCTION_BLOCK FB
VAR_OUTPUT
re : REFERENCE TO INT;
END_VAR

--> C0222: Outputs can't be of type 'REFERENCE TO'

R911403764, Edition 08 Bosch Rexroth AG


724 / 1158 ctrlX PLC Engineering
Errors and warnings

32.11.14
2 Compiler Error C0224
Message: Call Recursion: <recursion>
Possible error cause: A function calls itself.
Error correction: Make sure that functions are not recursive.

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR

POU();

FUNCTION POU
VAR
END_VAR

POU();

--> C0224: Call Recursion: POU -> POU

32.11.14
3 Compiler Error C0225
Message: '<name>' is not an instance of '<name>'
Possible error cause: A function block in a graphical programming language
has been assigned with an explicitly specified type that does not match the
declared type.
Error correction: Replace the explicit type with the one used in the declaration
part, or remove the specification of the explicit type from the POU.

Example of the error:

PROGRAM PLC_PRG
VAR
fbVar : MyFB;
END_VAR

--> C0225: 'fbVar‘ is not an instance of 'MyFB2‘


Error correction:

or

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 725 / 1158
Errors and warnings

32.11.14
4 Compiler Error C0227

Reference, programming
Message: Initialisation of constant variable <constant name> not constant
Possible error cause: A constant is initialized with a variable.
Error correction: Initialize constants only with constant values.

Example of the error:


PROGRAM PLC_PRG
VAR
i : INT;
END_VAR
VAR CONSTANT
k : INT := i;
END_VAR

--> C0227: Initialisation of constant variable 'k' not constant

32.11.14
5 Compiler Error C0228
Message: No initial value for constant variable '<constant name>'
Possible error cause: A constant is not initialized.
Error correction: Initialize the constants.

Example of the error:


PROGRAM PLC_PRG
VAR
END_VAR
VAR CONSTANT
k : INT;
END_VAR

--> C0228: No initial value for constant variable 'k'


Error correction:
Example:
k : INT := 1;

32.11.14
6 Compiler Error C0230
Message: Type name '<data type>' not expected in this place
Possible error cause: The data type name of an enumeration is used at an
invalid position.
Error correction: Check whether the data type name is used correctly at this
location. Maybe there is a spelling error.

R911403764, Edition 08 Bosch Rexroth AG


726 / 1158 ctrlX PLC Engineering
Errors and warnings

Example of the error:


TYPE MyEnum :
(
enum_member := 0
);
END_TYPE

PROGRAM PLC_PRG
VAR
value : INT;
END_VAR
value := MyEnum;
MyEnum := value;

--> For PLC_PRG, the error message is issued 2x:


C0230: Type name 'MyEnum' not expected in this place
Error correction:
Example:
value := MyEnum.enum_member;
MyEnum.enum_member := value;

32.11.14
7 Compiler Error C0232
Message: Array initialisation expected
Possible error cause: An array of arrays is initialized, but the initialization values
are not nested.
Error correction: Use a nested array initialization as shown in the example
below.

Example of the error:


PROGRAM PLC_PRG
VAR
value : ARRAY[0..2] OF ARRAY[0..2] OF INT := [1,2,3];
END_VAR

--> C0232: Array initialisation expected


Error correction:
Example:
value : ARRAY[0..2] OF ARRAY[0..2] OF INT := [
[1,2,3],
[4,5,6],
[7,8,9]];

32.11.14
8 Compiler Error C0233
Message: Initialisation list for {0} <data type> expected
Possible error cause: An array of the type of a structure is initialized with
elements that are not structure initializations or variables.
Error correction: As shown in the example below, use structure initializations or
existing variables to initialize arrays of structures.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 727 / 1158
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
values : ARRAY[0..2] OF COLOR := [1,2,3];
END_VAR

--> C0233: Initialisation list for COLOR expected


Error correction:
Example:

Reference, programming
PROGRAM PLC_PRG
VAR
colorVariable : COLOR := (red:=0, green:=0, blue:=255);
value : ARRAY[0..2] OF COLOR := [
colorVariable,
(red:=255, green:=0, blue:=0),
(red:=0, green:=255, blue:=0)];
END_VAR

32.11.14
9 Compiler Error C0234
Message: First Operand of __QueryInterface must be an interface reference or
the instance of a function block
Possible error cause: Incorrect operands are passed to the operator
__QueryInterface.
Error correction: Pass an interface reference or the instance of a function
block.

Example of the error:


PROGRAM PLC_PRG
VAR
a : INT;
ITFref, ITFref2 : ITF;
ITFref2 : ITF2;
END_VAR

__QueryInterface(a ,ITFref);

INTERFACE ITF EXTENDS __SYSTEM.IQueryInterface


INTERFACE ITF2 EXTENDS ITF

--> C0234: First Operand of __QueryInterface must be an


interface reference or the instance of a function block
Error correction:
Example:
__QueryInterface(ITFref2, ITFref);

32.11.15
0 Compiler Error C0235
Message: Second Operand of __QueryInterface must be an interface reference
Possible error cause: Incorrect operands are passed to the operator
__QueryInterface.
Error correction: Pass an interface reference.

R911403764, Edition 08 Bosch Rexroth AG


728 / 1158 ctrlX PLC Engineering
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
a : INT;
ITFref, ITFref2 : ITF;
ITFref2 : ITF2;
END_VAR

__QueryInterface(ITFref2, a);

INTERFACE ITF EXTENDS __SYSTEM.IQueryInterface


INTERFACE ITF2 EXTENDS ITF

--> C0235: Second Operand of __QueryInterface must be an


interface reference
Error correction:
Example:
__QueryInterface(ITFref2, ITFref);

32.11.15
1 Compiler Error C0236
Message: Wrong type definition for VAR_EXTERNAL <variable name>
Possible error cause: The variable is declared in VAR_GLOBAL / VAR_EXTERNAL
as different types.
Error correction: Use the same type definition in VAR_GLOBAL and
VAR_EXTERNAL.

Example of the error:


PROGRAM PLC_PRG
VAR_EXTERNAL
ig : STRING;
END_VAR

VAR_GLOBAL
ig : INT;
END_VAR

--> C0236: Wrong type definition for VAR_EXTERNAL ig

32.11.15
2 Compiler Error C0237
Message: No global definition found for VAR_EXTERNAL '<variable name>'
Possible error cause: An attempt is made to declare a variable in
VAR_EXTERNAL which does not exist in VAR_GLOBAL.
Error correction: Make sure that the identifiers match.

Example of the error:


PROGRAM PLC_PRG
VAR_EXTERNAL
i : INT;
END_VAR

VAR_GLOBAL

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 729 / 1158
Errors and warnings

ig : INT;
END_VAR

--> C0237: No global definition found for VAR_EXTERNAL 'i'

32.11.15
3 Compiler Error C0238
Message: No initial value allowed for VAR_EXTERNAL <variable name>
Possible error cause: An attempt is made to initialize a variable in
VAR_EXTERNAL.

Reference, programming
Error correction: Do not initialize variables in VAR_EXTERNAL.

Example of the error:


PROGRAM PLC_PRG
VAR_EXTERNAL
ig : INT := 2;
END_VAR

VAR_GLOBAL
ig : INT;
END_VAR

--> C0238: No initial value allowed for VAR_EXTERNAL ig

32.11.15
4 Compiler Error C0239
Message: Interface <interface name 1> does not extend <interface name 2>
Possible error cause: The used interface does not extend another interface.
Error correction: Extend the interface.

Example of the error:


PROGRAM PLC_PRG
VAR
ITFref : ITF;
ITFref2 : ITF2;
END_VAR

__QueryInterface(ITFref2,ITFref);

INTERFACE ITF
INTERFACE ITF2 EXTENDS ITF

--> C0239: Interface ITF__Union does not extend


__System.IQueryInterface
Error correction:
Example:
INTERFACE ITF EXTENDS __System.IQueryInterface

32.11.15
5 Compiler Error C0240
Message: First Operand of __QueryPointer must be an interface reference or
the instance of a function block

R911403764, Edition 08 Bosch Rexroth AG


730 / 1158 ctrlX PLC Engineering
Errors and warnings

Possible error cause: Incorrect operands are passed to the operator


__QueryPointer.
Error correction: Pass an interface reference or the instance of a function
block.

Example of the error:


PROGRAM PLC_PRG
VAR
a : INT;
ITFref : ITF;
pt : POINTER TO FB;
END_VAR

__QueryPointer(a,pt);

--> C0240: First Operand of __QueryPointer must be an


interface reference or the instance of a function block
Error correction:
Example:
__QueryPointer (ITFref, pt);

32.11.15
6 Compiler Error C0241
Message: Second Operand of __QueryPointer must be pointer
Possible error cause: Incorrect operands are passed to the operator
__QueryPointer.
Error correction: Pass a pointer.

Example of the error:


PROGRAM PLC_PRG
VAR
b : INT;
ITFref : ITF;
pt : POINTER TO FB;
END_VAR

__QueryPointer(ITFref,b);

INTERFACE ITF EXTENDS __System.IQueryInterface

--> C0241: Second Operand of __QueryPointer must be pointer


Error correction:
Example:
__QueryPointer (ITFref, pt);

32.11.15
7 Compiler Error C0242
Message: Operand of __DELETE must be pointer
Possible error cause: An incorrect operand is passed to the operator __DELETE.
Error correction: Pass a pointer.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 731 / 1158
Errors and warnings

Example of the error:


PROGRAM PLC_PRG
VAR
a : INT;
pt : POINTER TO INT;
END_VAR

__DELETE(a);

--> C0242: Operand of __DELETE must be pointer

Reference, programming
Error correction:
Example:
__DELETE (pt);

32.11.15
8 Compiler Error C0243
Message: The name used in the signature is not identical to the object name
Possible error cause: The object name differs from the name used in the code.
Error correction: make sure that the names are the same.

Example of the error:

32.11.15
9 Compiler Error C0380
Message: The Operators LOWER_BOUND and UPPER_BOUND are only sup-
ported for arrays of variable length.
Possible error cause: One of the two operators LOWER_BOUND or
UPPER_BOUND is not used for an array of variable length.
Error correction: Use the operators LOWER_BOUND and UPPER_BOUND only
for an array of variable length.
For compiler version 3.5.14.0 and higher, the operators can also be used for
static arrays. As a result, the error C0380 occurs only in the case of earlier
compiler versions.

Example of the error:


FUNCTION_BLOCK POU
VAR_IN_OUT
arrin : ARRAY [*] OF INT;
END_VAR
VAR
arrtest : ARRAY [0..5] OF INT;
test1: DINT;

R911403764, Edition 08 Bosch Rexroth AG


732 / 1158 ctrlX PLC Engineering
Errors and warnings

test2: DINT;
END_VAR

test1 := UPPER_BOUND(arrin, 1);


test2 := UPPER_BOUND(arrtest, 1);

--> C0380: The operators LOWER_BOUND and UPPER_BOUND are


supported only for arrays with variable length.

32.11.16
0 Compiler Error C0509
Message: Multiple assignments for operator '__New' not allowed
Possible error cause: In one line of code, the assignment operator ":=" is called
a multiple number of times with the __New operator.
Error correction: Program the memory allocation with the __New operator in
a separate line of code for each pointer that points to dynamically allocated
memory.

Example of the error:


PROGRAM PLC_PRG
VAR
pbAlpha : POINTER TO BYTE; // Typed pointer to Alpha
pbBeta: POINTER TO BYTE; // Typed pointer to Beta
xInit : BOOL := TRUE;
xDelete : BOOL;
END_VAR

IF (xInit) THEN
pbBeta := pbAlpha := __NEW(BYTE); // Incorrect code for
memory allocation
END_IF

pbBeta := pbAlpha := 16#01;

IF (xDelete) THEN
__DELETE(pbAlpha); // Frees memory of pointer
END_IF

--> C0509: Multiple assignments for operator '__New' not


allowed
Error correction:

PROGRAM PLC_PRG
VAR
pbAlpha : POINTER TO BYTE; // Pointer to Alpha
pbBeta: POINTER TO BYTE; // Pointer to Beta
xInit : BOOL := TRUE;
xDelete : BOOL;
END_VAR

IF (xInit) THEN
pbAlpha := __NEW(BYTE); // Allocates memory for Alpha
pbBeta := __NEW(BYTE); // Allocates memory for Beta
END_IF

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 733 / 1158
Errors and warnings

pbBeta := pbAlpha := 16#01; // Multiple assignment

IF (xDelete) THEN
__DELETE(pbAlpha); // Frees memory of pointer
END_IF

See also
● ⮫ Chapter 32.3.72 Operator '__NEW' on page 524
● ⮫ Chapter Attribute 'enable_dynamic_creation' on page 614

32.11.16

Reference, programming
1 Compiler Error C0511
Message: The function block '<function block name>' is ABSTRACT and cannot
be used as a target for an assignment.
Possible error cause: A value was assigned to an abstract function block. The
concrete function blocks may have different types and therefore cannot be
copied.
Error correction: In order to copy the data of the function block, concrete
function blocks have to be used.

Example of the error:


PROGRAM PLC_PRG
VAR
refAbstract1 : REFERENCE TO AbstractPOU;
refAbstract2 : REFERENCE TO AbstractPOU;
END_VAR

refAbstract1 := refAbstract2;
--> C0511: The function block 'refAbstract1' is ABSTRACT and
cannot be used as a target for an assignment.
Error correction:
Use the reference assignment REF= to assign the reference refAbstract1 to
the same function block as refAbstract2.

32.11.16
2 Compiler Error C0542
Message: Inheritance is not intended for the data type "UNION" <data type
name>.
Possible error cause: A structured data type (DUT) is derived from a UNION by
extending with EXTENDS, or a UNION is derived from a DUT. This kind of deriva-
tion is not permitted. However, for reasons of compatibility only a warning is
issued.

Example of the error


TYPE U_StringExt EXTENDS U_StringBase :
UNION
str10 : STRING(10);
END_UNION
END_TYPE TYPE U_StringBase :
UNION
str20 : STRING(20);
END_UNION
END_TYPE PROGRAM PLC_PRG
VAR

R911403764, Edition 08 Bosch Rexroth AG


734 / 1158 ctrlX PLC Engineering
Errors and warnings

uStringExt : U_StringExt;
END_VAR

uStringExt.str20 := 'a234567890b234567890'; -> C0542

32.11.16
3 Compiler Error C0543
Message: The name <keyword> is a reserved keyword in the IEC 1131-3
standard. An error will be issued in future versions.
Possible error cause: A reserved keyword was assigned as the name of a vari-
able.
Error correction: Rename the variable.

Example of the error:


PROGRAM PLC_PRG
VAR
char : BYTE;
END_VAR

--> C0543: The name 'char' is a reserved keyword in the


IEC 1131-3 standard. An error will be issued in future
versions.
Note: For violations in compiled libraries, only a text message (information) will
be issued instead of a warning.
The following keywords are reserved:
● CHAR
● WCHAR
● ANY_DERIVED
● ANY_ELEMENTARY
● ANY_MAGNITUDE
● ANY_SIGNED
● ANY_DURATION
● ANY_CHARS
● ANY_CHARS
● CHAR_TO
● TO_CHAR
● WCHAR_TO
● TO_WCHAR
● ATAN2
● USING
● CLASS

See also
● ⮫ Chapter 32.9 Keywords on page 659

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 735 / 1158
Generic Device Editor

33 User interface
33.1 Generic Device Editor
33.1.1 Tab “Communication”
The tab “Communication” is used to configure the communication settings to
the ctrlX device and provides the following functions:
● Scan the network for reachable ctrlX devices.
● Configuring network communication settings to the ctrlX device.
● Executing communication test.
● Displaying device information.

User interface
● Configuring the gateway settings (only for ctrlX PLC Engineering).

Call
The tab can be called as follows:
● By double-clicking on the control node in the device tree.
● Via the command “Communication settings...” in the context menu of the
control node, also refer to:
⮫ Command “Communication settings...”
Alternatively, execute the command from the “Project” menu if the control
node is selected in the device tree, also refer to:
⮫ Menu “Project”

Description
The tab is in ctrlX PLC Engineering and ctrlX I/O Engineering and consists of a
toolbar and an overview of the communication settings of the ctrlX device. For
ctrlX PLC Engineering, the gateway settings can be configured additionally.
Toolbar Description
“Scanning network...” The command scans the network for ctrlX devices and
lists accessible devices in a selection dialog.
“Device” Contains option settings of the ctrlX device:
Options:
● “Save communication settings to the project” (non-
deselectable)
● “Edit communication port” disabled in factory set-
ting)
If this option is enabled, the communication port
can be set in the configuration window.
Communication over- Description
view
Field to configure the PLC gateway.
“PLC gateway” GUI elements:
● Combobox to select the PLC gateway.
● Display of the configured IP address and port
number.
● Icon to display the communication state:
– : Communication OK
– : Communication not determined
– : Communication disturbed

R911403764, Edition 08 Bosch Rexroth AG


736 / 1158 ctrlX PLC Engineering
Generic Device Editor

Communication over- Description


view
Field to configure the control (communication to the
“ctrlX core” ctrlX device)
GUI elements:
● Combobox to select the control.
When expanded, the combo box displays all avail-
able ctrlX CORE controls on the network.
The list of available controls can be refreshed using
the “Scanning network...” command in the toolbar.
The button to apply the selected control first per-
forms a communication test and then applies the
required settings (IP address and ports). Data can
also be applied if the ctrlX device is currently not
accessible.
● Communication test
Click on to test the communication to the con-
trol.
● Icon to display the communication state:
– : Communication OK
– : Communication not determined
– : Communication disturbed
● Displays when the control is connected:
– ctrlX device name
– System status or operating state of the ctrlX
device
– Processor architecture of the ctrlX device, e.g.
amd64
– Serial number
– Device type
– App version
– Available licenses
– Available device ports

33.1.2 Generic Device Editor


The generic device editor contains tabs for configuring device properties in PLC
Engineering. Additionally there are device-specific tabs, so that the configura-
tion editor consists of many different dialogs, depending on the device.
The editor opens after a double-click the device object in the device tree
(“Devices” view).
You can make general settings for a device editor in the PLC Engineering
“Options” in the “Device Editor” category. For example, you can show and hide
the tabs of the generic device editor.

33.1.3 ‘Status’ tab


The generic device editor tab displays status information, such as the PLC
operating status and specific diagnostic messages of the ctrlX device.

33.1.4 'Information' tab


The generic device editor tab displays general information that originates from
the device description file and may include the following information:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 737 / 1158
Generic Device Editor

● Device designation
● Vendor
● Device category
● Version
● Order number
● Description
● Device illustration

33.1.5 Tab “DataLayerNode I/O Image”


The tab is only supported by I/O real time devices at the Data Layer.

User interface
The “DataLayerNode I/O Mapping” tab maps the data and values of an I/O real
time device which can be transferred from the control to the Engineering PC
via the Data Layer. The displayed data may vary and depend on the respective
object node or the real time object type. All other functions in the tab corre-
spond to the following description, see:
⮫ Tab '<Device name> I/O mapping'

Call
By double-clicking on an I/O device below the “DataLayer_Realtime” object
node in the device tree.

33.1.6 Tab 'Symbol Rights'


In this tab of the generic device editor, you define the access rights of different
user groups (clients) to the individual symbol sets available on the controller.
Requirement: User management must be set up on the PLC. An application was
downloaded to the controller for which symbol sets were defined in the PLC
Engineering project. They have access data for logging in to the controller.
In the “Symbol Sets” view, all symbol sets are listed below the “Application”
node whose definition was downloaded with the application to the controller.
In the “Rights” view, the user groups defined in the user management of the
controller are listed in a table. When a symbol set is selected, you see the
access rights of the corresponding user group to the symbols of this set. :
Access granted; : Access not granted. You can change the access rights by
double-clicking the symbol.
Click the button to save the current access configuration to an XML file The
file type is “Device symbol management files (*.dsm)”. Click the button to
read a file like this from the hard drive.
See also
● ⮫ Creating symbol sets with different access rights for different control
clients on page 231
● ⮫ Chapter 33.1.2 Generic Device Editor on page 736
● ⮫ Chapter 33.1.10 Tab 'Access Rights' on page 743
● ⮫ Chapter 33.1.16 "Users and groups” tab on page 754

33.1.7 Tab 'Licensed Software Metrics'


The tab of the device editor displays the code sizes of the applications of the
open project in a tree structure. The display is refreshed when you click “Build
🠂 Generate Code” or “Online 🠂 Login” for the active application. When the
compile information is deleted, the displayed code size of the corresponding
application is reset.

R911403764, Edition 08 Bosch Rexroth AG


738 / 1158 ctrlX PLC Engineering
Generic Device Editor

“Metric” Applications of the open project


“Size” ● “Size of User Code”: Sum of the displayed code sizes of the applica-
tions listed below
● Code size of the respective application
“ Unit” Unit in which the “Size” is displayed
“Max. Allowed” Not implemented yet

33.1.8 Tab '<device name> IEC Objects'


Please note that manually creating another instance of
NOTICE
the device object can lead to malfunctions.
In this tab of the generic device editor, "objects" are listed that allow for access
to the device from the IEC application. In online mode, this is used as the
monitoring view.
For devices for which a function block instance is created implicitly, at least
this instance is listed as an object here in the table. This instance can be
used, for example, in order to restart a bus or to query information from the
application. The device type determines whether this kind of device instance
is available and which access options it has. Please refer to the help for the
special device configuration.
Instances of function blocks that are linked with inputs or outputs of the device
are also displayed here. The mapping of a function block to a channel is defined
in the “<device name> I/O Mapping” tab. The “Go to Instance” command
takes you directly to the affected object from there.
In addition, you can create more objects in the table here that are not yet
linked with a device channel.
In online mode, you can use the table of IEC objects as a monitoring view. It
also shows the current value, the address, and the comment for the function
block variable at the channel. Finally, it provides the capability of writing and
forcing values.
“Add” Opens the “Select Function Block” dialog for creating a new instance
“Edit” or for editing the instance selected in the table.
“Delete” Deletes the selected entry.
“Go to Variable” Jumps from the selected entry directly to the corresponding mapping
in the “<device name> I/O Mapping” tab.
“Variable” The object name comprises the device name and the function block
name. Example: EL2004_Relay. Changing the device name has an
immediate effect. The part of the name after the device name is edit-
able here.
“Mapping” Mapping type, as in the “<device name> I/O Mapping” tab
“Type” Data type: Here it is the name of the function block.
“Value” In online mode only:
“Prepared value” Display of the current value, the address, and the comment for the
“Address ” variable at the channel. Moreover, the option of specifying a value for
writing or forcing the variable.
“ Comment”
See also
● ⮫ Chapter 33.1.9 Tab '<Device name> I/O mapping' on page 739

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 739 / 1158
Generic Device Editor

33.1.9 Tab '<Device name> I/O mapping'


Devices with I/O channels
This tab is displayed in device editors for devices with I/O channels. It shows
the available channels and allows for the mapping of input, output, and
memory addresses of the control to variables or entire function blocks of the
application. In this way, you create the 'I/O Mapping'.
The application responsible for the I/O handling is defined in the tab “PLC
settings”.
You can use the 'online configuration mode' if the device supports it. In this
mode you can access the I/Os of the hardware without having to load a real
application to the device beforehand.

User interface
If an I/O channel is not referenced in the application, its value is not refreshed.
To monitor non-referenced I/O channels, select the option "Always update vari-
ables" in the tab: Enabling PLC settings. Alternatively, also enable this option in
the “I/O mapping” tab of a device. Enabling is valid only for this one device and
its children.
Mapping 'too large' data types
NOTICE
If a variable of a data type that is larger than a byte is
mapped to a byte address, the value of the variable will
be truncated to byte size there. For the monitoring of the
variable value in the dialog “I/O mapping”, this means:
The value that the variable presently has in the project
is displayed in the root element of the address. The indi-
vidual present bit values of the byte are displayed in suc-
cession in the bit elements below that, but this may not
be sufficient for the entire variable value.
Example of the tab “<Device name> I/O mapping” for a CAN bus slave:

The tab contains a table for the editing of the I/O mapping. The information
displayed for the inputs and outputs originates from the device description.

R911403764, Edition 08 Bosch Rexroth AG


740 / 1158 ctrlX PLC Engineering
Generic Device Editor

“Find” (1) Input field for a character string to search for the mapping table. The
search results are marked in yellow.
“Filter” (2) Selection list with filters for the I/O assignments shown in the map-
ping table:
● “Show all”
● “Show only outputs”
● “Show only inputs”
● “Show only unmapped variables”
● “Show only mapped variables”
● “Show only mappings to existing variables”
● “Show only mappings to new variables”
“Add FB for I/O Channel” Depending on the device, available if the channel entry is selected
(11) in the mapping table. Opens the “Select Function Block” dialog for
selecting the function block that should be linked directly to the
channel.
“Go to Instance” (12) Available if the entry is selected in the mapping table. Jumps to the
corresponding entry in the tab “<Device name> IEC objects”.
“Variable” Depending on the device, the inputs and outputs of the device appear
as nodes and below them, indented, the associated channels or,
depending on the device, only the implicitly created device instance.
The symbol indicates the channel type:
: Input
: Output
A double-click on the cell opens an input field.
● Option 1: The variable already exists; enter complete path:
<Application name>.<Module name>.<Variable name>, example:
app1.plc_prg.ivar; input help via .
● Option 2: The variable does not exist yet; enter a simple name;
automatically created internally as a global variable.
Depending on the device, inputs or outputs can be linked directly to
a function block. In this case, the “Add FB for I/O Channel” button
can be clicked. See above.
“Mapping” (3) Mapping type:
● : Already existing variable
● : New variable
● : Mapping on the function block instance
“Channel” (4) Symbolic channel name.
“Address” (5) Address of the channel, e.g. %IW0.
Struck-through address: Indicates not to assign any further variables
to this address. Reason: Although the variable specified here – as an
already existing variable – is managed at a different memory location,
ambiguities could result during the writing of the values, particularly
with outputs.
: Indicates that this address was edited and specified. If the arrange-
ment of the device objects in the device tree changes, PLC Engineering
does not adapt this address automatically.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 741 / 1158
Generic Device Editor

“Type” (6) Data type of the channel, e.g. BOOL.


Structures or bit fields defined in the device description are only dis-
played if they are part of the IEC standard and are marked as IEC
data type in the device description. Otherwise, the table cell remains
empty.
When mapping structured variables, the editor prevents you from
entering both the structure variable (example: %QB0) and individual
structure elements (example: %QB0.1 and QB0.2). Therefore, if there
is a main entry with a sub-tree of bit channel entries in the mapping
table, the following applies: Input a variable either in the line of the
main entry or in the lines of the sub-elements (bit channels), but not in
both.

User interface
“Default value” Default value of the parameter applied to the channel: Appears only if
the option “Set all outputs to default value” is activated in the “PLC
settings” for the behavior of the outputs at stop.
Note: As of compiler version V3.5 SP11, the initialization value of the
variable is automatically used as the default value for a mapping to an
existing variable. In the “Default value”, editing is only possible a newly
generated variable is mapped or if no mapping is entered. In previous
versions, the user had to ensure that default value and initialization
value are identical.
“Unit” (7) Unit for the parameter value, for example ms for milliseconds.
“Description” (8) Brief description of the parameter.
“Current value” Actual value of the parameter applied to the channel; displayed in
online mode only.
Changing the default value by an online change is allowed, but the value is only
applied after a "Reset cold" or "Reset warm".
“Reset mapping” (9) PLC Engineering resets the mapping settings to the default values
defined by the device description file.
“Update Variables” (10) Definition for the device object about updating I/O variables. The
default value is defined in the device description:
● “Use parent device setting”: Update according to the settings of the
superordinate device.
● “Enabled 1 (use bus cycle task if not used in any task)”: PLC Engi-
neering updates the I/O variables in the bus cycle task if they are
not used in any other task.
● “Enabled 2 (always in bus cycle task)”: PLC Engineering updates all
variables in each cycle of the bus cycle task, regardless of whether
they are used and whether they are mapped to an input or output
channel.
If a UNION is represented by I/O channels in the mapping dialog, it depends on
the device whether mapping to the root element is also possible.

Devices with I/O drivers


For devices with I/O drivers, you can set the bus cycle task here in the “I/O
Mapping” tab if the general settings should not be used (“PLC Settings” tab).
Table 22: Bus cycle options
“Bus cycle task” The list box provides all tasks that are defined in the task configuration
of the active application (example: “MainTask”). In case of “Use parent
bus cycle setting”, the settings of the parent node will be used.

R911403764, Edition 08 Bosch Rexroth AG


742 / 1158 ctrlX PLC Engineering
Generic Device Editor

General information about the bus cycle task


As a rule, for each IEC task the used input data is read at the start of each task
(1) and the written output data is transferred to the I/O driver at the end of the
task (3). The implementation in the I/O driver is decisive for further transfer of
the I/O data. It is responsible for the time frame and time point that the actual
transfer to the corresponding bus system occurs.
The bus cycle task of the PLC can be defined globally for all fieldbuses in the
PLC settings. For some fieldbuses, however, you can change this independent
of the global setting. The task with the shortest cycle time is used as the
bus cycle task (setting: “unspecified” in the PLC settings). The messages are
normally sent on the bus in this task.
Other tasks copy only the I/O data from an internal buffer that is exchanged
only with the physical hardware in the bus cycle task.

(1) Lesen der Eingänge vom Eingangspuffer (2) IEC-


Task
(3) Schreiben der Ausgänge in den Ausgangspuffer (4)
Buszyklus
(5) Eingangspuffer (6)
Ausgangspuffer
(7) Daten vom/zum Bus kopieren
(9) Buszyklustask, Priorität 1, 1ms
(10) Buszyklustask, Priorität 5
(11) Buszyklustask, Priorität 10, unterbrochen durch Task 5
Task usage
The “Task Deployment” tab provides an overview of used I/O channels, the set
bus cycle task, and the usage of channels.
If an output is written in various tasks, the status is
WARNING
undefined, as this can be overwritten in each case.
If the same inputs are used in various tasks, it is possible
for the input to change during the processing of a task.
This results if the task is interrupted by a task with a
higher priority and thus causes the process image to be
read again. Remedy: at the beginning of the IEC task,
copy the input variables into variables and then work
only with the local variables in the rest of the code.
Conclusion: Using the same inputs and outputs in mul-
tiple tasks is not useful and can cause unpredictable
states in some cases.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 743 / 1158
Generic Device Editor

Also refer to
● ⮫ Chapter 17.4 Configuring Devices and I/O Mapping on page 118
● ⮫ Chapter 33.1.2 Generic Device Editor on page 736
● ⮫ Chapter "Edit I/O mapping" command on page 927
● ⮫ Chapter 33.1.8 Tab '<device name> IEC Objects' on page 738
● ⮫ Chapter 33.4.7 Dialog 'Select Function Block' on page 1039
● ⮫ Chapter Command 'Online Config Mode' on page 930
● ⮫ Chapter 33.1.18 Tab 'PLC Settings' on page 758

33.1.10 Tab 'Access Rights'


Recommendations regarding data security
NOTICE

User interface
In order to minimize the risk of data security violations,
we recommend the following organizational and tech-
nical actions for the system where your applications are
running. Whenever possible, avoid exposing the PLC and
control networks to open networks and the Internet.
Use additional data link layers for protection, such as
a VPN for teleaccess, and install firewall mechanisms.
Restrict access to authorized persons only, and change
any existing default passwords during the initial commis-
sioning, and change them regularly.
Detailed information on the concept and use of device
NOTICE
user management is provided in "Handling of Device User
Management".
There you will also find the following instructions on how
to use the editor:
− First-time login to the controller for editing and
viewing its user management
− Setting up a new user in the user management of the
controller
− Changing of access rights to controller objects in the
user management of the controller
− Loading user management from a *.dum file, modi-
fying it, and downloading it to the controller in offline
mode
On this tab of the device editor, you define the device access rights of device
users to objects on the controller. As in the project user management, users
must be members of at least one user group and only user groups can be
granted certain access rights.
Requirements for the “Access Rights” tab to be displayed:
● In the PLC Engineering options, in the “Device Editor” category, the “Show
access rights page” option has to be selected.
Note that this PLC Engineering option can be overwritten by the device
description.
Requirements for the access rights to be granted to user groups
● A component for the user management has to be available on the controller.
That is the primary requirement.
● Users and user groups have to be configured on the “Users and Groups” tab.

R911403764, Edition 08 Bosch Rexroth AG


744 / 1158 ctrlX PLC Engineering
Generic Device Editor

Table 23: Toolbar of the tab


Synchronization Switches on and off the synchronization between the editor and the
user management on the device.
If the button is not pressed, then the editor is blank or it contains a
configuration that you loaded from the hard disk.
When the button is pressed, PLC Engineering synchronizes the display
in the editor continuously with the current user management on the
connected device.
When you enable the synchronization while the editor contains a user
configuration that is not synchronized with the device yet, you are
prompted what should happen to the editor contents. Options:
● “Upload from the device and overwrite the editor content”: The
configuration on the device is loaded into the editor, overwriting
the current contents.
● “Download the editor content to the device and overwrite the user
management there”: The configuration in the editor is transferred to
the device and applied there.
Import from disk CAUTION: The import of a device user management by means of a
*.dum2 file completely overwrites the existing user management on
the device. In order to log in to the device again afterwards, you need
authentication data from the new user management. This means that
you have to log in as a user from the imported user management after
the import.
● When you click the button on the “Users and Groups” tab to import
a “Device user management file *.dum2”, the default dialog for
selecting a file opens to select a device user management file from
the hard drive. After you select the file, the “Enter Password” dialog
opens. You have to specify the password that was assigned when
the file was exported. Then the user management is enabled.
Note: Before V3.5 SP16, the “Device user management files
(*.dum)” file type was used which did not require any encryption.
● When you click the button on the “Access Rights” tab to import
a “Device rights management file *.drm”, the default dialog for
selecting a file opens to select a corresponding file from the hard
drive. The existing configuration in the dialog is overwritten by the
imported file.
Export to disk ● When you click the button on the “Users and Groups” tab, first
the “Enter Password” dialog opens for assigning a password to
the device user management file. Note: This password has to be
repeated later when this file is imported to enable this user man-
agement on the controller.
After the password assignment dialog is closed, the default dialog
for selecting and importing a user management configuration from
the hard disk opens. In this case, the file type is “Device user
management files (*.dum2)”.
Note: Before V3.5 SP16, the “Device user management files
(*.dum)” file type was used which did not require any encryption.
● When you click the button on the “Access Rights” tab, the file type
is “Device rights management files (*.drm)”. In this case, a pass-
word does not have to be assigned for the file before saving.
“Device user” User name of the user currently logged in on the device

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 745 / 1158
Generic Device Editor

Table 24: “Objects”


In the tree structure, the objects are listed to which actions can be executed at runtime. The
objects are each assigned by their object source and partially sorted in object groups. In the
“Rights” view, you can configure the access options for a user group to a selected object.
Object source (root node)
● “File system objects 🠂 Device”: In these objects, the rights can be granted to folders of the
current execution directory of the controller.
● “Runtime objects 🠂 /”: In these objects, all objects are managed that have online access in the
controller and therefore have to control the access rights.
A description of the objects is located in the table. ⮫ Overview of the objects on page 746
Object groups and objects (indented)

User interface
Example: “Device” with child nodes “Logger”, “PlcLogic”, “Settings”, “UserManagement”.
Table 25: “Rights”
In general, the access rights are inherited from the root object (also “Device” or “/” to the subob-
jects. This means that if a permission of a user group is denied or explicitly granted to a parent
object, then this first affects all child objects.
The table applies for the object that is currently selected in the tree. For every user group, it shows
the rights currently configured for the possible actions on this object.

Possible actions on the object:


● “Add/Remove”
● “Modify”
● “View”
● “Execute”

R911403764, Edition 08 Bosch Rexroth AG


746 / 1158 ctrlX PLC Engineering
Generic Device Editor

When an object is clicked, a table on the right side shows the access rights of the available user
groups for the selected object.
This allows you to quickly see:
● Which access rights are evaluated by an object
● Which user group has which effective rights to which object
Meanings of the symbols
● : Access right granted explicitly
● : Access right denied explicitly
● : Access right granted through inheritance
● : Access right denied through inheritance
● : The access right was not granted or denied explicitly and also not inherited by the parent
object. Access is not possible.
● No symbol: Multiple objects are selected that have different access rights.
Change the permission by clicking the symbol.

Example
The “Logger” object on the “Access Rights” tab was created by the "Logger"
component and controls its access rights. It is located directly below the
“Device” runtime object.
The possible access rights for this object can be granted only for the “View”
action.

Initially, each object has a read access. This means that every user can read
the "Logger" of a controller. If this access right should be denied for a single
user group (“Service” in the example), then the read access to the logger
object has to be denied explicitly.

Overview of the objects


“Runtime objects 🠂 Device”
“Logger” Online access to the logger is read only. Therefore, only the “View” access right
can be granted or denied here.
“PlcLogic” All IEC applications are inserted here automatically as child objects during
download. When an application is deleted, it is removed automatically. This
allows specific control of online access to the application. Access rights can be
assigned centrally over all applications in the “PlcLogic” The “Administrator” and
“Developer” user groups have full access to the IEC applications. The “Service”
and “Watch” user groups only have read access (for example for read-only moni-
toring of values).

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 747 / 1158
Generic Device Editor

The following table shows which action is affected in particular when a specific
access right is granted for an IEC application.
x : The right has to be set explicitly.
- : The right is not relevant.
“Application” Operation Access Rights
“Add/ “Execute” “Modify” “View”
Remove”
Login - - - x
Create x - - -
Create child x - - -
object

User interface
Delete x - - -
Download / x - - -
online
change
Create Boot x - - -
Application
Read vari- - - - x
able
Write Vari- - - x x
able
Force vari- - - x x
able
Set and - x x -
delete break-
point
Set Next - x x -
Statement
Read call - - - x
stack
Single cycle - x - -
Switch on - x x -
flow control
Start / Stop - x - -
Reset - x - -
Restore - x - -
retain varia-
bles
Save retain - - - x
variables
“PlcShell” Only the “Modify” permission is evaluated at this time. This means that only
when the “Modify” permission has been granted to a user group can PLC shell
commands also be evaluated.
“RemoteConnec Additional external connections to the controller can be configured below this
tions” node. Currently, access to the OPC UA server can be configured here.
“Settings” This is the online access to the configuration settings of a controller. By default,
access to “Modify” is granted only to the administrator.
“UserManageme This is the online access to the user management of a controller. By default, read/
nt” write access is granted only to the administrator.

R911403764, Edition 08 Bosch Rexroth AG


748 / 1158 ctrlX PLC Engineering
Generic Device Editor

“X509” This controls the online access to the X.509 certificates. Two types of access are
distinguished here:
● Read (“View”)
● Write (“Modify”)
Every operation is assigned to one of these two access rights. Each operation is
inserted as a child object below X509. Therefore, access per operation can now
be fine-tuned even more.

“File system objects 🠂 /”


All folders from the execution path of the controller are inserted below the "“/”"
file system object. This allows you to grant specific rights to each folder of the file
system.

See also
● ⮫ Chapter 20.4 Handling of Device User Management on page 262
● ⮫ Chapter 33.1.2 Generic Device Editor on page 736
● ⮫ Chapter 33.1.16 "Users and groups” tab on page 754

33.1.11 Tab 'Applications'


On this tab of the generic device editor you can see which applications exist on
the device. Depending on the system you can delete the applications from the
device or retrieve detailed information about the application.

“Applications on the PLC” List of the applications found via “Refresh list” during the last scan of
the control device.
“Delete” Deletes the application selected in the list or all listed applications on
“Delete All” the controller
Note: If a safety controller is inserted below a PLC, then this command
can permanently interrupt the communication links of the safety con-
troller to other safety controllers (via safety network variables), to field
devices, and to the development system. The safe field devices and
the other safety controller can enter the safe state as a reaction. The
connection to the development system is affected only in the case of a
safety controller that is connected to the main controller via a fieldbus.
For more information, refer to the section "Subordinate Safety Con-
troller".
“Details” Opens the dialog box “Details”. It displays information defined for the
application on the “Information” tab of the dialog box “Properties”.
“ Contents” Requirement: The “Download the application info” option is activated
in the “Properties” of the application object on the “Application
generation options” tab. This causes information about the contents
of the application to be additionally loaded to the PLC.
The “Contents” button opens a dialog box with additional information
about the differences between the latest generated code and the
application code that exists on the controller. The different modules
are displayed in a comparison view.
“Refresh List” The controller is scanned for applications and the list is refreshed
accordingly
You can configure the commands “Remove Application from Device” and
“Remove Applications from Device” by means of the dialog box form “Tools
🠂 Customize”. These commands correspond to the “Delete” and “Delete All”
buttons.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 749 / 1158
Generic Device Editor

Also refer to
● ⮫ Chapter 33.1 Generic Device Editor on page 735
● ⮫ Chapter 33.2.6 “Application” object on page 763
● ⮫ Chapter 33.1.2 Generic Device Editor on page 736
● ⮫ Chapter 33.1.4 'Information' tab on page 736
● ⮫ Chapter Dialog 'Properties - Application Build Options' on page 1053
● ⮫ Chapter Command 'Login' on page 939
● ⮫ Chapter 19.3 Subordinate Safety Controller on page 232

33.1.12 Tab 'Backup and Restore'


In this tabbed page of the generic device editor, you can backup and restore

User interface
the application-specific file on the PLC by saving and reading a zip archive.
Requirement: The communication settings are correct for connection to the
device. The application for backup is available on the PLC.
Table 26: Menu Bar
“Backup” This button opens a menu with the following commands:
● “Read Backup Information from Device”: This command searches
for application-specific files from the $PlcLogic$ directory of the
PLC and lists them in a table in the lower part of the tabbed page.
● “Create Backup File and Save to Disk”:
Requirement: The “Read Backup Information from Device” com-
mand was used for determining the backup-related files. These files
are located in the table in the lower part of the tabbed page.
This command compresses the files in the table set as “Active”
and the meta.info information file into a backup zip file. The file
extension is tbf (="Target Backup File").
● “Save Backup File to Device”:
Requirement: The backup file has been saved to the disk. This com-
mand saves the backup file to the TBF directory of the PLC.
“Restore” This button opens a menu with the following commands:
● “Load Backup File from Disk”: This command opens the “Open”
dialog box for navigating the file system for a saved backup file. The
included files are listed in a table in the lower part of the tabbed
page.
● “Load Backup File from Device”: This command generates a list
of all backup files found on the PLC. Select one of these files to
view its contents in a table on the tabbed page. For the restore
operation, you can deactivate optional components and edit the
comments.
● “Restore on Device”: This command is available if at least one
component of the backup file that is currently loaded in the tabbed
page is set to active. It prompts for restoring the application status
on the device. The user interface is blocked during restore. You can
cancel the operation.
Table 27: “Target Information”
“ID” ID of the PLC (example: 0000 0001)
“Type” Device type (example: 4096)
“Version” Device version (example: 3.5.8.0)

R911403764, Edition 08 Bosch Rexroth AG


750 / 1158 ctrlX PLC Engineering
Generic Device Editor

Table 28: “Backup Information”


“File name” Storage path of the backup file. Clicking the symbol ( ) opens
the file system dialog box. Example: PlcLogic$/Application/
Application.crc
“Size of active files” (in kilobytes) Total size of the files set as active in the table (example:
206 KB (210965 bytes)).
“Mode” Defines the scope of the backup: “Application”. The application-related
files are added to the archive.
“Comment” Optional entry for comments to be saved in the meta.info file of the
backup and reading when the files are restored.
Table 29: Table of files for backup
“Active” : Optional files can be deactivated here for exclusion in the backup
file.
Required components are shown here with a green check mark (no
check box).
“Component” Affected components (example: file system)
“File” Name of the component file to back up (example: $PlcLogic$/
Application/Application.app)
“Size” File size in bytes (example: 43280)
“Requires STOP” : For components, the application must be stopped before backup
and restore. A dialog prompt will open to warn you of any backup or
restore conflicts.
See also
● ⮫ Chapter 22.5.8 Backup and Restore on page 312

33.1.13 Tab 'Files'


In this tab of the generic device editor, you can transfer files between PLC Engi-
neering (host) and the PLC. If the communication settings are correct and the
PLC is online, then PLC Engineering establishes the connection automatically
to the PLC for the duration of the file transfer.

Table 30: “Host” / “Runtime”


Access to the file system of the host with the functionalities of a
standard file manager
“Location” Current directory for the file transfer on the host side
Opens a dialog to create a new directory in the set path
Deletes the selected files or directories
Updates the list of files and directories there for the set location
Copies the selected files and directories to the respective other file
system from the host and runtime system
If a file is not already available in the target directory, then it is cre-
ated. If it is already available and not write-protected, then it is over-
written. Then a corresponding message is displayed.
corresponds to the “Write File to Controller” command.
corresponds to the “Write File from Controller” command.
By default, the “Write File to Controller” and “Write File from Controller” com-
mands are not included in any menu. You can add it to a menu by means of the
“Tools 🠂 Customize” dialog, in the “Online” command category.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 751 / 1158
Generic Device Editor

See also
● ⮫ Chapter 33.1.2 Generic Device Editor on page 736
● ⮫ Chapter 24 Copying Files to/from PLC on page 319

33.1.14 "Log” tab


You can view the PLC log on this tab of the generic device editor. It lists the
events recorded on the target system. This applies to the:
● Events upon the startup and shutdown of the system (components loaded
with version)
● Application download and loading of the boot application
● Customized entries

User interface
● Log entries from I/O drivers
● Log entries of data sources
The “Log” tab also opens when you click “Open Log Page”. You can configure
this as a menu command in the “Customize” dialog.

Table 31: Menu bar


Refreshes the list of log events for all runtime system component
“Components” Filters the display of log events by the runtime system components
selected in the list box
Example:
CmpApp displays all events which occur in these compo-
nents, for example "Application [ <name> ] loaded via
[OnlineChange]".
“<all components>”: Displays the reported events of all components
Loads the next page with newer log messages
Loads the previous page with older log messages
Loads the page with the newest log entries and enables automatic
scrolling
: Indicates that there are new log messages which have not been
displayed yet.
Hint: This is also displayed on the status bar as “Auto-Scroll: ON”.
Loads the page with oldest log messages
Filters events with the severity “Warning” and notifies about how many
Blue-outlined button: Warnings are displayed.
Filters events with the severity “Error” and notifies about how many
Blue-outlined button: Errors are displayed.
Filters events with the severity “Exception” and notifies about how
many
Blue-outlined button: Exceptions are displayed.
Filters events with the severity “Information” and notifies about how
many
Blue-outlined button: Information is displayed.
Filters events with the severity “Debug” and notifies about how many
Blue-outlined button: Debug messages are displayed.
Logger Enables a logger for displaying its recorded events
By default, the <default logger> defined by the system is set. For
example, that is the logger PlcLog for a ctrlX CORE runtime system.

R911403764, Edition 08 Bosch Rexroth AG


752 / 1158 ctrlX PLC Engineering
Generic Device Editor

“UTC time” : Converts the times displayed below “Timestamp” to the local time
of the development system. The conversion is based on the time zone
of the operating system where the PLC Engineering is running. (default
setting)
: Displays the original time stamp of the runtime system
If you change the option, then the displayed time stamp is converted
automatically.
Exports the list contents to an xml file. You can select the file name
and location.
Imports an XML file with log messages stored in the file system . A
separate window opens to display the log messages.
Table 32: Display window with log file
Tabular display of the log messages
Ten thousand log messages are displayed per page.
“Severity” ● : Warning
● : Error
● : Exception
● : Information
● : Debug message
“Time Stamp” Date and time of the development system or of the runtime system)
Example: 01/12/07 09:48
“Description” Description of the event
Example: PLC started
“Component” Runtime component where the reported event occurred
Table 33: Status bar
“Auto-Scroll” Displays whether auto-scrolling is enabled (“ON”) or disabled (“OFF”)
Hint: Click the button to enable “Auto-Scroll”.
● “ON”: The log list is refreshed automatically when changes occur.
● “OFF”: When a new log event occurs, it is displayed next to “Off”.
Moreover, the button is decorated on the menu bar: .
Note for error checking
For exceptions with the description *SOURCEPOSITION*, the affected function
opens in the editor by double-clicking it or by means of the “Display Source
Code in Editor” command in the context menu. The cursor jumps to the line
that is causing the error. You can also perform this diagnosis when you have
the PLC Engineering project archive, including the download information files
and the exported log file. When the affected function is protected, then the
following message appears: "The source code is not available for
<function name>".
If a VendorException is reported, then a manufacturer-specific exception
error has occurred in the PLC Engineering runtime. Contact the PLC manufac-
turer for more information.

Also refer to
● ⮫ Chapter 33.1.2 Generic Device Editor on page 736
● ⮫ Chapter 22.5.5 Reading the PLC on page 309
● ⮫ Chapter Dialog 'Customize' - 'Menu' on page 1094

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 753 / 1158
Generic Device Editor

33.1.15 Tab 'Task deployment'


This sub-dialog box of the device editor displays a table of inputs and outputs
as well as their assignment to the defined tasks.
The information only becomes visible after code has been generated for the
application. It is used for troubleshooting, because it shows where inputs or
outputs are used in several tasks with different priorities. Multiple use can lead
to undefined values through overwriting.

User interface
Table 34: “I/O Deployment for Tasks” (1)
“I/O Channels” (2) All inputs and outputs of the linked devices. The display corresponds
to that in the dialog box “I/O Mapping” of the device editor.
By double-clicking on an input or output you can open the associated
I/O mapping editor.
“<task name>” (3) A column appears for every task defined in the task configuration. The
title contains the task name and priority.
The priority of the tasks decreases from first to the last column. A red
cross appears in the box for inputs and outputs that are written or
read by a task: . In addition, the task defined as a “Bus cycle task” in
the “PLC Settings” of the device editor is marked at these points with
a blue double arrow symbol .
Following a mouse-click on the title cell, only the I/Os assigned to this
task are displayed.
Following a mouse-click on the “I/O Channels” cell, all channels are
shown again.
See also
● ⮫ Chapter 33.1.2 Generic Device Editor on page 736
● ⮫ Chapter 33.1.9 Tab '<Device name> I/O mapping' on page 739
● ⮫ Chapter 33.1.18 Tab 'PLC Settings' on page 758
● ⮫ Chapter 18.21.2 Creating a Task Configuration on page 208

R911403764, Edition 08 Bosch Rexroth AG


754 / 1158 ctrlX PLC Engineering
Generic Device Editor

33.1.16 "Users and groups” tab


Recommendations for data security
NOTICE
In order to minimize the risk of data security violations,
we recommend the following organizational and tech-
nical actions for the system where your applications are
running: If possible, avoid exposing the PLC and control
networks to open networks and the Internet. Use addi-
tional security layers such as a VPN for remote access
and install a firewall. Restrict access to authorized per-
sonnel, and change any existing default passwords when
commissioning and then in regular intervals.
On this tab of the generic device editor, you edit the device user management
of the PLC.
Depending on how it is supported by the device, you can define user accounts
and user groups. In combination with the configuration on the “Access rights”
tab, you thus control access to control objects and files at runtime.
Prerequisites: The control has a user management and allows editing the man-
agement. You have login data in order to be able to log in to the controller.
It is possible to apply user account definitions from the project user manage-
ment into the device user management (see below: “Import” button).

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 755 / 1158
Generic Device Editor

Table 35: Toolbar of the tab


Synchronization Switches on and off the synchronization between the editor and the
user management on the device.
If the button is not pressed, then the editor is blank or it contains a
configuration that you loaded from the hard disk.
When the button is pressed, PLC Engineering synchronizes the display
in the editor continuously with the current user management on the
connected device.
When you enable the synchronization while the editor contains a user
configuration that is not synchronized with the device yet, you are
prompted what should happen to the editor contents. Options:
● “Upload from the device and overwrite the editor content”: The

User interface
configuration on the device is loaded into the editor, overwriting
the current contents.
● “Download the editor content to the device and overwrite the user
management there”: The configuration in the editor is transferred to
the device and applied there.
Import from disk CAUTION: The import of a device user management by means of a
*.dum2 file completely overwrites the existing user management on
the device. In order to log in to the device again afterwards, you need
authentication data from the new user management. This means that
you have to log in as a user from the imported user management after
the import.
● When you click the button on the “Users and Groups” tab to import
a “Device user management file *.dum2”, the default dialog for
selecting a file opens to select a device user management file from
the hard drive. After you select the file, the “Enter Password” dialog
opens. You have to specify the password that was assigned when
the file was exported. Then the user management is enabled.
Note: Before V3.5 SP16, the “Device user management files
(*.dum)” file type was used which did not require any encryption.
● When you click the button on the “Access Rights” tab to import
a “Device rights management file *.drm”, the default dialog for
selecting a file opens to select a corresponding file from the hard
drive. The existing configuration in the dialog is overwritten by the
imported file.
Export to disk ● When you click the button on the “Users and Groups” tab, first
the “Enter Password” dialog opens for assigning a password to
the device user management file. Note: This password has to be
repeated later when this file is imported to enable this user man-
agement on the controller.
After the password assignment dialog is closed, the default dialog
for selecting and importing a user management configuration from
the hard disk opens. In this case, the file type is “Device user
management files (*.dum2)”.
Note: Before V3.5 SP16, the “Device user management files
(*.dum)” file type was used which did not require any encryption.
● When you click the button on the “Access Rights” tab, the file type
is “Device rights management files (*.drm)”. In this case, a pass-
word does not have to be assigned for the file before saving.
“Device user” User name of the user currently logged in on the device

R911403764, Edition 08 Bosch Rexroth AG


756 / 1158 ctrlX PLC Engineering
Generic Device Editor

Table 36: “User”


All currently defined users, and below them their memberships of user groups, are listed in a tree
structure.
“Add” Opens the “Add User” dialog for creating a new user account.
“Import” Opens the “Import user” dialog. It displays all the user accounts
defined in the project user management.
Select the desired entries and click “OK” in order to import them
into the device user management. CAUTION: The passwords are NOT
applied!
“Edit” Opens the “Edit user <UserName>” dialog. It corresponds to the “Add
User” dialog and you can change the settings of the user account.
“ Delete” Deletes the account of the currently selected user.
Table 37: “Groups”
All currently defined groups, and below them the users assigned to them, are listed in a tree
structure.
“Add” Opens the “Add group” dialog.
Define a new group name. From the list of defined users, select those
that are to belong to the group. Confirm the selection with “OK”. The
group is displayed in the tree.
“Import” Opens the “Import user” dialog. It displays all the user groups defined
in the project user management.
Select the desired entries and click “OK” in order to import them into
the device user management.
“Edit” Opens the “Edit group <GroupName>” dialog. It corresponds to the
“Add Group” dialog where you can change the group definition.
“ Delete” Deletes the currently selected group.
Table 38: “Add Dialog 'Add User'”
“Name” Name of the new user
“Default group” List box with all configured user groups. Every user must belong to at
least one group. You define this here as a default group.
“Password”
“Confirm password”
“Password strength” Password security in stages from “Very weak” to “Very good”.
“Hide password” : The password is shown only with asterisks "*" when it is entered.
“Password can be changed
by the user”
“Password must be
changed at first login”

Also refer to
● ⮫ Chapter 33.1.2 Generic Device Editor on page 736
● ⮫ Chapter 20.4 Handling of Device User Management on page 262
● ⮫ Chapter 33.1.10 Tab 'Access Rights' on page 743
● ⮫ Chapter Command 'Add Device User' on page 951

33.1.17 “PLC shell” tab


This tab of the generic device editor includes a text-based control monitor for
querying specific information from the controller. Device-dependent commands
can be entered and the response of the control is output in a result window.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 757 / 1158
Generic Device Editor

Table 39: Bosch Rexroth AG standard commands


Command with Possible Parameters Description
? List of available PLC shell commands with possible param-
eters and short description
getcmdlist List of names of available PLC shell commands
mem <memory address> [<size>] Provides a hex dump of the defined memory range.
The size parameter is optional and describes the number of
bytes that are output. Default value: 16
Example: mem 16x0422139C 8
reflect Repeats the given command (for testing the connection)
applist Provides a list of all loaded applications

User interface
The order in the list defines the application index beginning
with 0.
pid [<application name>| Provides the GUID (application index) of one or all loaded
<application index>] * applications
pinf [<application name>| Provides the contents of the following fields from the
<application index>] * project information: title, version, author, and description.
Requirement: The option “Create POU for properties
access automatically” in the “Project Information” dialog is
activated.
startprg [<application name>| Starts the given application, or all loaded applications if no
<application index>] * application is given
stopprg [<application name>| Stops the given application, or all loaded applications if no
<application index>] * application is given
resetprg [<application name>| Resets the given application, or all loaded applications if
<application index>] * no application is given
resetprgcold [<application Executes a cold boot of the given application, or all loaded
name>|<application index>] * applications if no application is given
reload[<application name>| Loads the boot application of the given application, or the
<application index>] * boot projects of all loaded applications if no application is
given
getprgstat [<application name>| Provides the program status of the given application, or the
<application index>] * program status of all loaded applications if no application
is given
plcload Shows the processor load of the controller (in percent)
rtsinfo Provides information about the runtime system, for
example the processor and version of the runtime system
channelinfo Provides information about the communication channel
rtc-get Provides the universal time (UTC) via the DataTime string
rtc-set Sets the universal time (UTC) via the DataTime string (see
ISO 8601)
listpcicards [<VendorID>] Provides a list of PCI adapters (all or by <VendorID>)
gettaskgroups Provides a list of all task groups, their tasks, and the CPU
core binding
cert-getapplist Provides all registered and used certificates (ID of the com-
ponent and usage).
cert-genselfsigned [<number Generates self-signed certificates
for search result by "cert- The validity period of the certificate can be specified by
getapplist"> <expdays=>] means of expdays=.
Default value: 365 days

R911403764, Edition 08 Bosch Rexroth AG


758 / 1158 ctrlX PLC Engineering
Generic Device Editor

Command with Possible Parameters Description


cert-gendhparams [length in Generates the parameters for the Diffie-Hellman key
bits] exchange
Caution: This operation can take several minutes to com-
plete.
cert-getcertlist [<trust Lists all certificates of the specified trust level
level>] If a trust level is not given, then all certificates are listed.
Possible trust levels
● untrusted: Untrustworthy certificates
● trusted: Trustworthy certificates
● own: Certificate of the controller
● quarantine: Certificates whose trust level (trusted,
untrusted) cannot be determined by validation.
Incoming connections were therefore denied.
cert-createcsr [<number for Generates CSR files for all applications
search result by "cert-
getapplist">]
cert-import <trust level> <file Imports the specified certificate
name.cer>
cert-export <trust level> Exports the specified certificate
[<number for search result by
"cert-getcertlist">]
cert-remove <trust level> Removes the specified certificate
<number for search result by
"cert-getcertlist" or "all">
cpuload Shows the processor load of the CPU (for multicore, each
processor core)
gettaskgroups Provides a list of defined task groups
The assigned tasks are shown for each task group.
getmulticoreinfo Shows whether or not multicore is supported and the
number of available processor cores
sessinfo-list Provides a list of all currently logged in clients/users
sessinfo-getcnt Provides the number of currently logged in clients/users
*Application name: Name of the application in the device tree
Application index: Results from the list of all applications on the controller
that you can call with the “applist” command. Index 0 stands for the first
application in the list, 1 for the second, and so on.

Also refer to
● ⮫ Chapter 22.5.7 Using PLC Shell for requesting Information on page 311
● ⮫ Chapter 33.1.2 Generic Device Editor on page 736

33.1.18 Tab 'PLC Settings'


On this tab of the generic device editor you make the basic settings for the
configuration of the PLC, for example the handling of inputs and outputs and
the bus cycle task.
“Application for I/O Application that is responsible for the I/O handling.
handling”

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 759 / 1158
Generic Device Editor

Table 40: “PLC Settings”


“Refresh I/Os in stop” : PLC Engineering refreshes the values of the input and output chan-
nels even if the PLC is in the stop state. If the watchdog detects a
malfunction, the outputs are set to the predefined default values.
: PLC Engineering does not refresh the values of the input and
output channels when the PLC is in the stop state.
“Behavior of the outputs at Handling of the output channels when the controller enters the stop
stop” state:
● “Retain values”: The current values are retained.
● “All outputs to default value”: The default values resulting from the
I/O mapping are assigned.
● “Execute program”: You can control the handling of the output

User interface
values via a program contained in the project, which PLC Engi-
neering executes at "STOP". Enter the name of the program in the
field on the right.
“Always update variables” Global setting that defines whether or not PLC Engineering updates
the I/O variables in the bus cycle task. This setting is effective for I/O
variables of the slaves and modules only if 'deactivated' is defined in
their update settings.
● “Deactivated (update only if used in a task)”: PLC Engineering
updates the I/O variables only if they are used in a task.
● “Activates 1 (use bus cycle task if not used in another task)”: PLC
Engineering updates the I/O variables in the bus cycle task if they
are not used in any other task.
● “Activate 2 (always in bus cycle task)”: PLC Engineering updates all
variables in each cycle of the bus cycle task, regardless of whether
they are used and whether they are mapped to an input or output
channel.
Table 41: “Bus Cycle Options”
“Bus cycle task” Task that controls the bus cycle. By default the task defined by the
device description is entered.
By default the bus cycle setting of the superordinate bus device (use
cycle settings of the superordinate bus) applies, i.e. the device tree is
scanned upwards for the next valid bus cycle task definition.
Pay strict attention to the following notes!
Before you select the “<unspecified>” setting for the
NOTICE
bus cycle task, you should be aware that "<unspeci-
fied>" means that the default setting given in the device
description goes into effects. You should therefore check
this description. Use of the task with the shortest cycle
time may be defined as the default there, but use of the
task with the longest cycle time could equally well be
defined!
For fieldbuses, a fixed cycle matrix is necessary to
NOTICE
assure a determined behavior. Therefore, do not use the
type 'free-running' for a bus cycle task.

R911403764, Edition 08 Bosch Rexroth AG


760 / 1158 ctrlX PLC Engineering
Generic Device Editor

Table 42: “Additional Settings”


“Force variables for the I/O This setting is available only if it is supported by the device.
mapping ” : When compiling the application PLC Engineering creates two global
variables for each I/O channel that is mapped to a variable in the
dialog “I/O Mapping”. You can use these variables for the forcing of
the input or output value on this channel, for example via an HMI
visualization.
“Activate diagnostics for : PLC Engineering automatically integrates the library CAA Device
devices” Diagnosis in the project and creates an implicit function block for
each device. If there is already a function block for the device, then
either an extended FB is used (for example with EtherCAT) or a further
FB instance is added. This then contains a general implementation of
the device diagnostics.
By means of the FB instances you can determine the status of all
devices in the application and evaluate errors. In addition, the library
contains functions for the programmatic editing of the device tree.
Example: Scanning of all children of a bus system, jumping to the
parent element.
“ Display I/O warnings as Warnings concerning the I/O configuration are displayed as errors.
errors ”
See also
● ⮫ Chapter 33.1.2 Generic Device Editor on page 736
● ⮫ Chapter 33.1.9 Tab '<Device name> I/O mapping' on page 739
● ⮫ Chapter Command 'Build' on page 933
● PDF document 'CAA Device Diagnosis', which is a component of the library.

33.1.19 'Parameters' tab


This dialog is intended for test purposes. Its values should be changed only by
experts.
The device-specific parameters are displayed in a table on this tab of the
generic device editor. The device description defines which parameters you can
edit in this dialog.
You can sort the entries in alphabetically ascending or descending order or in
the default order by clicking the column header.
“Parameters” Parameter name, not editable
“Type” Data type of the parameter, not editable
“Value” Initially displays the default value of the parameter, directly or the
corresponding symbol name. Non-editable parameters are displayed in
light-gray. If the parameter can be edited, double-click on the table
field to open an input field, a drop-down list or a file selection dialog
and use it to change the value.
“Default value” Default value of the parameter defined by the device description, not
editable
“Unit” Unit of measure for the value (example: "ms" for milliseconds; not
editable)
“Description” Short description of the parameter specified by the device description,
not editable
Also refer to
● ⮫ Chapter 33.1.2 Generic Device Editor on page 736

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 761 / 1158
Objects

33.1.20 Tab “Status”


The “Status” tab provides an overview on the real time data system configu-
ration in the project and the control. Consequently, the two configurations
can be compared. The displayed data may vary and depend on the respective
object node or the real time object type.

The tab can only display data if a connection is established to the control or if a
real time configuration is available in the project.
− When no communication to the control is established, the right display
window remains empty
− If no real time configuration is created in the project, the left display
window remains empty

User interface
Call
The tab can be called as follows:
● Via the “Show status” command, see:
⮫ Chapter Command “Show status” on page 884
● In the device editor, by double-clicking on the DataLayer_Realtime object
node or by double-clicking on the subordinate object node.

33.2 Objects
33.2.1 Objects – General information
Objects in PLC Engineering provide certain functionalities to create your
application. Examples: Application, program, function, library manager, device,
image pool. Objects are managed in the views Devices, POUs, Modules in tree
structures.
Insert an object into the respective "tree" using the command “Project 🠂 Add
object”. The inserting options depend on the position in the tree.
Properties of each object can be seen and edited via the context menu of the
object.
Also refer to:
● ⮫ Command 'Properties'

33.2.2 ‘Project settings’ object


Symbol
Function: this object contains the configuration of the project.
Call
● Menu “Project 🠂 Project settings”
● Double-click on the object in the device tree
PLC Engineering directly saves the project settings in the project. For example,
when transferring a project to another system, the “Project settings” object is
also transferred. A project archive is not required.
The project settings are valid project-wide and offer setting possibilities for var-
ious categories such as “AS” or “Users and Groups”. The available categories
vary, depending on which software packages you have installed via the Package
Manager.
Also refer to
● ⮫ Chapter Command 'Add-on Installer' on page 963
● ⮫ Chapter Dialog 'Project Settings' - 'SFC' on page 1065
● ⮫ Chapter 'Project settings' dialog - 'Users and groups' on page 1061

R911403764, Edition 08 Bosch Rexroth AG


762 / 1158 ctrlX PLC Engineering
Objects

● ⮫ Chapter 'Project settings' dialog - 'Compiler options' on page 1062


● ⮫ Chapter 'Project settings’ dialog - 'Compiler warnings' on page 1062
● ⮫ Chapter 'Project settings’ dialog - 'Download source code' on page 1063
● ⮫ Chapter Dialog 'Project Settings' - 'Page Setup' on page 1063
● ⮫ Chapter 'Project settings' dialog - 'Security' on page 1064
● ⮫ Chapter Dialog 'Project Settings' - 'Static Analysis Light' on page 1066
● ⮫ Chapter Dialog 'Project Settings' - 'Visualization' on page 1069
● ⮫ Chapter Dialog 'Project Settings' - 'Visualization Profile' on page 1069

33.2.3 Object “device (ctrlX CORE)”


Symbol

Call
In the ctrlX PLC Engineering device tree below the project node, see ⮫ Chapter
17.2 Device tree and device editor on page 111

Function
The “device (ctrlX CORE)” object node symbolizes the control in your PLC
project and provides all elements and tools required to configure the PLC
project.
In the initial state, the control object node contains the following child nodes:
Child nodes Function
PLC Logic The PLC Logic child node is part of the control
object node and contains the following objects
to create a PLC control program
Application The “Application” node contains the objects
required for an executable control program,
see ⮫ Chapter 33.2.6 “Application” object
on page 763
Library Manager The Library Manager lists all libraries that were
integrated in the project for creating applica-
tions, see ⮫ Chapter 33.2.19 "Library manager”
object on page 780
PLC_PRG (PRG) Program function block (structured text)
The program function block “PLC_PRG (PRG)”
is automatically created when creating a ctrlX
project template and does not yet contain any
program code.
Task Configuration The “Task Configuration” object is used to
define and display the basic settings for the
task configuration, see ⮫ Chapter 33.2.31
"Task configuration" object on page 860
Main Task In the “Main Task” object, define the con-
ditions for task start and calls within the
task, see ⮫ Chapter 33.2.32 "Task" object
on page 865
PLC_PRG Program function block “PLC_PRG (PRG)” with
call in Main Task

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 763 / 1158
Objects

Child nodes Function


Realtime_Data (DataLayer) The “Realtime_Data (DataLayer)” node allows
the configuration and connection of realtime
data to the PLC which is managed via the ctrlX
CORE Data Layer, see ⮫ Chapter 33.2.4 Object
“DataLayer_Realtime” on page 763

Further documentation
● ⮫ Chapter 8.2 Creating a new project on page 53
● ⮫ Chapter 8.2.1 Creating a project on the basis of a template for ctrlX CORE
Creating devices on page 54

User interface
33.2.4 Object “DataLayer_Realtime”
The object node “DataLayer_Realtime” facilitates the mapping of real time data
channels in the ctrlX Data Layer in the I/O image of the current PLC project,
e.g. EtherCAT device (master/slave).
To facilitate mapping, the configuration of the real time data channels has to be
transferred to the ctrlX PLC Engineering project. There are several options to
transfer the configuration, e.g. by downloading the configuration from the ctrlX
device or by loading a description file.
Depending on the use case, the context menu node “Select realtime data”
provides the following commands to transfer the configuration:
● “Selectively from ctrlX CORE..”
The command facilitates the application of real time data via download
directly from the ctrlX device.
For this process, a connection to the communication from the Engineering
PC to the control is required.
Refer to: ⮫ Command “Selectively from ctrlX CORE..”
● “All data from ctrlX CORE..”
By using this command, all data currently configured in the DataLayer_Real-
time node is discarded. Subsequently, all real time data channels that
can be contacted by the PLC via the Data Layer of the ctrlX device are
re-inserted.
For this process, a connection to the communication from the Engineering
PC to the control is required.
Refer to: ⮫ Command “All data from ctrlX CORE..”
● “Selectively from file..”
By using the command, a description file created in ctrlX IO Engineering can
be read in and used to configure the I/O image.
For this process, no connection to the communication from the Engineering
PC to the control is required.
Refer to: ⮫ Command “Selectively from file..”

33.2.5 Object “ethercat_master_instances_ethercatmaster”


The object node is used to manage several EtherCAT real time channels which
are fed by different EtherCAT master instances
Currently, only individual licenses are supported.

33.2.6 “Application” object


Symbol:
The object is displayed as a node in the device tree. It includes objects
required for an executable control program.

R911403764, Edition 08 Bosch Rexroth AG


764 / 1158 ctrlX PLC Engineering
Objects

You can mount an application object below a “PLC logic” node, i.e. below a
programmable device.
Under each application there has to be a “task configuration” in which you
configure which program of the application is called by which task with which
settings.
Furthermore, under the application you hang the blocks of your control pro-
gram, such as POUs, global variable lists, library managers.
In addition, the application can also use instances of project-global function
blocks. Project-global function blocks are managed in the “POUs” view. The use
of such instances corresponds to the object-oriented programming.
An application can be provided with specific properties in the “Properties”
dialog of the application object, in the tab “Application build options”.
Example: Enabling dynamic memory allocation.
When downloading the application to the PLC, it is possible to provide informa-
tion on the application content. This is also a setting in the “Application build
options” tab. The application on the control can subsequently be compared to
the active application in PLC Engineering.
To provide additional information on the application such as author, version
and an individual brief description, modify the information from the gen-
eral“Project info” in the “Properties” dialog under the “Information” tab.
When logging into the target device (PLC or simulation), it is first checked
which application is currently on the PLC and whether the application param-
eters on the control match those in the project configuration. Respective
messages show possible mismatchings and options for further actions. Applica-
tions on the PLC can be deleted.
Go to the “Application” tab of the device editor for the applications currently
located on the device. There, the application can also be deleted from the
target system. There can also be additional applications in the list without a
separate object in the device tree, such as <Application>_symbols.app con-
taining a symbol list created for the application (refer to symbol configuration).
Also refer to
● ⮫ Chapter 17.2 Device tree and device editor on page 111
● ⮫ Chapter 33.2.31 "Task configuration" object on page 860
● ⮫ Chapter Dialog 'Properties - Application Build Options' on page 1053
● ⮫ Chapter 20 Transferring the application to the PLC on page 257
● ⮫ Chapter 33.1.18 Tab 'PLC Settings' on page 758
● ⮫ Chapter 19.2 Symbol Configuration on page 229
● ⮫ Chapter 23.2 Executing the Online Change on page 315

33.2.7 Object 'POU Locations'


This object is available only for specific controllers. It is displayed automatically
in the device tree. The object cannot be added or removed manually. The object
can be used for mapping the executable code of an application in different
code areas on the controller. Specifically small controllers often have limited
internal code areas (flash memory). If one or more additional code areas (for
example, external flash memory) are available on the controller, then the loca-
tion of the code POUs of an application can be changed specifically. In the case
of a safety controller (SIL2), this can also be used for moving non-safety-rele-
vant code POUs or entire libraries into this external memory.
If there are no specific requirements, then the code POUs are stored sequen-
tially in the code areas (“default”). This means that the next code POUs are
stored in the next areas only when the first code area is filled. In the “POU
Locations” editor, you will see the current location of the POUs in the memory

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 765 / 1158
Objects

areas and you can change them specifically. Especially in the case of a safety
application, this may be necessary for getting all safe POUs into the safe
internal memory area.

Editor 'POU Locations'


Double-clicking the “POU Locations” object in the device tree of the controller
opens the editor. Then it receives the entry “<application>”. After a code gener-
ation, all program blocks of the application are displayed with the respective
object type, current location in the memory, and code size.
In the “Configured Location” column, you can set one of the memory areas
other than the “Current Location” for each POU or library.
In order to move the POUs to the recently configured memory locations, you

User interface
first have to “Clean” and then “Generate Code” again.
Make sure to pay attention to the messages in the category “POU Locations”.
This also shows when a code POU cannot be moved as expected.
“Clean” Deletion of the compile information for the application. Corresponds
to the menu command “Build 🠂 Clean”. Requirement for moving the
POUs to the configured memory locations.
“Generate code” Starting of the code generation for the application. Corresponds to the
menu command “Build 🠂 Generate Code”. Requirement for moving the
POUs to the configured memory locations.
“Objects” Objects of the application, including the objects from the referenced
libraries
“Type” Object type; examples: “Function block”, “Method”, “Library”
“Current location” Current memory location of the POU: area_<n>.
“Configured location” Configured memory location where the POU is moved at the next code
generation. Possible values:
● “default”: Automatically assigned area.
● “area_<n>”: Explicitly assigned memory area (n=number)
“Code size” Code size of the POU (in bytes)
● ⮫ Chapter Command 'Clean' on page 932
● ⮫ Chapter Command 'Generate Code' on page 932

33.2.8 Object 'Alarm Configuration'


The object “Alarm Configuration” is for the management of alarms. It consists
of alarm classes, alarm groups and optionally an alarm storage. The alarm con-
figuration does not have a configuration.
If you insert the object, PLC Engineering also automatically inserts the fol-
lowing predefined objects:
● Alarm class “Error”
● Alarm class “Info”
● Alarm class “Warning”
● Alarm storage “AlarmStorage”
You can use these objects, but you don't have to. You can delete them and
replace them by objects that you add yourself.
See also
● ⮫ Chapter 33.2.9 Object 'Alarm Class' on page 766
● ⮫ Chapter 33.2.10 Object 'Alarm Group' on page 768
● ⮫ Chapter 33.2.11 Object 'Alarm Storage' on page 772

R911403764, Edition 08 Bosch Rexroth AG


766 / 1158 ctrlX PLC Engineering
Objects

33.2.9 Object 'Alarm Class'


An alarm class describes the general properties of an alarm. These include the
type of acknowledgement of the alarm and the actions that are to take place
automatically if a certain alarm status is attained. In the definition of the alarm
class you can also define the font of the message in the visualization elements.

“Priority” Specification of the priority of the alarms in this class


(0-255). The priority describes the priority of the alarm
condition. 0 represents the highest priority, 255 the
lowest.
“Archiving” : PLC Engineering records the alarms in this class. To do
this you must create an object “Alarm Storage”.
Table 43: “Acknowledgment”
“Acknowledgement “REP”: Alarm inactive after rectification of the cause
method”: Defini-
tion of how an
alarm is acknowl-
edged.
“ACK”: Alarm inactive after acknowledgement; acknowl-
edgement method for events

“ REP_ACK”: Alarm inactive after rectification of the cause


and acknowledgement

“ACK_REP”: Alarm inactive after acknowledgement and rec-


tification of the cause

“ACK_REP_ACK”: Inactive after optional acknowledgement


that the alarm was received, rectification of the cause and
acknowledgement that the alarm situation was ended

Alarm status:
● ① Normal: No alarm situation
● ‚ Active: Alarm situation has occurred
● ➂ Wait for confirmation: there is no longer an alarm;
acknowledgement has not taken place yet
● ➃ Active, Acknowledged: Alarm still exists; acknowl-
edgement already completed
Status transitions:
● ⑤ Activate: Alarm situation occurs ("alarm coming")
● ⑥ Deactivate: Alarm situation ended ("alarm going")
● ⑦ Confirm: Acknowledgement of an alarm that is
already ended
● ⑧ ACK: Acknowledgement of an alarm that still exists

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 767 / 1158
Objects

Note: PLC Engineering displays this diagram in a tooltip if


you position the mouse pointer over the selection box in
the configuration editor.
You frequently have to ensure that the user notices the
alarm during operation. Various actions are available in the
alarm class for this. The user must confirm (acknowledge)
the alarm in order for the alarm to be removed from the
alarm list.
“Acknowledge : During operation the user cannot acknowledge the
separately” alarm together with other alarms, but must acknowledge
it separately. This prevents the user from inadvertently
acknowledging an alarm together with other alarms.

User interface
Table 44: “Notification Actions”
You can assign a list of actions to each alarm class that are to be executed as
soon as the alarm is subject to a status transition.
“Action” Select one of the following actions by double-clicking the
action column:
● “Variable”: Value assignment of a variable
● “Execute”: Execution of a program
● “Call”: Call a function block instance
“Activate” The available status transitions depend on the selected
“Deactivate” “acknowledgement method”.
“Confirm” : The action is executed with the status transition.
“ACK”
“Details” Displays a summary of the action. You define the action
below the table or edit the action directly in this row.
“Deactivation”: Variable via which an application can deactivate the action.
Table 45: “Variable/Execute/Call”
You define the parameters of the action in the field below the table. The
parameters depend on the selected action:
● Variable:
“Variable”: Variable to which you assign a value or an
expression.
In the field on the right: Assigned variable or expres-
sion. You can select the variables via the input assistant
( ).
In the case of boolean variables you can use the place-
holder ALARM, in the case of integer variables the place-
holder STATE. In the case of string variables you can
enter any IEC literal (e.g. 'too high!').
– ALARM: Status (TRUE or FALSE) of the alarm of this
alarm class that was last activated/deactivated
– STATE: Status of the alarm of this alarm class that
last changed its status. (0: Normal, 2: Active, 3: Wai-
tingForConfirmation, 4: ActiveAcknowledged)
● Execute:
“Executable file”: Path and file name of the executable
file on the controller.
“Parameter”: One or more parameters that you add to
the call. You separate several parameters by a space.
● Call:

R911403764, Edition 08 Bosch Rexroth AG


768 / 1158 ctrlX PLC Engineering
Objects

“Function block instance”: Function block that is


called. The function block must implement the inter-
face IAlarmNotifiable (AlarmManager.library). The
desired action on a change of state is implemented in
the method Execute.
“Additional parameter structure”: If the function block
requires an additional parameter structure, the struc-
ture members are listed in this table and can
be filled here. An additional parameter structure
is defined in the function block with the attribute
AlarmManagerAdditionalData.
Example: The function block has the attribute
{attribute 'AlarmManagerAdditionalData' :=
'StructEmailParams'}.
The structure employed must consist of scalar compo-
nents or components of the type POINTER TO. PLC
Engineering does not support the ARRAY data type or
user-defined data types.
Note: Using the attribute {attribute
'AlarmManagerMandatoryParameter'} you can iden-
tify structure members as mandatory parameters.
Table 46: “Presentation Options for Alarm Table/Alarm Banner”
Defines how PLC Engineering displays the individual statuses of an alarm in
the alarm visualization element (alarm table, alarm banner).
“Status” Alarm status. The available statuses depend on the selected
“acknowledgement method”.
“Font” The standard dialog for the selection of a font or color is
opened with the button.
“Background Background color for the alarm message
color”
“Bitmap” You can add a bitmap by entering the bitmap ID. If no image
file is assigned to this ID yet, the standard file search dialog
opens. After having selected a file, the bitmap definition of
the image pool “GlobalImagePool” is added.
“Transparent” Activate this option if the bitmap has a transparent color.
“Transparent Color that is to be displayed transparently. Relevant only if
color” the “Transparent” option has been activated.
See also
● ⮫ Chapter 33.2.10 Object 'Alarm Group' on page 768
● ⮫ Chapter 33.2.11 Object 'Alarm Storage' on page 772

33.2.10 Object 'Alarm Group'


Use alarm groups for organizing individual alarms in the alarm management of
an application. Each alarm is assigned to one alarm group only. To configure
an alarm group, insert an “Alarm Group” object below an “Alarm Configuration”
object in the device tree.
A common deactivation variable can be assigned to all alarms that are assigned
to a group. You can create a hierarchical structure of alarm groups in the device
tree with the help of folder elements.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 769 / 1158
Objects

The dialog of the alarm group editor includes a table listing all alarms of the
group. The dialog displays the basic settings for the entire group, such as
deactivation, archiving, and associated text list, as well as the properties of
the individual alarms. You can edit the values in the list. Note the option of
exporting and importing alarms to and from a CSV file (see below).

Dialog 'Alarm Group'


“Text list” Name of the text list where the alarm message text is
saved (see below: “Message”). PLC Engineering generates
the list automatically when you create an alarm group. You
can also select an existing text list here.
“Archiving” Selection of the alarm storage object for the alarm group.

User interface
When you specify an alarm storage object, PLC Engi-
neering activates the alarm storage.
“Deactivation” Boolean variable that deactivates all alarms in this group.
PLC Engineering does not trigger these alarms any longer,
even if the alarm condition is fulfilled. Alarms that are
already active are not affected by this.
Table 47: Table of alarms
You enter the properties of the individual alarms in the corresponding table
columns. Depending on the selected observation type, PLC Engineering sets
additional parameters in input fields below the table.
“ID” This unique ID corresponds to the ID of the associated text
list. You can change the ID in the “ID” field of the table.
The ID must always be unique within the alarm group. A
change of the ID in the alarm table also directly causes a
change in the text list, and the other way around.
“Observation Drop-down list of observation types. Depending on the
type” type, different editing fields are available below the table
that define the condition for the alarm. The fields define an
expression that triggers the alarm. See the following table.
“Details” This field shows the configuration settings (defined in the
fields below the table) for the selected alarm type.
You can also enter the condition directly into the field.
If you input an expression that does not match the cur-
rently selected observation type, the type is automatically
adapted.
“Deactivation” Variable for deactivating the alarm (optional).
“Class” Assigned alarm class.
“Message” Required entry of a message text (message) that PLC
Engineering will display in the “Alarm Table” visualization
element when the alarm occurs. The text entered here
is transferred automatically by PLC Engineering to the
text list for the alarm group. You can insert line breaks
by pressing [Ctrl]+[Enter].PLC Engineering supports the
following placeholders, which are replaced by the actual
value at runtime:
<DATE> Date of the change to the present
status.
<TIME> Time of the last status change.
<EXPRESSION> Expression (defined within the alarm)
that triggered the alarm.

R911403764, Edition 08 Bosch Rexroth AG


770 / 1158 ctrlX PLC Engineering
Objects

<PRIORITY> Priority of the alarm (defined in the


alarm class).
<TRIGGERVALUE> Value that caused the alarm condition
* to become true.
<ALARMID> Alarm ID as displayed in the first
column of the alarm table.
<CLASS> Name of the alarm class (defined in the
alarm).
<ALLDEFAULT> Complete information about the alarm
is output.
<CURRENTVALUE> Actual value of the monitored variable.
*
<LATCH1> * Value of the first latch variable at the
time when the alarm was triggered.
<LATCH2> * Value of the second latch variable at the
time when the alarm was triggered.
<ALARM> TRUE in the case of the alarm status
'Active', FALSE with every other alarm
status.
<STATE> Alarm status: 0 = 'normal', 1 = 'active', 2
= 'waiting for ACK', 3 = 'active, acknowl-
edged' (still active and already acknowl-
edged)
* For <TRIGGERVALUE>, <CURRENTVALUE>, and <LATCHn>,
you can also use formatting specifications, such as those
that are valid for the C function "printf" (example: "The
value is <CURRENTVALUE %d>".
By default, only one column is available for message text.
You can add more columns from the context menu which
will be available in the “Data type” property for column
configuration of the “Alarm table” and “Alarm banner” visu-
alization elements.
“Min. pending Defines the minimum duration for fulfilling the alarm con-
time”: dition so that PLC Engineering triggers the alarm. In this
way, PLC Engineering can inhibit alarm conditions that
occur only for a short time.
IEC 61131 compliant format (example: t#2ms).

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 771 / 1158
Objects

“Latch var 1”, The latch variables are used to record additional values
“Latch var 2” when the alarm becomes active. A latch variable has to be
a scalar type (8-byte) or a STRING or WSTRING type.PLC
Engineering records a latch variable or a latch expression
when the alarm becomes active. In this way, it allows addi-
tional information about the alarm to be provided.
Note: With the respective configuration of the “Alarm
table” element or “Alarm banner” element, you can filter
the occurring alarms in the visualization by the contents of
the latch variable.
Example: When monitoring a motor speed, the temperature
and the current are additionally recorded.

User interface
By default, columns are available for two latch variables.
You can add more columns from the context menu which
will be available in the “Data type” property for column
configuration of the “Alarm table” and “Alarm banner” visu-
alization elements.
“Higher prio. When the alarm is triggered, it can be acknowledged by
alarm” triggering another alarm.
Example: A temperature monitor should issue a warning
at > 60 °C and an error at > 90 °C. If the temperature
rises, then the warning is displayed starting at 60 °C. At
90 °C and higher, the alarm for the error is triggered (this
automatically acknowledges the 60 °C warning).
Table 48: Monitoring types
“Digital”: “Expression”: Expression to be monitored. On the right
side of the expression for the comparison. In the center,
you select the desired comparison operator (“=” or <>).
“Upper limit”1): “Expression”: As described for “Digital”, but with the com-
pare options “>” or >= and optionally a “Hysteresis in %”.
“Lower limit”1): “Expression”: As described for “Digital”, but with the com-
pare options “<” or <= and optionally a “Hysteresis in %”.
“Inside range”1): “Expression”: Expression to be monitored.
“Range”: PLC Engineering triggers the alarm when the
monitored expression is within the range defined here. The
left field defines an expression for the lower limit of this
range. The right field defines an expression for the upper
limit. The expression to be monitored is displayed in the
field in-between. You have to set the comparison operators
accordingly. You can define a “Hysteresis in %” optionally.
“Outside range” : “Expression”: Expression to be monitored.
1)

“Range”: PLC Engineering triggers the alarm when the


monitored expression is outside the range defined here.
The left field defines an expression for the lower limit of
this range. The right field defines an expression for the
upper limit. The expression to be monitored is displayed
in the field in-between. You have to set the comparison
operators accordingly. You can define a “Hysteresis in %”
optionally.
“Change”: “Expression”: Expression to be monitored.PLC Engineering
triggers the alarm when its value changes.

R911403764, Edition 08 Bosch Rexroth AG


772 / 1158 ctrlX PLC Engineering
Objects

“Event”: In this case, the application triggers the alarm


(event alarm) by using functions from the library
AlarmManager.library.
1) For this observation type, you can monitor the specified expression as abso-
lute or relative. Absolute means that the limit value is defined by a fixed value
or a variable that returns a fixed value. Relative means that the limit value
depends on an expression; for example: upper limit: “Variable x >= 0.9 * y”.
“Hysteresis in %”: When you specify a hysteresis, the alarm condition is ful-
filled until a certain deviation from the specified limit value is reached. The
size of the deviation is specified as a percentage [%] of the limit value.
Example: Upper limit: i_temp >= 30 Hysteresis: 10%. The alarm is active
when the variable i_temp reaches or exceeds the value 30. The alarm is no
longer active if the value falls below 27.
The context menu includes the following commands for adding and removing
additional columns for messages and latch variables:
● “Add message column”
● “Remove message column”
● “Add latch var column”
● “Remove latch var column”
See also
● ⮫ Alarm Table in the Visualization
● ⮫ Chapter 33.2.9 Object 'Alarm Class' on page 766
● ⮫ Chapter 33.2.11 Object 'Alarm Storage' on page 772

Exporting and importing of alarms


In the context menu of the alarm table you will find commands for the export
and import of alarms to and from a CSV file:
● “Export Alarms”: The command opens the default dialog for saving a
file in the file system. The default file type is Alarm Group Export File
(*.csv). This way you can export the current alarm list to a CSV file.
● “Import Alarms”: The command opens the default dialog for searching for
a file in the file system. The default file type is Alarm Group Export File
(*.csv) for describing alarm definitions.

33.2.11 Object 'Alarm Storage'


In case of a reset (origin), PLC Engineering clears the
NOTICE
alarm storage file.
In “Alarm Storage”, you define the settings for the database file where PLC
Engineering saves the alarms that occur. You can insert the object only once
below an alarm configuration.
There is exactly one memory file located in a database. As an option, PLC
Engineering saves this file in a file directory on the controller. You cannot
change the name it is derived from the application name according to the fol-
lowing convention: <application name>.alarmstorage.sqlite. The alarm classes
and alarm groups define whether or not the memory file should be used.
“Subdirectory:” Name of a subdirectory on the PLC where PLC Engineering saves the
memory file (optional).
“No limit” No limit for the file size for the alarm storage.
“Maximum number of Number of recorded entries that PLC Engineering saves. When this
records” number is reached and a new entry is queued in the ring buffer, PLC
Engineering deletes the oldest entry.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 773 / 1158
Objects

“Maximum storage size” Maximum size of the memory file with specification of the unit. PLC
Engineering converts this size implicitly into an approximate maximum
number of entries that can be saved in the file (ring buffer).
“Circular buffer” For display purposes only (not editable).
: Memory in a circular buffer
: Memory in an unlimited buffer
The records that PLC Engineering saves in the database can be displayed in the
“Alarm Table” visualization element.
See also
● ⮫ Chapter 33.2.9 Object 'Alarm Class' on page 766
● ⮫ Chapter 33.2.10 Object 'Alarm Group' on page 768

User interface

Command 'CSV Export of Alarm Storage'


Function: This command opens the “Alarm Storage Export Configuration”
dialog box.
Call: Context menu of the “Alarm Storage” object.
Requirements: The application is in online mode with an alarm configuration.
An alarm storage is configured.
This command opens the “Alarm Storage Export Configuration” dialog box.

Dialog box 'Alarm Storage Export Configuration' - 'Basic Settings'


“Export file”: Path to the generated CSV file in the file system
Table 49: “Alarms to Export”
“Export all” All listed alarms are exported.
“Export alarms in Defined time range for the export of the listed alarms. This refers to
timestamp range the time stamp when the alarm was activated. The min./max. time
(timestamp activated)” stamps that are available in the alarm storage or were the last ones to
be used in an export are shown by means of "From" and Until".
When selecting the time range, the smallest unit is one second.
Table 50: “Language”
“Language” The drop-down list includes all languages that are available in text lists
for alarm texts, as well as the default language (<Standard>).

Dialog box 'Alarm Storage Export Configuration' - 'Advanced Settings'


Table 51: “Sort by Time Stamp Activated”
“Ascending” Sort order by the time stamp when the alarm was activated
“Descending”
Table 52: “File Format”
“Formatted values and The time stamps are formatted with the date and time format as
timestamps” defined below. REAL and LREAL values are formatted in number
format.
“Raw data from alarm The time stamps and values are written unformatted to the CSV file,
storage file” as they appear in the alarm storage. Alarms, alarm groups, and alarm
classes are written in non-readable form to the CSV file as internal IDs.
Table 53: “Formatting Options”
Defines the formatting of the entries in the CSV file. Possible only if the “Formatted values and
timestamps” data format is selected.
“REAL format (printf Setting: “%.1f”
syntax)”

R911403764, Edition 08 Bosch Rexroth AG


774 / 1158 ctrlX PLC Engineering
Objects

“Date format” The settings are applied from the system control.
“Time format” The settings are applied from the system control.
Table 54: “Separator”
“Semicolon” The entries in the CSV file are separated by a semicolon.
“Comma” The entries in the CSV file are separated by a comma.
“Tab” The entries in the CSV file are separated by a tab.
“Local time” Available only if the “Formatted values and timestamps” data format is
selected.
: The time stamps are written to the CSV file in local time.
: The time stamps are written to the CSV file in universal time coordi-
nated (UTC).

33.2.12 Object ‘Remote Alarms’


The object manages the remote alarm classes and groups.
For alarm management, this means that monitoring and alarm triggering is
done on the remote PLCs. The local alarm management communicates with the
remote PLCs via a data source management (over a proxy server) and therefore
recognizes the remote alarms. Then a visualization that is connected to the
local alarm management can display remote alarms. The user can operate and
acknowledge the alarms.
Update Opens the Update Alarm Classes and Groups dialog
described below.
Alarm Groups / Hierarchical representation of the alarm data of remote
Classes devices with their applications, alarm groups, and
classes. The remote devices are connected via the data
source management.
Map to Local List with an blank entry and the alarm classes of the
local alarm configuration:
● Blank entry: The remote display options of the
remote alarm class are used.
● <local alarm class>: The display options of the local
alarm class are used
Example: “Error”
Display options were specified (among other cri-
teria) in the definition of an alarm class.
Here you can specify whether the display options
set in the remote alarm configuration or the display
options of the local alarm configuration are applied.
The display options are required in the visualization
of the Alarm Table or Alarm Banner elements.

Dialog Update Alarm Classes and Groups


This dialog shows the current alarm definitions of the devices connected via
the data source management. The relevant data of the Alarm Class and Alarm
Group objects are retrieved.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 775 / 1158
Objects

Alarm Groups / Hierarchical representation of the alarm data of remote


Classes devices with their applications, alarm groups, and
classes. The remote devices are connected via the data
source management.
: The object (and its subordinate objects) are acti-
vated for alarm management.
OK Confirms the settings, updates the alarm data, and
closes the dialog.

33.2.13 Object 'Data Sources Manager'


Symbol:

User interface
This object is used as a node for subordinate data sources. At least one data
source must be available. An application with the data source manager commu-
nicates with remote devices.
Also refer to
● ⮫ Chapter 19.6 Data connection with data sources on page 241

Command “Add object” > “Data source”


Function: This command opens the “Add data source” dialog.
Call
● Menu “Project”
● Context menu in the “Devices” view of the PLC Engineering perspective
● Context menu in the “Data Sources” view of the “HMI” perspective
Prerequisite: The “Data source manager” object that you want to extend with a
data source is selected.

Dialog 'Add data source'


“Name” Example: Data_Source_A
“Select data source type” Data source type that fits the control configurations to establish com-
munication.
● “PLC Engineering Symbolic”:
Prerequisite: The local device is a CODESYS HMI.
The data is transmitted via symbolic monitoring. This requires that
symbols are configured in the symbol configuration of the remote
control application.
Note: As long as the symbol configuration is not affected after an
application change, you have the advantage that the application
does not have to be updated in the local device.
Tip: Use this communication link unless there are no resources for a
symbol configuration in the remote control.
● “PLC Engineering ApplicationV3”:
Data is transferred by means of the PLC Engineering address
protocol. This requires that the address information between the
remote PLC and the local device match. Otherwise a connection
cannot be established.
Advantage: A symbol configuration is not required in the remote
application.
Note: However, for changes to the remote application, the local
application (for example the HMI application) is updated!

R911403764, Edition 08 Bosch Rexroth AG


776 / 1158 ctrlX PLC Engineering
Objects

Tip: Use this communication for embedded or mini PLCs when


there are no available resources for the symbol configuration.
“Add” Opens the “Initialize data source - Provider settings” dialog. The con-
tents of the dialog depend on the selected data source type.
The remote controller should be running and the remote
NOTICE
controller application loaded and started.
Also refer to
● ⮫ Chapter 33.2.13 Object 'Data Sources Manager' on page 775
● ⮫ Chapter Tab 'Variables' on page 805

Dialog 'Initialize data source wizard - Provider settings' (at 'PLC Engineering
Symbolic')
The settings of this dialog are described in the following chapter: Object 'Data
source' - Tab 'Communication".
The dialog is used for the initial configuration of the connection when you
select “PLC Engineering Symbolic” as the data source type. The communication
takes place by means of symbolic monitoring. The configuration can be modi-
fied later in the editor of the data source on the “Communication” tab.
Also refer to
● ⮫ Chapter Tab 'Communication' via PLC Engineering Symbolic on page 808

Dialog 'Initialize data source wizard - Provider settings' (for 'PLC Engineering
ApplicationV3')
The settings of this dialog are described in the following chapter: Object 'Data
source' - Tab 'Communication".
The dialog is used for the initial configuration of the connection when you
select “PLC Engineering ApplicationV3” as the data source type. The communi-
cation takes place by means of address monitoring.
Also refer to
● ⮫ Chapter Tab 'Communication' via PLC Engineering ApplicationV3
on page 812

Dialog 'Initialize Data Source Wizard - Browse Data Source Variables'


The settings of this dialog are described in the "Object 'Data source'" chapter,
"Dialog 'Choose variables'".
Function: You can select the variables for data transmission from the variables
of the remote control. By clicking “Exit”, the data source is initialized and
the data types and variables (data interface) are declared below the folder
“DataSources_Objects”. You can modify the settings in the editor of the data
source object.
Call: Automatically
Also refer to
● ⮫ Dialog 'Choose Variables' on page 806

33.2.14 Object 'GlobalTextList'


Symbol:
This object is for the management and translation of texts that are written as
static text in visualizations in the project. It contains a table with these texts. If
you write a text in a visualization in an element under the property “Texts”, PLC
Engineering automatically adds a line in the table. You cannot write any new
text here, you can only edit an existing text.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 777 / 1158
Objects

In addition PLC Engineering makes the following commands available, in order


to consolidate the “GlobalTextList”:
● “Check Visualization Text IDs”
● “Update Visualization Text IDs”
● “Remove Unused Text List Entries”
The object is located in the POUs view and exists once at the most
“ID” Unambiguous identifier of the text
“Default” Source text as a character string with one formatting specification at
the most, for example Information A: %i possibilities. If no
translation is written under a language column , PLC Engineering uses
this text.

User interface
Double-click in the field in order to edit the text.
The table contains as many language columns as you have added. A language column is named with
a language code that you entered when creating the column with the command “Insert Language”.
“<Language code>” Name of the language as a language code, for example en-US. This
column contains the translation of the text that is written under
“Standard”.
If the language code is selected as a language in the visualization
manager, a visualization displays the translation during operation. A
running visualization can switch over during operation to another lan-
guage at the request of a user.
Double-click in the field in order to edit the text.
See also
● ⮫ Chapter Command 'Add Language' on page 1021
● ⮫ Chapter Command 'Create Global Text List' on page 1021
● ⮫ Chapter Command 'Import/Export Text Lists' on page 1022
● ⮫ Chapter Command 'Remove Language' on page 1023
● ⮫ Chapter Command 'Remove Unused Text List Entries' on page 1024
● ⮫ Chapter Command 'Check Visualization Text IDs' on page 1024
● ⮫ Chapter Command 'Update Visualization Text IDs' on page 1024
● ⮫ Chapter 33.2.24 Object 'Text List' on page 788
● ⮫ Chapter 18.8 Managing Text in Text Lists on page 137

33.2.15 Object 'GVL' - Global Variable List


Symbol:
A global variable list is used for the declaration, editing and display of global
variables.
A GVL is added to the application or the project by means of the “Project
🠂 Add Object 🠂 Global Variable List” command.
If you insert a GVL under an application in the Device tree, the variables are
valid within this application. If you add a GVL in the POUs view, the variables
are valid for the entire project.
You can apply settings for the editor of the object in the “Tools 🠂 Options”
dialog in the “Declaration Editor” and “Text Editor” categories.
If the target system supports network functionality, you can convert the varia-
bles of a GVL into network variables and thus use them for data exchange with
other devices in the network. To do this, define corresponding properties for
the GVL in the dialog “Properties”, tab “Network variables”.

R911403764, Edition 08 Bosch Rexroth AG


778 / 1158 ctrlX PLC Engineering
Objects

Also refer to
● ⮫ Chapter 18 Programming the application on page 129
● ⮫ Chapter “Properties”- “Network variables” dialog on page 1054
● ⮫ Chapter 33.4.26 'Options' dialog on page 1080

33.2.16 Object 'GVL' - Global Variable List (task-local)


Symbol:
A global variable list (task-local) is used for the declaration, editing and display
of global variables. For this special global variable list, the declared variables
in the list can be written by one task only. All other tasks have only read-only
access. This makes sure that the values of these variables are always consis-
tent, even for multicore projects.
The object is available for compiler version 3.5.13.0 with the corresponding
device description.

“Task with write access” Task that has exclusive write access to the variables.

See also
● ⮫ Chapter 18.16.7 Using Task-Local Variables on page 168
● ⮫ Chapter 18.16.6 Declaring Global Variables on page 167
● ⮫ Chapter 18.21.4 Multicore on page 209
● ⮫ Chapter 33.2.15 Object 'GVL' - Global Variable List on page 777
● ⮫ Chapter ‘Task group’ tab on page 865

33.2.17 Object 'Persistent variable list'


Symbol:
The object contains the declaration of global persistent variables in the declara-
tion section VAR_GLOBAL PERSISTENT RETAIN .. END_VAR. The variables
are stored in special non-volatile memory.
The persistence editor shows the variables as a list in the usual way. The dis-
played list does not influence the persistence behavior of the variables, but
only the list stored internally in the process image. The list there contains all
variables ever declared in chronological order. Variables that you have removed
are marked with a placeholder and continue to exist as a gap.
The declaration section can also contain instance paths, which refer to
locally declared persistent variables and were created with the command
“Declarations 🠂 Add All Instance Paths”.
Before you decide how to set up persistence for an appli-
NOTICE
cation, it would be helpful for you to be familiar with the
use cases described in the “Data Persistence” section.
Moreover, it is helpful if you can differentiate between
the mechanisms of persistent variables, retain variables,
variables of the Persistence Manager, and recipe varia-
bles.

Commands
The following commands are provided in the persistence editor:
● Command “Declarations 🠂 Add All Instance Paths”
● Command “Declarations 🠂 Reorder List and Clear Gaps”

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 779 / 1158
Objects

See also
● TODO
● ⮫ Chapter "Rearrange list and clean gaps” command on page 1013
● ⮫ Chapter 18.22.5 Preserving Data with Persistent Variables on page 214
● ⮫ Chapter 18.22.6 Preserving Data with Retain Variables on page 217
● ⮫ Chapter Command 'Add all instance paths' on page 1014

33.2.18 "Image pool” object


The “Image Pool” object contains a table with image ID assignments.
“ID” ID of the image. Use this ID to reference the image in the visualization
for example.

User interface
“File name” File path of the image file. Click on to open the “Select image”
dialog.
“Image” Show a thumbnail of the image.
“Link type” Opens the “Select image” dialog. The type of linking is defined there.

"Select image” dialog


“Image File” Directory and name of the image file, e.g. “C:\Pro-
grams\images\logo.bmp". PLC Engineering supports BMP, EMF, GIF,
ICO, JPG, PNG, SVG and TIFF image formats. Please note that a con-
trol does not support all formats.
Whether or not you can use images formatted as scalable vector
graphics (*.svg) depends on the operating system. Any necessary infor-
mation is located in the device description of the hardware vendor.
Tip: It is recommended to use only images in SVG format where the
aspect ratio of width to height corresponds to the aspect ratio of the
view box value. Otherwise, an unexpected display may occur.
Table 55: “File Handling”
“Remember the link” Only the link is saved. This automatically updates a change to the
image file in the image collection.
You must ensure that the path of the image file does not change.
When saving the project as an archive, the image file is embedded in
the project archive.
“Remember the link and The image in the image collection is copied, but the link information is
embed into project” retained.
This facilitates the detection of changes to the image file so that an
update of the image in the image collection can be made if required.
The behavior is controlled with the options in the next table.
Note: Embedded image files increase the memory requirement of the
project.
“Embed into project” The image is added to the image collection.
If the image file is changed again afterwards, then it is not updated in
the project. For libraries, you must embed the image in the project.
Note: Embedded image files increase the memory requirement of the
project.
Table 56: “Change Tracking”
These options are only available if the “Remember the link and embed into project” checkbox is
selected as described above.
“Reload the file The image file is automatically updated in the project without any
automatically” prompts.

R911403764, Edition 08 Bosch Rexroth AG


780 / 1158 ctrlX PLC Engineering
Objects

“Prompt whether to reload If the image file has changed, you may be prompted whether or not the
the file” image file should be updated.
“Do nothing” The image file in the image collection is not updated.
Also refer to
● ⮫ Chapter 18.9 Using Image Pools on page 144

33.2.19 "Library manager” object


Symbol:
The Library Manager lists all libraries that were integrated in the project for
creating applications. It provides information about the type of library, its prop-
erties, and its contents.
You can expand or collapse the list of integrated libraries, as well as edit library
properties for non-dependent libraries.
The Library Manager consists of three views:
● Upper window section: Lists the integrated libraries
● Lower left pane: Tree structure with all function blocks of the library
selected above
● Lower right pane: Documentation for the library function blocks selected in
the tree
Also refer to
● ⮫ Chapter 27 Using libraries on page 329

List of the integrated libraries


List of all libraries integrated in the project. If a library depends on other
libraries, then these referenced libraries are automatically integrated.
Displayed in gray fonts The library was added to the project automatically by means of a plug-
in.
Displayed in black fonts The library was added to the project automatically by means of the
“Add library” command.
“Name” Display of the integrated library in the following syntax:
“<PlaceholderName> = <LibraryName>, <Version> (<Company>)”:
“<PlaceholderName>”: If the library is a placeholder library, the place-
holder name precedes a “ = . ”.
“<LibraryName>”: Name of the library that is used for management in
the library repository.
“<Version>”: Version referenced upon its first integration.
“(<Company>)”: Provider (optional)
“Namespace” Namespace for unique access to the contents of the library.
It is prepended to a module identifier for this purpose:
<Namespace>.<LibraryFunctionBlockID>
The namespace usually coincides with the library name.
Note: If the library has the property LanguageModelAttribute
"qualified-access-only", you must access the library function
blocks in the application code via the namespace. Qualified (unique)
access is enforced.
Modify the standard namespace for local use (within the project) in
the “Properties” dialog.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 781 / 1158
Objects

“Effective version” Version of the library after the resolution.


This library version is used in the application.
Prerequisite: The library manager is in the “Devices” view and a place-
holder library is selected.
Example: 3.5.10.0
Symbol with tooltip to notify about the current device-dependent reso-
lution of the selected library.
Example, when the library manager is in the “Devices” view: “This
placeholder is explicitly redirected to this version (see Placeholder
dialog)”
Example, when the library manager is in the “POUs” view: “In device

User interface
'Device_1', this placeholder is resolved to 'VisuElemsAlarms, 1.0.0.0
(system)”
A placeholder library included in the “POUs” view is resolved as fol-
lows: Depending on the application, it is checked whether a resolution
is specified in the device description. Afterwards, the library profile
is checked. The first detected resolution is used. If you have assigned
a special resolution to the placeholder library in the “Placeholders”
dialog, then this will always be ignored. The result is displayed in the
tooltip of the symbol.
Library signed with a trusted certificate; compatible with PLC Engi-
neering >= V3 SP15
Library that is signed with a trusted certificate, but references at least
one unsigned library
Library signed with a private key + token is compatible with PLC Engi-
neering < V3 SP15
Library that is not signed, or signed with an untrusted or expired cer-
tificate. In the case of an untrusted certificate, the “Trust Certificate”
command is provided in the context menu.
Library that is defined as optional and not currently available
Library whose status is being determined
Licensed library for which no valid license is currently available
Library symbol for a library that cannot be loaded because its signa-
ture (encryption) could not be verified
Table 57: Commands in the library manager
“Add Library” Opens a dialog to select a library. All libraries installed in the library
repository are offered.
“Delete Library” Removes the presently selected library from the project
“Properties” Opens the dialog for the display and editing of the properties of the
presently selected library
“Details” Opens a dialog with details for the presently selected library (general
information, contents, properties, license information)
“Try to Reload Library” If you select a library marked as not found, you can attempt to load it
into the project again using this command.
“Download Missing Opens a dialog that displays the libraries marked as missing in the
Libraries” library manager.
PLC Engineering scans for the missing libraries in the download
servers specified in the project options. Following the download, the
missing libraries are installed automatically.
As long as this dialog is open, the newly installed libraries can be
uninstalled again.

R911403764, Edition 08 Bosch Rexroth AG


782 / 1158 ctrlX PLC Engineering
Objects

“Placeholders” The “Placeholders” dialog opens. The current resolution is displayed


and you can edit them here.
“Library Repository” Opens the “Library Repository” dialog for installing and uninstalling
libraries and for defining library locations
“Icon legend” Opens the “Information” dialog with a legend of the icons that display
the current status of a library in the list of integrated libraries (see
above)
“Summary” Opens the “Library summary” dialog. In the dialog, all libraries refer-
enced in the project are displayed in a tree structure and those libra-
ries that reference these libraries.
● “Show all occurrences in the library hierarchy and close the dialog”:
In the library manager editor, the libraries that reference or use this
library are highlighted in the open tree structure. The prerequisite is
that a library is selected. The “Information” dialog is closed.
This command is also executed when double-clicking on a library.
Display of libraries
● “Managed library”: Library name and version
● “Number of occurrences”: Number of positions where this library is
referenced by other libraries
When clicking on “+” in a library, the next subordinate level displays
the libraries that reference that library.
“Trust Certificate” Only in the context menu of a library selected in the Library Manager,
in which the library has been signed with an untrusted certificate. The
command turns the untrusted certificate into a trusted certificate and
the prepended icon changes from to .
“Export library” Only in the context menu of a library selected in the library manager:
Opens the standard dialog for saving the library file to the file system
Also refer to
● ⮫ Chapter Command 'Add Library' on page 1007
● ⮫ Chapter Command 'Export Library' on page 1011
● ⮫ Chapter Command 'Properties' on page 1008
● ⮫ Chapter Command 'Library Repository' on page 969
● ⮫ Chapter 'Placeholder' command on page 1010
● ⮫ Chapter Dialog 'Options' – 'Library Download' on page 1093

Tree structure of all function blocks of a selected library


All library function blocks that were integrated with the library are listed in the
tree structure.
Prerequisite: A library is selected in the upper view.
The usual sorting and search functions are available in the menu bar.

Documentation for the library function block selected in the lower left view
Tab “Inputs/Outputs” Interface (inputs/outputs) of the library function block
Tab “Graphical” Graphical display of the interface

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 783 / 1158
Objects

Tab “Documentation” Documentation for the library module.


Note: As a library developer, comply with the rules for documentation
submission in the "Library Development Guidelines".
“Library parameters” tab Prerequisite: The library project contains an object with library param-
eters.
The Open configuration dialog command is located on the tab. The
command opens the dialog:⮫ Dialog 'Library Parameters'
Also refer to
● ⮫ Chapter 27.3 Information for library developers on page 330

33.2.20 Object 'Network Variable List (Sender)'

User interface
Symbol:
A network variable list (sender) is used for declaring and listing global variables
that should be sent to network variable lists (receiver) of other devices or
network projects.
You add the object to the device tree by clicking “Add Object 🠂 Network
Variable List (Sender)” of an application.
You can configure the protocol and transmission parameters in the “Add
Network Variable List (Sender)” dialog or in the “Properties” dialog of the
object in the “Network variables” tab.

'Add network variable list (sender)' dialog


Function: This dialog defines the network properties for the sender NVL. When
you close the dialog, PLC Engineering adds the sender NVL of the application
to the device tree.
Call: Command “Project 🠂 Add object 🠂 Network variable list (sender)” if the
application object is selected in the device tree.
The dialog corresponds to the “Network Variables” tab in the “Properties” of
the network variable list object.
Also refer to
● ⮫ Chapter 19.5 Network variables on page 238
● ⮫ Chapter “Properties”- “Network variables” dialog on page 1054
● ⮫ Chapter 33.2.21 Object 'Network Variable List (Receiver)' on page 783
● ⮫ Chapter 19.5.2 Configuring a Network Variable Exchange on page 239

33.2.21 Object 'Network Variable List (Receiver)'


Symbol:
The object lists the received network variables and displays the information:
Network information and transmission information and sender.
You add the object to an application by clicking “Add Object 🠂 Network
Variable List (Receiver)”.
The Network Variable List (receiver) shows the received network variables. The
received network variables were declared in the Network Variable List (sender)
of another device or project. You cannot change the network variables in the
object editor.
The object editor consists of two parts:
● Information about the sender and transfer log of the list
● List of declarations of network variables

R911403764, Edition 08 Bosch Rexroth AG


784 / 1158 ctrlX PLC Engineering
Objects

Dialog 'Add Network Variable List (Receiver)'


Function: The dialog defines the receiver NVL to a sender NVL and adds the
receiver NVL to the application object in the device tree.
Call: Menu command “Project 🠂 Add object 🠂 Network variable list (receiver) ”
if the application object was selected.
“Task” Task of the current application that controls the variables to
be received.
“Sender” List box
● Available sender NVLs of another device in the project
● “Import from file”: Required if the necessary sender NVL
is defined in another project. For this, the necessary
sender NVL must have been generated in another project
as “GVL export file *.gvl” in the properties dialog of the
NVL in the “Link To File” tab.
“Import from file” File name in “GVL export file *.gvl” format if you have
selected “Import from file” for “Sender ”.

Also refer to
● ⮫ Chapter 19.5 Network variables on page 238
● ⮫ Chapter 19.5.2 Configuring a Network Variable Exchange on page 239
● ⮫ Chapter 33.2.20 Object 'Network Variable List (Sender)' on page 783

33.2.22 Object 'Recipe Manager'


Tab 'Storage'
The recipe manager provides functions for maintaining user-defined variable
lists, known as recipe definitions. The recipe definitions can be stored in recipe
files on the PLC.
“Storage Type” “Textual”: PLC Engineering saves the recipe in a readable Format with
the configured columns and delimiters.
“Binary”: PLC Engineering saves the recipe in a non-readable binary
format. This format requires less storage space.
Note: You can read binary recipes again only if you have not changed
the variable lists.
“File path” <directory name>\
Example: AllRecipes\
Path on the runtime system
Notes:
● The path has to end with a backslash ("\").
● The path is usually a relative path on the target system in the direc-
tory of the runtime files (PlcLogic).
● Access to paths outside of the directory PlcLogic is not permitted
on every controller. An absolute path for Windows systems can be
selected by pressing the button.
Example of the file path in the runtime system: PlcLogic/AllRecipes
PLC Engineering saves a file in this directory for each recipe when
downloading to the PLC. The requirement is that you select the
“Recipe management in the PLC” option.
The files are loaded to the recipe manager each time the application is
restarted.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 785 / 1158
Objects

“File extension” File extension for the recipe file in the format .<file extension>
The resulting default name for recipe files is in the form
<recipe>.<recipe definition>.<file extension>.
“Separator” Delimiters between the individual values in the saved file
“Available Columns” Defines the information that is saved and in which order in the recipe
“ Selected Columns” file
“Save as Default” PLC Engineering uses the settings on the tab throughout the entire
project for all other recipe managers.

Tab 'General'
“Recipe management in the : Has to be selected for the user program or visualization elements to

User interface
PLC” load recipes at runtime. If you transfer recipes to the PLC exclusively
via the PLC Engineering program interface, then you can clear this
option.
Table 58: “Save Recipe”
“Save recipe changes to When “Recipe management in the PLC” is selected, there is the fol-
recipe files automatically” lowing option for saving the recipe:
: We recommend this option because it helps the recipe manager
operate "normally". The recipe files on the PLC are updated automati-
cally at runtime whenever a recipe is changed.
Table 59: “Load Recipe”
When “Recipe management in the PLC” is selected, there are the following two options for down-
loading from the PLC:
“Download only for exact : The recipe is only downloaded if the file on the PLC con-
match of the variable list” tains all variables from the variable list of the recipe definition
of the application and these are sorted in the same order. Addi-
tional entries at the end are ignored. If the required match does
not exist, then the error status ERR_RECIPE_MISMATCH is set
(RecipeManCommands.GetLastError).
“Download variables with : The recipe values are downloaded only for those variables that have
matching names” the same name in the recipe definition of the application as in the
recipe file on the PLC. If the variable lists differ in composition and
sorting, then no error status is set.
In this way, recipe files can also be downloaded if variables in the file
or in the recipe definition have been deleted.
“Overwrite existing recipes : If recipe files with the same name exist on the controller, then they
on download” are overwritten with the configured values from the project when the
application is started. If the values from the existing recipe files should
be loaded instead, then this option has to be disabled.
Requirement: The “Storage Type” is “Textual” and the “Save recipe
changes to recipe files automatically” option is selected.
Table 60: “Write Recipe”
The following options are available for writing recipe values to the variables on the PLC:
“Limit the variable to : If the recipe contains a value that is outside of the value range
min/max when recipe value specified in the definition, then the defined minimum or maximum
is out of the range” value is written to the PLC variable instead of this value.
“Do not write to a variable : If the recipe contains a value that is outside of the value range
when the recipe value is specified in the definition, then no value is written to the PLC variable.
out of the min/max range” It retains its current value.

R911403764, Edition 08 Bosch Rexroth AG


786 / 1158 ctrlX PLC Engineering
Objects

Table 61: “Read Recipe”


The following option is available for reading recipe values from the PLC into the recipe in the
project:
“Check recipe for changes” Always use the function block RecipeManCommands from
RecipeManagement.library to read recipes. Never call the method
cyclically. This is because each call can be written to the file system,
which is time-intensive and burdens the controller. For example, a
Raspberry Pi has a limited number of write cycles.
: With each method call, the current PLC variable values are first
read into the recipe. Then the system checks whether the values have
changed. Only if the values have changed is the recipe saved. This
means that the recipe file is overwritten with the current recipes.
The option can be used in order to update the recipe file in the local
file system only if recipe values have changed on the PLC. However, it
affects performance because it generates additional code for checking.
: With each method call, the current PLC variable values are first
read into the recipe. Then the recipe is written to the recipe file in the
local file system.
Note: As the file system is written to each call, the controller can be
very burdened.

Recipes during online mode


Table 62: Option “Save recipe changes to recipe files automatically” is selected.
Menu commands Behavior of the recipes Behavior of the defined
defined in the project recipes at runtime
“Online 🠂 Reset Warm” The recipes of all Dynamically generated
“Online 🠂 Reset Cold” recipe definitions are recipes remain
downloaded with the unchanged.
“Online 🠂 Download”
values from the current
projects.
“Online 🠂 Reset Origin” The application is removed from the PLC. If a down-
load is done again afterwards, then the recipes are
restored as for an online reset warm.
Shutdown and restart of After a restart, the recipes are downloaded again
the PLC from the automatically created files. This will restore
the same state as before shutdown.
“Online 🠂 Online The recipe values remain unchanged. In runtime
Change” mode, a recipe can be changed only via the function
block command RecipeManCommands.
“Debug 🠂 Stop” The recipes remain unchanged when the PLC is
“Debug 🠂 Start” stopped or started.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 787 / 1158
Objects

Table 63: Option “Save recipe changes to recipe files automatically” is not
selected.
Actions Recipes defined in the Recipes defined at run-
project time
“Online 🠂 Reset Warm” The recipes of all Dynamically generated
“Online 🠂 Reset Cold” recipe definitions are recipes are lost.
downloaded with the
“Online 🠂 Download”
values from the current
projects. However, these
are set in the memory
only. To save recipes to a
file, you have to run the

User interface
“Save Recipe” command
explicitly.
“Online 🠂 Reset Origin” The application is Dynamically generated
removed from the PLC. recipes are lost.
When a download is per-
formed afterwards, the
recipes are restored.
Shutdown and restart of After the restart, the recipes are downloaded again
the PLC from the automatically created files. This will restore
the same state as before shutdown.
“Online 🠂 Online The recipe values remain unchanged. In runtime
Change” mode, a recipe can be changed only via the function
block command RecipeManCommands.
“Debug 🠂 Stop” The recipes remain unchanged when the PLC is
“Debug 🠂 Start” stopped or started.

See also
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter 'Read and save recipe' command on page 1020
● ⮫ Chapter 33.2.23 Object 'Recipe Definition' on page 787

33.2.23 Object 'Recipe Definition'


In the recipe definition (1), you define different data sets for the variables,
which are termed recipes (2).
You can toggle the display of the recipe definition between the flat list view
(3) and the structured view (4). In the structured view, PLC Engineering groups
variables according to structure.

“Type” Entered automatically


“Name” Optional
“Minimal Value” If the variable value is less than the “Minimal Value” or greater than the
“Maximal Value” “Maximal Value”, then PLC Engineering sets the value to the “Minimal
Value” or “Maximal Value”.

R911403764, Edition 08 Bosch Rexroth AG


788 / 1158 ctrlX PLC Engineering
Objects

“Comment” Additional information, for example the unit of the value.


“Current Value” Current variable value; not shown in online mode
Table 64: “Additional commands in the context menu in the structured view”
“Add Sibling” Adds a sibling variable to the recipe definition.
“Add Child” Adds a child variable to the recipe definition.
See also
● ⮫ Chapter 22.2 Changing values with recipes on page 287

33.2.24 Object 'Text List'


Symbol:
This object is used to create, manage, and translate texts. It contains a table
with texts where you can add new texts. You can select a text which you
have composed here can be selected in a visualization in the “Dynamic texts”
property of an element. In runtime mode, the visualization displays this text
dynamically in the selected language.
When the object is assigned to an alarm group and is located below the “Alarm
Configuration” object, PLC Engineering adds the texts of the alarm group to the
table. You can also add texts.
“ID” Unique identifier of the text
“Standard”: Source text as character string (example: Information A: %i
options). Use the keyboard shortcut [Ctrl]+[Enter] to add a line
break.
Double-click in the field to edit the text.
The table contains as many language columns as you want to add. A language column is named
with a language code that you specified when you created the column by means of the “Insert
Language” command.
“<language code>” Name of the language as a language code. Example: en-US. This
column contains the translation of the text which is composed under
“Standard”. Under the condition that the language code is selected
as the language in the visualization manager, a visualization displays
the translated text in runtime mode. If a translation has not been com-
posed, then PLC Engineering uses the text under “Standard”. A visuali-
zation in runtime mode can also change the language if requested by a
user.
Blank line Edit the line to add your own text.
See also
● ⮫ Chapter 18.8 Managing Text in Text Lists on page 137
● ⮫ Chapter 33.2.14 Object 'GlobalTextList' on page 776
● For descriptions about alarm management and alarm visualization, see the
help for CODESYS Visualization.

33.2.25 "Symbol configuration” object


You can use the symbol configuration for creating symbol descriptions for
project variables. Click “Project 🠂 Add Object” to add a symbol configuration
object to the device tree. Then define specific presets. See below: “Add symbol
configuration” dialog.
Double-click on the “Symbol configuration” object to open the symbol configu-
ration editor.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 789 / 1158
Objects

Dialog 'Add Symbol Configuration'


Function: This dialog box is used for defining presets for a “Symbol
Configuration” object.
Call: Menu “Project 🠂 Add object 🠂 Symbol configuration”, context menu of
the Application object.
“Include comments in XML” Exports the symbol file with the comments assigned to the variables.
“Support OPC UA Note: Availability and editability of this option depend on the device.
functionalities” : When downloading the symbol configuration, additional informa-
tion is also downloaded to the control required to operate the OPC UA
server:
● Basic types of derived function blocks

User interface
● Contents of attributes assigned via compiler pragmas
● Scopes (example: VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT)
Table 65: “Client side data layout”
For detailed information and examples of layout options, see the next section "Symbol Configura-
tion Editor".
“Compatibility layout” This setting is used for the compatibility of old projects. The data
layout created for the client is adjusted as much as possible to the
layout created internally by the compiler.
“Optimized layout” Recommended for new projects. Calculates the output layout in opti-
mized form detached from the internal compiler layout. Does not
generate any gaps for unpublished elements and strictly fulfills the
requirements for memory alignment of the data types. Requires com-
piler version 3.5.7.0 or later.

Symbol configuration editor


The editor includes a table with selected variables and a menu bar for editing.
Table 66: Menu bar
“View” You can use this button for activating and deactivating the following
categories of variables used in the configuration editor:
● “Unconfigured from project”: Variables that have not been added
to the symbol configuration, but are provided in the project.
● “Unconfigured from libraries”: Variables that have not been added
to the symbol configuration, but are provided in the included libra-
ries.
● “Symbols exported via attributes”: The filter causes variables to
be listed that are already marked for export to the symbol file via
the pragma attribute {attribute 'symbol' := 'read'}. These
symbols are marked in gray. The “Attribute” column shows which
access rights are set by the pragma.
“Build” Building the project. Requirement for current preparation of variables
in the configuration editor.

R911403764, Edition 08 Bosch Rexroth AG


790 / 1158 ctrlX PLC Engineering
Objects

“Settings” ● “Support OPC UA features”:


Note: Availability and editability of this option depend on the
device.
: When downloading the symbol configuration, additional data
is loaded to the control required to operate the OPC UA server.
Currently, it includes the following information:
– Basic types of derived function blocks
– Contents of attributes assigned via compiler pragmas
– Scopes (example: VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT)
● <!> “Include comments in XML”
: Exports the symbol file with the comments assigned to the vari-
ables.
● “Include Node Flags in XML”
: The namespace node flags provide additional information about
the origin of a node in the namespace. The node flags always in
the symbol table when OPC UA is activated. However, its inclusion
in the XML file can be deactivated as some defective parsers have
problems with it.
● “Configure Comments and Attributes”
Opens the “Comments and Attributes” dialog. Here you configure
the details of what should be included in the symbol configuration
and XML file with respect to comments and attributes.
● “Configuring synchronization with IEC tasks”:
Opens the dialog “Properties - <device name>”, “Options” tab.
This setting allows for the symbolic clients (e.g. visualizations
or database links based on the PLCHandler) to have consistent
read/write access synchronized with the IEC tasks. For a detailed
description of this setting, see the "Setting: Configuring Synchroni-
zation with IEC Tasks" section below.
Note: The variable access synchronous to the IEC tasks can increase
the jitter for all IEC applications on this device! Synchronized con-
sistent access can interrupt the real-time capability.
● List box for defining the data layout type for the client of the
symbol configuration:
Note: Refer to the section "Example of data layout types" at the end
of this help page.
– “Optimized layout”: Recommended for new projects. Calculates
the output layout in optimized form detached from the internal
compiler layout. Does not generate any gaps for unpublished ele-
ments and strictly fulfills the requirements for memory alignment
of the data types. Requires compiler version 3.5.7.0 or later.
– “Compatibility layout”: This setting is used for the compatibility
of old projects. The data layout created for the client is adjusted
as much as possible to the layout created internally by the com-
piler.
Due to the configuration possibilities of the symbol configuration
which have grown over time, problematic offsets can still occur.
Causes of offsets
Memory gaps due to internal pointers or references in func-
tion blocks and structure components that are not released for
symbol configuration.
Memory gaps that occur differently in 32-bit and 64-bit systems
depending on the data type, such as __XINT / __XWORD .

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 791 / 1158
Objects

Fields that are at uneven addresses. Some clients are not set up
for this.
Unintentional memory misalignment, which occurs when using
the attributes 'pack_mode' or 'relative_offset'.
● “Use empty namespaces by default (V2 compatible)”: Required
when using a PLC Engineering V2-compatible OPC server configura-
tion.
: Identical behavior as in PLC Engineering V2.3.
– Program variables are exported without application name
(Application.PLC_PRG.MyVar --> PLC_PRG.MyVar
– Global variables are additionally exported without the name of
the GVL(Application.GVL.MyGlobVar --> .MyGlobVar

User interface
● “Activate Direct I/O Access”: WARNING: This feature is potentially
dangerous and not intended for operation in production. Activate
only for error checking and tests, or when commissioning the
machinery (for example, for checking cables connections).
: In the symbol configuration, you can also use access to
direct I/O addresses that correspond to IEC syntax (for example,
"%IX0.0"). Access to input addresses (I) is read-only*. Access to
output addresses (Q) and memory addresses (M) can be read-
write.
*Info: In simulation mode, write access to symbols is also possible
for input addresses.
Because external clients for protocols such as OPC or OPC UA
do not always support IEC syntax for direct addresses, access is
also provided using an array syntax in the namespace __MIO of the
implicit code. For example, you can also access __MIO.MIO_IX[2].x3
instead of %IX2.3.
However, the symbols for array access are hidden in browsers
because some clients cannot handle the large number of nodes
(several thousand depending on the size of the I/O ranges).
● “Support Calls of Functions, FBs, Methods, and Programs”:
Note: Availability and editability of this option depend on the
device.
: The access rights “execute” can be set in the symbol table
for symbols of blocks of type function, function block, method, or
program. The “Support OPC UA features” option also has to be
selected in the “Settings”.
● “Include Call information in XML”:
: The information about called functions, function blocks,
methods, or programs is also listed in the XML file of the symbol
configuration. The option is enabled only if the “Support calls of
functions, FBs, methods, and programs” option is supported by the
device.
● “Enable Symbol Sets”:
: A toolbar with buttons and a list box is displayed above the
symbol table. You can use this to configure symbol sets for client-
specific assignment of access rights to the controller. See below for
more information: "Symbol group configuration toolbar".

R911403764, Edition 08 Bosch Rexroth AG


792 / 1158 ctrlX PLC Engineering
Objects

“Download” If you use a device that supports its own application file for the symbol
configuration, then this button is also available in the toolbar. If you
have changed the symbol configuration in online mode, you can use it
to immediately load the new <application name>._Symbols file
onto the control.
“Tools” “Save xml schema file”: The command opens the standard dialog for
saving a file in the file system. With this command, you can prepare
the XSD format of the symbol file, for example for use in external
programs.
Table 67: Symbol table
“Access rights” You can change the access rights for a symbol by clicking the symbol in
the “Access Rights” column.
Icons for access rights (in ascending order)
● : Read only
● : Write only
● : Read and write
● : Execute
These rights allow for executing access to functions, function
blocks, methods, and programs.
Requirements for assignment: The device provides the options
“Support calls of functions, FBs, methods and programs” and
“Support OPC UA features”. Both options are activated in the
“Settings”.
Note: In case the control has a user management, you can use symbol
sets to define client-specific access rights to the same symbols.
“Maximum” Maximum access rights for this symbol
“Attribute” If the access right was assigned by attribute, then a corresponding
icon is displayed here.
“Type” Alias data types are also displayed In PLC Engineering V3.5 SP6 and
later. Example: MY_INT : INT for a variable declared with the data
type MY_INT (type INT).
“Member variables” You can add variables of a structured data type also by selecting a
check box for symbol configuration in the “Symbols” column. This
causes PLC Engineering to export all member variable symbols. How-
ever, in the “Members” column, you can click the ellipsis button
( ) to select only specific structural components. Note: This selec-
tion applies to all instances of this data type for which symbols are
exported. If a member of a structured type cannot be selected, then
an asterisk ( ) is displayed in the check boxes of the members to
indicate that all exportable members of that type are exported.
Table 68: Toolbar for symbol set configuration
“List box” Already defined symbol sets
“Add New Symbol Set” Opens the “Add New Symbol Set” dialog for specifying a name for this
set
“Add Duplicate from Opens the “Add Duplicate from Selected Symbol Set” dialog. A copy is
Selected Symbol Set” created for the set selected in the list box. You can change the default
name (<group name>_Duplicate).
“Rename Selected Opens the “Rename Selected Symbol Set” dialog for specifying
Symbol Set” another name for the set selected in list box.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 793 / 1158
Objects

“Delete selected Symbol Opens a dialog prompting whether or not the symbol set selected in
Set” the list box should be deleted.
“Configure Symbol Rights” Opens the “Symbol Rights” tab of the device editor. When logged
in there, you can assign different access rights for each user group
(client) to the symbol set selected in the list box.
Also refer to
● ⮫ Chapter 33.1.6 Tab 'Symbol Rights' on page 737

Dialog 'Comments and Attributes'


Table 69: “Symbol Table Contents”
“Enable extended OPC UA Note: Availability and editability of this option depend on the device.

User interface
information” : Additional information that can be evaluated by OPC UA servers
is included in the symbol table. This includes inheritance information
of user-defined data types and the namespace node flags. Additional
information, such as comments and attributes, can also be included if
the OPC UA setting is active.
When the OPC UA setting is enabled, attributes are included in the
symbol table according to the following rule:
● In compiler versions V3.5.5.0 to V3.5.7.X, all attributes are included
according to the “Match simple identifiers” setting.
● In compiler version V3.5.8.X, all attributes are included according to
the setting “Include all attributes”.
● In compiler version V3.5.9.0 and later, you can customize the attrib-
utes that are included.
“Include comments” Prerequisite: “Enable extended OPC UA information” is enabled.
“Include attributes” : Comments and attributes are also saved in the symbol table.
“Also include comments Prerequisite: “Include comments” is enabled.
and attributes for type : The information for type nodes is also included (user-defined types,
nodes” such as STRUCT and ENUM elements).
: Only directly exported variables have comments and attributes.
Table 70: “XML symbol file contents”
“Include namespace node : The namespace node flags provide additional information about the
flags” origin of a node in the namespace. The node flags always in the symbol
table when OPC UA is activated. However, its inclusion in the XML file
can be deactivated as some defective parsers have problems with it.
“Include comments” : Comments can also be saved in the XML file.
In compiler versions V3.5.5.x to V3.5.8.0, this includes the setting
“Prefer docu-comments”.
“Include attributes” : Attributes can also be saved in the symbol file.
“Also include comments Prerequisite: “Include comments” is enabled.
and attributes for type : The information for type nodes is also included (user-defined types,
nodes” such as STRUCT and ENUM elements).
: Only directly exported variables have comments and attributes.

R911403764, Edition 08 Bosch Rexroth AG


794 / 1158 ctrlX PLC Engineering
Objects

Table 71: “Select Comments”


Prerequisite: “Include comments” is enabled
“Include docu comments”
“Normal comments”
“Always include both types
of comments” The options determines the comments that are saved in the symbol
“Prefer docu comments, configuration.
fallback to normal ones”
“Prefer normal comments,
fallback to docu comments”
Table 72: “Filter Attributes (Case-Insensitive)”
Prerequisite: “Include attributes” is enabled
“Include all attributes” Defines the attributes that are saved in the symbol configuration.
“Include attributes starting
with”
“Filter attributes with
regular expression”
“Match simple identifiers” Exists primarily due to the backward compatibility to older versions in
order to emulate the old behavior.

Setting: Configure synchronization with IEC tasks


For the synchronous consistent access, it is first waited in the runtime system
when processing a read or write request from the symbolic client until a point
in time is found at which no IEC tasks is executed. When this gap is detected,
restarting the IEC tasks is prevented until all values of the variable list have
been copied. Then the IEC tasks are planned again as usual. Synchronized
access can cause a delayed starting of IEC tasks, which is shown as increased
jitter. As all applications in the runtime system are managed by a common
scheduler, this potential impairment of the real-time behavior affects all appli-
cations on the device. All applications of the device are affected, regardless
of whether or not they include a symbol configuration or they have been down-
loaded to the controller from one or more PLC Engineering projects. Thus,
the runtime system only allows the synchronized consistent access if all appli-
cations loaded to the control when accessed, allow this access.
The setting is located in the editor of the symbol configuration of the “Settings”
menu. In addition, the setting is also located in the context menu of the con-
troller when you click the “Properties” command and then select the “Options”
tab in the opened dialog.
For applications without symbol configuration, the setting can only be found in
the properties dialog.
After changing the setting, all applications downloaded
NOTICE
to the device by means of a download or online change
have to be reloaded and all boot applications updated.
When is a synchronized consistent access required?
Generally, consistent values are not required for visualized values, as it is
mostly not relevant for changing values from which IEC task cycle they origi-
nate. Not in case of rarely changing values. Even when writing there are almost
no hard consistency demands because typically the machine must be in a kind
of standby mode (for example when writing recipes) in which there is no direct
access to the values written as recipes.
However, consistent values are especially required for database connections to
save production data. For clocked machines, these values have to be synchro-
nous to the production cycle (per produced product one set of values) and

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 795 / 1158
Objects

not consistent with regard to one or multiple IEC tasks. The consistency with
regard to the machine clock has to be already ensured by the IEC application.
For this purpose, the values that arise during a production cycle are typically
collected in a global variable list. At the end of the cycle, the symbolic client is
notified by means of an additional variable (BOOL or counter) that the machine
cycle has ended and the values are valid. Now the client has the chance to
archive the values from the production cycle. If required, successful reading
can also be displayed in opposite direction using a released variable. Thus,
the production can be stopped, even if production data could not be archived.
For this use case, the synchronized consistent access is neither required nor
useful, as the synchronization has to take place on application level.
In contrast, synchronized consistent access by symbolic clients is typically
applied in the process industry with continuously running systems without

User interface
production clocking when, for example when process values are written consis-
tently and cyclically in a fixed time frame of 60s. This can be done either by
synchronization on application level analogous to the clocked machines (see
above), or by synchronization of the synchronized consistent symbolic access.
The advantage of the latter is that no logic has to be implemented in the IEC
program and access is controlled entirely by the client.
Due to the increased jitter, the synchronized consistent
CAUTION
monitoring is not suitable for Motion or real-time crit-
ical applications. Due to these reasons, the synchronized
consistent access should only be released and used if
absolutely required.
If a client uses the synchronous consistent access enabled via this setting, it
also affects the client. Depending on the scheduler of the runtime system, the
response time can jitter more here for read/write access because the system
might still have to wait for an execution gap of the IEC tasks. Furthermore, read
and/or write access can fail if IEC tasks run for a very long time (multiple 100
ms) or if the CPU load by one or multiple IEC tasks is close to 100% for a
longer period. The availability of the values thus also depends on the control
load by the IEC application.
Additionally, the client can minimize effects on itself and on the runtime system
if considering the following when defining the variable lists to be read/written:
● Synchronously consistently access only those variables that are required as
consistent
● Separated variable lists for variables that have to be consistent and for
variables that may be inconsistent
● Split variable lists with many consistent variables into multiple smaller lists
● Select reading intervals for cyclic value reading as high as possible.

Support for the current configuration and possible corrective actions


Entries marked in red in the symbol table show variables that they are config-
ured for export to the symbol file but are currently invalid in the application.
The cause for this can be that the declaration has been removed from the
block.
In version 3.5.8.0 and later, a warning appears in the editor if variables that
have configured symbols are not used in the IEC code or are not mapped in
the case of I/O variables. In addition, the compiler indicates variables that are
referenced from outdated library versions n the symbol configuration.

R911403764, Edition 08 Bosch Rexroth AG


796 / 1158 ctrlX PLC Engineering
Objects

Object variables that are not used in the program code,


NOTICE
are not compiled by default and are therefore not avail-
able in the symbol configuration.
But: Variables of non-compiled objects are nevertheless
provided by PLC Engineering in the symbol configuration
if one of the following conditions is met:
− The “Link always” function block property is enabled.
− The {attribute 'linkalways'} pragma is used.
Also refer to
● ⮫ Chapter 19 Working with control networks on page 229
● ⮫ Chapter “Properties” - “Options” dialog on page 1059
● ⮫ Chapter 'Properties' dialog - 'Build' on page 1048
● ⮫ Chapter Attribute 'linkalways' on page 628
● ⮫ Chapter Effects of Pragmas on Symbols on page 648

Example for the data layout types

Examples for the layout types


The following examples from an IEC application will show how gaps can result
in the client-side memory layout caused by unpublished symbols, internal
"invisible" pointers, or a "pack mode" definition in the device description.
With the “Optimized layout” setting, the gaps are avoided. The symbol file
contains different information about the size and offset of memory locations,
depending on the selected layout setting.
Beispiel: Große Struktur
// Beispiel einer großen Struktur, von der nicht alle Members
veröffentlicht werden :
// Example of a big structure, where not all members get
published :
STRUCT
{attribute 'symbol':='readwrite'}
PublicNumber : INT;

{attribute 'symbol':='none'}
InternalData : ARRAY[0..100] OF BYTE;

{attribute 'symbol':='readwrite'}
SecondNumber : INT;

{attribute 'symbol':='none'}
MoreData : ARRAY[0..100] OF BYTE;
END_STRUCT
END_TYPE
Resulting entries in the symbol file; pay attention to "size" and "byteoffset":
Symboldatei, Große Struktur, Option Kompatibilitätslayout
<TypeUserDef name="T_GrosseStruktur" size="208"
nativesize="208" typeclass="Userdef" pouclass="STRUCTURE"
iecname="GrosseStruktur">

<UserDefElement iecname="PublicNumber" type="T_INT"


byteoffset="0" vartype="VAR" />

<UserDefElement iecname="SecondNumber" type="T_INT"

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 797 / 1158
Objects

byteoffset="104" vartype="VAR" />

</TypeUserDef>
Symboldatei, Große Struktur, Option Optimiertes Layout
<TypeUserDef name="T_GrosseStruktur" size="4"
nativesize="208" typeclass="Userdef" pouclass="STRUCTURE"
iecname="GrosseStruktur">

<UserDefElement iecname="PublicNumber" type="T_INT"


byteoffset="0" vartype="VAR" />

<UserDefElement iecname="SecondNumber" type="T_INT"

User interface
byteoffset="2" vartype="VAR" />

</TypeUserDef>
Beispiel: Struktur mit ungeraden Adressen

// Die folgenden Mechanismen können zu Komponenten mit nicht


korrekter Speicherausrichtung führen:
// The following mechanisms can cause misalignment:
// - {attribute 'relative_offset':='…'} an einem Member / at
a member
// - {attribute 'pack_mode':='…'} in einer
Strukturdeklaration / at a structure declaration
// - target setting 'memory-layout\pack-mode' in der
Gerätebeschreibung / in the device description

{attribute 'pack_mode':='1'}
TYPE UngeradeAdressen :
STRUCT
{attribute 'relative_offset':='3'}
{attribute 'symbol':='readwrite'}
PublicNumber : INT;

{attribute 'symbol':='readwrite'}
PublicValue : LREAL;
END_STRUCT
END_TYPE
Resulting entries in the symbol file; pay attention to "size" and "byteoffset":
Symboldatei, Struktur mit ungeraden Adressen, Option Kompatibilitätslayout
<TypeUserDef name="T_UngeradeAdressen" size="13"
nativesize="13" typeclass="Userdef" pouclass="STRUCTURE"
iecname="UngeradeAdressen">

<UserDefElement iecname="PublicNumber" type="T_INT"


byteoffset="3" vartype="VAR" />

<UserDefElement iecname="PublicValue" type="T_LREAL"


byteoffset="5" vartype="VAR" />

</TypeUserDef>

R911403764, Edition 08 Bosch Rexroth AG


798 / 1158 ctrlX PLC Engineering
Objects

Symboldatei, Struktur mit ungeraden Adressen, Option Optimiertes Layout


<TypeUserDef name="T_UngeradeAdressen" size="16"
nativesize="13" typeclass="Userdef" pouclass="STRUCTURE"
iecname="UngeradeAdressen">

<UserDefElement iecname="PublicNumber" type="T_INT"


byteoffset="0" vartype="VAR" />

<UserDefElement iecname="PublicValue" type="T_LREAL"


byteoffset="8" vartype="VAR" />

</TypeUserDef>
Beispiel Funktionsbaustein
// Each POU contains some implicit variables, which do not
get published. Depending on the data type these might cause
memory gaps of different sizes.
FUNCTION_BLOCK Baustein IMPLEMENTS SomeInterface
VAR_INPUT
in : INT;
END_VAR
VAR_OUTPUT
out : INT;
END_VAR
VAR
END_VAR
Each block contains some implicit variables which are not published. If it is
a data type such as __XWORD, different sizes of memory gaps result in the
client-side data layout, depending on whether the system is 64-bit or 32-bit.
Resulting entries in the symbol file for 64-bit and 32-bit; pay attention to "size"
and "byteoffset":
Symboldatei, Funktionsbaustein, Option Kompatibilitätslayout, 64 Bit
<TypeUserDef name="T_Baustein" size="24"
nativesize="24" typeclass="Userdef" pouclass="FUNCTION_BLOCK"
iecname="Baustein">

<UserDefElement iecname="in" type="T_INT" byteoffset="16"


vartype="VAR_INPUT" />

<UserDefElement iecname="out" type="T_INT" byteoffset="18"


vartype="VAR_OUTPUT" />

</TypeUserDef>
Symboldatei, Funktionsbaustein, Option Optimiertes Layout, 64 Bit
<TypeUserDef name="T_Baustein" size="4"
nativesize="24" typeclass="Userdef" pouclass="FUNCTION_BLOCK"
iecname="Baustein">

<UserDefElement iecname="in" type="T_INT" byteoffset="0"


vartype="VAR_INPUT" />

<UserDefElement iecname="out" type="T_INT" byteoffset="2"


vartype="VAR_OUTPUT" />

</TypeUserDef>

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 799 / 1158
Objects

Symboldatei, Funktionsbaustein, Option Kompatibilitätslayout, 32 Bit


<TypeUserDef name="T_Baustein" size="12"
nativesize="12" typeclass="Userdef" pouclass="FUNCTION_BLOCK"
iecname="Baustein">

<UserDefElement iecname="in" type="T_INT" byteoffset="8"


vartype="VAR_INPUT" />

<UserDefElement iecname="out" type="T_INT" byteoffset="10"


vartype="VAR_OUTPUT" />

</TypeUserDef>

User interface
Symboldatei, Funktionsbaustein, Option Optimiertes Layout, 32 Bit
<TypeUserDef name="T_Baustein" size="4"
nativesize="12" typeclass="Userdef" pouclass="FUNCTION_BLOCK"
iecname="Baustein">

<UserDefElement iecname="in" type="T_INT" byteoffset="0"


vartype="VAR_INPUT" />

<UserDefElement iecname="out" type="T_INT" byteoffset="2"


vartype="VAR_OUTPUT" />

</TypeUserDef>

Also refer to
● ⮫ Chapter 19.2 Symbol Configuration on page 229

33.2.26 Object 'Trace'


Symbol:
An object of type “Trace” is used for configuring and displaying application-spe-
cific trace data in one or more charts. At application runtime, value curves of
trace variables, which you can monitor in the trace editor in PLC Engineering,
are recorded on the controller. The requirement is that setting of a trace con-
figuration, the transfer of the trace configuration to the controller, and the
starting of the trace record. The recorded data is transferred to the develop-
ment system and displayed in diagrams according to the configuration. You can
navigate through the data when tracing.
Double clicking the trace object opens the trace editor. The corresponding
toolbar contains the most important trace commands. The trace variable list
shows the variable whose value curve is recorded.

R911403764, Edition 08 Bosch Rexroth AG


800 / 1158 ctrlX PLC Engineering
Objects

● (1): Toolbar of the trace editor


● (2): Trace editor
● (3): Trace variable list
● (4): Links for trace configuration
“Configuration”
“Add variable”
Also refer to
● ⮫ Chapter 22.4 Data recording with "Trace" on page 298

Toolbar of the trace editor


Also refer to
● : ⮫ Chapter Command 'Download Trace' on page 1027
● : ⮫ Chapter Command 'Start Trace' on page 1032
● : ⮫ Chapter Command 'Stop Trace' on page 1032
● : ⮫ Chapter Command 'Reset Trigger' on page 1031
● : ⮫ Chapter Command 'Mouse Zooming' on page 1029
● : ⮫ Chapter Command 'AutoFit' on page 1025
● : ⮫ Chapter Command 'Cursor' on page 1026
● : ⮫ Chapter Command 'Compress' on page 1026
● : ⮫ Chapter Command 'Compress' on page 1026
● : ⮫ Chapter Command 'Stretch' on page 1033

Trace editor
At application runtime, the runtime system buffer of the trace component is
filled with the recorded samples. The data is transferred to the development
system and stored in its trace editor buffer. The trace editor accesses this data
and displays it in diagrams as a graph over time. If you close the trace editor,
the trace editor buffer will be freed up.
Use menu commands for controlling the trace. In addition, you can use menu
commands, keyboard shortcuts, and mouse input for navigating through the
data.
Also refer to
● ⮫ Chapter 22.4.4 Operating the Data Recording on page 304
● ⮫ Chapter 22.4.5 Navigating into Trace Data on page 304

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 801 / 1158
Objects

Trace variable list


The trace variable list provides an overview of the current trace configuration.
In the list, all diagrams with the respective trace variables are displayed in
a table. When double-clicking on a trace variable, the “Trace configuration”
dialog also opens with its variable settings.
List box opens by means of the “Hide Instance Paths” command.
“Hide instance paths” Display of the variable name in the list
● : Variable name with complete instance path
Example: PLC_PRG.iCounter
Table 73: Diagrams
Tabular display of the diagrams

User interface
“Name” Listing of the diagrams with the respective variables
● “Diagram <n>” : The diagram is displayed.
The diagram name can be changed by clicking on the selected name
● “<Variable>” : The variable is displayed.
The variable name can be changed by clicking on the selected name
in the line editor
When selecting a “Diagram <n>” in the table, the corresponding dia-
gram is also selected in the editor. This also works the other way
around.
“Cursor <n>” Y-value at the cursor position
“Delta” Delta of the Y-value from “cursor 2” to “cursor 1”
You can use drag&drop to reorder the charts and variables or move them to
other charts. With the [Ctrl] key pressed, the variable is copied. This is also
possible in online mode.
Table 74: Context menu in the trace variable list
“Add variable” Adds a new trace variable and opens the “Trace Configuration” dialog
with its variable settings. Select a variable in the input field of the
“Variable” setting to trace its value curve.
“Visible” Toggles the visibility of the graph (value curve or trace variable) in the
corresponding diagrams:
● : visible.
● : Hidden.
“Display Settings” Opens the “Trace Configuration” dialog. Select a configuration item in
the “Trace Record” tree view or “Presentation (Diagrams)”.
“Configuration” Opens the “Trace Configuration” dialog. The “Variable Settings” are
displayed on the right.
Also refer to
● ⮫ Chapter “Trace configuration” dialog on page 1096

Navigating in the diagram


Table 75: Via mouse input
User input via mouse Symbol mouse Effect
cursor during user
input
Drag the graph along the X-axis. Scrolls trace graphs of all diagrams at
the same time along the time axis (X-
axis).
Hold down the [Ctrl] key and drag the Scrolls the trace graphs of the selected
graphs along the Y-axis. diagrams along the Y-axis.

R911403764, Edition 08 Bosch Rexroth AG


802 / 1158 ctrlX PLC Engineering
Objects

User input via mouse Symbol mouse Effect


cursor during user
input
Move the mouse wheel backwards. Compressed time axis (like the symbol
).
Move the mouse wheel forwards. Stretches time axis (like the symbol
).
Hold down the [Ctrl] key and move the Compresses the Y-axis.
mouse wheel backwards.
Hold down the [Ctrl] key and move the Stretches the Y-axis.
mouse wheel forwards.
Prerequisite: One or two trace cursors Refreshes the Y-values in the trace vari-
are enabled. able list at the same time
Drag the triangle of a trace cursor to ● First value: Y-value at the position of
another position along the time axis. the left cursor.
● Second value: Y-value at the position
of the right cursor.
● Third value: Difference between
both values.
Prerequisite: “Mouse zooming” enabled Zooms the trace graphs of all diagrams
( ). to the box.
Stretch a box.
Table 76: With keyboard shortcuts
Shortcut Effect
Prerequisite: No trace cursor is activated. Scrolls trace graphs of all diagrams at the same
[Left arrow] time along the time axis.
[Right arrow]
[Up arrow] Scrolls the trace graphs of the selected diagrams
[Arrow down] along the Y-axis.
Prerequisite: One or two trace cursors are ena- Scrolls trace graphs of all diagrams at the same
bled. time along the time axis.
[Alt] + [left arrow]
[Alt] + [right arrow]
[-] Compressed time axis (like the symbol ).
[+] Stretches the X-axis (like the symbol ).
[Ctrl]+[-] Compresses the Y-axis of the selected diagram.
[Ctrl]+[+] Stretches the Y-axis of the selected diagram.
[Tab] Selects the next lower diagram.
Prerequisite: One or two trace cursors are ena- Moves the black trace cursor.
bled.
[Left arrow]
[Right arrow]
Prerequisite: Two trace cursors are activated. Moves the gray trace cursor.
[Shift]+[Left arrow]
[Shift]+[Right arrow]
Also refer to
● ⮫ Chapter Command 'Cursor' on page 1026
● ⮫ Chapter Command 'Mouse Zooming' on page 1029
● ⮫ Chapter 22 Application at runtime on page 287

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 803 / 1158
Objects

33.2.27 Object 'Unit Conversion'


Symbol
A “Unit Conversion” object is used to define a conversion rule. The following
table lists all defined conversion rules. You can edit a conversion rule in the
input fields listed below the table.

Table of conversion rules


“Name” <name> : <name>_Impl is the name of the conversion rule. PLC
Engineering automatically implements the entry as a function block
<name>_Impl and instances it as <name>.
“Type” Type of conversion rule

User interface
● “Single scaling (offset)”: adds an offset to the input variable.
Result := Input + Offset
● “Single scaling (factor)”: multiplies the input variable by a factor.
Result := Input * Factor
● “Linear scaling 1 (factor and offset)”: converts the input variable
with a factor and offset. Result := Input * Factor + Offset
● “Linear scaling 2 (Base and target range)”: converts the input var-
iable for the output value to be within a target range. PLC Engi-
neering calculates the functional linear equation internally.
● “User defined conversion”: configures a user-defined conversion
rule with IEC operators. The input variable is rValue.
● “Switchable conversion”: defines a conversion rule that PLC Engi-
neering executes independent of any specified language or variable.
“Setting” Displays the configured conversion rule.
“Condition” ● “TRUE”: PLC Engineering always executes the conversion.
● “Language” If the language in the visualization is the lan-
guage defined here, then PLC Engineering executes the con-
version. The current visualization language is located in the
VisuElems.CurrentLanguage variable.
● “Variable”: If the comparison is TRUE, then PLC Engineering exe-
cutes the conversion rule. PLC Engineering can pass the compar-
ison for a constant, variable, or IEC expression.
You can edit the comparison below the table in the “Condition
Setting”.
“Condition Setting” If you select “TRUE” as the “Condition”, then the field is hidden.
If you configure “Language” as the “Condition”, then the field shows
the current configuration, for example en,de.
If you select “Variable” as the “Condition”, then the field shows the
current configuration, for example PLC_PRG.bActual=PLC_PRG.bSet.
You can edit the current condition setting below the table in the input
fields for “Condition Setting”.

Input field 'Single scaling (offset)'


The input variable is added with an offset.
“Offset” ● as a number, including REAL
● as an IEC variable

Input field 'Single scaling (factor)'


The input variable is multiplied by the factor.

R911403764, Edition 08 Bosch Rexroth AG


804 / 1158 ctrlX PLC Engineering
Objects

“Factor” ● as a number, including REAL


● as an IEC variable

Input field 'Linear scaling 1 (factor and offset)'


The input variable is converted with the linear equation defined below.
“Factor” ● as a number, including REAL
● as an IEC variable
“Offset” ● as a number, including REAL
● as an IEC variable

Input field 'Linear scaling 2 (Base and target range)'


The input variable is converted to be within a target range. PLC Engineering
internally creates a linear equation from the following input values.
“Base start value” Lowest possible value for the input variable.
● as a number, including REAL
● as an IEC variable
“Base end value” Highest possible value for the input variable.
● as a number, including REAL
● as an IEC variable
“Target start value” Lowest possible value for the output variable.
● as a number, including REAL
● as an IEC variable
“Target end value” Highest possible value for the output variable.
● as a number, including REAL
● as an IEC variable

Example
Conversion of electric current from a 10-bit input signal to an amperage range
of 4-20 mA
“Base start value” 0
“Base end value” 1024
“Target start value” 4.0
“Target end value” 20.0

Input field 'User defined conversion'


“Convert :=” Conversion rule as mathematical function of rValue The input variable
is rValue.
“Reverse :=” Reverse function of the function defined in “Convert”

Input field 'Switchable conversion'


Use this conversion rule when you want to apply a conversion that is language-
specific or variable-dependent.
“Switchable conversion Selected from a list of predefined conversion rules. Double-click
name” directly into the field for editing.
“Condition setting” Configured condition. Click into the input fields in “Condition setting”
to edit the condition.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 805 / 1158
Objects

Example
The Conv_A_LanguageDependent conversion rule that defines which conver-
sion rule is executed for the English or German language.
“Name” “Type” “Setting” “Condition” “Condition
setting”
Conv_A_Langu “Switchable Conv_AInInch “Language”
ageDependent conversion” , Conv_AInMM
“Switchable conversion name” “Condition setting”
Conv_AInInch en
Conv_AInMM de

User interface
See also
● ⮫ Chapter 18.14 Unit Conversion on page 157

33.2.28 "Data source" object


Object 'Data source' – General information
Symbol:
In the Editor ( “Data Source” object type), access to the data of a remote
device is managed in the “Variables”, “Type Mapping”, “Communication” and
“General and diagnostics” tabs.

Status bar
The status bar which is always visible notifies the user about the data source
type and the most important communication settings. If the communication
is established by means of the data source type PLC Engineering Symbolic,
then the name of the data source type, the connection type, and the network
name of the remote device are displayed. If the communication is established
by means of data source type PLC Engineering ApplicationV3 , then the name of
the data source type, the location of the remote project, and the instance name
of the remote application.
Example:
PLC Engineering Symbolic (PLC Engineering V3): PLC_Name
PLC Engineering ApplicationV3 (D:\Projects\Project_A):
Project_A.App_A

Also refer to
● ⮫ Chapter 19.1 Working with control networks – General information
on page 229

Tab 'Variables'
The variables for the data originating from the remote source are declared
in the global variable list <name of data source>. The global variable list
acts as a data interface to the remote PLC. The object is located below the
application and below the “DataSources_Objects” folder.

“Update variables” Establishes a connection to the remote device and opens the “Choose
Variables” dialog.

R911403764, Edition 08 Bosch Rexroth AG


806 / 1158 ctrlX PLC Engineering
Objects

“Local variable” Variable in the local application. Contains the remote data.
“Access rights” Access rights of the variables. The respective remote variable has the
same access rights.
● : Write access. Every time the values changes, the variable is
updated on the controller.
● : Read access. Every time the values changes on the controller,
the variable is updated in the application.
● : Read/Write access
Note: If you change the access rights, then a download is required for
the change to go into effect.
“Update always” : The controller data is updated automatically (via the data source).
A variable is updated automatically if it is used in the visualization,
trend, recipe, or as an alarm.
Note: This is the recommended setting type.
: The variable is updated in each cycle.
Note: Select the option only when the variable is used exclusively in
IEC code. If a variable is used in the visualization code, then it is
updated automatically.
Note: When an instance of a function block or a data type is updated in
this way, the instance is always transferred completely.
“Create or map” Mapping type for how the remote variable is mapped to the local vari-
able.
● : Mapping to a specific created variable with the data type of
the remote variable. The control data is mapped 1:1. That is the
recommended mapping type. The variable is declared in the GVL
<name of data source>.
● : Mapping to an existing variable. This requires that the existing
variable has the same data type.
● : Mapping to a specific created variable with type-conforming
data type to the remote data type: remote and local data types are
not the same, but compatible. For example, a type-conforming data
type can be available in a library. The variable is declared in the GVL
<name of data source>.
“Type mapping” Data type of the remote variable. If the variable is not a scalar type,
then the type is listed on the “Type Mappings” tab.
“Remote variable” Variable in the remote PLC

Dialog 'Choose Variables'


Symbol:
Function: The dialog lists the remote variables that are accessed by means of
the configured connection.
Call: “Update variables” command on the “Variables” tab.
Requirement: The remote PLC is running. The control application is down-
loaded.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 807 / 1158
Objects

“Variables” The remote variables are listed in the tree view. The top node is iden-
tified by the remote application name. Its variables are listed below
that. Structured data is listed with all of its subordinate elements.
Example: appControl_A
: The variable is selected for transferring to the local device. When
the variable is structured, it is applied with all subelements. If the
variables themselves are subelements, then only this subelement is
applied without accepting the structure completely.
Red font: When a variable is displayed in a red font, the variable is not
available (anymore) in the remote PLC.
Note: You can click “Uncheck unavailable variables” to remove the vari-
able from the list.

User interface
: The variable is not selected for the transfer.
The variable has expandable elements. By clicking the symbol, the
variable is extended by their elements.
“Insert the items : The selected variables are transferred with this structure if they are
structured” structured.
: The variable is transferred unstructured with a scalar data type.
“Uncheck unavailable Requirement: The link is visible when previously are no longer avail-
variables” able in the variable available on the remote PLC. These variables are
marked in red in the window above. The symbol configuration or the
application presumably changed in the remote PLC.
By clicking the command, the red variables are removed from the list
box.

Tab 'Type Mappings'


The tab lists the non-scalar data types as they are currently available in the
“DataSources_Objects” folder. You can edit or delete the data type declaration
by selecting a data type and then the declared elements in the lower window.
Moreover, you can modify the name, reset access rights, map another type, or
select another remote variable.

Tab 'Type Mappings'


“Local type” Data type in the local application
“Create or map” ● : Mapping to a new created data type. Declared in the
“DataSources_Objects” folder.
● : Mapping to an existing data type
● : Mapping to a type-conforming data type. Declared in the
“DataSources_Objects” folder.
“Mapping name” Name of the data type
“Remote type” Data type of the remote PLC
List with the subordinate elements of the selected data type.
“Local variable” Local variable name of the element of the selected data type
“Access right” Access rights to the element
“Type mapping” Data type of the element
“Remote variable” Remote variable name of the element of the selected data type
[Del] Removes the selected element

See also
● ⮫ Chapter 19.6.6 Editing data source variables on page 249

R911403764, Edition 08 Bosch Rexroth AG


808 / 1158 ctrlX PLC Engineering
Objects

Tab 'Communication' via PLC Engineering Symbolic


The tab includes the communication settings via PLC Engineering Symbolic for
the remote data source.
When initially adding a data source, you have selected the “PLC Engineering
Symbolic” data source type, and depending on that the communication settings
to the data source were configured. Afterwards, the communication settings
are outdated on this tab. You can only initially set the “Data source type”
setting.
PLC Engineering Symbolic means that in the case of an active connection the
communication is done via symbolic monitoring. This kind of symbolic access is
possibly for PLC Engineering V2 and PLC Engineering V3 controller variants. In
addition, the runtime system has to support the symbol configuration.
You can develop a local application offline based on the symbol information
without a connection to the data source. To do this, you refer to a symbol file
in the configuration settings in which all required variable information has been
stored. Then no active connection is established.

Tab 'Communication' via PLC Engineering Symbolic


“Variable information” Source of the variable information
● “From connection settings”
A connection is established actively according to the communica-
tion settings specified below (“Connection type” and “Connection
Settings”). The variable information is read from the remote con-
troller application.
● “<device name>.<application name>.symbol configuration”
The variable information is read from the symbol configuration. The
symbol configuration is part of the active project and located in the
device tree at the object of the remote controller below the applica-
tion. An active connection is not established to the controller.
● “From symbol file”
The variable information is read from a symbol configuration file
that is stored on the development system. In the “Choose symbol
file” field, specify this data. An active connection is not established
to the controller.
“Choose symbol file” The path of the symbol file for the “Variable information” selection is
“From symbol file”.
The symbol file is stored on the development system and con-
tains the required variable information. By default, a symbol
file path is created in the project directory in the fol-
lowing structure: <project folder>\<project name>.<device
name>.<application name>.xml.
Example:
D:\Projects\Project_A\VisualizeWithHMI.Device.Applicatio
n.xml
Note: If the “Alarm Table” element or “Trend” element is used in the
visualization, then the symbol file required for symbolic access and the
respective project must both be saved in the same folder. The project
contains the configuration for the alarm table element or the trend
recording for the trend element. This is the default case for automati-
cally generated symbol files.
Example: D:\Projects\Project_A\VisualizeWithHMI.project

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 809 / 1158
Objects

“Connection type” Connection type between the remote PLC and the local device.
Depending on the selected connection type, the following settings
below change.
Note: Whenever possible, avoid a direct connection without a gateway.
● “PLC Engineering V2”
The devices exist in the same network. The V2 runtime on the
remote PLC provides a communication interface.
● “PLC Engineering V2 (Via gateway)”
The devices do not exist in the same network. They are connected
via a V2 gateway.
● “PLC Engineering V3”

User interface
The devices exist in the same network. The V3 runtime on the
remote PLC provides a communication interface.
● “PLC Engineering V3 (Via gateway)”
The devices do not exist in the same network. They are connected
via a V3 gateway.

Connection settings for connection type 'PLC Engineering V2'


“PLC”
“Driver type” ● “Tcp/Ip (Level 2 Route)”
● “Tcp/Ip (Level 2)”
● “Tcp/Ip”
“Address” Example: localhost (for the currently used system on your computer)
“Port” Example: 1200
“Block size” Example: 128
Requirement: The driver type is “Tcp/Ip (Level 2)”.
“Target ID” Example: 0
Requirement: The driver type is “Tcp/Ip (Level 2 Route)”.
“Motorola byte order” : Byte order on the PLC in big endian (Motorola format)
: Byte order in little endian (Intel format)

Connection settings for connection type 'PLC Engineering V2 (Via gateway)'


“Gateway” The gateway settings are configured in addition to the PLC settings.
Note: For this connection, a “CoDeSys V2.3 Gateway Server” (V2
Gateway) also has to be installed on the development computer where
PLC Engineering V3 is running.
“IP address” Example: localhost
“Port” Example: 1217

R911403764, Edition 08 Bosch Rexroth AG


810 / 1158 ctrlX PLC Engineering
Objects

Connection settings for connection type 'PLC Engineering V3'


“PLC”
“Name or address of The setting that you make here varies according to the selection in
device” the “Type of name or address” list box. For options that are derived
automatically, you do not have to specify the setting here. The setting
can remain empty.
Example: Nothing specified for “...(automatically derived)”
Example: PLC_A for “Node name”
Example: [ABCD] for “Node address”
Example: 192.168.1.5:11741 for “IP address”
Example: POU.dssCommVar with data type
DatasourceSym.ConnectionSetup for “Dynamic from variable”
Hint: : Opens the input to select the program variables for
dynamic configuration. This variable has to be the data type
DatasourceSym.ConnectionSetup.
“Type of name or address” ● “Node name (automatically derived)”
● “Node address (automatically derived)”
● “IP address (automatically derived)”
● “Node name”
● “Node address”
● “IP address”
● “Dynamic from variable”
“Dynamic from variable” The device name or address is configured dynami-
cally at runtime by means of an IEC variable of
data type DatasourceSym.ConnectionSetup. The data type
DatasourceSym.ConnectionSetup (STRUCT) is defined in the
Datasource Symbolic Access library. For the configuration, the
structure member xDataValid first has to be set to FALSE. If the
address data has been specified, then xDataValid has to be set back
to TRUE.
Use case: The device name or address is not available when a project
is being created.
The dynamic configuration can also be used to change the settings at
runtime without restarting the HMI application.
Note: For this connection type, the connection is also not done dynam-
ically via gateway.

Connection settings for connection type 'PLC Engineering V3 (Via gateway)'


“Gateway” The gateway settings are configured in addition to the PLC settings.
“IP address” Example: localhost
“Port” Example: 1217

Extending the communication settings for the PLCHandler interface


It is not recommended to configure the PLCHandler man-
NOTICE
ually.
The connection to the controller is established via the PLC Engineering
PLCHandler communication interface. In this case, the configuration is per-
formed in the PLCHandler INI format and allows for advanced parameterization.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 811 / 1158
Objects

“Advanced”
“Used as” ● “Don't use”
Recommended setting
The “INI content” property as well as any specified configuration
settings there are ignored.
● “Extend the configuration by the following content”
As a rule, the configuration settings are used which are specified
in the “Connection Settings for PLC Engineering V3 (Via gateway)”
property. Moreover, the configuration settings are used in the “INI
content” property.
● “Configure completely with the following content”
The configuration settings of the “Configuration Settings for PLC

User interface
Engineering V3 (Via gateway)” property are ignored. Instead, only
the configuration settings are used in the “INI content” property.
“INI content” Requirement: “Used as” is set to “Extend the configuration by the
following content”.
Example:

logfilter=16#000000FF
Example:

parameter0=EncryptCommunication
value0=1
Note: If the parameters are generic, then they can be specified as
0-based (parameter0 and value0). When extending, the numbering is
automatically adjusted so that the extended parameters connect to the
existing ones. The number of parameters (parameters=<n>) is also
set to the correct value.
“INI content” Requirement: “Used as” is set to “Configure completely with the
following content”.
Example:

[PLC:PLC_IdArti]
interfacetype=ARTI
active=1
logevents=1
motorola=0
nologin=0
timeout=10000
precheckidentity=0
tries=3
waittime=12
reconnecttime=10
buffersize=0
device=Tcp/Ip (Level 2 Route)
instance=PLCWinNT_TCPIP_L2Route
parameters=4
parameter0=Address
value0=localhost
parameter1=Port
value1=1200
parameter2=TargetId

R911403764, Edition 08 Bosch Rexroth AG


812 / 1158 ctrlX PLC Engineering
Objects

value2=0
parameter3=Motorola byteorder
value3=No

Communication settings for controllers with visualization user management


“Login Configuration” If a visualization user management is configured on the remote device,
then valid credentials are required at login.
“Type” Defines how the visualization user management gets credentials
● “Login using the following credentials”
The credentials are hard-coded into the “User name” and
“Password” settings. They are used each time a connection is
attempted.
● “Login using the credentials determined at runtime”
At runtime, a dialog opens and prompts the user to specify a user
name and password. Hard-coded credentials, which have nonethe-
less been specified in “User name” and “Password”, are ignored.
“User name” Example: max.smith
“Password” Example: ···

See also
● ⮫ Chapter 19.6.5 Initially Adding a Data Source on page 243
● ⮫ Chapter 33.2.13 Object 'Data Sources Manager' on page 775

Tab 'Communication' via PLC Engineering ApplicationV3


The tab includes the communication settings for a remote data source.
When initially adding a data source, you have selected the PLC Engineering
ApplicationV3 data source type, and depending on that the communication
settings to the data source were configured. Afterwards, the communication
settings are outdated on this tab. You can only initially set the “Data source
type” and “Select the project type” settings.
PLC Engineering ApplicationV3 means that in the case of an active connection
the communication is done via address monitoring. In this case, the remote
PLC is configured by directly specifying the device address or automatically via
network scan.

Tab 'Communication' via PLC Engineering ApplicationV3


“Select the project type” The project type indicates where the controller is configured: in the
same project as the HMI application or in a separate project.
● “Current project”
The control application is part of the currently open project. The
communication settings can be updated automatically or manually.
● “Other Project”
The control application is part of a separate project whose location
is specified in “Choose file”. The communication settings are done
manually.
In the initial setting of the data source object, this option is fixed and
influences which settings are available for “Target device”.
“Choose file” Name and path of the project that contains the control application
(source project)
Example: D:\PLCs\PLC_A.project
Requirement: The “Select the project type” is “Other Project”.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 813 / 1158
Objects

Window area for controllers Controllers and their subordinate applications, read from the selected
of the project project
Example:

Settings for 'Select the project type' == 'Current project'


“Target device” Note: The following settings are available when “Select the project
type” is set to “Current project”.

User interface
“Automatic configuration” : The configuration is read automatically from the source project.
This is the recommended setting.
Example: “[DEVICE_A]”
Example: “[undetermined]”: No configuration can be read.
Note: Make sure that the application is running on the controller and
the network path is active. The communication settings of the con-
troller are applied only then. These are the communication settings
that were configured in the source project in the device editor on the
“Communication Settings” tab.
“Manual configuration” : More configuration settings are displayed.
See "Manual configuration" below.

Settings for 'Select the project type' == 'Other Project'


The communication setting is done only manually.
See "Manual configuration" below.

Manual configuration
“Dynamic from variable” : The communication parameters are configured at applica-
tion runtime by means of an IEC variable of data type
DatasourceAppV3.ConnectionSetup.
: Opens the input for selecting the IEC variables for a dynamic con-
figuration.
The data type DatasourceAppV3.ConnectionSetup (STRUCT) is
defined in the Datasource ApplicationV3 Access library. For the
configuration, the structure member xDataValid first has to be set to
FALSE. If the address data has been specified, then xDataValid has
to be set back to TRUE.
Use case: The communication parameters are not available yet when a
project is being created.
“Use device address” : The communication is done via the address specified here.
Example: 0101
Hint: Click “From device” for an automatic address setting.
“From device” The data of the currently connected data source device is read
automatically and specified in “Use device address”. The address
corresponds to the setting of the device in the device editor in
“Communication Settings”.

R911403764, Edition 08 Bosch Rexroth AG


814 / 1158 ctrlX PLC Engineering
Objects

“Search for the target : The data source manager starts the network scan for devices in the
device using the network network. The scan is successfully when controllers are found whose
scan” communication settings match the selected search criteria. The result
is displayed in the input fields.
“Node name” : Search for the specified node name
Example: WST06
“Target type” : Search for the specified target type
Example. 4096
“Target ID” : Search for the specified target ID
Example: 0000 0001
“Target version” : Search for the specified target version
Example: 1.0.0.0
“Network location” ● “Direct child of the data sources PLC”: The scanned remote PLC
has an address that is running with the address of the local con-
troller (of the data source manager).
Example: Data sources PLC: 0000.0001; remote source PLC:
0000.0001.0001
● “Direct child of node with address”: Specify the address of the
parent node
● “Direct child of the data source PLC or of the node with address”:
Combination of both options above.
“Search type” ● “First found device”: The first controller in the device tree is
selected that fulfills the specified criteria.
● “Exactly found device”: The controller is selected that fulfills the
specified criteria exactly.
Note: The data source manager waits until the network scan is com-
plete. This usually takes about 10 seconds.

Communication settings for controllers with visualization user management


“Login Configuration” If a visualization user management is configured on the remote device,
then valid credentials are required at login.
“Type” Defines how the visualization user management gets credentials
● “Login using the following credentials”
The credentials are hard-coded into the “User name” and
“Password” settings. They are used each time a connection is
attempted.
● “Login using the credentials determined at runtime”
At runtime, a dialog opens and prompts the user to specify a user
name and password. Hard-coded credentials, which have nonethe-
less been specified in “User name” and “Password”, are ignored.
“User name” Example: max.smith
“Password” Example: ···

Specific settings of the communication buffer


“Advanced” : The subsequent settings are changed.
“Default communication Default setting: 50000
buffer size”

See also
● ⮫ Chapter 19.6.5 Initially Adding a Data Source on page 243
● ⮫ Chapter 33.2.13 Object 'Data Sources Manager' on page 775

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 815 / 1158
Objects

Tab 'General and Diagnosis'


The “General and Diagnosis” tab provides information about the status of the
data source communication.

“Update Configuration”
“Update rate (ms)” Example: 200
“Connection Information”
“Connection status” Example: online
“Error information” Example: OK

See also

User interface
● ⮫ Chapter 19.6.8 Updating Data Interfaces on page 252

Object 'DUT'
Symbol:
● for a DUT without text list support
● for an enumeration data type with text list support
A DUT (Data Unit Type) declares a user-specific data type.
You can add this kind of object below the application or in the “POUs” view.
When the object is created, the “Add DUT” dialog opens. There you select
among the “Structure”, “Enumeration”, “Alias”, or “Union” data types.
Moreover, enumerations can have a text list stored to localize the enumeration
values. Then the object also has a localization view.
Syntax
TYPE <identifier> : <data type declaration with optional
initialization>
END_TYPE
How the data type declaration has to be done syntactically depends in detail on
the selected data type.

Examples
Declaration of a structure
TYPE S_POLYGONLINE :
STRUCT
aiStart : ARRAY[1..2] OF INT := [-99, -99];
aiPoint1 : ARRAY[1..2] OF INT;
aiPoint2 : ARRAY[1..2] OF INT;
aiPoint3 : ARRAY[1..2] OF INT;
aiPoint4 : ARRAY[1..2] OF INT;
aiEnd : ARRAY[1..2] OF INT := [99, 99];
END_STRUCT
END_TYPE
Extension of a structure

TYPE S_PENTAGON EXTENDS S_POLYGONLINE :


STRUCT
aiPoint5 : ARRAY[1..2] OF INT;
END_STRUCT
END_TYPE

R911403764, Edition 08 Bosch Rexroth AG


816 / 1158 ctrlX PLC Engineering
Objects

Declaration of an enumeration
{attribute 'qualified_only'}
{attribute 'strict'}
TYPE E_TRAFFICSIGNAL :
(
eRed,
eYellow,
eGreen := 10
);
END_TYPE
Enumeration with text list support in the localization view

The “Textual View” and “Localization View” buttons are located on the
right edge of the editor. Click the buttons to toggle between the views.
Declaration of an alias
TYPE A_MESSAGE : STRING[50];
END_TYPE
Declaration of a union of components with different data types
TYPE U_DATA :
UNION
lrA : LREAL;
liA : LINT;
dwA : DWORD;
END_UNION
END_TYPE

Dialog 'Add DUT'


Function: The dialog is used to configure a new DUT (Data Unit Type).
Call: Menu bar: “Project 🠂 Add Object 🠂 DUT”; context menu of the application
object.
“Name” Name of the new DUT data type
Example: S_POLYGONLINE

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 817 / 1158
Objects

Table 77: “Type”


“Structure” Creates an object which declares a structure that combines multiple
variables with different data types into a logical unit. The variables
declared within the structure are called members.
Example: S_POLYGONLINE
“Extends” : Extends an existing structure by more members. In the input field,
specify an existing structure. The members of the existing structure
are automatically available in the new structure.
Example: S_PENTAGON
“Enumeration” Creates an object which declares an enumeration that combines mul-
tiple integer constants into a logical unit. The constants declared
within an enumeration are also called enumeration values.

User interface
Example: E_TRAFFICSIGNAL
“Add Text List Support” : Enumeration that does not have any text list support
: Enumeration with additionally stored text list for the enumeration
values. The text list allows you to localize the names of the enumera-
tion values.
Example: ETL_TRAFFICSIGNAL
Note: In the case of an existing enumeration type, text list support
can be added or removed at any time. As a result, the “Add Text List
Support” and “Remove Text List Support” commands are provided in
the context menu of the object.
Hint: The localized texts can be displayed, for example, in a visualiza-
tion. In this case, the text output of a visualization element displays
the symbolic enumeration values in the current language instead of
the numeric enumeration values. When an enumeration with text list
support is specified in the “Text variable” property of a visualization
element, it gets the additional property < < enumeration name> >.
Example: In a visualization, you use the variable
PLC_PRG.eTrafficLight of type ETL_TRAFFICSIGNAL.
ETL_TRAFFICSIGNAL is an enumeration with text list support. Then
the entry in the properties editor of the visualization element looks like
this: PLC_PRG.eTrafficLight <ETL_TRAFFICSIGNAL>.
Hint: When you edit the enumeration type in the application, a prompt
opens when you close the application and asks whether the affected
visualizations should be updated automatically.
See also: Help for "Enumerations" with information about the declara-
tion syntax
“Alias” Creates an object which declares an alias with which an alternative
name is declared for a base type, data type, or function block
“Union” Creates an object which declares a union that combines multiple mem-
bers with mostly different data types into a logical unit.
All members have the same offset so that they are occupy the same
memory. The memory requirement of a union is determined by the
memory requirement of its "largest" component.
“Add” Closes the dialog and creates the new object
The object is displayed with the symbol in the device tree or in
the “POUs” view. When a text list is also stored for the object, the
symbol is displayed.

R911403764, Edition 08 Bosch Rexroth AG


818 / 1158 ctrlX PLC Engineering
Objects

See also
● ⮫ Chapter 32.5.22 Alias on page 591
● ⮫ Chapter 32.5.21 Enumerations on page 586
● ⮫ Chapter 32.5.20 Structure on page 583
● ⮫ Chapter 32.5.23 Data Type 'UNION' on page 592
● ⮫ Chapter Command 'Add Text List Support' on page 1025
● ⮫ Chapter Command 'Remove Text List Support' on page 1025
● ⮫ Help for CODESYS Visualization: Using Texts

Object 'External File'


An “External File” is any file that you add to the project in the “POUs” view or
“Devices” view. Click “Project 🠂 Add Object” to open the “Add External File”
dialog and define how the file belongs to the project.
An external file which was inserted in the “POUs” view is never downloaded to
the controller.
An external file which was added in the “Devices” view is always downloaded to
the controller when an online change or a download is performed due to an IEC
code change.
When an external file is downloaded to the controller, it is not updated in the
project.

Dialog 'Add External File'


“File path” The button opens a dialog for selecting a file in the local file
system.
“Name” Object name for the file in PLC Engineering. If you do not type any-
thing, the file will have its previous name.
Table 78: “File Handling”
“Remember the link” The file is available in the project only as long as it exists in the
defined file path.
“Remember the link and PLC Engineering saves an internal copy of the file in the project, as
embed into project” well as the link to the defined file path. The update option selected
below applies as long as the external file exists there. Otherwise PLC
Engineering uses the version saved in the project.
“Embed into project” PLC Engineering saves only one copy of the file in the project. There is
no longer a link to the external file.
Table 79: “Change Tracking”
“Reload the file If the external file changes, then PLC Engineering updates the file in
automatically” the project.
“Prompt whether to reload If the external file changes, then a dialog prompt opens whether PLC
the file” Engineering should also update the file in the project.
“ Do nothing” The file remains unchanged in the project, even if the external file
changes.
“Display File Properties” Clicking this button opens the default “Properties of <file name>”
dialog, which you can also open in the Windows file system by right-
clicking the file.
“Open” The file object is inserted into the device tree (“Devices” or “POUs”
view) and opened in the editor for the matching file format.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 819 / 1158
Objects

See also
● ⮫ Chapter 8.3.4 Adding objects on page 61
● ⮫ Chapter Command 'Add Object' on page 932
● ⮫ Chapter 'Properties’ dialog - 'External File' on page 1051

Object 'C Code File'


Symbol:
This object contains the C-code for the C-integration in its editor.
The C-code files can be created in the following ways:
● You add an object “C Code Module” to the application and, in the dialog
box “Add C Code Module”, you specify a source directory containing C-code

User interface
files; you import this directory into PLC Engineering.
● You add an object “C Code File” to a “C Code Module” and in doing so you
specify a C-file in the dialog box “Add C Code File” that you import into PLC
Engineering.
● You add an object “C Code File” to a “C Code Module” and in doing so you
specify the name for a new C-file in the dialog box “Add C Code File”. As
opposed to the two other methods you create an empty file by doing this.
Possible file formats of a C-code file:
● *.c
● *.ccp
● *.h
● *.hpp
You can make simple changes to the C-code in the text editor.

Objects for C-stubs: 'iec_external.c' and 'iec_external.h'


If you create C-stubs with the command “Create Stub Implementation in
C”, these are stored in the objects “iec_external.c” and “iec_external.h” of
the “Extensions” folder. The object “iec_external.c” contains the C-stubs,
“iec_external.h” contains the associated declarations.
The object “iec_external_c” contains a marked range for
NOTICE
header includes (range between /** INCLUDE SECTION
BEGIN **/ and /** INCLUDE SECTION END **/). You
may not change this range!
See also
● ⮫ Chapter Command 'C Integration – Create Stub Implementation in C'
on page 937
● ⮫ Chapter 18.10 Integrating C Modules on page 146
● ⮫ Chapter Object 'C Code File' on page 819

Object 'C Implemented Library'


Symbol:
You add the object to a library project in the “POUs” view. A “C Implemented
Library” can contain several precompiled modules, each of which is assigned to
a certain device. The inserted modules are not visible in the library manager.
If you double-click on the object in the “POUs” view, it opens in its editor.
Table 80: Compiled Components
“Object files for devices”
List of the devices with the assigned module with the following information:
“Device”, “Version”, “File name”, “File size”

R911403764, Edition 08 Bosch Rexroth AG


820 / 1158 ctrlX PLC Engineering
Objects

“Add” Opens the dialog box “Select Device”, where you can assign a precom-
piled module to a device and add it to the C-implemented library.
Any number of modules can be added to such an object. When down-
loading a concrete project with this library to a device, only the respec-
tively matching file is loaded to the device.
“Remove” Removes the selected entry in “Object files for devices”.
Table 81: “Choose Device ”
“Object File” Input of a file that matches the “Device” and can be loaded by the
operating system as a dynamic object, for example for Windows: *.dll,
for Linux: *.so
Please note: The file *.dll must contain the title of the library project
in its name. Example: if the library project has name XYlib, then the
“Object File” must be called: <name>_XYlib.dll
“Device” ● “Vendor”:
● List of the devices
● Options
– “Group by category”:
: the available devices (newest version) are sorted by category.
The category is defined in the device description file.
: the available devices appear flat and alphabetically sorted.
– “Display all versions (for experts only)”
: in addition, all other available versions of the devices can also
be selected.
: only the newest version of each device is available for selec-
tion.
– “Display outdated versions”
: in addition, outdated versions of the devices can also be
selected. Outdated versions result, for example, from the update
of plug-ins.
: outdated device versions are not displayed.
● Information about the device.
“Chose device” The runtime module precompiled in the “object file” is assigned to the
selected “device”.
See also
● ⮫ Chapter 18.10 Integrating C Modules on page 146

33.2.29 "POU” object


"POU” object – General information
Symbol:
An object of type “POU” is a programming organization unit in an PLC Engi-
neering project. Source code for your controller program is written in POUs.
There are following POU types:
● Program
● Function
● Function block
Add an object “POU ” using the command “Project 🠂 Add object” in the device
tree or in the “POUs” view. When adding a POU, specify the POU type and the
implementation language.
Other programming objects (method, action, etc.) can be added to these
objects as objects.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 821 / 1158
Objects

Call POUs
Certain POUs can call other POUs. Recursion is not permitted.
When calling POUs via the namespace, PLC Engineering scans the project for
the POU to be called as per the following sequence:
1. Current application
2. “Library manager” of the current application
3. View “POUs”
4. “Library manager” in “POUs view”
When calling a programming block that exists with the same name both in
a library used in the application and as an object in the “POUs” view, the
following applies: There is no syntax according to which you can call the POU

User interface
in the “POUs” view only by its name. In this case, you need to move the library
from the application's library manager to the project's library manager (in the
“POUs” view). Subsequently, you can call the POU object in the “POUs” view
using its name. When adding the library namespace, call the library POU.
The term "POU" is also used in PLC Engineering for the “POUs view”, where
PLC Engineering manages the objects valid across projects.
Also refer to
● ⮫ Chapter 'Properties' dialog – General information on page 1047

'Adding the POU' dialog


Function: This dialog is used to configure a new POU acc. to the IEC 61131-3
standard. Thus, a POU can either be a program, a function or a function block.
Call: Menu “Project 🠂 Add object”, context menu in view “Devices”, if an appli-
cation is selected, context menu in view “POUs”.
“Name” POU name
Table 82: “Type”
“Program”
“Function block” ● “Enhanced”: Specifying or selecting a basic function block in
terms of the object-oriented programming. Is specified with the
keyword EXTENDS in the function block declaration
● “Implemented”: Specifying or selecting an interface in terms of
the object-oriented programming. Is specified with the keyword
IMPLEMENTS in the function block declaration. When the POU is
created, all methods defined via the interface are created
● “Final”: Derived access is not permitted. This means that a func-
tion block cannot be extended by another function block. This ena-
bles optimized code generation
● “Abstracts”: Identifies that the function block has a missing or
incomplete implementation and cannot be instantiated. Abstract
FBs are used exclusively as base function blocks and the implemen-
tation typically occurs in a derived FB. If a non-abstract function
block is created, which in turn extends an abstract function module,
all abstract methods of the abstract basic function block are added
as (non-abstract) methods to the new function block

R911403764, Edition 08 Bosch Rexroth AG


822 / 1158 ctrlX PLC Engineering
Objects

● “Access specifier”
– “PUBLIC”: Does not corresponds any access modifier specifica-
tion
– “INTERNAL”: The access to the function block is limited to the
namespace (of the library)
● “Method implementation language”: If you have selected the
“Implemented” option, select an implementation language for all
method objects that PLC Engineering creates via the implementa-
tion of the interface.
The “method implementation language” is independent of the
implementation language of the function block
“Function” Note: Not available if “Sequential Function Chart (SFC)” is selected in
the drop-down list “Implementation language”.
“Return type”: Selection list for the data type of the return value
“Implementation language” Selection list for the implementation language of the POU
Also refer to
● ⮫ Chapter ‘Function block’ object on page 823
● ⮫ Chapter 'Program’ object on page 822
● ⮫ Chapter Object 'Function' on page 825
● ⮫ Chapter 18.24.2 Extension of Function Blocks on page 220
● ⮫ Chapter 18.24.3 Implementing Interfaces on page 221

'Program’ object
A program is a POU that yields one or more values when executed. All values
remain unchanged after program execution until the next execution. The call
order of programs in an application are defined in task objects.
Add a program to the application or project using the command “Project 🠂 Add
object 🠂 POU”. In the device tree and in the “POUs” view, the program POUs
have the suffix “(PRG)”.
The editor of a program consists of the declaration section and the implemen-
tation section.
The top line of the declaration part contains the following declaration:
PROGRAM <program>

Calling a program
Programs and function blocks can call a program. A program call is not per-
mitted in a function. There are not instances of programs.
When a POU calls a program and values of the program change, the changes
remain up to the next program call. The values of the program also remains
if a different POU calls next. This is different from calling a function block.
When calling a function block, only the values of the respective instance of the
function block change. The changes have to be considered only when a POU
calls the same instance.
The input parameters and/or output parameters for a program can also directly
be set upon the call.
Syntax: <program>(<input variable> := <value>, <output value> =>
<value>):
When inserting a program call via the input help and the option “Insert with
arguments” is activated in the input help, PLC Engineering adds input and/or
output parameters to the program call according to the syntax.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 823 / 1158
Objects

Examples
Calls:
IL:

By parameter assignment:

User interface
ST:
PLC_PRG()
erg := PLC_PRG.out2;
By parameter assignment:
PLC_PRG(in1:=2, out1=>erg);

Also refer to
● ⮫ Chapter 33.2.29 "POU” object on page 820
● ⮫ Chapter 18.21 Task configuration on page 208

‘Function block’ object


A function block is a POU providing one or multiple values at execution.
Add the object to the application or project using the command “Project 🠂 Add
object 🠂 POU” command. In the device tree or in the “POUs” view, function
block POUs have the suffix “(FB)”.
They always call a function block via the instance that is a function block copy.
The editor of a function block consists of the declaration section and the imple-
mentation section.
The values of the output variables and the internal variables remain up to the
next execution. This means that if the function block is called multiple times
with the same input variables, the same output values do not necessarily result.
In addition to the functionality described in the IEC 61131-3, function blocks
in PLC Engineering can also be used for the following functionalities of the
object-oriented programming:
● Extension of a function block
● Implementing interfaces
● Methods
● Properties

R911403764, Edition 08 Bosch Rexroth AG


824 / 1158 ctrlX PLC Engineering
Objects

The top line of the declaration part contains the following declaration:
FUNCTION_BLOCK <access specifier> <function block> | EXTENDS
<function block> | IMPLEMENTS <comma-separated list of
interfaces>

Calling a function block


It is always called via an instance of the function block. When calling a function
block, only the values of the respective instance change
Instance declaration:
<instance> : <function block>;
Access a function block variable in the implementation section as follows:
<instance> . <variable>
Note the following:
NOTICE
− From outside the function block instance, only the
function block input variables and output variables
can be accessed (not the internal variables).
− Access to a function block instance is limited to the
function block, in which the instance is declared,
unless it is declared globally.
− When calling the instance, values can be assigned to
the function block variables.

Example
Access to function block variables:
The function block FB1 is provided with the input variable iVar1 of type INT
and the output variable out1. The variable iVar1 is called from the program
Prog in the following.

PROGRAM Prog
VAR
inst1 : FB1;
END_VAR

inst1.iVar1 := 33; (* FB1 is called and the value 33 is


assigned to the variable iVar1 *)

inst1(); (* FB1 is called, that's necessary for


the following access to the output variable *)

ires := inst1.out1 (* the output variable out1 of the FB1 is


read *)
In FBD:

Assigning variable values upon call:


In the textual languages IL and ST, values can be directly assigned to input
variables and/or output variable when calling the function block.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 825 / 1158
Objects

A value is assigned to an input variable with :=.


A value is assigned to an output variable with =>.

Example
The instance CMD_TMR of the timer function block is called with assignments
for the input variable IN and for PT. Subsequently, the output variable Q of the
timer is assigned to the variable A

PROGRAM PLC_PRG
VAR
CMD_TMR : TOF;
END_VAR

User interface
CMD_TMR(IN := %IX5.1, PT := T#100MS);
A := CMD_TMR.Q;

If you insert a function module instance via the “input help” and the “Insert
with arguments” option is activated in the Input “help” dialog, PLC Engineering
inserts the call with all input and output variables. Then, insert the value
assignment. In the example, above PLC Engineering inserts the call as follows:
CMD_TMR (IN:= ,PT:= , Q=> ).
Using the 'is_connected' attribute on a local variable is used to determine
whether a particular input receives an external assignment at call time in the
function module instance.

Also refer to
● ⮫ Chapter 33.2.29 "POU” object on page 820
● ⮫ Chapter 18.24.2 Extension of Function Blocks on page 220
● ⮫ Chapter 18.24.3 Implementing Interfaces on page 221
● ⮫ Chapter 'Method’ object on page 829
● ⮫ Chapter Object 'Property' on page 839
● ⮫ Chapter Attribute 'is_connected' on page 627

Object 'Function'
A function is a POU that supplies precisely one data element when executed
and whose call in textual languages can occur as an operator in expressions.
The data element can also be an array or a structure.
Add the object to the application or project using the command “Project 🠂 Add
object 🠂 POU” command. In the device tree or in the “POUs” view, function
POUs have the “(FUN)” suffix.
Functions have no internal status information, which
NOTICE
means that functions do not save the values of their
variables until the next call. Calls of a function with
the same input variable values always supply the same
output value. Therefore functions must not use global
variables and addresses!
The editor of a function consists of the declaration part and the implementa-
tion part.
The top line of the declaration part contains the following declaration:
FUNCTION <function> : <data type>
Below that, you declare the input and function variables.
The output variable of a function is the function name.

R911403764, Edition 08 Bosch Rexroth AG


826 / 1158 ctrlX PLC Engineering
Objects

If you declare a local variable in a function as RETAIN,


NOTICE
this has no effect. In this case, PLC Engineering issues a
compiler error.
You cannot mix explicit and implicit parameter assign-
NOTICE
ments in function calls in PLC Engineering V3. This
means that you have to use either only explicit or only
implicit parameter assignments in function calls. The
order of the parameter assignments when calling a func-
tion is arbitrary.

Calling a function
In ST, you can use the call of a function as an operand in expressions.
In SFC, you can use a function call only within step actions or transitions.

Examples
Function with declaration part and a line implementation code

Function calls:
ST:
result := POU_Funct(5,3,22);
IL:

LD:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 827 / 1158
Objects

Functions with additional outputs

User interface
According to the IEC 61131-3 standard, functions can have additional outputs.
You declare the additional outputs in the function between the keywords
VAR_OUTPUT and END_VAR. The function is called according to the following
syntax:
<function> (<function output variable1> => <output variable
1>, <function output variable n> => <output variable n>)

Example
The fun function is defined with two input variables in1 and in2. The output
variable of the fun function is written to the locally declared output variables
loc1 and loc2.
fun(in1 := 1, in2 := 2, out1 => loc1, out2 => loc2);

Also refer to
● ⮫ Chapter 33.2.29 "POU” object on page 820

Object 'Interface'
Symbol:
Keyword: INTERFACE
An interface is a means of object-oriented programming. The object ITF
describes a set of method and property prototypes. In this context, prototype
means that the methods and properties contain only declarations and no imple-
mentation.
This allows different function blocks having common properties to be used in
the same way. An object “ITF” is added to the application or the project with
the command “Project 🠂 Add Object 🠂 Interface”.
Table 83: “Adding an interface”
“Inheritance”
“Name” Interface name
“Extends” : Extends the interface that you enter in the input field or via the
input assistant . This means that all methods of the interface that
extend the new interface are also available in the new interface.
You can add the objects “Interface property” and “Interface Method” to the
object “ITF”. Interface methods may contain only the declarations of input,
output and input/output variables, but no implementation.
So that you can also use an interface in the program, there must be a function
block that implements this interface.
This means:

R911403764, Edition 08 Bosch Rexroth AG


828 / 1158 ctrlX PLC Engineering
Objects

● the function block contains the interface in its IMPLEMENTS list in its decla-
ration part
● the function block contains an implementation for all methods and property
prototypes of the interface
A function block can implement one or more interfaces. You can use the same
method with identical parameters, but different implementation code in dif-
ferent function blocks.
Please note the following:
● You may not define variables within an interface. An interface has no imple-
mentation part and no actions. Only a collection of methods is defined, in
which you may define only input, output and input/output variables.
● PLC Engineering always treats variables declared with the type of an inter-
face as references.
● A function block that implements an interface must contain implementation
code for the methods of the interface. You have named the methods exactly
as in the interface and the methods contain the same input, output and
input/output variables as in the interface.
Interface references and online change
NOTICE
The following can happen with a compiler version <
3.4.1.0: if a function block changes its data because vari-
ables are added or deleted, or because the type of varia-
bles changes, then PLC Engineering copies all instances
of the function block to a new memory location. In this
case, however, an interface reference refers not to the
new memory location, but still to the old one.
In case of compiler versions >= 3.4.1.0, PLC Engineering
automatically re-addresses the interface references so
that PLC Engineering also references the correct inter-
face in case of an online change. PLC Engineering
requires additional code and more time for this, so that
jitter problems can occur depending on the number of
objects concerned. Therefore, PLC Engineering displays
the number of variables and interface references con-
cerned before the execution of the online change and
you can then decide whether the online change should
be executed or aborted.

Example
Definition of an interface and its use in a function block
You have inserted the interface “ITF” below the application. The interface
contains the methods “Method1” and “Method2”. “ITF”, “Method1” and
“Method2” contain no implementation code. You insert the required variable
declarations only in the declaration part of the methods.
If you subsequently insert a function block in the device tree that implements
the interface “ITF”, PLC Engineering automatically also inserts the methods
“Method1” and “Method2” under the function block. Here you can implement
function-block-specific code in the methods.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 829 / 1158
Objects

User interface
● ⮫ Chapter 18.24.3 Implementing Interfaces on page 221
● ⮫ Chapter 18.24.4 Extending Interfaces on page 223

'Method’ object
Symbol:
Keyword: METHOD
Methods are an extension of the IEC 61131-3 standard and a tool for object-ori-
ented programming which is used for data encapsulation. A method contains a
declaration and an implementation. However, unlike a function, a method is not
an independent POU, and it is subordinated to a function block or program. A
method can access all valid variables of the superordinate POU.
You can add a method below a program or a function block. Use the command
“Project 🠂 Add object 🠂 Method”. The dialog opens to add a method.
Use interfaces for the organization of methods.
For further information, see: ⮫ Implementing Interfaces
IMPORTANT
NOTICE
When you copy a method below a POU and add it below
an interface, or move the method there, the contained
implementation is removed automatically.

Declaration
Syntax
METHOD <access specifier> <method name> : <type of return
value>

R911403764, Edition 08 Bosch Rexroth AG


830 / 1158 ctrlX PLC Engineering
Objects

<access specifier> Optional


Access specifier
Depending on the declared access specifier, a
method can be called only within its own namespace
(INTERNAL), only within its own POU and its deriv-
atives (PROTECTED), or only within its own POU
(PRIVATE). The method can be called from anywhere
for PUBLIC.
<method name> Method identifier
<type of return Optional
value> Return type of the method
Note: For methods without an explicit return type,
the first output declared is used as the return value.
Only if neither return type nor output are declared, a
method does not return any value. However, a compiler
error is not generated in either case.

Possible scopes of validity with variable declaration (parameter)


<scope list> Scopes:
● VAR_IN_OUT <variable declaration list>
END_VAR
For variable declaration with input/output variables.
● VAR_INPUT <variable declaration list>
END_VAR
For variable declaration for inputs.
● VAR_OUTPUT <variable declaration list>
END_VAR
For variable declaration for outputs.
Like functions, methods can have additional out-
puts. Also provide arguments (variables) to the
additional outputs when calling the method.
● VAR <variable declaration list> END_VAR
For variable declaration for local purposes.
<variable Variable declaration
declaration list>
<type of return Variable declaration
value> <variable name>: <data type>:= <initial value>;
Semicolon-separated list of variables (parameters)
assigned to a scope of validity according to their pur-
pose.
● Variables for input and input/output can have an
assigned initial value.
The assignment of an initial value is mandatory.
However, if one is specified, argument passing
for this parameter can be omitted when calling
the method. Such parameters are called optional
parameters.
● The variables of a method (parameter) contain tem-
porary data that are valid only during the execution
of the method (stack variables). All variables that
are declared and implemented in a method are rein-
itialized each time the method is called.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 831 / 1158
Objects

Sample/declaration
METHOD PUBLIC DoIt : BOOL
VAR_INPUT
iInput_1 : DWORD;
iInput_2 : DWORD;
sInput_3 : STRING(12);
END_VAR

Implementation
Optional
● When implementing the method, access to function block instances or pro-

User interface
gram variables is allowed.
● The THIS pointer allows for access to its own function block instance. There-
fore, the pointer is permitted only in methods that are assigned to a function
block.
● A method cannot access VAR_TEMP variables of the function block.
● A method can call itself recursively.
● There is no implementation for interface methods. Interface methods can
have declared input, output, and VAR_IN_OUT variables, but do not contain
any implementation.

Calling a method
Syntax bei Aufruf

<return value variable> := <POU name> . <method


name>(<argument passing>);
<return value Variable for the return value.
variable> The type has to match the return type of the method.
Note: For methods without an explicit return type,
the first output declared is used as the return value.
Only if neither return type nor output are declared, a
method does not return any value. However, a compiler
error is not generated in either case.
<POU name> Identifier of the function module instance below which
the method is located.

R911403764, Edition 08 Bosch Rexroth AG


832 / 1158 ctrlX PLC Engineering
Objects

<method name> Method identifier.


<argument passing> Comma-separated list with the actual arguments.
One argument is passed on to each parameter (vari-
able) of the method:
<parameter name> := <actual argument>
● The actual argument is assigned to each declared
input/output or input. The argument can be a value
(literal), an expression or a variable with matching
type.
● The actual output is assigned to each declared
output (variable of the same type). The argument
has to be a variable with matching type.
● Passing an argument for an input or an input/output
can be missing.
The number of arguments in the list may thus be
smaller than the number of parameters (scope of
validity: input or input/output). In particular, if it is
an optional parameter - for which a default or initial
value was specified in the declaration - argument
passing can be omitted.
Tip: If the input help supports when calling the
method, you are informed on existing initial values.
● An argument passing specifying the parameter with
name and assignment operator is optional.
It is sufficient to specify only the argument. The
order of the variables in the declaration then deter-
mines which argument is passed on to which
parameter.

Sample/declaration

METHOD PUBLIC DoIt : BOOL


VAR_INPUT
iInput_1 : DWORD;
iInput_2 : DWORD;
sInput_3 : STRING(12);
END_VAR
Aufruf mit Argumentübergabe an Parameter

bFinishedMethod := fbInstance.DoIt(sInput_3 := 'Hello World


', iInput_2 := 16#FFFF, iInput_1 := 16);
When the method is called, the return value of the method is assigned to a
locally declared variable.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 833 / 1158
Objects

Example
If you omit the names of the input variables, the assignment of the arguments
results from the declaration order.
Deklaration

METHOD PUBLIC DoIt : BOOL


VAR_INPUT
iInput_1 : DWORD;
iInput_2 : DWORD;
sInput_3 : STRING(12);
END_VAR

User interface
IF iInput_1 = iInput_2 THEN
DoIt := TRUE; // explicit return value
END_IF
Aufruf mit Argumentübergabe nach Reihenfolge in der Deklaration

bFinishedMethod := fbInstance.DoIt( 16, 16#0010,'Hello World


');

Recursive method call


Within the implementation, a method can call itself, either directly by means
of the THIS pointer, or by means of a local variable for the assigned function
block.
● <return value variable> := <POU name> . < method name>
(<argument passing>);
Direct call of the relevant function block instance with the THIS pointer.
● <return value variable> := <POU name> . < method name>
(<argument passing>);
Call by means of a local variable of the method that temporarily instantiates
the relevant function block
A compiler warning is issued for a recursive call. If the method is provided
with the pragma {attribute 'estimated-stack-usage' := '<estimated
stack size in bytes>'}, the compiler warning is suppressed.
Chapter ⮫ Attribute 'estimated-stack-usage' provides an implementation
example.
To call methods recursively, it is not enough to specify only the method name. If
only the method name is specified, a compiler error is output: “Program name,
function or function block instance expected instead of ...”
Also refer to
● ⮫ Chapter 18.24.5 Calling Methods on page 224
● ⮫ Chapter Attribute 'estimated-stack-usage' on page 614
● ⮫ Chapter 32.2.16 THIS on page 451

Special methods of a function block


FB_Init Declarations automatically implicit, but explicit declaration also pos-
sible
Contains initialization code for the function block, as is defined in the
declaration part of the function block
FB_Reinit Explicit declaration is necessary.
Call after the instance of the function block was copied (as during an
online change). It reinitializes the new instance module.

R911403764, Edition 08 Bosch Rexroth AG


834 / 1158 ctrlX PLC Engineering
Objects

FB_exit Explicit declaration is necessary.


Call for each instance of the function block before a new download or
a reset or during an online change for all shifted or deleted instances.
Properties Provides Set and/or Get accessor methods.
Also refer to
● ⮫ Chapter 32.10.1 Methods 'FB_Init', 'FB_Reinit', and 'FB_Exit' on page 660
● ⮫ Chapter Object 'Property' on page 839
● ⮫ Chapter Object 'Interface Property' on page 836

Dialog 'Add Method'


Function: Defines a method below the selected POU when the dialog is closed.
Call: “Project 🠂 Add object 🠂 Method”, context menu
Prerequisite: In the “POUs” view or in the “Devices” view a program (PRG) or a
function block (FUNCTION_BLOCK) is selected.
The interface of a method inserted below a basic function block is copied when
a method with the same name is inserted below a derived function block.
“Name” Example: meth_DoIt.
The standard methods FB_Init and FB_Exit are offered in a list box
if they are not already inserted below the POU. If it is a derived func-
tion block, the list box also offers all of the methods of the basic
function block.
“Return type” Default data type or structured data type of return value
Example: BOOL
“Implementation language” Example: “Structured Text (ST)”
“Access specifier” Controls access to data.
● “PUBLIC” or not specified: Access is not restricted.
● “PRIVATE”: The access is limited to the program, the function block
or the GVL.
The object is marked as (private) in the POU or device view. The
declaration contains the keyword PRIVATE.
● “PROTECTED”: Access is restricted to the program, function block,
or GVL with its derivations. The declaration contains the keyword
PROTECTED.
The object is marked as (protected) in the POU or device view.
● “INTERNAL”: Access to the method is restricted to the namespace
( library).
The object is marked as (internal) in the POU or device view. The
declaration contains the keyword INTERNAL.
“Abstract” : Indicates that the method has no implementation and the imple-
mentation is provided by the derived function block.
“Add” Adds a new method below the selected object.

Input assistance when generating function blocks that inherit properties


If you use object-oriented programming and inheritance (keyword EXTENDS) of
function blocks, the following support is provided:
If you insert an action, property, method or transition below a module derived
from a base module, the dialog “... add” opens. The input field for the name
is extended to a combo box. The combo box selection list contains a valid
selection from the actions, properties, methods or transitions available in the

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 835 / 1158
Objects

basic function block. Now, for example, you can easily adopt a method of the
basic function block first, and then adapt it accordingly for the derived function
of the module.
Methods and attributes with the PRIVATE access modifier are not available
either in this selection because they should not be inherited. When accepted
into the inherited block, methods and attributes with the PUBLIC access modi-
fier automatically have a blank access modifier field. Functionally seen, it is the
same.

Example

User interface
Also refer to
● ⮫ Chapter 18.24.2 Extension of Function Blocks on page 220
● ⮫ Chapter 18.24 Object-oriented programming on page 219
● ⮫ Chapter Object 'Action' on page 843
● ⮫ Chapter Object 'Property' on page 839
● ⮫ Chapter 'Method’ object on page 829
● ⮫ Chapter Object 'Transition' on page 845

Also refer to
● ⮫ Chapter 18.24.3 Implementing Interfaces on page 221
● ⮫ Chapter ST editor in online mode on page 380
● ⮫ Chapter 22.3.3 Using Watch Lists on page 297
● ⮫ Chapter 32.2.10 Instance Variables - VAR_INST on page 445

Object 'Interface Method'


Symbol:

R911403764, Edition 08 Bosch Rexroth AG


836 / 1158 ctrlX PLC Engineering
Objects

This object is used for object-oriented programming.


The object “Interface Method” is added to an interface via the command
“Project 🠂 Add Object”.
If a method is inserted underneath an interface, you can add and instance only
variable declarations (input, output and input/output variables) in this method.
You can only add program code to the method if a function block 'implements'
the interface to which the method belongs. PLC Engineering then inserts the
method underneath the function block.
See also
● ⮫ Chapter Object 'Interface' on page 827
● ⮫ Chapter 'Method’ object on page 829
● ⮫ Chapter 18.24.3 Implementing Interfaces on page 221

Object 'Interface Property'


Symbol:
Interface properties are an extension of the IEC 61131-3 standard and a tool
for object-oriented programming. An interface property declares the accessor
methods Get and Set (no implementation code). Therefore, a function block
that implements an interface also inherits their interface properties.
You can add an interface property to the device tree for an interface. Then
an interface is extended with the accessor methods Get and Set. The Get
accessor is for read access. The Set accessor is for write access. You
can delete an unneeded accessor. Click “Project 🠂 Add Object 🠂 Interface
Property” to add an accessor. The “Add Interface Property” dialog opens.
See also
● ⮫ Chapter Object 'Interface' on page 827
● ⮫ Chapter Object 'Property' on page 839

Example

Declaration and implementation of the interface property Literal_A

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 837 / 1158
Objects

User interface
This interface itf_A has the property Literal_A with the accessor methods
Get and Set.
The function blocks fb_A1 and fb_A2 implement the interface itf_A and
therefore inherit its interface property. Each FB has its own implementation.
Interface itf_A

INTERFACE itf_A
VAR
END_VAR
PROPERTY Literal_A : STRING
FB fb_A1

FUNCTION_BLOCK fb_A1 IMPLEMENTS itf_A


VAR
str_1 : STRING;
str_2 : STRING;
iCnt : INT;
END_VAR
iCnt := iCnt + 1;

str_1 := 'Function block A1';


Accessor fb_A1.Literal_A.Get

VAR
END_VAR
Literal_A := CONCAT (str_1,' and property.');

R911403764, Edition 08 Bosch Rexroth AG


838 / 1158 ctrlX PLC Engineering
Objects

Accessor fb_A1.Literal_A.Set

VAR
END_VAR
str_2 := Literal_A;
FB fb_A2

FUNCTION_BLOCK fb_A2 IMPLEMENTS itf_A


VAR
str_1 : STRING;
str_2 : STRING;
iCnt : INT;
END_VAR

iCnt := iCnt + 1;
str_1 := 'Function block A2';
Accessor fb_A2.Literal_A.Get

VAR
END_VAR
Literal_A := str_1;
Accessor fb_A2.Literal_A.Set

VAR
END_VAR
str_2 := Literal_A;
Program PLC_PRG

PROGRAM PLC_PRG
VAR
iCnt : INT;
my_1 : fb_A1;
my_2 : fb_A2;
strName_1 : STRING;
strName_2: STRING;
END_VAR

iCnt := iCnt + 1;
my_1();
my_2();
strName_1:= my_1.Literal_A;
strName_2:= my_2.Literal_A;
my_1.Literal_A := 'Hello 1';
my_2.Literal_A := 'World 2';
This leads to the following monitoring of PLC_PRG when the application is in
runtime mode:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 839 / 1158
Objects

User interface
Object 'Property'
Symbol:
Keyword: PROPERTY
Properties are an extension of the IEC 61131-3 standard and a tool for object-
oriented programming.
Properties are used for data encapsulation because they allow for external
access to data and act as filters at the same time. For this purpose, a property
provides the accessor methods Get and Set which allows for read and write
access to the data of the instance below the property.
You can add a property with accessor methods below a program, a function
block, or a global variable list. Click “Project 🠂 Add Object 🠂 Property” to open
the “Add Property” dialog.
You can add an interface property below an interface.
When you copy a property that is inserted below a POU and add it below an
interface, or if you move the property there, the included implementations are
removed automatically.
Also refer to
● ⮫ Chapter Object 'Interface Property' on page 836

Dialog 'Add Property'


Function: Creates a new property that is positioned below the selected pro-
gramming function block when the dialog is closed.
Call: “Project 🠂 Add object 🠂 Property”, context menu
Prerequisite: In the “POUs” view or “Devices” view a program(PRG), a function
block(FUNCTION_BLOCK) or a global variable list(GVL) is selected.
“Name” Name (identifier) of the property
Example: prop_iA
“Return type” Default type or structured type of return value
Example: INT
“Implementation language” Example: “Structured text (ST)”

“Access specifier” Controls access to data


“PUBLIC” or unspecified Access is not restricted.

R911403764, Edition 08 Bosch Rexroth AG


840 / 1158 ctrlX PLC Engineering
Objects

“PRIVATE” The access is limited to the program, the function block or the GVL.
The object is marked as (private) in the POU or device view. The
declaration contains the keyword PRIVATE.
“PROTECTED” Access is restricted to the program, function block, or GVL with its
derivations.
The object is marked as (protected) in the POU or device view. The
declaration contains the keyword PROTECTED.
“INTERNAL” Access is restricted to the namespace (library).
The object is marked as (internal) in the POU or device view. The
declaration contains the keyword INTERNAL.

“Abstract” : Identifies that the property does not have an implementation and
the implementation is provided by the derived function block
“Add” Adds a new property be low the selected object and below that the
accessor methods Get and Set
Note: When selecting a property, you can also add a previously
removed accessor explicitly by clicking on “Add object”.

Editor 'Property'
You can program the data access in the editor. The code can contain additional
local variables. However, it cannot contain any additional input variables or (as
opposed to a function or method) output variables.

Example

Funktionsbaustein FB_A

FUNCTION_BLOCK FB_A
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR
iA : INT;
END_VAR

iA := iA + 1;
Eigenschaft prop_iA

PROPERTY PUBLIC prop_iA : INT


Accessormethode FB_A.prop_iA.Get

prop_iA := iA;

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 841 / 1158
Objects

Accessormethode FB_A.prop_iA.Set
iA := prop_iA;
PROGRAM PLC_PRG
VAR
fbA : FB_A;
iVar: INT;
END_VAR

fbA();
IF fbA.prop_iA > 500 THEN
fbA.prop_iA := 0;
END_IF

User interface
iVar := fbA.prop_iA;

Get and Set accessors


When calling the Set accessor, it is written to the property. It is used like
an input parameter. When the Get accessor is called, the property is read. It
is used like an output parameter. Access is restricted in each case via access
modifiers (qualifiers). The objects are marked accordingly.
When a property is accessed as read only or write only, delete the accessor
that is not required.
You can add accessors explicitly by selecting a property and clicking “Add
Object”. A dialog opens, either “Add Get accessor” or “Add Set accessor”.
There you can set the implementation language and the access.
Table 84: Dialog “Add Get (Set) Accessor”
“Implementation language” Example: “Structured text (ST)”

“Access specifier” Qualifier for declaration section


PUBLIC or unspecified Access is not restricted.
PRIVATE The access is limited to the program, the function block or the GVL.
The object is marked as (private) in the POU or device view. The
declaration contains the keyword.
PROTECTED Access to the property is restricted to the program, function block, or
GVL and its derivations. The declaration contains the keyword.
The object is marked as (protected) in the POU or device view.
INTERNAL Access to the method is restricted to the namespace (the library).
The object is marked as (internal) in the POU or device view. The
declaration contains the keyword.

“Add” Adds the accessor methods Get or Set below the selected property.

Monitoring properties in online mode


The following pragmas are provided for the monitoring of properties in online
mode. You insert them at the top position of the property definition:
● {attribute "monitoring" := "variable"}
Each time the property is accessed, PLC Engineering saves the actual value
to a variable and displays the value of this variable. This value can become
outdated if no further access to the property takes place in the code.
● {attribute "monitoring" := "call"}

R911403764, Edition 08 Bosch Rexroth AG


842 / 1158 ctrlX PLC Engineering
Objects

Each time the value is displayed, PLC Engineering calls the code of the Get
accessor. If this code contains a side effect, then the monitoring executes
the side effect!
Monitor a property with the help of the following functions.
● Inline monitoring
Prerequisite: The option “Activate inline monitoring” is selected in the cate-
gory “Text editor” of the “Options” dialog.
● Monitoring list
Also refer to
● ⮫ Chapter 18.24.5 Calling Methods on page 224
● ⮫ Chapter Attribute 'monitoring' on page 629

Input assistance when generating function blocks that inherit properties


If you use object-oriented programming and inheritance (keyword EXTENDS) of
function blocks, the following support is provided:
If you insert an action, property, method or transition below a module derived
from a base module, the dialog “... add” opens. The input field for the name
is extended to a combo box. The combo box selection list contains a valid
selection from the actions, properties, methods or transitions available in the
basic function block. Now, for example, you can easily adopt a method of the
basic function block first, and then adapt it accordingly for the derived function
of the module.
Methods and attributes with the PRIVATE access modifier are not available
either in this selection because they should not be inherited. When accepted
into the inherited block, methods and attributes with the PUBLIC access modi-
fier automatically have a blank access modifier field. Functionally seen, it is the
same.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 843 / 1158
Objects

Example

User interface
Also refer to
● ⮫ Chapter 18.24.2 Extension of Function Blocks on page 220
● ⮫ Chapter 18.24 Object-oriented programming on page 219
● ⮫ Chapter Object 'Action' on page 843
● ⮫ Chapter Object 'Property' on page 839
● ⮫ Chapter 'Method’ object on page 829
● ⮫ Chapter Object 'Transition' on page 845

Object 'Action'
Symbol:
In an action you implement further program code. You can implement this
program code in a different language than the base implementation. The base
implementation is a function block or a program where you inserted the action.
An action does not have its own declaration and it works with the data from
the base implementation. This means that the action uses the input and output
variables and the local variables from its base implementation.
Add an “Action” to a function block or program by clicking “Project 🠂 Add
Object 🠂 Action”.
Table 85: “Add Action”
“Name” Name of the action
“Implementation language” Combobox for the implementation language

R911403764, Edition 08 Bosch Rexroth AG


844 / 1158 ctrlX PLC Engineering
Objects

Input assistance when generating function blocks that inherit properties


If you use object-oriented programming and inheritance (keyword EXTENDS) of
function blocks, the following support is provided:
If you insert an action, property, method or transition below a module derived
from a base module, the dialog “... add” opens. The input field for the name
is extended to a combo box. The combo box selection list contains a valid
selection from the actions, properties, methods or transitions available in the
basic function block. Now, for example, you can easily adopt a method of the
basic function block first, and then adapt it accordingly for the derived function
of the module.
Methods and attributes with the PRIVATE access modifier are not available
either in this selection because they should not be inherited. When accepted
into the inherited block, methods and attributes with the PUBLIC access modi-
fier automatically have a blank access modifier field. Functionally seen, it is the
same.

Example

Also refer to
● ⮫ Chapter 18.24.2 Extension of Function Blocks on page 220
● ⮫ Chapter 18.24 Object-oriented programming on page 219
● ⮫ Chapter Object 'Action' on page 843
● ⮫ Chapter Object 'Property' on page 839
● ⮫ Chapter 'Method’ object on page 829
● ⮫ Chapter Object 'Transition' on page 845

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 845 / 1158
Objects

Calling an action
Syntax:
<program>.<action> or <FB-instance>.<action>
To call an action from only within the base implementation, you only have to
provide the action name.

Examples
Calling a “Reset” action from another POU The call is not executed from the
base implementation.
Declaration:
PROGRAM PLC_PRG

User interface
VAR
Inst : Counter;
END_VAR
Calling a “Reset” action from an IL POU
CAL Inst.Reset(In := FALSE)
LD Inst.Out
ST ERG
Calling a “Reset” action from an ST POU
Inst.Reset(In := FALSE);
Erg := Inst.out;
Calling a “Reset” action from an FBD POU

Actions are used frequently in the SFC implementation language.

Also refer to
● ⮫ Chapter SFC Element 'Action' on page 402

Object 'Transition'
Symbol:
The object can be used as a transition element in a program block implemented
in SFC.
Also refer to
● ⮫ Chapter SFC Elements 'Step' and 'Transition' on page 400

Input assistance when generating function blocks that inherit properties


If you use object-oriented programming and inheritance (keyword EXTENDS) of
function blocks, the following support is provided:
If you insert an action, property, method or transition below a module derived
from a base module, the dialog “... add” opens. The input field for the name
is extended to a combo box. The combo box selection list contains a valid
selection from the actions, properties, methods or transitions available in the
basic function block. Now, for example, you can easily adopt a method of the
basic function block first, and then adapt it accordingly for the derived function
of the module.

R911403764, Edition 08 Bosch Rexroth AG


846 / 1158 ctrlX PLC Engineering
Objects

Methods and attributes with the PRIVATE access modifier are not available
either in this selection because they should not be inherited. When accepted
into the inherited block, methods and attributes with the PUBLIC access modi-
fier automatically have a blank access modifier field. Functionally seen, it is the
same.

Example

Also refer to
● ⮫ Chapter 18.24.2 Extension of Function Blocks on page 220
● ⮫ Chapter 18.24 Object-oriented programming on page 219
● ⮫ Chapter Object 'Action' on page 843
● ⮫ Chapter Object 'Property' on page 839
● ⮫ Chapter 'Method’ object on page 829
● ⮫ Chapter Object 'Transition' on page 845

33.2.30 "POUs for implicit checks” object


'POUs for implicit checks' – General information
You can add these special POUs to an application to provide them with implicit
monitoring functions. These functions check the boundaries of arrays or sub-
range types, the validity of pointer addresses or a division by 0 during runtime.
Note: This option can be disabled for devices that are already equipped with
these kinds of monitoring blocks by a special implicit library.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 847 / 1158
Objects

The command “Add Object 🠂 POU for Implicit Checks” is used for adding to
the application. The command opens the “Add POU for Implicit Checks” dialog
where you can select a monitoring function type (see table below). Depending
on the monitoring function, you have to edit the implementation code or create
it yourself from scratch.
To prevent multiple inclusions, monitoring functions that have already been
inserted are disabled in the “Add POU for Implicit Checks” dialog.
To get the feature for monitoring functions, do not edit
NOTICE
their declaration part. However, you are permitted to add
local variables.
After removing implicit monitoring functions (for example
CheckBounds) from the project, an online change is no

User interface
longer possible, only a download. A corresponding mes-
sage is output.
By default, PLC Engineering does not run implicit checks for function blocks
from libraries used in the application. However, you can extend the check to the
libraries as follows: Open the “Properties” dialog of the application and enter
the compiler definition checks_in_libs in the “Compiler defines” field on the
“Build” tab. This definition affects implementation libraries (*.library) only,
not protected libraries (*.compiled-library).
You can use the "no_check" attribute to deactivate the check for special POUs
in the project.
Table 86: “Available functions”
Monitoring function Type
“CheckBounds” “Bound Checks”
Appropriate handling of bound violations; such handling includes set-
ting flags or changing field indices.
“CheckDivDInt” “Division checks”:
“CheckDivLInt” Monitors the divisor value to avoid division by zero.
“CheckDivReal”
“CheckDivLReal”
“CheckRangeSigned” “Range checks”:
“CheckRangeUnsigned” Monitors the range limit of a subrange type in runtime mode. Valid for
data types DINT/UDINT.
“CheckLRangeSigned” “L-range checks”:
“CheckLRangeUnsigned” Monitors the range limit of a subrange type in runtime mode. Valid for
data types LINT/ULINT.
“CheckPointer” “Pointer checks”
You are responsible for filling in this function completely with imple-
mentation code. See the help page for "POU 'CheckPointer'". The
function should monitor whether the passed pointer reference a
valid memory address, and whether the orientation of the referenced
memory area matches the variable type to which the pointer refers.
If both conditions are fulfilled, then the pointer is returned. If not,
then CheckPointer should complete an appropriate error handling.
CheckPointer monitors variables of type REFERENCE TO in the same
way.
Also refer to
● ⮫ Chapter 18.15 Using function blocks for implicit checks on page 160
● ⮫ Chapter POU 'CheckBounds' on page 848
● ⮫ Chapter POU 'CheckDivInt' on page 851
● ⮫ Chapter POU 'CheckDivLInt' on page 851

R911403764, Edition 08 Bosch Rexroth AG


848 / 1158 ctrlX PLC Engineering
Objects

● ⮫ Chapter POU 'CheckDivLReal' on page 853


● ⮫ Chapter POU 'CheckDivReal' on page 852
● ⮫ Chapter POU 'CheckPointer' on page 859
● ⮫ Chapter POU 'CheckRangeSigned' on page 854
● ⮫ Chapter POU 'CheckRangeUnsigned' on page 857
● ⮫ Chapter POU 'CheckLRangeSigned' on page 856
● ⮫ Chapter POU 'CheckLRangeUnsigned' on page 858
● ⮫ Chapter 'Properties' dialog - 'Build' on page 1048
● ⮫ Chapter Attribute 'no_check on page 633

POU 'CheckBounds'
Functions for bound checks: CheckBounds
The task of this monitoring function is to handle bound violations appropriately.
Examples of reactions to violations include setting error flags and changing
the value of the array index. The check is performed only for one variable
array index. An incorrect constant array index leads to a compiler error. PLC
Engineering calls the function implicitly as soon as values are assigned to a
variable of type ARRAY.
After inserting the function, you receive automatically generated code in the
declaration and implementation parts. See below.
To get the feature for monitoring functions, do not edit
CAUTION
the declaration part. However, you are permitted to add
local variables.
Deklarationsteil
// Automatisch erzeugter Code : NICHT EDITIEREN
FUNCTION CheckBounds : DINT
VAR_INPUT
index, lower, upper: DINT;
END_VAR
Implementierung
// Automatisch erzeugter Code: Es handelt sich hierbei um
einen Implementierungsvorschlag.
IF index < lower THEN
CheckBounds := lower;
ELSIF index > upper THEN
CheckBounds := upper;
ELSE
CheckBounds := index;
END_IF

(* It is also possible to set a breakpoint, log messages or


e.g. to halt on an exception:
Add CmpApp.library, SysExcept.library and SysTypes2_Itf as
newest.
Declaration:
VAR
_pApp : POINTER TO CmpApp.APPLICATION;
_result : SysTypes.RTS_IEC_RESULT;
END_VAR

Implementation:
_pApp := AppGetCurrent(pResult:=_result);
IF index < lower THEN
CheckBounds := lower;

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 849 / 1158
Objects

IF _pApp <> 0 THEN


AppGenerateException(pApp:=_pApp,
ulException:=RtsExceptions.RTSEXCPT_ARRAYBOUNDS);
END_IF
ELSIF index > upper THEN
CheckBounds := upper;
IF _pApp <> 0 THEN
AppGenerateException(pApp:=_pApp,
ulException:=RtsExceptions.RTSEXCPT_ARRAYBOUNDS);
END_IF
ELSE
CheckBounds := index;
END_IF

User interface
*)
When called, the “CheckBounds” function is assigned the following input
parameters:
● index: Index of the array element
● lower: Lower limit of the array range
● upper: Upper limit of the array range
The return value is the index of the array element, as long as it is within a valid
range. If not, then the PLC Engineering returns either the upper or lower limit,
depending on which threshold was violated.

Example: Correction of access to an array outside the defined array bounda-


ries
In the sample program below, the index falls short of the defined lower limit
of the a array.
PROGRAM PLC_PRG
VAR
a: ARRAY[0..7] OF BOOL;
b: INT:=10;
END_VAR

a[b]:=TRUE;
In this example, the CheckBounds function causes a to change the upper limit
of the array range index to 10. The value TRUE is assigned then to the element
a[7]. In this way, the function corrects array access outside of the valid array
range.

R911403764, Edition 08 Bosch Rexroth AG


850 / 1158 ctrlX PLC Engineering
Objects

Example: Output an exception on array boundary violation


Add the following libraries in the Library Manager of the application:
● CmpApp.library and SysExcept.library as placeholder libraries.
● SysTypes2_Itfs.library with “Newest version always”
Add a “CheckBounds” object below the application and modify the specified
code as shown below.
Deklarationsteil
FUNCTION CheckBounds : DINT
VAR_INPUT
index, lower, upper: DINT;
END_VAR
VAR
_pApp : POINTER TO CmpApp.APPLICATION;
_Result : ISystypes2.RTS_IEC_RESULT;
END_VAR
Implementierungsteil
// Automatisch erzeugter Code: Es handelt sich hierbei um
einen Implementierungsvorschlag.
_pApp := AppGetCurrent(pResult := _Result);
IF index < lower THEN
CheckBounds := lower;
IF _pApp <> 0 THEN
AppGenerateException(pApp := _pApp, ulException :=
RtsExceptions.RTSEXCPT_ARRAYBOUNDS);
END_IF
ELSIF index > upper THEN
CheckBounds := upper;
IF _pApp <> 0 THEN
AppGenerateException(pApp:=_pApp,
ulException:=RtsExceptions.RTSEXCPT_ARRAYBOUNDS);
END_IF
ELSE
CheckBounds := index;
END_IF
Program an object “ MAIN_PRG” with the content shown below under the
application.
PROGRAM MAIN_PRG
VAR
xInit : BOOL;
arData : ARRAY[0..7] OF BYTE;
i : INT;
dwAdr : DWORD;
END_VAR

IF NOT xInit THEN


// Erforderlich für CheckBounds
xInit := TRUE;
END_IF

// Setze i auf einen Wert > 7 oder < 0


// Generiert eine Exception in CheckBounds, Benutzerdefiniert
arData[i] := 11;

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 851 / 1158
Objects

When you load and run this application, an "exception" is generated if the
array boundaries are violated. Processing stops in “CheckBounds” so that the
type of error can be detected.

Also refer to
● ⮫ Chapter 18.15 Using function blocks for implicit checks on page 160
● ⮫ Chapter 33.2.30 "POUs for implicit checks” object on page 846
● ⮫ Chapter 33.1.14 "Log” tab on page 751

POU 'CheckDivInt'

Functions to avoid the divisor value "0": CheckDivInt, CheckDivLint,

User interface
CheckDivReal und CheckDivLReal
To prevent division by zero, you can use the functions CheckDivInt,
CheckDivLint, CheckDivReal, and CheckDivLReal. If you include these func-
tions in the application, then they are called before each division operation in
the code.
To get the feature for monitoring functions, do not edit
CAUTION
the declaration part. However, you are permitted to add
local variables.

The default implementation of CheckDivReal:


Declaration part:
// Automatisch erzeugter Code : NICHT EDITIEREN
FUNCTION CheckDivReal : REAL
VAR_INPUT
divisor:REAL;
END_VAR
Implementation part:
// Automatisch erzeugter Code: Es handelt sich hierbei um
einen Implementierungsvorschlag.
IF divisor = 0 THEN
CheckDivReal:=1;
ELSE
CheckDivReal:=divisor;
END_IF;

The DIV operator uses the output of the CheckDivReal function as a


divisor. In the sample program below, CheckDivReal prevents division by 0
by changing the implicit value of the divisor d from "0" to 1 before the division
operation is executed. Thus, the result of the division is 799.
PROGRAM PLC_PRG
VAR
erg:REAL;
v1:REAL:=799;
d:REAL:=0;
END_VAR
erg:= v1 / d;

Also refer to
● ⮫ Chapter 18.15 Using function blocks for implicit checks on page 160
● ⮫ Chapter 33.2.30 "POUs for implicit checks” object on page 846

POU 'CheckDivLInt'

R911403764, Edition 08 Bosch Rexroth AG


852 / 1158 ctrlX PLC Engineering
Objects

Functions to avoid the divisor value "0": CheckDivInt, CheckDivLint,


CheckDivReal und CheckDivLReal
To prevent division by zero, you can use the functions CheckDivInt,
CheckDivLint, CheckDivReal, and CheckDivLReal. If you include these func-
tions in the application, then they are called before each division operation in
the code.
To get the feature for monitoring functions, do not edit
CAUTION
the declaration part. However, you are permitted to add
local variables.

The default implementation of CheckDivReal:


Declaration part:
// Automatisch erzeugter Code : NICHT EDITIEREN
FUNCTION CheckDivReal : REAL
VAR_INPUT
divisor:REAL;
END_VAR
Implementation part:
// Automatisch erzeugter Code: Es handelt sich hierbei um
einen Implementierungsvorschlag.
IF divisor = 0 THEN
CheckDivReal:=1;
ELSE
CheckDivReal:=divisor;
END_IF;

The DIV operator uses the output of the CheckDivReal function as a


divisor. In the sample program below, CheckDivReal prevents division by 0
by changing the implicit value of the divisor d from "0" to 1 before the division
operation is executed. Thus, the result of the division is 799.
PROGRAM PLC_PRG
VAR
erg:REAL;
v1:REAL:=799;
d:REAL:=0;
END_VAR
erg:= v1 / d;

Also refer to
● ⮫ Chapter 18.15 Using function blocks for implicit checks on page 160
● ⮫ Chapter 33.2.30 "POUs for implicit checks” object on page 846

POU 'CheckDivReal'

Functions to avoid the divisor value "0": CheckDivInt, CheckDivLint,


CheckDivReal und CheckDivLReal
To prevent division by zero, you can use the functions CheckDivInt,
CheckDivLint, CheckDivReal, and CheckDivLReal. If you include these func-
tions in the application, then they are called before each division operation in
the code.
To get the feature for monitoring functions, do not edit
CAUTION
the declaration part. However, you are permitted to add
local variables.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 853 / 1158
Objects

The default implementation of CheckDivReal:


Declaration part:
// Automatisch erzeugter Code : NICHT EDITIEREN
FUNCTION CheckDivReal : REAL
VAR_INPUT
divisor:REAL;
END_VAR
Implementation part:
// Automatisch erzeugter Code: Es handelt sich hierbei um
einen Implementierungsvorschlag.
IF divisor = 0 THEN

User interface
CheckDivReal:=1;
ELSE
CheckDivReal:=divisor;
END_IF;

The DIV operator uses the output of the CheckDivReal function as a


divisor. In the sample program below, CheckDivReal prevents division by 0
by changing the implicit value of the divisor d from "0" to 1 before the division
operation is executed. Thus, the result of the division is 799.
PROGRAM PLC_PRG
VAR
erg:REAL;
v1:REAL:=799;
d:REAL:=0;
END_VAR
erg:= v1 / d;

Also refer to
● ⮫ Chapter 18.15 Using function blocks for implicit checks on page 160
● ⮫ Chapter 33.2.30 "POUs for implicit checks” object on page 846

POU 'CheckDivLReal'

Functions to avoid the divisor value "0": CheckDivInt, CheckDivLint,


CheckDivReal und CheckDivLReal
To prevent division by zero, you can use the functions CheckDivInt,
CheckDivLint, CheckDivReal, and CheckDivLReal. If you include these func-
tions in the application, then they are called before each division operation in
the code.
To get the feature for monitoring functions, do not edit
CAUTION
the declaration part. However, you are permitted to add
local variables.

R911403764, Edition 08 Bosch Rexroth AG


854 / 1158 ctrlX PLC Engineering
Objects

The default implementation of CheckDivReal:


Declaration part:
// Automatisch erzeugter Code : NICHT EDITIEREN
FUNCTION CheckDivReal : REAL
VAR_INPUT
divisor:REAL;
END_VAR
Implementation part:
// Automatisch erzeugter Code: Es handelt sich hierbei um
einen Implementierungsvorschlag.
IF divisor = 0 THEN
CheckDivReal:=1;
ELSE
CheckDivReal:=divisor;
END_IF;

The DIV operator uses the output of the CheckDivReal function as a


divisor. In the sample program below, CheckDivReal prevents division by 0
by changing the implicit value of the divisor d from "0" to 1 before the division
operation is executed. Thus, the result of the division is 799.
PROGRAM PLC_PRG
VAR
erg:REAL;
v1:REAL:=799;
d:REAL:=0;
END_VAR
erg:= v1 / d;

Also refer to
● ⮫ Chapter 18.15 Using function blocks for implicit checks on page 160
● ⮫ Chapter 33.2.30 "POUs for implicit checks” object on page 846

POU 'CheckRangeSigned'
Function for monitoring the range limits of a subrange type of type DINT.

This monitoring function is responsible for the appropriate handling violations


to range limits. Examples of reactions to violations include setting error flags
and changing values. The functions are called implicitly when a value is
assigned to a subrange type variable.
To obtain the feature for monitoring functions, do not
CAUTION
edit the declaration section. However, you are permitted
to add local variables.
When the function is called, it receives the following input parameters:
● value: Value that should be assigned to the subrange type variables
● lower: Lower range limit
● upper: Upper range limit
The return value is the assignment value as long as it is within the valid range.
If not, then either the upper or lower limit is returned, depending on which
threshold was violated.
For example, the assignment i := 10*y is replaced implicitly by i :=
CheckRangeSigned(10*y, -4095, 4095);
If y is "1000", then "10*1000=10000" is not assigned to i like in the original
code. Instead, the upper range limit of "4095" is assigned.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 855 / 1158
Objects

The same is true for CheckRangeUnsigned function.


If functions are not available, then the subrange is not
NOTICE
checked for the respective variables at runtime. In this
case, you can assign any value between -2147483648
and +2147483648 (or between 0 and 4294967295)
to a variable of subrange type DINT/UDINT. You
can assign any value between -9223372036854775808
and +9223372036854775807 (or between 0 and
18446744073709551615) to a variable of a subrange
type LINT/ULINT.
Linking area monitoring functions can lead to endless
CAUTION
loops. For example, an endless loop can occur if the

User interface
counter variable of a FOR loop is a subrange type and
the counting range for the loop exits the defined sub-
range.

Example of an endless loop:

VAR
ui : UINT (0..10000);
...
END_VAR

FOR ui:=0 TO 10000 DO


...
END_FOR
The program never exits the FOR loop because the CheckRangeSigned moni-
toring function prevents ui from being set to a value greater than 10000.

Example for CheckRangeSigned


The assignment of a value to a DINT variable of a signed subrange type is
a condition for automatically calling the CheckRangeSigned. The function
restricts the assignment value to the subrange as defined in the variables
declaration. The default implementation of the function in ST is as follows:
Declaration part:

// Automatisch erzeugter Code : NICHT EDITIEREN


FUNCTION CheckRangeSigned : DINT
VAR_INPUT
value, lower, upper: DINT;
END_VAR
Implementation:

// Automatisch erzeugter Code : Es handelt sich hierbei um


einen Implementierungsvorschlag.
IF (value < lower) THEN
CheckRangeSigned := lower;
ELSEIF(value > upper) THEN
CheckRangeSigned := upper;
ELSE
CheckRangeSigned := value;
END_VAR

R911403764, Edition 08 Bosch Rexroth AG


856 / 1158 ctrlX PLC Engineering
Objects

Also refer to
● ⮫ Chapter 18.15 Using function blocks for implicit checks on page 160
● ⮫ Chapter 33.2.30 "POUs for implicit checks” object on page 846

POU 'CheckLRangeSigned'
Function for monitoring the range limits of a subrange type of type LINT.
For an implementation example of range monitoring, see the help page for the
CheckRangeSigned function.

This monitoring function is responsible for the appropriate handling violations


to range limits. Examples of reactions to violations include setting error flags
and changing values. The functions are called implicitly when a value is
assigned to a subrange type variable.
To obtain the feature for monitoring functions, do not
CAUTION
edit the declaration section. However, you are permitted
to add local variables.
When the function is called, it receives the following input parameters:
● value: Value that should be assigned to the subrange type variables
● lower: Lower range limit
● upper: Upper range limit
The return value is the assignment value as long as it is within the valid range.
If not, then either the upper or lower limit is returned, depending on which
threshold was violated.
For example, the assignment i := 10*y is replaced implicitly by i :=
CheckRangeSigned(10*y, -4095, 4095);
If y is "1000", then "10*1000=10000" is not assigned to i like in the original
code. Instead, the upper range limit of "4095" is assigned.
The same is true for CheckRangeUnsigned function.
If functions are not available, then the subrange is not
NOTICE
checked for the respective variables at runtime. In this
case, you can assign any value between -2147483648
and +2147483648 (or between 0 and 4294967295)
to a variable of subrange type DINT/UDINT. You
can assign any value between -9223372036854775808
and +9223372036854775807 (or between 0 and
18446744073709551615) to a variable of a subrange
type LINT/ULINT.
Linking area monitoring functions can lead to endless
CAUTION
loops. For example, an endless loop can occur if the
counter variable of a FOR loop is a subrange type and
the counting range for the loop exits the defined sub-
range.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 857 / 1158
Objects

Example of an endless loop:

VAR
ui : UINT (0..10000);
...
END_VAR

FOR ui:=0 TO 10000 DO


...
END_FOR
The program never exits the FOR loop because the CheckRangeSigned moni-

User interface
toring function prevents ui from being set to a value greater than 10000.

Also refer to
● ⮫ Chapter 18.15 Using function blocks for implicit checks on page 160
● ⮫ Chapter POU 'CheckRangeSigned' on page 854
● ⮫ Chapter 33.2.30 "POUs for implicit checks” object on page 846

POU 'CheckRangeUnsigned'
Function for monitoring the range limits of a subrange type of type UDINT.
For an implementation example of range monitoring, see the help page for the
CheckRangeSigned function.

This monitoring function is responsible for the appropriate handling violations


to range limits. Examples of reactions to violations include setting error flags
and changing values. The functions are called implicitly when a value is
assigned to a subrange type variable.
To obtain the feature for monitoring functions, do not
CAUTION
edit the declaration section. However, you are permitted
to add local variables.
When the function is called, it receives the following input parameters:
● value: Value that should be assigned to the subrange type variables
● lower: Lower range limit
● upper: Upper range limit
The return value is the assignment value as long as it is within the valid range.
If not, then either the upper or lower limit is returned, depending on which
threshold was violated.
For example, the assignment i := 10*y is replaced implicitly by i :=
CheckRangeSigned(10*y, -4095, 4095);
If y is "1000", then "10*1000=10000" is not assigned to i like in the original
code. Instead, the upper range limit of "4095" is assigned.
The same is true for CheckRangeUnsigned function.
If functions are not available, then the subrange is not
NOTICE
checked for the respective variables at runtime. In this
case, you can assign any value between -2147483648
and +2147483648 (or between 0 and 4294967295)
to a variable of subrange type DINT/UDINT. You
can assign any value between -9223372036854775808
and +9223372036854775807 (or between 0 and
18446744073709551615) to a variable of a subrange
type LINT/ULINT.

R911403764, Edition 08 Bosch Rexroth AG


858 / 1158 ctrlX PLC Engineering
Objects

Linking area monitoring functions can lead to endless


CAUTION
loops. For example, an endless loop can occur if the
counter variable of a FOR loop is a subrange type and
the counting range for the loop exits the defined sub-
range.

Example of an endless loop:

VAR
ui : UINT (0..10000);
...
END_VAR

FOR ui:=0 TO 10000 DO


...
END_FOR
The program never exits the FOR loop because the CheckRangeSigned moni-
toring function prevents ui from being set to a value greater than 10000.

Also refer to
● ⮫ Chapter 18.15 Using function blocks for implicit checks on page 160
● ⮫ Chapter POU 'CheckRangeSigned' on page 854
● ⮫ Chapter 33.2.30 "POUs for implicit checks” object on page 846

POU 'CheckLRangeUnsigned'
Function for monitoring the range limits of a subrange type of type ULINT.
For an implementation example of range monitoring, see the help page for the
CheckRangeSigned function.

This monitoring function is responsible for the appropriate handling violations


to range limits. Examples of reactions to violations include setting error flags
and changing values. The functions are called implicitly when a value is
assigned to a subrange type variable.
To obtain the feature for monitoring functions, do not
CAUTION
edit the declaration section. However, you are permitted
to add local variables.
When the function is called, it receives the following input parameters:
● value: Value that should be assigned to the subrange type variables
● lower: Lower range limit
● upper: Upper range limit
The return value is the assignment value as long as it is within the valid range.
If not, then either the upper or lower limit is returned, depending on which
threshold was violated.
For example, the assignment i := 10*y is replaced implicitly by i :=
CheckRangeSigned(10*y, -4095, 4095);
If y is "1000", then "10*1000=10000" is not assigned to i like in the original
code. Instead, the upper range limit of "4095" is assigned.
The same is true for CheckRangeUnsigned function.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 859 / 1158
Objects

If functions are not available, then the subrange is not


NOTICE
checked for the respective variables at runtime. In this
case, you can assign any value between -2147483648
and +2147483648 (or between 0 and 4294967295)
to a variable of subrange type DINT/UDINT. You
can assign any value between -9223372036854775808
and +9223372036854775807 (or between 0 and
18446744073709551615) to a variable of a subrange
type LINT/ULINT.
Linking area monitoring functions can lead to endless
CAUTION
loops. For example, an endless loop can occur if the
counter variable of a FOR loop is a subrange type and

User interface
the counting range for the loop exits the defined sub-
range.

Example of an endless loop:

VAR
ui : UINT (0..10000);
...
END_VAR

FOR ui:=0 TO 10000 DO


...
END_FOR
The program never exits the FOR loop because the CheckRangeSigned moni-
toring function prevents ui from being set to a value greater than 10000.

Also refer to
● ⮫ Chapter 18.15 Using function blocks for implicit checks on page 160
● ⮫ Chapter POU 'CheckRangeSigned' on page 854
● ⮫ Chapter 33.2.30 "POUs for implicit checks” object on page 846

POU 'CheckPointer'
Monitoring function for pointers
Use this function to monitor the memory access of pointers in runtime mode.
As opposed to other monitoring functions, a standard suggestion does not exist
for the implementation of CheckPointer. You must define an implementation
according to your own requirements.
The CheckPointer function is intended to check whether the passed pointer
points to a valid memory address and whether the alignment of the referenced
memory area matches the type of the variable to which the pointer points. If
both conditions are fulfilled, the POINTER is returned. If not, then the function
should complete an appropriate error handling.
To get the feature for monitoring functions, do not edit
CAUTION
the declaration part. However, you are permitted to add
local variables.
For the THIS pointer and the SUPER pointer there is no
NOTICE
implicit call of the monitoring function.
The function “Checkpointer” is active from compiler ver-
NOTICE
sion 3.5.7.40 also for variables of type REFERENCE identi-
cally as on pointer variables.

R911403764, Edition 08 Bosch Rexroth AG


860 / 1158 ctrlX PLC Engineering
Objects

Template
Deklaration:

// Automatisch erzeugter Code: NICHT EDITIEREN


FUNCTION CheckPointer : POINTER TO BYTE
VAR_INPUT
ptToTest : POINTER TO BYTE;
iSize : DINT;
iGran : DINT;
bWrite: BOOL;
END_VAR
Implementierung (unvollständig!):

// Keine Standardimplementierung. Bitte fügen Sie Ihren Code


hier ein.
CheckPointer := ptToTest;
When the function is called, PLC Engineering provides the following input
parameters:
● ptToTest: Destination address of the pointer
● iSize: Size of the referenced variable; the data type of iSize must be
compatible with INT and cover the dimensional scope of the variables.
● iGran: Granularity of the referenced size; this is the largest non-struc-
tured data type contained in the referenced variables; the data type of
iGran must be compatible with INT
● bWrite: Access type (TRUE = write access, FALSE = read access); the data
type of bWrite has to be BOOL
When the result of the check is positive, the unchanged pointer is returned
(ptToTest).

Also refer to
● ⮫ Chapter 18.15 Using function blocks for implicit checks on page 160
● ⮫ Chapter 33.2.30 "POUs for implicit checks” object on page 846

33.2.31 "Task configuration" object


Object 'Task configuration' – General information
Symbol:
The object is used to define and display the basic settings for the task configu-
ration.
The “Task configuration” object must be included exactly one time in each
application.
“Task configuration” tabs and their functions
● “Properties”: Displays the basic settings
● “System Events”: Links function block calls with system events
● “Monitoring”: Displays the status and current statistics for the cycles times
in online mode
● “Variable use”: Overview of the tasks that access the variables and how they
access the variables
● “Task groups”: Definitions of the tasks groups and their assignment to CPUs
● “CPU load” Graphical representation of the CPU load in online mode

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 861 / 1158
Objects

Also refer to
● ⮫ Chapter 18.21.2 Creating a Task Configuration on page 208
● ⮫ Chapter Tab 'Properties' on page 861
● ⮫ Chapter Tab 'System Events' on page 861
● ⮫ Chapter Tab 'Monitor' on page 863
● ⮫ Chapter 'Variable use' tab on page 864
● ⮫ Chapter ‘Task group’ tab on page 865
● ⮫ Chapter Tab 'CPU Load' on page 865
● ⮫ Chapter 'Task’ object – General information on page 865

Tab 'Properties'

User interface
Object: “Task Configuration”
In this tab, you define the basic settings of the task configuration as predefined
by the target system, such as the maximum values for tasks and watchdog
parameters.

Tab 'System Events'


Object: “Task Configuration”
On the “System Events” tab, you define which event calls which function and
whether or not the configuration is currently activated. You use this tab when a
system event (instead of a task) should call a project function.
“Add Event Handler” Opens the “Add Event Handler” dialog
“Remove Event Handler” Deletes the selected list assignment
“Event Info” Shows information from the corresponding event library
“Open Event Function” Opens the editor of the new function for the selected assignment You
have selected the implementation language of the new function in the
“Add Event Handler” dialog.
Assignment of functions to call for events with: “Name”,“Description”, “Function to call”, and
“Active” (activate/deactivate configuration).
Table 87: “Add Event Handler”
Adds a new assignment "Event – Function to call" to the list
“Event” The possible selection depends on the target device. PLC Engineering
marks unavailable events with a red symbol in front of the name.
A list of all possible system events is located at the end of this section.
“Function to call” Function name (“POU”, type “FUNCTION”)
You have to specify the name of the new function. PLC Engineering
inserts the function to the device tree after you confirm the dialog.
“Scope” ● “Application”: The function is available to the application.
● “POUs”: The function is available to the entire project.
“Implementation language” Implementation language for the new function
“Description” Short description of the selected event

Features in “Online Mode”


The list of assignments from called functions to events also includes the
following information: “Event Status”, “Call Count”, and the “Online Reset”
button.

R911403764, Edition 08 Bosch Rexroth AG


862 / 1158 ctrlX PLC Engineering
Objects

“Event Status” 0: No error has occurred.


Does not equal 0: Error. You need to consult the respective runtime
system documentation.
“Call Count” Displays how often the event has occurred or the associated function
has been called.
“Online Reset” PLC Engineering reinitializes the event lists and resets the counter for
the events/function calls. Incorrectly initialized events are displayed
with a red status cell.

Possible system events


Event Description Task Debugging
PrepareStart Call before starting Communication task No
the application
StartDone Call after starting Communication task No
the application
PrepareStop Call before stop- Communication task No
ping the application
StopDone Call after stopping Communication task No
the application
PrepareReset Call before reset- Communication task No
ting the application
ResetDone Call after resetting Communication task No
the application
PrepareOnline- Call before online Communication task No
Change change of the appli-
cation
OnlineChange- Call after online Communication task No
Done change of the appli-
cation
PrepareDown- Call before down- Communication task No
load loading the applica-
tion
DownloadDone Call after down- Communication task No
loading the applica-
tion
PrepareDelete Call before deleting Communication task No
the application
DeleteDone Call after deleting Communication task No
the application
PrepareExit Call before exiting Communication task No
the application
ExitDone Call after exiting Communication task No
the application

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 863 / 1158
Objects

Event Description Task Debugging


CodeInitDone Event is sent after Communication task No
Code Init. Called
within the task
safe section and
only for an online
change change (for
example, the copy
code for online
change is executed
here).
Exception The event is sent Exception handling Depends on the

User interface
if an exception has task of the runtime, task
occurred in the or the task itself
context of an appli- if the runtime does
cation. not support exception
handling
Login Login of a client to Communication task No
this application
Logout Logout of a client Communication task No
from this applica-
tion
BeforeReadin- Call before reading IEC task Yes
gInputs the inputs
AfterReadingIn- Call after reading IEC task Yes
puts the inputs
BeforeWritin- Call before writing IEC task Yes
gOutputs the outputs
AfterWritingOut- Call after writing IEC task Yes
puts the outputs
DebugLoop Event is sent in Communication task No
cycles to the debug
loop if the IEC task
stops at a break-
point.
PrepareShut- Event is sent imme- Runtime main loop No
down diately before the
runtime system is
downloaded.
PrepareExit- Event is sent during Runtime main loop No
Comm download before
exiting the commu-
nication server.
PrepareExitTasks Event is sent during Runtime main loop No
download before
exiting all tasks.

Tab 'Monitor'
Object: “Task configuration”
In online mode, the tab shows the task status of the task configuration as
well as current messages about the cycle times and cycles. PLC Engineering
refreshes the values in the same time interval as for monitoring of values from
the control.

R911403764, Edition 08 Bosch Rexroth AG


864 / 1158 ctrlX PLC Engineering
Objects

The displayed values can be reset to the value 0 with the context menu com-
mand “Reset”.
“Task” Task name as defined in the task configuration
“Status” ● “Not generated”: Task was not started since most recent update; espe-
cially for event tasks
● “Created”: The task is detected in the runtime system, but not yet in
operation
● “Valid”: Task is normal in operation
● “Exception”: Task has exceptional state
“Number of IEC cycles” Number of cycles executed since starting the application where the IEC
code was executed; 0 if the target system does not support the counter
function.
“Number of cycles” Number of executed cycles since logging in to the PLC.
It depends on the target system whether cycles are also counted where
the application is not running. In these cases, the “Cycle Count” may be
greater than the “IEC-Cycle Count”.
“Latest cycle time (µs)” Last measured cycle time [µs]
“Average cycle time Average cycle time over all cycles [µs]
(µs)”
“Max. Cycle time (µs)” Maximum measured cycle time over all cycles [µs]
“Min. Cycle time (µs)” Minimum measured cycle time over all cycles [µs]
“Jitter (µs)” Current value of the periodic jitter [µs]
Note: From PLC Engineering 3.5 SP11 to SP15, the peak-to-peak value of
the periodic jitter is displayed. In older versions, as now again from SP16,
the current value of the periodic jitter is displayed.
“Min. Jitter (µs)” Minimum measured periodic jitter [µs]
“Max. Jitter (µs)” Maximum measured periodic jitter [µs]
“Core” Number of processor cores on which the task is currently running.
Example: 2
Prerequisite: The control has a multi-core CPU.
If the CPU is not a multi-core CPU, the value -1 is displayed here.
Also refer to
● ⮫ Chapter 18.21.3 Definitions of jitter, latency on page 209
● ⮫ Chapter 18.21 Task configuration on page 208

'Variable use' tab


Object: “Task configuration”
In the “Variable use” tab you get an overview of all variables and their use.
There you can see the tasks where variables are accessed.
When using multicore, write access (w) to a variable should take place only in a
task because otherwise it can cause inconsistencies.
In the context menu, you can hide individual tasks and show the cross-refer-
ence list to variables.
“Variables” Name of the variable
“Type” Data type
“Quantity” Number of tasks that access these variables.
“<Task name>” Access to the variable (r: read, w: write, rw: read/write)

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 865 / 1158
Objects

Also refer to
● ⮫ Chapter 18.21.4 Multicore on page 209
● ⮫ Chapter 18.21 Task configuration on page 208

‘Task group’ tab


Object: “Task configuration”
Define the task groups in the “Task group” tab. Task groups can be distributed
to individual processor kernels in case of multicore systems. The tasks of a task
group are bound to the processor cores according to the strategy defined in
the “Core” field.
“Add group” The interface adds a new task group with the name NewGroup_<nr>.

User interface
“Remove group” Deletes the selected task group
“Group name” The name can be changed by double-clicking in the field.
“Core” Specifies in which process kernel the task of this group is processed.
● “FreeFloating”: All tasks are dynamically connected to different pro-
cessor kernels - the operating system assigns the tasks, the user
cannot influence the assignment.
● “SequentialPinned”: All tasks are connected to different processor
kernels - the operating system assigns the tasks, the user cannot
influence the assignment.
● “FixedPinned”: All tasks are connected to a processor kernel. Which
processor kernel the tasks are connected to is decided in the run-
time system (standard setting).
● “<Core number>”: Defined processor kernel. If the process kernel is
not available, an error message is output.
Also refer to
● ⮫ Chapter 18.21.4 Multicore on page 209
● ⮫ Chapter 18.21 Task configuration on page 208

Tab 'CPU Load'


Object: “Task Configuration”
The “CPU Load” tab is available in online mode for multicore devices only. The
load of the individual CPUs is presented in the trace editor.
You open the trace configuration by double-clicking the legend in the window
on the right side. Adding more variables is not possible here.
See also
● ⮫ Chapter 18.21.4 Multicore on page 209

33.2.32 "Task" object


'Task’ object – General information
Symbol:
Define the conditions to start the task and to call the task in the object.
You insert the object below “Task Configuration” in the device tree.
Also refer to
● ⮫ Chapter “Configuration” tab on page 865

“Configuration” tab
Object: “Task”

R911403764, Edition 08 Bosch Rexroth AG


866 / 1158 ctrlX PLC Engineering
Objects

“Priority” Possible values: 0..31, where 0 is the highest priority


“Task group” Assigned task group. This assignment is displayed in the device tree in
parentheses. Task groups can be assigned to certain processor kernels
in multicore systems.
This task group is displayed in the device tree in parentheses.
Table 88: “Type”
“Cyclic” PLC Engineering processes the task cyclically. The cycle time of the
task is defined in the “Interval” field.
“Event” PLC Engineering starts processing the task as soon as the global vari-
able defined in the input field “Event” contains a rising edge.
“Free running” PLC Engineering starts processing the task again automatically in a
continuous loop at program start and at the end of a complete pass.
No cycle time is defined.
“Status” PLC Engineering starts task processing as soon as the variable defined
in the “Event” input field yields the Boolean value TRUE.
“external” PLC Engineering starts processing the task as soon as the event
defined in the “Event” input field occurs. The events supported and
provided in the selection list depend on the target system. (Do not
confuse with system events).
“Interval” Task cycle time
Required for the types “Cyclic” or “External Event” when the event
requires a given time. Period after which the task is to be restarted. If
you enter a number here, then you can select the desired unit in the
dropdown list after the input field.
If you select “ms”, then an entry is automatically displayed in TIME
format, for example t#200ms, as soon as the window is in focus again.
You can also enter the task cycle time directly in TIME format. Entries
in [µs] format are always displayed as a pure number.
Deviations of the task from this desired task cycle time are displayed
at runtime as periodic jitter on the “Monitoring” tab.
A defined cycle grid is required for field buses to ensure
NOTICE
a determined response. Therefore, do not use the “type”
“free-running” for a bus cycle task.
Please note the difference between the processing types
NOTICE
“Status ” and “Event”: If the given event yields TRUE,
then the start condition of a task of type “Status” is
satisfied. In contrast, the start for an “Event” type task
requires a change in the event from FALSE to TRUE. If the
scanning rate of the task scheduler is too low, then the
rising edge of the event can remain unnoticed.
Note: When setting the task cycle time, identify which
NOTICE
bus system is currently being used. For example, the task
cycle time in a CAN bus system must match the currently
set baud rate and the number of frames used in the bus.
In addition, the times set for heartbeat, node guarding,
and sync should always be a multiple of the task cycle
time. If not, then CAN frames can be lost.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 867 / 1158
Objects

Table 89: “Watchdog”


Defines the time monitoring for a task. If the target system supports an extended watchdog config-
uration, it is possible that the following settings are predefined in the device description:
● Upper and lower limit
● Default watchdog time
● Time specified in percent
The default watchdog settings depend on the device.
“Enabling” Watchdog is active.
If the task exceeds the currently set “Time” of the watchdog, then the
task is halted with an error status (exception). The currently specified
“sensitivity” is included in the calculation. If you activate the option

User interface
“Update I/Os” in the “PLC Settings” of the PLC, then PLC Engineering
resets the outputs to the defined default values.
Possible cases:
● Multiple subsequent timeouts:
Sensitivity: 0, 1 - exception in cycle 1
Sensitivity: 2 - exception in cycle 2
Sensitivity: n - exception in cycle n
● One timeout: Exception if the cycle time of the current cycle
is longer than (time * sensitivity). Example: Time=t#10ms, Sensi-
tivity=5, i.e., exception as soon as the (one-time) task runs longer
than 50 ms.
“Time (example: t#200ms)” Watchdog time
Defined the time monitoring for a task together with the “Sensitivity”
as described in “Enabling”.
Depending on the target system, the monitoring interval is given as a
percentage of the task interval if possible. In this case, the drop-down
list for the unit is disabled and displays “%”.
“Sensitivity” Number
Defined the time monitoring for a task together with the watchdog
time as described in “Enabling”.
Using the functions from the library CmpIecTask.library, you can deactivate
a watchdog for specific PLC cycles. This is useful for cycles that demand more
time due to initialization.

Example
Disable/re-enable watchdog:
hIecTask := RTS_IEC_HANDLE //Declaration of the variable
hIecTask
hIecTask := IecTaskGetCurrent(0);
IecTaskDisableWatchdog(hIecTask); // Watchdog disabled
...
IecTaskEnableWatchdog(hIecTask); Watchdog enabled

Listing of the program function block (“POU”) calling the task


The calling order corresponds to the function block order in the list (from top to bottom).
“Add call” Defines a new program call
“Open function block” Opens the selected function block
“Move up” Change of calling sequence
“Down”

R911403764, Edition 08 Bosch Rexroth AG


868 / 1158 ctrlX PLC Engineering
Menu commands

Also refer to
● ⮫ Chapter 33.2.31 "Task configuration" object on page 860
● ⮫ Chapter Tab 'Monitor' on page 863
● ⮫ Chapter ‘Task group’ tab on page 865

33.3 Menu commands


33.3.1 Menu commands – General information
By default, the most important commands are available in the user inter-
face of PLC Engineering. To customize the menu configuration, select “Tools
🠂 Customize 🠂 Menu”.
If you have packages or add-ons installed, additional menus and commands
may be available.
Also refer to
● ⮫ Chapter 7.2.1 Customizing Menus on page 47

33.3.2 Menu “File”


Command 'New Project’
Symbol: , keyboard shortcuts: [Ctrl] + [N]
Function: The command opens the “New Project” dialog for creating a new
project file.
Call: Menu “File”

'New project' dialog


Function: Selection of a project category and a project template.
Call: “File 🠂 New project”
Depending on the selected template, a project is created that is automatically
equipped with a certain scope of objects.

“Categories”
“Libraries” Contains templates for creating library projects
“Projects” Contains templates for creating PLC projects

“Templates”
“Projects” category:
“Empty project” Contains only the “Project settings” object
“Standard project” Contains a basic set of objects and libraries. A wizard supports cre-
ating the objects and libraries, see below.
“Libraries” category:
“PLC Engineering-Container Library that contains only other libraries, but no individual blocks.
library”
“PLC Engineering-Interface Library only for defining the interface of a software component. Thus,
library” it contains only objects that do not generate code (constants, struc-
tures, interfaces, etc.).
“Empty library” Contains only the “Project settings” object
“External PLC Engineering Target system-specific library, is implemented as part of the runtime
library” system (in ANSI C or C++) .

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 869 / 1158
Menu commands

“Name” Name of the project to be created. Depending on the template, a


default name is displayed. The numerical addition ensures the unique-
ness of the name in the file system.
You can change the file name by taking the file path conventions of the
operating system into consideration. Dots in the name are not allowed,
but the name must not contain any dots.
PLC Engineering automatically adds the file extension corresponding
to the selected template.
“Location” Memory location for the new project file.
opens a dialog for browsing the file system.
shows the history of previously entered paths

User interface
“OK” PLC Engineering opens a new project. An error symbol at the input
field indicates missing data. When hovering with the mouse cursor
over it, a tooltip informs the user how to proceed.

“Standard project” dialog


Function: Wizard for creating a standard project.
Call: Command “File 🠂 New project” in the “New project” dialog, select the
“Projects” category and the “Standard project” template and click on“OK”.
“Device” Selection list with PLC devices. The selected device is inserted as an
object in the Devices view below the root node
“PLC_PRG in” Selection list with the programming languages. The automatically
inserted program PLC_PRG is created in the selected language.

Also refer to
● ⮫ Chapter 8.2.3 Creating a standard project on page 56

'Open project’ command


Symbol: Shortcut: [Ctrl] + [O]
Function: The command opens a dialog to load a project. Browse the file
system for a PLC Engineering project and open it in the development system.
Call: Menu “File”

‘Open project’ dialog


“File type” Type of the PLC Engineeringproject loaded into the development
system
“All supported files” Filters for all projects that can be loaded by PLC Engineering
File extension project Filters for projects created with PLC Engineering V3
File extension Filters for project archives created with PLC Engineering V3
projectarchive
File extension library Filters for library project created with PLC Engineering V3
“Open” Loads the selected project in PLC Engineering
Note: Depending on the state of your PLC Engineering installation, it
may be necessary to update or complete the installation. If this is
the case, first another dialog “Open project” opens with options for
installation management.

Command “Open project from ctrlX CORE...”


Prerequisite
To be able to open a project from the ctrlX device, the project data source has
to available on the ctrlX device, see:

R911403764, Edition 08 Bosch Rexroth AG


870 / 1158 ctrlX PLC Engineering
Menu commands

⮫ Project data source - Introduction

Symbol

Call
In the PLC Engineering menu “File 🠂 Open project from ctrlX CORE...”

General information about the project data source


The project data can either be saved on the ctrlX CORE device or in the file
system of the Engineering PC.
If the project data is stored on the ctrlX device, the command “Open project
from ctrlX CORE...” allows to call the project data from the ctrlX device and to
open and edit it in PLC Engineering.
Via the command “Project synchronisation...”, it is possible to synchronize the
changed project data between Engineering PC and ctrlX device again after
editing, see:
⮫ Command “Project synchronisation...”

Operating principle
The command opens the “Open project in ctrlX CORE” dialog, see:
⮫ Dialog “Open project in ctrlX CORE”
In the dialog, select from which ctrlX device the project data is to be loaded to
the Engineering PC. After the project data has been read from the ctrlX device,
it is possible to edit the project in PLC Engineering and then synchronize it
again with the project store in the ctrlX device. In addition, the project data can
also be stored on the Engineering PC.

Command 'Close project'


Function: The command closes the currently opened project. PLC Engineering
remains open.
Call: Menu “File”. Also, implicitly when opening a new/different project while a
project is still open.
If the project contains unsaved changes, a prompt is displayed asking if the
project should be saved.
If you have not yet explicitly saved the project, a prompt is displayed asking if
you want to delete the project files.
Also refer to
● ⮫ Chapter 8.2 Creating a new project on page 53

Command 'Save project'


Symbol: , shortcut [Ctrl] + [S]
Function: this command saves the project file.
Call: “File” menu
This command saves the project file with the current project name, which
appears in the title bar of the main window. If the project has been changed
since it was last saved, the project name is given an asterisk.
The command is not available if the project is read-only.
Write protection exists if
● the project is identified in the project information (summary) as 'Released'
● the option “Open read-only” was selected in the dialog box “Open Project”
when opening the project

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 871 / 1158
Menu commands

Write protection is indicated by a line in the top right corner of the main
window. A mouse-click on this line brings up a menu with commands for the
possible actions:
● “Save project under a different file name on the disk”: a mouse-click on this
option leads to 'Save file as…'
● “Exit read-only mode”: appears only if the option “Open read-only” was
selected when opening the project.
● “Remove read-only attribute from the project on the disk”: appears only if
the project file had been provided with the property 'Read-only' on the disk
at the time of opening.
● “Remove identification 'Released' in the project information”: appears only if
this attribute is currently set.

User interface
Backup copy
Optionally a backup copy of the project file can be created. If the option
“Create backup copy” is activated in the option dialog box 'Load and Save',
the project is additionally copied to a file <projectname.backup> each time
the project is saved.
See also
● ⮫ Chapter Command 'Save project as' on page 871
● ⮫ Chapter 11.13 Saving the project on page 85
● ⮫ Chapter ‘Options’ dialog - ‘Load and save' on page 1084

Command 'Save project as'


The command opens the standard Windows dialog for saving a file. The project
can be stored with the desired location and file type.
“File type” The selection list contains the versions of the development system
for which the project can be saved for regular projects as well as for
library projects. If the current project contains Add-ons that are not
available in the selected storage format (profile), the “Expand profile”
dialog is opened.
● “Project files (PLC Engineering V<version>) (*.project)”: The project
is saved as PLC Engineering project file "<projectname>.project "
for the currently used or the selected version of the programming
system.
● “Library files (PLC Engineering V<version>) (*.library)”: The project
is saved as PLC Engineering library file "<projectname>.library" for
the currently used or the selected version of the programming
system.
When opening the project in an older version, it is recommended to
save data for precisely this version, as you are informed immediately
about potential data loss.
Before saving a project as a library:
● Make sure that the rules for creating libraries have been followed.
● If it is to be possible to configure global constants provided by the library at
a later time in an application, then you must define them in a parameter list.
A parameter list is a special type of global variable list.
● When saving the project, no automatic check for errors is performed.
● Unlike CoDeSys V2.3, there is no distinction between 'external' and 'internal'
libraries. Now you can define in the properties of each individual project
object whether or not it should be treated as 'external'.
● Consider whether the library created is to be installed in the system library
repository immediately. If yes, use the "Save project and install to library
repository" command.

R911403764, Edition 08 Bosch Rexroth AG


872 / 1158 ctrlX PLC Engineering
Menu commands

● If you want to protect the library project against subsequent changes, set
the “Released” attribute in the “Project information” dialog. At the next
attempt to save the project, a corresponding message will be displayed and
the user must respond to the write protection with deliberate actions.
● If you save the project as a version of the development system other than
the one currently in use, then you will be informed first about possible data
loss.

'Expand profile’ dialog


In this dialog, the selected profile (memory format) can be extended by the
add-ons that are contained in the current project. The profile is saved tempora-
rily and then deleted after being saved or exported.
“Add to profile” : The current profile is extended by the add-on so that the add-on
data of the current project is also saved.
“AddOn” The add-on of the current project that is not contained in the selected
memory format.
“Version” Version of the “Add-on” included in the current profile.
If several versions are installed, then the version can be selected.
“Save profile” Opens the “Enter Profile name” dialog. In this dialog, specify the
name for the new profile. The new profile is saved permanently at
$ProgramData$/$PRODUCT$/CustomInformationalProfiles.
“Use saved profile” The profile which was permanently saved in “Save profile” is used for
saving or exporting the current project.

Also refer to
● ⮫ Chapter Command 'Save project' on page 870
● ⮫ Chapter 11.13 Saving the project on page 85
● ⮫ Chapter ‘Options’ dialog - ‘Load and save' on page 1084
● ⮫ Chapter 27.3 Information for library developers on page 330
● ⮫ Chapter Command 'Save Project and Install into Library Repository'
on page 875

Command 'Save/Send Archive'


Function: This command opens the dialog “Project Archive” for the configura-
tion of project archives.
Call: Menu bar: “File 🠂 Project Archive”
An archive file (*.projectarchive) contains all files contained and referenced in
the currently opened project. It can either be saved or dispatched as an e-mail
attachment. The dispatch by email is very helpful for providing an employee
with all project-relevant files. The file can be simply unpacked again with the
command “Extract Archive”.
The archiving function is not intended for the storage of
NOTICE
a project, but rather for the simple summarizing of all
project-relevant files.
See also
● ⮫ Chapter 11.14 Saving/sending the project archive on page 87
● ⮫ Chapter Command 'Extract archive' on page 873

Dialog 'Project Archive'


The dialog displays all the categories that can be added to the project archive.
In this dialog, complete categories or individual objects from the categories can
be added to the project archive by setting a check mark ( ).

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 873 / 1158
Menu commands

Entries that are display as red in the list require your attention. Move the
mouse pointer over this library for more information.
“Additional Files” Opens the dialog “Additional Files”. Here, further files can be added to
the archive with the “Add” button.
“Comment” Opens the "Comment" dialog. Here, comments can be added to the
archive.
“Save” Creates the archive file and saves it. The storage location and the
archive name are specified in the subsequent dialog
“Send” Creates a temporary archive file that is attached to an empty e-mail. A
correct installation of the MAPI (Messaging Application Programming
Interface) is required for the successful execution of this operation.
Failure is documented by the display of a corresponding error mes-

User interface
sage. The temporary archive is automatically deleted after sending the
e-mail.

Command 'Extract archive'


Function: The command extracts a project archive created using the “Save/
send archive” command. Before that you need to configure which contents of
the archive PLC Engineering should extract and to which directories in the file
system they should be copied.
Call: Menu “File 🠂 Project archive”
By default, an archive has the file extension .projectarchive.
After selecting the archive, the “Extract project archive” dialog opens where
you configure the extraction.

Dialog Box 'Extract Project Archive'


This dialog box shows the contents of the project archive. You can exclude
complete categories or single objects from categories by clearing the check
boxes ( ) from the extraction.
Table 90: “Locations”
“Extract into the same The archive is extracted to the same directory.
folder where the archive is
located”
“Extract into the following The contents of the archive are extracted to the given path.
folder”
“Advanced” Opens the “Advanced” dialog box for you to define where special and
additional files from the archive are extracted.
Table 91: “Contents”
“Items” Shows the contents of the archive structured in object categories.
: The object is extracted.
: The object is not extracted.
“Comment” Comment that was entered when creating the project archive
“Extract” If an extracted file has the same name as an existing file in the target
directory, then a dialog box opens, prompting whether the local file
should be replaced. The decision can be applied automatically to any
additional conflicting names. In this case, you have to select the
“Apply to all objects and files” check box.

R911403764, Edition 08 Bosch Rexroth AG


874 / 1158 ctrlX PLC Engineering
Menu commands

'Advanced’ dialog
Table 92: “Repositories”
“Install devices in” Drop-down list with currently available repositories. Select the reposi-
“Install libraries in” tories to which PLC Engineering is to install the devices and libraries
contained in the archive.
(Only relevant in the con-
text of PLC programming)
Table 93: “Additional files”
By default, "additional files" are preconfigured with “Do not extract”. Change this by selecting
entries in the table and activating one of the following options:
“Extract to project Project file directory
directory”
“Extract to directory” User-defined directory
“Do not extract” Default setting
Also refer to
● ⮫ Chapter Command 'Save/Send Archive' on page 872

Command 'Print'
Symbol:
Function: This command opens the default Windows dialog box for printing
documents.
Call: Main menu “File”
See also
● ⮫ Chapter Dialog 'Project Settings' - 'Page Setup' on page 1063

Command 'Print Preview'


Function: This command opens a print preview for the currently open element.
Call: Main menu “File”
Requirement: An object is open in the editor.
See also
● ⮫ Chapter Dialog 'Project Settings' - 'Page Setup' on page 1063
● ⮫ Chapter Command 'Print' on page 874

Command 'Page Setup'


Symbol:
Function: This command opens the “Page Setup” dialog box for configuring the
layout of the printed version of the project contents.
Call: Main menu “File 🠂 Page Setup”
See also
● ⮫ Chapter Dialog 'Project Settings' - 'Page Setup' on page 1063
● ⮫ Chapter Command 'Print' on page 874

Command 'Last used projects'


Function: Opens the list of recently used projects from which you can select a
project to open.
Call: Menu “File”
Also refer to
● ⮫ Chapter 8.2 Creating a new project on page 53

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 875 / 1158
Menu commands

Command 'Exit'
Shortcut: [<Alt>]+[<F4>]
Function: this command exits from the programming system. If a project is
currently opened that has been changed since it was last saved, a dialog box
opens asking whether the project should be saved.
Call: “File” menu

Command 'Save Project and Install into Library Repository'


Function: this command saves the project as a library in the 'system' library
repository.
Call: Main menu “File”.

User interface
With this command PLC Engineering saves the project as a library in the 'sys-
tem' library repository. This is an extension to the saving of a project as a
library file using the “Save Project as” command. The library is installed on the
local system and is immediately available for insertion into a project.
See also
● ⮫ Chapter Command 'Save project as' on page 871

Command 'Save Project as Compiled Library'


Function: This command saves a library project in encrypted format.
Call: Menu “File”
The command opens the standard dialog for saving a file in the file system. The
“Compiled PLC Engineering Libraries” file type is already preset. The file exten-
sion is .compiled-library-v3 or .compiled-library (PLC Engineering <
SP15). In this format, then source code of the library POU is not visible when
the library is used in a project.
If the “Force signing of compiled libraries” option is enabled in the “Security
screen” view, “Users” tab, a library project has to be provided with a digital cer-
tificate-based signature when it is saved. If a matching certificate is available, it
is provided in the “Security screen”, “Users” tab in the “Digital signature” sec-
tion. In the “project information”, “Summary” tab, a “library compatibility” with
a PLC Engineeringversion >= V3 SP15 is set by default. In this case, the project
file is stored with the file extension .compiled-library-v3 when being saved
as a compiled and signed library. If you still have not specified a suitable valid
certificate for your user profile in the “Security Screen”, then a dialog prompt
opens next for you to do this. Afterwards, you can execute the save command
again.
In all other respects, compiled library files behave just like *.library files,
and therefore they can be installed and referenced with the same steps.
We recommend the use of compiled libraries signed with certificates. Besides
the protection of the source code and the unauthorized use of a library, less
memory is also used which results in shorter loading times.

R911403764, Edition 08 Bosch Rexroth AG


876 / 1158 ctrlX PLC Engineering
Menu commands

If you have the corresponding help files with translations, then as of PLC Engi-
neering V3 SP15 you can extend the library documentation with the translation
into other languages. This is done as follows:
Place the files __lmd__<language>.aux created for the new languages in
a directory <library name>.lmd parallel to the library project <library
name>.compiled-library-v3. If the files are correct, they are included in the
compiled library file when the library project is saved using the “Save project
as compiled library” command.
Example: The directory standard.lmd is exists parallel to the library file
standard.compiled-library-v3 and contains the file __lmd__fr.aux with
the French translation of the library documentation. After saving as a compiled
library, the French version of the documentation is also available in the library
manager.
Also refer to
● ⮫ Chapter Command 'Security Screen' on page 908
● ⮫ Chapter 27.3 Information for library developers on page 330
● ⮫ Chapter Command 'Save Project and Install into Library Repository'
on page 875

Command 'Source Upload'


Function: This command loads the project source code (as project archive)
from the controller.
Call: Main menu “File”.
Requirement: The network path for the controller must be configured.
After you execute the command, an overview opens with all devices in the
network. Select a controller from this overview. The dialog box “Extract Project
Archive” then opens with export settings.
See also
● ⮫ Chapter Command 'Source Download' on page 877

Dialog Box 'Extract Project Archive'


This dialog box shows the contents of the project archive. You can exclude
complete categories or single objects from categories by clearing the check
boxes ( ) from the extraction.
Table 94: “Locations”
“Extract into the same The archive is extracted to the same directory.
folder where the archive is
located”
“Extract into the following The contents of the archive are extracted to the given path.
folder”
“Advanced” Opens the “Advanced” dialog box for you to define where special and
additional files from the archive are extracted.
Table 95: “Contents”
“Items” Shows the contents of the archive structured in object categories.
: The object is extracted.
: The object is not extracted.
“Comment” Comment that was entered when creating the project archive

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 877 / 1158
Menu commands

“Extract” If an extracted file has the same name as an existing file in the target
directory, then a dialog box opens, prompting whether the local file
should be replaced. The decision can be applied automatically to any
additional conflicting names. In this case, you have to select the
“Apply to all objects and files” check box.

Command 'Source Download'


Function: This command loads the project source code (as project archive) to
the controller.
Call: Main menu “File”.
Requirement: The network path for the controller must be configured.
After you execute the command, an overview opens with all devices in the

User interface
network. Select a controller from this overview. Then the Archiv.prj project
archive is downloaded to this controller. You can click “Source Upload” to
upload the complete source code to the PLC Engineering development system
at a later time.
If you are already connected to a controller (in online mode), then the “Source
Download to Connected Device” command is also available for this process.
See also
● ⮫ Chapter Command 'Source Upload' on page 876
● ⮫ Chapter Command 'Source Download to Connected Device' on page 946

33.3.3 Menu “Edit”


Standard Commands
PLC Engineering provides the following standard commands:
● Undo: , shortcut: [Ctrl] + [Z]
● Redo: , shortcut: [Ctrl] + [Y]
● Cut: , shortcut: [Ctrl] + [X]
● Copy: , shortcut: [Ctrl] + [C]
● Paste: , shortcut: [Ctrl] + [V]
● Delete: , shortcut: [Ctrl]
● Select all: shortcut: [Ctrl] + [Ctrl]
Not all editors support the “Insert” command. In some editors it can be used
with limitations. Graphical editors only support the command if the pasted
elements will create a valid construct.
In object trees like POUs or device view the command refers to the currently
selected object. Multi selection is possible.

Command ‘Replace’. 'Replace in project’


Symbol , keyboard shortcut [Ctrl] + [H]
Symbol: ; keyboard shortcut[Ctrl]+[Shift]+[H]
Function: The commands search the project or parts of it for a specific char-
acter string and replace it.
Call: Menu “Edit 🠂 Search and Replace”
Prerequisite: The application is in online mode.
The command opens the “Replace” dialog where the search and replace char-
acter strings are specified and the search options are defined.

R911403764, Edition 08 Bosch Rexroth AG


878 / 1158 ctrlX PLC Engineering
Menu commands

Table 96: In addition to the options of the “Search” dialog, the following settings are still possible:
“Replace with” Input field for the new character string.
“Replace” Each next found character string is highlighted in the editor and
replaced (step-by-step replace).
“Replace all” All found character strings are replaced at one time without them
being displayed in the editors.
“Leave changed objects The editors of the found objects remain open.
open after "Replace all"”
Replacement in referenced libraries is not possible.

Also refer to
● ⮫ Chapter Command ‘Search', 'Search in project on page 878
● ⮫ Chapter 18.11 Searching and Replacing in the Entire Project on page 149

Command ‘Search', 'Search in project


Symbol , keyboard shortcut [Ctrl] + [F]
Symbol ; keyboard shortcut[Ctrl]+[Shift]+[F]
Function: The commands search the project or parts of it for a specific string.
Call: Menu “Edit 🠂 Search and Replace”
The command opens the “Find” dialog where the searched character string is
specified and the search options are defined.

‘Search' dialog
“Search for” Character string to be searched.
“Match case”: : The search considers uppercase and lowercase.
“Match whole word”: : Only character strings are found that exact matches.
“Search up”: : The specified search space is run through upwards.
: The specified search space is run through downwards.
“Use regular expressions”: Use the button to receive support when specifying regular expres-
sions.
“Search in” : Drop-down list with the areas of the project to be searched:
● “Active editor”
● “All open editors”
● “Selected objects & subobjects”
● “Entire project”
● “Entire project & non-compiled libraries”
● “Selection only”
: Opens a dialog where you set the areas of the project to be
searched (see below)
“Find next” Starting the search
“Find all” All search results are listed in the message view with their object path,
project name, object name, and object position. Possible additions
to the position: “(Decl)” = declaration part of the object, “(Impl)” =
implementation part of the object
Double-clicking the entry in the list opens the match position in the
respective object editor.
“Replace” Switches to the “Replace” dialog
The color of the search result markings can be customized in the options of the
text editor. This is done using the “Selection color” - “Inactive” parameter in
the “Text area” tab.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 879 / 1158
Menu commands

Also refer to
● ⮫ Tab 'Text Area' on page 1089

Dialog for setting the objects to be searched


“Entire project” All editable positions in all objects of the project are searched.
“Entire project and all All editable positions in all objects of the project, including integrated
uncompiled libraries” uncompiled libraries, are searched.
“Within the following Only the editable positions within the objects defined here are
objects” searched:
● “Schema”: The “Save” command saves the current search configu-
ration under the specified name. All stored schemes are available in

User interface
the drop-down list ( ) .
● “Object types”: : Browsing the object
● “Name filter”: Name filter for the objects to be browsed. The place-
holder "*" can be used.
Example: Filter "*CAN*": All objects are browsed containing "CAN" in
their name
“All open editors” All editors are searched that are currently open in a window.
“Active editor” Only the editor is searched where the cursor currently is.
“Selection only” Only the text is searched that is currently selected in an object.
Also refer to
● ⮫ Chapter Command ‘Replace’. 'Replace in project’ on page 877
● ⮫ Chapter 18.11 Searching and Replacing in the Entire Project on page 149

Command ‘Find next’


Symbol , keyboard shortcut [ F3]
Function: This command selects the next search result at its position in the
relevant editor when searching for a specific character string in the project.
Call: Menu “Edit 🠂 Search and Replace”
Prerequisite: You have started a search for a certain character string in the
project using the “Search” or “Replace” commands.
Also refer to
● ⮫ Chapter Command ‘Search', 'Search in project on page 878
● ⮫ Chapter Command ‘Replace’. 'Replace in project’ on page 877
● ⮫ Chapter 18.11 Searching and Replacing in the Entire Project on page 149

Command 'Find next (selection)'


Keyboard shortcut [Ctrl] + [F]
Function: The command searches for the next string in the project that matches
the one that is currently selected or where the cursor is currently located.
Call: Menu “Edit 🠂 Search and Replace”
Prerequisite: You have placed the cursor in an editable string in the project, or
you have selected an editable string.
Also refer to
● ⮫ Chapter Command ‘Search', 'Search in project on page 878
● ⮫ Chapter Command ‘Replace’. 'Replace in project’ on page 877
● ⮫ Chapter 18.11 Searching and Replacing in the Entire Project on page 149

Command 'Search previous’


Symbol , keyboard shortcut [Shift] + [F3]

R911403764, Edition 08 Bosch Rexroth AG


880 / 1158 ctrlX PLC Engineering
Menu commands

Function: This command, when searching for a specific string in the project,
selects the previous search result at its position in the relevant editor.
Call: Menu “Edit 🠂 Search and Replace”
Prerequisite: You have started a search for a certain character string in the
project using the “Search” or “Replace” commands.
Also refer to
● ⮫ Chapter Command ‘Search', 'Search in project on page 878
● ⮫ Chapter Command ‘Replace’. 'Replace in project’ on page 877
● ⮫ Chapter 18.11 Searching and Replacing in the Entire Project on page 149

Command 'Search previous (selection)'


Keyboard shortcut [Ctrl] + [Shift] + [F3]
Function: The command searches for the previous string in the project that
matches the one that is currently selected or where the cursor is currently
located.
Call: Menu “Edit 🠂 Search and Replace”
Prerequisite: You have placed the cursor in an editable string in the project, or
you have selected an editable string.
Also refer to
● ⮫ Chapter Command ‘Search', 'Search in project on page 878
● ⮫ Chapter Command ‘Replace’. 'Replace in project’ on page 877
● ⮫ Chapter 18.11 Searching and Replacing in the Entire Project on page 149

Command 'Next Message'


Keyboard shortcut: [F4]
Function: This command selects the next message in the messages view.
Call: Main menu “Edit”.
If the last message in the list has been reached, then the marking jumps to the
beginning.
See also
● ⮫ Chapter Command 'Previous Message' on page 880

Command 'Previous Message'


Keyboard shortcut: [Shift]+[F4]
Function: This command selects the previous message in the messages view.
Call: Main menu “Edit”
If the first message in the list has been reached, then the marking jumps to the
end.
See also
● ⮫ Chapter Command 'Next Message' on page 880

Command “Selectively from ctrlX CORE..”


Symbol:

Call:
In the device tree via the context menu of the object “DataLayer_Realtime
🠂 Select realtime data 🠂 Selectively from ctrlX CORE..”

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 881 / 1158
Menu commands

Function:
The command opens the “Selecting real-time data online from ctrlX CORE”
dialog.
Via the dialog, add an instance of an EtherCAT master in the device tree, see:
⮫ Dialog “Selecting real-time data online from ctrlX CORE”

Command “PLC real-time data”


The command inserts a “DataLayerOwner” node below the node
“DataLayer_Realtime” in the device tree.
In the DataLayerOwner node, so-called "twins" of Global Variable Lists (GVL)
can be created and managed. GVL twins are used to exchange real-time data

User interface
between the PLC and the ctrlX Data Layer to exchange real-time data, see:
⮫ Connection to the ctrlX real-time data system

Symbol

Call
In the device tree via the context menu of the “DataLayer_Realtime” object:
“DataLayer_Realtime 🠂 PLC real-time data”

Related topics
⮫ Device tree and device editor
⮫ Object “DataLayer_Realtime”

Command “Selectively from file..”


Symbol:

Call:
In the device tree via the context menu of the object “DataLayer_Realtime
🠂 Select realtime data 🠂 Selectively from file..”

Function:
The command opens a dialog for selecting the description file with the top-
ology of the real-time data system.
By using the description file, an instance of the real time data system can be
added to the ctrlX PLC Engineering device. In particular if no connection can
be established to the device and the configuration cannot be read out of the
control online (offline configuration).
The description file can be created in ctrlX IO Engineering.

Command “All data from ctrlX CORE..”


Symbol:

Call:
In the device tree via the context menu of the object “DataLayer_Realtime
🠂 Select realtime data 🠂 All data from ctrlX CORE..”

R911403764, Edition 08 Bosch Rexroth AG


882 / 1158 ctrlX PLC Engineering
Menu commands

Function:
By using the command, the real time data system configuration can be read out
of the control and can be applied to the project. Selecting/deselecting devices
is not possible using this command!
If you only want to integrate individual elements of the control configuration to
the project, see ⮫ Command “Selectively from ctrlX CORE..”

Command “PLC Realtime data input”


The command creates a twin of a Global Variable List (GVL) of type "Input" in
the “DataLayerOwner” node of the project.
The GVL twin of type input is used to transfer or map real-time data from the
Data Layer of the ctrlX device to the PLC or to map it, see also:
⮫ Connection to the ctrlX real-time data system
When the command is called, all available GVLs configured below the applica-
tion node are provided for selection.

Prerequisite
The command is available only if at least one Global Variable List is configured
below the application node, see:
⮫ Object 'GVL' - Global Variable List

Symbol

Call
In the device tree via the context menu of the “DataLayer_Realtime” object:
“DataLayer_Realtime 🠂 plc_app_Application_realtime_data (DataLayerOwner)
🠂 PLC Realtime data input”

Optionally, GVL twins can also be created using the “Use as Plc Realtime data
(input)” command, see:
⮫ Command “PLC Realtime data input”

Related topics
⮫ Device tree and device editor
⮫ Object “DataLayer_Realtime”

Command “PLC Realtime data output”


The command creates a twin of a Global Variable List (GVL) of the type
"Output" in the “DataLayerOwner” node of the project.
The GVL twin of the output type is used to transfer or map real-time data from
the PLC to the real-time system (Data Layer) of the ctrlX device, see also:
⮫ Connection to the ctrlX real-time data system
When the command is called, all available GVLs configured below the applica-
tion node are provided for selection.

Prerequisite
The command is available only if at least one Global Variable List is configured
below the application node, see:
⮫ Object 'GVL' - Global Variable List

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 883 / 1158
Menu commands

Symbol

Call
In the device tree via the context menu of the “DataLayer_Realtime” object:
“DataLayer_Realtime 🠂 plc_app_Application_realtime_data (DataLayerOwner)
🠂 PLC Realtime data output”

Optionally, GVL twins can also be created using the “Use as Plc Realtime data
(Output)” command, see:
⮫ Command “Use as Plc Realtime data (Output)”

User interface
Related topics
⮫ Device tree and device editor
⮫ Object “DataLayer_Realtime”

Command “Use as Plc Realtime data (input)”


The command creates a twin of a Global Variable List (GVL) of type "Input" in
the “DataLayerOwner” node of the project.
The GVL twin of type input is used to transfer or map real-time data from the
Data Layer of the ctrlX device to the PLC or to map it, see also:
⮫ Connection to the ctrlX real-time data system

Symbol

Call
Via the context menu of a GVL below the application node in the device tree:
“Use as Plc Realtime data 🠂 Input”

Optionally, GVL twins can also be created using the “PLC Realtime data input”
command, see:
⮫ Command “PLC Realtime data input”

Related topics
⮫ Device tree and device editor
⮫ Object “DataLayer_Realtime”

Command “Use as Plc Realtime data (Output)”


The command creates a twin of a Global Variable List (GVL) of the type
"Output" in the “DataLayerOwner” node of the project.
The GVL twin of type output is used to transfer or map real-time data from the
PLC to the Data Layer of the ctrlX device, see also:
⮫ Connection to the ctrlX real-time data system

Symbol

Call
Via the context menu of a GVL below the application node in the device tree:
“Use as Plc Realtime data 🠂 Output”

R911403764, Edition 08 Bosch Rexroth AG


884 / 1158 ctrlX PLC Engineering
Menu commands

Optionally, GVL twins can also be created using the “PLC Realtime data output”
command, see:
⮫ Command “PLC Realtime data output”

Related topics
⮫ Device tree and device editor
⮫ Object “DataLayer_Realtime”

Command “Show status”


Call:
In the device tree via the context menu of the object node DataLayer_Realtime
and all other subordinate object nodes of the real time data system.

Function:
The command opens the tab“Status” in the generic device editor, see:
⮫ Tab “Status”
The tab provides an overview of the configured participants of the real-time
data system and their current states.

Command 'Insert File as Text'


Function: This command copies the contents of a text file to the active editor as
the current cursor position.
Call: The command is not in any menu by default. You can add it to a menu
by using the dialog box from “Tools 🠂 Customize” (command category “Text
Editor”).
Requirement: The file must have the extension .txt. The command is available
in a text editor only.
Many development environments and text processing applications provide the
option of exporting code and text as a plain text file. This command can copy
the contents of this file to the editor.
See also
● ⮫ Chapter 'Options' dialog - 'Text editor' on page 1087

Command 'Overwrite Mode'


Shortcut: [Insert]
Function: This command activates the overwrite mode.
Call: Menu “Edit 🠂 Advanced”
Requirement: A text editor is opened.
If the overwrite mode is activated, characters in front of the cursor are over-
written when entering new characters. If the overwrite mode is deactivated,
characters are inserted and existing characters in front of the cursor are
retained.
See also
● ⮫ Chapter 'Options' dialog - 'Text editor' on page 1087

Command 'View Whitespace'


Symbol:
Function: This command causes control characters for spaces and tabs to be
shown.
Call: Menu “Edit 🠂 Advanced”
Requirement: A text editor is opened.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 885 / 1158
Menu commands

PLC Engineering visualizes spaces by a period and tabs by an arrow.


See also
● ⮫ Chapter 'Options' dialog - 'Text editor' on page 1087

Command 'View Indentation Guides'


Function: This command activates the indentation help lines.
Call: Menu “Edit 🠂 Extended”
Requirement: A text editor is opened.
If the indentation help lines are activated, a broken line is inserted for each
manual indentation in the code. This facilitates the overview of the different
levels in the code. You can insert manual indentations with the [Tab] key.

User interface
See also
● ⮫ Chapter 'Options' dialog - 'Text editor' on page 1087

Command 'Go to Line'


Function: With this command the cursor jumps to a defined line in the code.
Call: Menu “Edit 🠂 Extended”
Requirement: A text editor is opened.
This command opens a dialog box with an input field “Line number”.
See also
● ⮫ Chapter 'Options' dialog - 'Text editor' on page 1087

Command 'Make Uppercase'


Shortcut: [Ctrl]+[Shift]+[U]
Function: This command converts all lowercase letters in the selected code into
uppercase letters.
Call: Menu “Edit 🠂 Advanced”
Requirement: A text editor is opened and code is selected, or the declaration
editor is opened and variable declarations are selected.
See also
● ⮫ Chapter 'Options' dialog - 'Text editor' on page 1087

Command 'Make Lowercase'


Shortcut: [Ctrl]+[U]
Function: This command converts all uppercase letters in the selected code
into lowercase letters.
Call: Menu “Edit 🠂 Advanced”
Requirement: a text editor is opened and code is selected, or the declaration
editor is opened and variable declarations are selected.
See also
● ⮫ Chapter 'Options' dialog - 'Text editor' on page 1087

Command 'Go to Matching Bracket'


Function: This command makes the cursor jump to the other part of the
selected code parenthesis.
Call: Menu “Edit 🠂 Advanced”

R911403764, Edition 08 Bosch Rexroth AG


886 / 1158 ctrlX PLC Engineering
Menu commands

Requirement: A text editor is opened and the cursor is positioned at an opening


or closing code parenthesis. If you position the cursor at a code parenthesis,
PLC Engineering displays the corresponding parenthesis in color, provided you
have activated the option “Associated parentheses” in the PLC Engineering
options in the “Text Editor” category, “Text Area” tab.
See also
● ⮫ Tab 'Text Area' on page 1089

Command 'Select to Matching Bracket'


Function: This command selects the entire code section within the currently
selected code parentheses.
Call: Menu “Edit 🠂 Extended”
Requirement: A text editor is opened and the cursor is positioned at an opening
or closing code parenthesis. If you position the cursor at a code parenthesis,
PLC Engineering displays the corresponding parenthesis in color, provided you
have activated the option “Associated parentheses” in the project options in
the “Text Editor” category, “Text Area” tab.
See also
● ⮫ Chapter 'Options' dialog - 'Text editor' on page 1087

Command 'Expand All Folds'


Function: This command expands all collapsed code segments in the textual
editor or result locations in the cross-reference list so that the code and all
search locations are displayed in full again.
Requirement: A textual editor is active and indentation is activated in the
“Options” (“Text Editor” category); or the cross-reference list is active.
Call: Textual editors: main menu“Edit 🠂 Advanced”, or right-click. In the cross-
reference list: right-click.
See also
● ⮫ Chapter 'Options' dialog - 'Text editor' on page 1087
● ⮫ Chapter Command 'Collapse All Folds' on page 886
● ⮫ Right-click commands in the cross-reference list on page 905

Command 'Collapse All Folds'


Function: This command collapses all expanded code segments in the textual
editor or result locations in the cross-reference list. In this way, only the upper-
most level of code and only the root node of the result locations displayed.
Requirement: A textual editor is active and indentation is activated in the
“Options” (“Text Editor” category); or the cross-reference list is active.
Call: In textual editors: main menu “Edit 🠂 Advanced”, or right-click. In the
cross-reference list: right-click.
See also
● ⮫ Chapter 'Options' dialog - 'Text editor' on page 1087
● ⮫ Chapter Command 'Expand All Folds' on page 886
● ⮫ Right-click commands in the cross-reference list on page 905

Command 'Comment Out Selected Lines'


Symbol ; keyboard shortcut: [Ctrl]+[O]
Function: The command inserts comment marks ('//') at the beginning of the
selected lines.
Call: Menu bar: “Edit 🠂 Advanced”; context menu

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 887 / 1158
Menu commands

Requirement: In the ST editor, either the cursor is located in a line of the


implementation or multiple lines are selected.
See also
● ⮫ Chapter Command 'Uncomment Selected Lines' on page 887

Command 'Uncomment Selected Lines'


Symbol ; keyboard shortcut: [Ctrl]+[I]
Function: The command removes any comment marks ('//') at the beginning of
the selected lines.
Call: Menu bar: “Edit 🠂 Advanced”; context menu
Requirement: In the ST editor, either the cursor is located in a line of the

User interface
implementation or multiple lines are selected.
See also
● ⮫ Chapter Command 'Comment Out Selected Lines' on page 886

'Enable inline monitoring' command


Function: The command activates or deactivates the inline monitoring feature.
This works like the same-named switch in the PLC Engineering options (cate-
gory “Text Editor”).
Prerequisite: A text editor is active.
Call: Context menu of the text editor, in the submenu “Advanced”
Also refer to
● ⮫ Tab 'Monitoring' on page 1089
● ⮫ Chapter 22.3 Monitoring values on page 291

Command 'Toggle Bookmark'


Symbol , keyboard shortcut [Ctrl]+[F12]
Function: The command sets or removes a bookmark at the current position.
Call: Menu bar: “Edit 🠂 Bookmarks”
Requirement: A POU is open in the editor and the cursor is at a program line.
See also
● ⮫ Chapter 18.20.3 Setting and Using Bookmarks on page 206

Command 'Next Bookmark (Active Editor)'


Symbol: ; keyboard shortcut: [F12]
Function: The command jumps to the next bookmark in the active editor.
Call: Menu bar: “Edit 🠂 Bookmarks”
Requirement: A POU is open in the editor and the cursor is positioned in the
POU.
See also
● ⮫ Chapter Command 'Next Bookmark' on page 887
● ⮫ Chapter 18.20.3 Setting and Using Bookmarks on page 206

Command 'Next Bookmark'


Symbol:
Function: The command jumps to the next bookmark in the “Bookmarks” view
and in the project, and opens the respective POU. The order of jumping
to bookmarks corresponds to the order of bookmarks in the table of the
“Bookmarks” view.
Call:

R911403764, Edition 08 Bosch Rexroth AG


888 / 1158 ctrlX PLC Engineering
Menu commands

● “Next Bookmark” button in the “Bookmarks” view


● The command is not in any menu by default. You can add it to a
menu by using the dialog from “Tools 🠂 Customize” (command category
“Bookmarks”).
Requirement:
● A project is open.
● The “Bookmarks” view is open.
See also
● ⮫ Chapter Command 'Next Bookmark (Active Editor)' on page 887

Command 'Previous Bookmark (Active Editor)'


Symbol: ; keyboard shortcut: [Shift]+[F12]
Function: The command jumps to the previous bookmark in the active editor.
Call: Menu bar: “Edit 🠂 Bookmarks”
A POU is open in the editor and the cursor is positioned in the POU.
See also
● ⮫ Chapter Command 'Previous Bookmark' on page 888
● ⮫ Chapter 18.20.3 Setting and Using Bookmarks on page 206

Command 'Previous Bookmark'


Symbol:
Function: The command jumps to the previous bookmark in the “Bookmarks”
view and in the project, and opens the respective POU. The order of jumping
to bookmarks corresponds to the order of bookmarks in the table of the
“Bookmarks” view.
Call:
● “Next Bookmark” button in the “Bookmarks” view
● The command is not in any menu by default. You can add it to a
menu by using the dialog from “Tools 🠂 Customize” (command category
“Bookmarks”).
Requirement:
● A project is open.
● The “Bookmarks” view is open.
See also
● ⮫ Chapter Command 'Previous Bookmark (Active Editor)' on page 888
● ⮫ Chapter 18.20.3 Setting and Using Bookmarks on page 206

Command 'Clear All Bookmarks (Active Editor)'


Symbol:
Function: The command deletes all bookmarks in the active editor.
Call: Menu bar: “Bookmarks”
Requirement: A POU is open in the editor and the cursor is positioned in the
POU.
See also
● ⮫ Chapter Command 'Clear All Bookmarks' on page 888
● ⮫ Chapter 18.20.3 Setting and Using Bookmarks on page 206

Command 'Clear All Bookmarks'


Symbol:
Function: The command deletes all bookmarks in the open project.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 889 / 1158
Menu commands

Call: The command is not in any menu by default. You can add it to a menu by
using the dialog from “Tools 🠂 Customize” (command category “Bookmarks”).
Requirement: A POU is open in the editor and the cursor is positioned in the
POU.
See also
● ⮫ Chapter Command 'Clear All Bookmarks (Active Editor)' on page 888
● ⮫ Chapter 18.20.3 Setting and Using Bookmarks on page 206

Command 'Browse Cross References'


Symbol:
Function: The command shows all occurrences of a variable in the “Cross

User interface
Reference List” view.
Call: Menu bar: “Edit 🠂 Browse”; cross reference view: toolbar
Requirement: A POU is open in the editor and the cursor is set at a variable.
Or the “Cross Reference List” view is open and a variable is specified in the
“Name” field.
See also
● ⮫ Chapter 18.20.1 Using the Cross-Reference List to Find Occurrences
on page 204
● ⮫ Chapter Command 'Browse Global Cross References' on page 889

Command 'Browse Global Cross References'


Symbol:
Function: The command shows all occurrences of all variables with the same
name in the “Cross Reference List” view. In contrast to the “Browse Cross
References” command, these can be different variables.
Call: Menu bar: “Edit 🠂 Browse”; cross reference view: toolbar
Requirement: A POU is open in the editor and the cursor is set at a variable.
Or the “Cross Reference List” view is open and a variable is specified in the
“Name” field.
See also
● ⮫ Chapter 18.20.1 Using the Cross-Reference List to Find Occurrences
on page 204
● ⮫ Chapter Command 'Browse Cross References' on page 889

Command 'Browse Call Tree'


Symbol:
Function: The command opens the view “Call Tree”, which displays the calls of
a module and also its callers.
Call:
● Menu “Edit 🠂 Browse”
● Context menu, see below: Requirement
Requirement: A module is opened in the editor and the cursor is placed in a
variable, or a module is selected in the “Devices” view or in the “POUs” view.
See also
● ⮫ Chapter Command 'Call tree' on page 906

Command 'AutoDeclare'
Shortcut: [Shift]+[F2]
Function: The command opens the dialog “Declare variable”, which supports
the declaration of a variable.

R911403764, Edition 08 Bosch Rexroth AG


890 / 1158 ctrlX PLC Engineering
Menu commands

Call: Menu “Edit”


Prerequisite: An object or a device of the project is open in the editor.
Due to the auto-declaration function, the “Declare Variable” dialog also appears
when the cursor is located in the implementation part of a POU in a line
containing the name of an undeclared variable. The requirement for this is
that you must have selected the command “Tools 🠂 Options” and activated
the option “Declare unknown variables automatically (AutoDeclare)” in the cat-
egory “SmartCoding”.
Thanks to the smart tag function, the “AutoDeclare” command also appears
when you place the cursor over an undeclared variable in the implementation
part of the ST editor and then click .

'Declare variable' dialog


“Validity range” Validity range of the variable that has not been declared yet.
Example: VAR (default setting in local variable)
“Name” Variable name that is not declared yet
Example: bIsValid
“Data type” Example: BOOL
● : Lists the standard data types.

– “Input assistant”: Opens the “Input assistant” dialog.
– “Array wizard”: Opens the “Array” dialog.
“Object” Object in which the new variable is declared. By default the object that
you are currently editing is displayed.
Example: fbA
: Lists objects in which the variable can be declared.
If no objects are available for the selected “Scope”, the entry “<create
object>” appears. When you select the entry “<create object>”, the
“Add Object” dialog opens to generate a suitable object.
“Initialization” Example: FALSE
If no initialization value is entered, the variable is initialized automati-
cally.
: Opens the “Initialization value” dialog. This procedure is recom-
mended for the initialization of structured variables.
“Address” Memory address of the application for the variable that has not been
declared yet.
Example: %IX1.0
Note:
Only possible in case of the following validity ranges:
● Local variable (VAR)
● Global variable (VAR_GLOBAL)
● Or for a persistent variable (PERSISTENT).
“Flags” Attribute keywords
● CONSTANT: Keyword for one constant.
● RETAIN: Keyword for a remanent variable.
● PERSISTENT: Keyword for persistent variable (stricter than
RETAIN).
The selected attribute keyword is added to the variable declaration.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 891 / 1158
Menu commands

“Comment” Example: New input In1


In the tabular declaration editor the comment entered is displayed in
the column “Comment”, while in the textual declaration editor it is
displayed above the variable declaration.
“Apply changes using : When exiting the dialog, the variable is not yet declared, but the
refactoring” “Refactoring” dialog is opened first. You can continue editing your
changes here.
The options is available in the following validity ranges:
● Input variables ( VAR_INPUT)
● Output variable (VAR_OUTPUT)
● VAR_IN_OUT variables (input variable and output variable)

User interface
“OK” Variable is declared and is displayed in the declaration.
Example:

VAR RETAIN
// New input In1
xIn1 AT %IX1.0: BOOL := FALSE;
END_VAR

“Array” dialog
“Ranks and base type Definition of the field sizes (“Dimension”) by entering the lower and
specification” upper limits and the “Base type” of the array. You can enter the
basic type directly or with the help of the dialogs “Input Assistant”
or “Array” if you click the button.
“Result” Display of the defined array.
PLC Engineering only re-initializes variables if you have
NOTICE
modified the initialization values of the variables.

"Initialization value" dialog


List of the variables with name (“expression”), “initialization value” and “data type”.
Modified initialization values are displayed in bold lettering.
Input field below the list Input of an initialization value for the selected variable(s).
“Apply value to the selected Change of the initialization value of the selected line(s) according to
lines” the value of the input field.
“Reset selected lines to Generation of standard initialization values.
default values”
“OK” PLC Engineering applies the initialization values in the “Declare
Variable” dialog.
If the variable to be initialized via this dialog is a function block instance with
extended FB_Init method, another table is displayed above the “Initialization
value” table. This table lists the additional FB_Init parameters. The meaning
and operation is basically the same as the table below with the following differ-
ences:
● All variables have to be assigned initialization values. Otherwise “OK” cannot
be selected
● For complex data types (structures, arrays) no components contained in
them are displayed (type cannot be expanded). In this case, the complex
type has to be initialized with a corresponding variable
For FB_Init parameters configured in this way, a corresponding symbol is dis-
played after the initialization value in the “Declare variable” dialog.

R911403764, Edition 08 Bosch Rexroth AG


892 / 1158 ctrlX PLC Engineering
Menu commands

Also refer to
● ⮫ Chapter 32.10.1 Methods 'FB_Init', 'FB_Reinit', and 'FB_Exit' on page 660
● ⮫ Chapter 18.16.4 Using the 'Declare variable' dialog on page 165
● ⮫ Smart tag functions on page 134
● ⮫ Chapter 18.18.3 AT Declaration on page 200
● ⮫ Chapter 18.12 Refactoring on page 150
● ⮫ Chapter 18.22 Data persistence on page 211
● ⮫ Dialog box 'Refactoring' on page 895
● ⮫ Chapter 32.4.13 Addresses on page 552
● ⮫ Chapter 'Options' dialog - 'Refactoring' on page 1086
● ⮫ Chapter ST Editor on page 379

Command 'Input Assistant'


Symbol: ; keyboard shortcut: [F2]
Function: This command opens the “Input Assistant” dialog which helps you
to select one of the possible programming elements at the current cursor posi-
tion.
Call: Menu bar: “Edit”; context menu.
Requirement: A POU is open in the editor and the cursor is at a program line.

Dialog 'Input Assistant' - Tab 'Categories'


The input assistant provides all program elements that you can insert at the
current cursor position in the editor.
The elements are sorted by “Categories”. In the category “Variables”, you
can also set a “Filter” for the scope, for example “Local variables”, “Global
variables”, or “Constants”.
“Structured view” : The elements are displayed in a structure tree. You can show/
hide the columns “Type”, “Address”, and “Origin” by right-clicking the
column title and selecting/clearing the column name in the dropdown
list.
: The elements are displayed in a flat structure.
“Show documentation” : The dialog is extended with the “Documentation” field.
“Insert with arguments” : Elements that include arguments (for example, functions) also
insert with these arguments at the cursor position.
Example: If you insert the function block fb1, which contains an
input variable fb1_in and an output variable fb1_out, "with argu-
ments", then this appears in the editor as follows: fb1(fb1_in:= ,
fb1_out=> ).
“Insert with namespace : Inserts the selected element with the appended namespace. In the
prefix” case of library modules, the check box remains disabled if the require-
ment for a namespace has been defined in the library properties.
If you create objects with the same name in the same category, whether glob-
ally (“POUs” view) or assigned to an application (“Devices” view), then only
one entry appears in the input assistant. The usage conforms to the usual call
priority (application assigned before global).

Dialog 'Input Assistant' - Tab 'Text Search'


This tab allows you to search for specific objects. When you begin typing a
search string into the search field, the names of all objects are listed whose
names include the search string. Double-click an object to insert it at the cur-
rent cursor position in the editor.
“Filters” Limits the search to a specific variable category

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 893 / 1158
Menu commands

See also
● ⮫ Chapter 18.5 Using the input assistance on page 131
● ⮫ Dialog 'Properties' on page 1009
● ⮫ Chapter Command 'Input Assistant' on page 892

Command 'Go to Source Position'


Function: The command sets the cursor to the position in the source code that
causes the message.
Call: Main menu “Edit”, context menu of the message in the message view.
Requirements: A message is selected in the message view.
Use the command “Next Message” or “Previous Message” to display the source

User interface
code position of the next or previous message.
See also
● ⮫ Chapter Command 'Next Message' on page 880
● ⮫ Chapter Command 'Previous Message' on page 880
● ⮫ Chapter 'Messages’ command on page 898

Command 'Go to Definition'


Symbol:
Function: This command shows the definition locations of a variable or func-
tion.
Call: Main menu “Edit 🠂 Browse”
Requirement: A POU is open in the editor and the cursor is at a variable or
function.
See also
● ⮫ Chapter 18.20.2 Finding Declarations on page 206

Command 'Go To Reference'


Symbol:
Function: The command opens the declaration location of the variable that is
referenced by the pointer currently in focus in online mode.
Call:
● Context menu in the declaration part or implementation code
● Menu bar: “Edit 🠂 Browse”
Requirement: Online mode. A POU is open in the editor and the cursor is at a
pointer. The referenced variable is stored in static memory.
If the pointer does not point exactly to the beginning of the variable, then a cor-
responding message is displayed when you switch to the variable declaration.
See also
● ⮫ Chapter 32.5.16 Pointers on page 566

Command 'Go to Instance'


Symbol:
Function: This command opens the instance of a function block in a new
window.
Call: Menu bar: “Edit 🠂 Browse for Symbol”
Requirement: The application is in online mode. A POU is open in the editor
and the cursor is at an instance of a function block.
The command is not available for temporary instances or instances from com-
piled libraries.

R911403764, Edition 08 Bosch Rexroth AG


894 / 1158 ctrlX PLC Engineering
Menu commands

See also
● ⮫ Chapter 18.20.2 Finding Declarations on page 206

Command 'Refactoring' - 'Rename <...>'


Function: This command opens a dialog box for renaming an object or variable
across the project.
Call: Main menu “Edit 🠂 Refactoring” or right-click.
Requirement: An object is selected in the device tree or in the “POUs” view, or
the cursor is placed before or on a variable identifier in the declaration section
of a programming object.
You can rename the following:
● Variables
● POUs
● GVLs
● Methods
● Properties
● Devices
● Variables and unit conversions in the unit conversion edit

Dialog box 'Rename'


“Current name” Name of the object or variable
“New name” Input field for a new name.
If the name already exists, then PLC Engineering reports this directly
below this input field.
“OK” Can be activated if you have typed a valid name in “New name”.
Opens the “Refactoring” dialog box.
The affected objects and occurrences are highlighted in both views.
You can determine how to handle the occurrences in each view by
right-clicking the occurrences and clicking the available commands.

Dialog box 'Refactoring'


This dialog box displays all occurrences in the project.
The affected objects and occurrences are highlighted in both views.
Right view Displays the occurrence within an object where “Current name”
occurs.
Left view Device tree of the project with the object.
You can determine how to handle the occurrences in each view by right-clicking the occurrences
and clicking the available commands.
“Reject this change” Reject the single change in view on the right.
“Accept this object” Accept all changes in the affected object.
“Reject this object” Reject all changes in the affected object.
“Accept whole project” Accept all changes in the project.
“Reject whole project” Reject all changes in the project.
PLC Engineering highlights the accepted changes in yellow and the rejected changes in gray.
See also
● ⮫ Chapter 18.12 Refactoring on page 150

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 895 / 1158
Menu commands

Command 'Refactoring' - 'Update Referenced Pins'


Currently, this command applies only to the CFC, FBD,
NOTICE
LD, and IL editors. It is a combination of the “Reset Pins”
and “Update Parameters” commands.
Function: This command modifies the pins according to the latest block decla-
ration in all affected occurrences of the block.
Call: Main menu “Edit 🠂 Refactoring” or right-click.
Requirement: The cursor is placed in the name of the block in the first line of
the block declaration or in the device tree.
See also
● ⮫ Chapter 18.12 Refactoring on page 150

User interface
● ⮫ Chapter Command 'Reset Pins' on page 993
● ⮫ Chapter Command 'Update Parameters' on page 1005

Command 'Refactoring' - 'Add Variable'


Symbol:
Function: This command enables the declaration of variables in a POU, as well
as the automatic update to the occurrence of the POU.
Call: Main menu “Edit 🠂 Refactoring”, or right-click.
Requirements: The declaration part is in focus.
The command opens the default dialog box for declaring variables.
See also
● ⮫ 'Declare variable' dialog on page 890

Dialog box 'Refactoring'


After clicking “OK” to close the declaration dialog, the “Refactoring” dialog box
opens with two frames.

R911403764, Edition 08 Bosch Rexroth AG


896 / 1158 ctrlX PLC Engineering
Menu commands

“Right dialog frame ” Declaration part and implementation of the POU where the variable is
added.
Colored highlighting of changed locations: New added declarations
have a blue font and are highlighted in yellow (1).
“Left dialog frame ” Device tree or POUs tree of the project.
Colored highlighting of blocks where the POU is used: red font and
yellow highlight (2).
After you double-click the POU object, the detail view opens.
Before you decide which changes to accept at which locations, select the
required option from the drop-down list (3) at the upper right part of the
window:
“Add inputs with Default placeholder text: _REFACTOR_; editable
placeholder text” The placeholder text defined here is used at the occurrence locations
of the new added variables in the implementation code. This is used
for searching for the affected locations.
“Add inputs with the Initialization value for the new variable.
following value”
You can accept or reject changes by right-clicking the changed locations or by
executing commands in the left or right area of the dialog box. Refer to the
description of the “Refactoring 🠂 Rename” command.

Examples
1. By refactoring, the fun block receives a new input variable input3 with the
initialization value 1. The change has the following effect:
Before:
fun(a + b, 3, TRUE);
fun(input1:= a + b , input2 :=3 , inputx := TRUE);
After:
fun(a + b, 3, 1, TRUE);
fun(input1:= a + b , input2 :=3 , _REFACTOR_, inputx := TRUE);
2. By refactoring, the "fun" block receives a new input variable input3 with
the placeholder text "_REFACTOR_":
Before:
inst(input1 := a + b, input2 := 3, inputx := TRUE);
fun(a + b, 3, TRUE);
After:
inst(input1 := a + b, input2 := 3, input3 := _REFACTOR_,
inputx
:= TRUE);
fun(a + b, 3, _REFACTOR_, TRUE);

See also
● ⮫ Chapter 18.12 Refactoring on page 150
● ⮫ Chapter Command 'Refactoring' - 'Rename <...>' on page 894

Command 'Refactoring' - 'Remove <variable>'


Symbol:
Function: This command removes an input or output variable from the POU and
all occurrences of the POU.
Call: Main menu “Edit 🠂 Refactoring”, or right-click.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 897 / 1158
Menu commands

Requirements: In the declaration part of the POU, the cursor is located in the
identifier of the variable to be removed.
Then, the command opens a dialog box with information about the removal.
After you confirm this, the “Refactoring” dialog box opens. For a description of
the “Refactoring” dialog box, refer to the “Edit 🠂 Refactoring 🠂 Rename” help
page.
When you accept the changes in the “Refactoring” dialog box, the respective
input and output parameters are deleted at the occurrence locations of the
affected POU.
In CFC, only the connection is removed between the removed input or output
to the block. The input or output itself remains in the chart.

User interface
Example in ST
In a POU, refactoring removes the input4 input variable. The occurrences are
updated automatically:
Before removal:
inst(input1 := a + b, input2 := 3, input4 := 1, input5 :=
TRUE);
fun(a + b, 3, 1, TRUE);
After removal:
inst(input1 := a + b, input2 := 3, input5 := TRUE);
fun(a + b, 3, TRUE);

See also
● ⮫ Chapter 18.12 Refactoring on page 150
● ⮫ Chapter Command 'Refactoring' - 'Rename <...>' on page 894

Command 'Refactoring' - 'Reorder Variables'


Symbol:
Function: This command allows changing the order of variables in the declara-
tion editor for the selected scope: VAR_INPUT, VAR_OUTPUT, or VAR_IN_OUT.
Call: “Edit 🠂 Refactoring”; context menu of the focused scope in the declara-
tion editor.
Requirement: One of the above scopes is selected in the declaration, and more
than one variable is declared in it.
The command opens the “Reorder” dialog box with a list of all declarations of
the selected scope. You can drag a selected declaration up or down to another
position.
See also
● ⮫ Reordering variables in the declaration on page 152

Command 'Advanced' - 'Format Document'


Symbol:
Function: The command starts an automatic formatting of the code in the open
ST editor.
Call: Menu bar: “Edit 🠂 Advanced”; context menu of the window in focus in the
ST editor
Requirement: The focus is in the ST editor. The syntax of the ST code does not
contain any errors.
The following formatting is performed automatically:
● Keywords are converted to uppercase letters.
● Spacing is standardized.

R911403764, Edition 08 Bosch Rexroth AG


898 / 1158 ctrlX PLC Engineering
Menu commands

● Indentations are changed according to syntax.


● Long lines are wrapped in sensible places.
See also
● ⮫ Chapter ST Editor on page 379

33.3.4 Menu “View”


Command 'Devices'
Symbol: , keyboard shortcuts: [Alt] + [0]
Function: The command opens the “Devices” view in the PLC Engineering main
window. It contains the "device tree" of the project where you configure your
applications.
The standard menu for navigating in the object tree of the view is available via
the button.
Call: Menu “View”
Also refer to
● ⮫ Chapter 17.2 Device tree and device editor on page 111
● ⮫ Chapter Command ‘POUs’ on page 900
● ⮫ Chapter Standard Menu in View 'Devices', 'POUs', 'Modules' on page 899

'Messages’ command
Symbol:
Function: The command opens the “Messages” view.
Call: Menu “View”

View 'Messages'
Message category The messages are categorized by component or functionality for selec-
tion from a list box. Filter the message display by selecting a category.
Message type Click the symbol of the message type to show or hide messages. PLC
Engineering shows the number of messages next to each symbol.
● : Errors
● : Warning
● : Information
Deletes all messages in the selected message category.
Deletes all messages in all message categories.
“Description” Message text with the reported object and the location in the object.
Double-click a message in the table to jump to the source text location.
Command icon In the case of unresolved libraries, it lists commands that can be used
to quickly fix the reported error (quickfix)
● Updating placeholder '<Library>' to the latest version.
● Open the 'Placeholder' dialog of the library manager.
“Project” Name of the project generating the message
“Object” Object in which the message was generated
“Position” Position in code
Table 97: “Commands in context menu”
“Next message” The source text position of the next message is displayed.
“Previous message” The source text position of the previous message is displayed.
“Go to source text position” The source position of the selected message is displayed.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 899 / 1158
Menu commands

Command 'Start Page'


Symbol:
Function: This command opens the “Start Page” view.
Call: Main menu “View”
The view includes some basic commands and a list of recently opened projects.
In addition, the PLC Engineering homepage is displayed.
If you access the Internet through a proxy, then you can save the authentication
data in the project options (“Proxy Settings”) so you do not have to provide
this data every time you use this command.
By moving the mouse pointer over the list of recently opened projects, you can
remove or pin individual projects in the list. Pinned projects remain in this list

User interface
until you remove the pin.
In the project options (“Load and Save”), you can configure whether this start
page should open automatically when you start PLC Engineering.
See also
● ⮫ Chapter ‘Options’ dialog - ‘Load and save' on page 1084
● ⮫ Chapter 'Options' dialog - 'Proxy settings' on page 1085

Command 'Full Screen'


Symbol: , keyboard shortcut [Ctrl]+[Shift]+[F12]
Function: This command switches the PLC Engineering display to full screen
mode.
Call: Main menu “View”
Choosing this command displays the main window of the PLC Engineering
user interface in full-screen mode. You can return to the previous setting
by choosing the command again or with the keyboard shortcut [Ctrl]+[Shift]
+[F12].

Command 'Properties'
Symbol:
Function: The command opens the properties of the currently selected object
in the POUs tree or device tree.
Call: Menu “View”
Also refer to
● ⮫ Chapter 33.4.22 “Properties” dialog on page 1047

Standard Menu in View 'Devices', 'POUs', 'Modules'


The views “Devices”, “POUs” and “Modules” provide the button in the top
right corner to open a menu with the following commands:
● “Open in editor”: Opens the selected object in the corresponding editor.
● “Find object”: Opens the dialog “Find Object” for the object tree. Starting
to enter a search string all matching objects will be displayed with their
path. Use the button “Open” to open the selected search result in the editor.
● “Sort by type”: Sorts the objects in the view alphabetic by type.
● “Sort by name”: Sorts the objects in the view alphabetic by name.
● “Sort ascending”: Displays the chosen sorting in ascending order.
● “Sort descending”: Displays the chosen sorting in descending order.
● “Track active editor”: PLC Engineering selects the object, that is opened in
the active editor, in the device tree of the view.

R911403764, Edition 08 Bosch Rexroth AG


900 / 1158 ctrlX PLC Engineering
Menu commands

See also
● ⮫ Chapter Command 'Devices' on page 898
● ⮫ Chapter Command ‘POUs’ on page 900

Command ‘POUs’
Symbol: , Shortcut: [Alt] + [1]
Function: This command opens the “POUs” view in the PLC Engineering main
window. POUs located here are available in the entire project.
Call: Menu “View”
See also
● ⮫ Chapter Standard Menu in View 'Devices', 'POUs', 'Modules' on page 899
● ⮫ Chapter 8.3.4 Adding objects on page 61

Command 'Element properties'


Symbol:
Function: This command opens the “Element Properties” view.
Call: Main menu “View”
This command opens the properties view for the open object. This view is
available only for a few objects, for example visualization and POU (SFC).
The properties are displayed in a structured table. You change the property
values by clicking into the value fields. You can filter or sort the properties
view.

Command 'ToolBox'
Symbol:
Function: This command opens the “ToolBox” view.
Call: Main menu “View”
This command opens the toolbox view for the open object. By default, this view
is available for graphical editors and visualizations. It includes the graphical
programming elements that you can drag into the editor.

Command 'Watch' - 'Watch <n>'


Symbol:
Function: This command opens the "Watch <n>" view. You can populate a
watchlist with variables from your project in order to monitor, force, or write
these variable values in an individual view in online mode. The value "n" can be
1, 2, 3, or 4 for a total of up to four watchlists.
Call: Main menu “View”
See also
● ⮫ Chapter 22.3.3 Using Watch Lists on page 297

Command 'Watch' - 'Watch All Forces'


Symbol:
Function: The command opens the “Watch All Forces” view, which is a special
kind of watch list.
Call: Menu bar: “View 🠂 Watch 🠂 Watch All Forces”
Requirement: A project is in offline mode or online mode.
The view contains all variables currently prepared for forcing, and all forced
variables of the application in one list. Actions are possible in the list which
are also possible in other watch lists. Moreover, the following commands are
available in the “Unforce” list box of the view:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 901 / 1158
Menu commands

Table 98: “Watch All Forces”


Tabular view of all forced variables of the application, including variables prepared for forcing
“Expression” Variable name
“Data Type” Data type of the variable
“Value” Currently forced value of the variable
“Prepared Value” Value prepared for forcing
“Overwritten value at start For inputs, the actual value is already overwritten by the force value
of cycle” before the application code is executed. As a result, this is the forced
value.
For outputs, this is the forced value.
“Overwritten value at end For outputs, this is the value which is calculated in the cycle. However,

User interface
of cycle” this value is overwritten by the force value at the end of the cycle.
For inputs, this is the forced value.
● “Unforce and Keep All Selected Values”: For all selected entries in the list,
the variables will be set to the forced value and the forcing will be lifted
● “Unforce and Restore All Selected Values”: For all selected entries in the list,
the variables will be reset to the values they had before they were forced,
and the forcing will be lifted.
See also
● ⮫ Chapter 21.5 Forcing and writing of variables on page 277
● ⮫ Chapter 22.3.3 Using Watch Lists on page 297

Command 'Add All Forces to Watchlist'


Function: The command adds all variables of the active application, which are
currently prepared for forcing, or which are already forced, to the watchlist.
Please regard, that this works only for docked watch list views.
Call: Context menu of view “Watch”
Requirement: Online mode, a watch list view is active.
There is a special watch list: “Watch All Forces”. This view shows automatically
all variables currently prepared for forcing or already being forced. It provides
additional commands for releasing any forces.
See also
● ⮫ Chapter 22.3.3 Using Watch Lists on page 297
● ⮫ Chapter Command 'Watch' - 'Watch <n>' on page 900
● ⮫ Chapter Command 'Watch' - 'Watch All Forces' on page 900
● ⮫ Chapter 21.5 Forcing and writing of variables on page 277

Command 'Bookmarks'
Symbol:
Function: This command opens the “Bookmarks” view.
Call: Menu bar: “View”.
“Previous Bookmark” Jumps to the bookmark that above the selected bookmark in the table
and opens the respective POU in the editor.
“Next Bookmark” Jumps to the bookmark that below the selected bookmark in the table
and opens the respective POU in the editor.
Deletes the selected bookmark from the table and in the respective
POU.

R911403764, Edition 08 Bosch Rexroth AG


902 / 1158 ctrlX PLC Engineering
Menu commands

List of bookmarks in the project with the following information: “Bookmark”, “Object”, and
“Position”.
You can edit the bookmark order per drag&drop.
When you double-click a row, PLC Engineering opens the respective “Object” in the editor and
jumps to this bookmark.
“Bookmark” Name of the bookmark as assigned by PLC Engineering in ascending
numerical order: “Bookmark_0”, “Bookmark_2” etc.
If the bookmark is selected and you click in the field, then it is editable
and you can modify the bookmark name.
“Object” Name and project path of the POU where the bookmark is set
Example: POU_Add [PLC_1: SPS-Logic: Application]
“Position” Position of the bookmark in the POU
Example: Row 3, Column 1 (Impl)
(Impl): in the implementation part of the POU
(Decl): in the declaration part of the POU
See also
● ⮫ Chapter 18.20.3 Setting and Using Bookmarks on page 206
● ⮫ Chapter Command 'Next Bookmark' on page 887
● ⮫ Chapter Command 'Previous Bookmark' on page 888

Command 'Breakpoints'
Symbol:
Function: This command opens the “Breakpoints” view.
Call: Menu bar: “View”.
This view shows an overview of all defined breakpoints for an application. You
have access to all breakpoint commands within this view.
Table 99: Table of current breakpoints
“Application” Select the required application from the list.
“POU” Name of the function block that will receive the breakpoint
“Location” Location of the breakpoint in the POU
● Text editor: Line number and column number
● Graphical editor: Network number or element number
For function blocks, "(Impl)" indicates that the breakpoint is located in
the implementation of the function block, not in an instance.
“Instance Path” Complete object path of the breakpoint location.
“Tasks” Names of tasks that will be effective when the breakpoint is executed.
If there are no restrictions, then "(all)" is displayed here.
“Condition” ● “Break always”: No additional enable condition defined; the break-
point is always enabled.
● Boolean expression. The expression must yield TRUE for the break-
point to be enabled.
“Hit Count Condition” When the breakpoint should be in effect (depending on the hit count)
“Current Hit Count” How often the breakpoint has already been reached up to now during
the execution
Table 100: Toolbar
“New This command opens the “Breakpoint Properties” dialog.
Breakpoint”
“New Data This command opens the “New Breakpoint” dialog.
Breakpoint”

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 903 / 1158
Menu commands

“Clear Removes the breakpoint (not the same as disable)


Breakpoint”
“Enable/Disable Toggles the status of the breakpoint or execution point between "ena-
Breakpoint” bled" and "disabled"
●Breakpoint enabled
●Breakpoint disabled
●Execution point enabled
●Execution point disabled
●Data breakpoint enabled
●Data breakpoint disabled
●Data execution point enabled

User interface
●Data execution point disabled
As opposed to "Clear breakpoint", a disabled breakpoint remains in the
list and can be enabled again.
“Properties” The “Breakpoint Properties” dialog opens for editing the breakpoint
parameters. This dialog is the same as “New Breakpoint”. In online
mode, you can change the breakpoint into an execution point.
“Go to Source Opens the online view of the affected block. The cursor is set at the
Position” breakpoint location.
“Clear All Deletes all breakpoints and execution points in the application. The list
Breakpoints” is cleared. Not to be confused with "deactivate".
“Enable All Enables all currently disabled breakpoints and execution points.
Breakpoints”
“Disable All Disables all currently enabled breakpoints and execution points. The
Breakpoints” points remain in the list and can be enabled again.
See also
● ⮫ Chapter 33.4.9 Dialog 'Breakpoint Properties' on page 1040
● ⮫ Chapter Command 'New Breakpoint' on page 956
● ⮫ Chapter Command 'New Data Breakpoint' on page 956
● ⮫ Chapter Command 'Enable Breakpoint' on page 957
● ⮫ Chapter Command 'Disable Breakpoint' on page 957
● ⮫ Chapter Command 'Toggle Breakpoint' on page 957

Command 'Cross Reference List'


Symbol:
Function: This command opens the “Cross Reference List” view.
Call: Menu bar: “View”, or “Edit 🠂 Browse 🠂 Browse Cross References”.
This view shows a list of cross-references for a symbol in the project. The
symbol can be a variable, a POU (program, function block, function), or a
user-specific data type (DUT). The cross-reference list offer two basic types of
searches:
● Text search: By specifying a symbol name, the cross-references of all sym-
bols in the project are displayed with their names. If multiple symbols with
the same are found, then the display can be limited to individual declara-
tions by means of the context menu.
● Declaration search: The symbol can be selected by means of the
input assistant or by specifying a qualified path (for example,
Device.Application.PLC_PRG.i or __POOL.POU.a). Then only the occur-
rence locations of this symbol are displayed, even if there exist other sym-
bols with the same name.

R911403764, Edition 08 Bosch Rexroth AG


904 / 1158 ctrlX PLC Engineering
Menu commands

Input field Symbol name (variable name, POU name, DUT name). Input
options:
● Selection of a declared symbol by means of the input assistant
( button).
● Manual input of the symbol name. Triggering of the search by
pressing the button or the [Enter] key.
For the text search, you can use the placeholders "*" (any
number of characters) or "?" (exactly any one character) in
combination with a partial string of a variable identifier.
Use the percent sign "%" to search for IEC addresses. Exam-
ples: "%MW8", "%M*".
More options outside of cross-reference list view:
● Use the command “Browse for Symbol 🠂 Browse Cross
References” if the name of a declared symbol is selected in
an editor, or if the cursor is in the name field. A search is also
possible if the object is selected in the device tree or POU
pool.
● Automatic if the name of a declared symbol is selected in an
editor, or if the cursor is in the name field. A automatic search
is also possible if the object is selected in the device tree or
POU pool.
Requirement: PLC Engineering option “Automatically list
selection in cross reference view” is activated (category
“SmartCoding”.
The following input is valid:
● Variable name, simple or qualified. Examples: "iVar",
"PLC_PRG.iVar".
● POU name: Examples: "PLC_PRG", "myFB".
● DUT name: Example: "mySTRUCT".
● Strings combined with placeholders: asterisk (*) for any char-
acter or question mark (?) for exactly one characters).
Example: "iVar*" applies to iVar1, iVar_glob2, iVar45, etc.
"iVar?" refers to iVar1, iVar2, iVarX, and so on, but not
iVar_glob2, iVar45 and so on...
● "%<IEC address>": PLC Engineering searches for variables
that are assigned to this address and direct memory access.
Example: "%QB0", %Q0 := 2.
Open input assistant for selecting a symbol
Perform a search
Define columns to search for the string.
Input field String that is searched for in the selected columns. The result
locations are marked in yellow. Cross references without this
string are hidden.
Show source position of previous cross-reference, [Shift]+[F4]
Show source position of next cross-reference, [F4]
Limit results to current declaration: Available if multiple declara-
tions are found for a symbol. Limits the display to the declaration
that you have selected in the list.
Show source position of selected cross-reference: The focus
jumps to the occurrence location of the symbol.
Print cross-reference list: The default dialog opens for setting up
a print job.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 905 / 1158
Menu commands

The cross references are displayed with the following information:


“Symbol” The result locations for the symbols (variables, POUs, or DUTs)
are grouped by declaration. The declaration occurrence com-
prises the root node and the occurrence locations in the project
are indented below. The precise expression is displayed that has
the symbol at the occurrence location.
Example: If there is a global variable i in the project and a local
declared variable i in a POU, then two root node entries will
be listed after a text search for cross-references with the occur-
rences of the variable i below each.
“POU” Block name; also a task name if a block call in the task configura-
tion.

User interface
“Variable” Only the variable name (for example, iVar)
“Access” Type of access to the variable at the occurrence location:
“Declaration” / “Read” / “Write” / “Call”.
Special case for pointers: An assignment type p := ADR(var1)
is displayed as write | address when searching for var1. The
reason for this: Any write access to p is not displayed when
searching for var1. Write access is also possible by means of
pointer variables.
“Type” Data type of the variable
“Address” IEC address if variables are assigned Example: "AT %QB0".
“Position” Location of the occurrence in the POU editor, for example line
number, network number, declaration part, or implementation
part. Example: "line 1, column 1 (Impl)".
“Object” POU name plus complete path of the occurrence location in
brackets (if this is found in the “Devices” view). Example:
"PLC_PRG [Device:Plc Logic:Application]"
“Comment” Comments if available in the declaration of the variable
The search yields all result locations in the project and in included, uncompiled
libraries.

Right-click commands in the cross-reference list


“Show source position”: Opens the respective POU and marks the occurrence:
for root entries, the declaration, and for subordinate entries, the respective
occurrence location. As an alternative, you can double-click a line.
“Limit Results to Selected Declaration”: Limits the display of results to the
selected symbol declaration if multiple declarations are found.
“Expand All”: In the list, every single result location is shown.
“Collapse All”: In the list, only the root nodes of the result locations are shown.

See also
● ⮫ Chapter Command 'Browse Cross References' on page 889
● ⮫ Chapter 18.20.1 Using the Cross-Reference List to Find Occurrences
on page 204
● ⮫ Chapter Command 'Limit Results to Current Declaration' on page 1034
● ⮫ Chapter Command 'Collapse All Folds' on page 886
● ⮫ Chapter Command 'Expand All Folds' on page 886

Command 'Browse Cross References in Classic View'


Symbol
Function: This command opens the “Classic Cross Reference List” view.

R911403764, Edition 08 Bosch Rexroth AG


906 / 1158 ctrlX PLC Engineering
Menu commands

Call: The command is not in any menu by default. You can add it to a menu
by using the dialog box from “Tools 🠂 Customize” (command category “Browse
Project”).
The view corresponds to the “Cross Reference List” view before PLC Engi-
neering V3.5 SP6.

Command 'Call Stack'


Symbol:
Function: This command opens the “Call Stack” view.
Call: Main menu “Debug”.
This view is very useful when you want to step into programs. It shows the
current location with the complete call path.
“Application Name of the active application that controls the current POU

“Task” Name of the task that controls the current POU

“POU” Name of the POU where program execution has halted


The first line in the list describes the current execution location
(marked with a yellow arrow). If this location is in a block that is
called by another block, then the call location is described in the
second line. In turn, if the caller is called by yet another block,
then that call location is described in the third line, and so on.
“Location” Position within the POU where program execution has halted
● Line and column numbers for textual editors
● Network or element numbers for graphical editors
“Instance Instance where program execution has halted
path”
The call stack is also available in offline mode and normal online mode when
you are not currently using any debugging functions). In this case, it receives
the last displayed location during a stepped execution, but it is displayed in
gray.
The “Call Tree” view, in contrast to the “Call Stack”, at any time provides
information on the calls of a POU.
See also
● ⮫ Chapter 21.3 Using Breakpoints on page 271
⮫ Chapter Command 'Call tree' on page 906

Command 'Call tree'


Symbol:
Function: This command opens the “Call Tree” view.
Call:
● “View” menu
● Context menu of a callable block in the “Devices” or “POUs” view.

View 'Call tree'


The call tree is available at all times, even before compiling the application.
It is a static representation of the caller and the calls of the block that you
specify explicitly. Therefore, the tree always contains two root nodes above
the respective call order is displayed as successive indented entries. Recursive
calls are detected quickly in this tree representation.
Example of a call tree (1) for the (2) PLC_PRG block:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 907 / 1158
Menu commands

User interface
● (3) Node “<block name> is called by:”
● (4) Node “<block name> calls:”
“Block name” Name of the program block; specified manually, by dragging from
another view, or by means of the button .
The drop-down list includes the last specified block names.
Toolbar and keyboard usage
: Find block PLC Engineering searches for the block specified in “Block name” and
displays its caller and calls.
: Use block from the input The “Input Assistant” dialog box opens for selecting a block call or
assistant instance call. The call tree is refreshed automatically after the selec-
tion.
: Show source code posi- PLC Engineering jumps to the occurrence location of the block in the
tion of the selected block source code of the program.
[F4]: Show source code The selection in the call tree jumps to the next or previous block in the
position of the next block call structure. At the same time, the associated source code position is
[Shift]+[F4]: Show source opened in the respective editor.
code position of the pre- Note: Double-clicking an entry in the call tree also opens the associ-
vious block ated source code position.
Display of the call tree:
“Symbol” “<block name> is called by”: The call order is displayed for below this
node. The bottom entry in this tree structure shows the start of the
calls.
“<block name> calls”: The calls from this block are displayed below
this node. The bottom entry in this tree structure shows the end of the
call chain.
“Position” For the root node in the call tree: Line numbers of the declaration
(“Decl”) of the block.
For the caller or calls below the root node: Line number, column
number, and network number of the position, depending on the imple-
mentation language.
Context menu for the entry selected in the tree:
“Collapse All” The expanded entries in the call tree are collapsed, except for the two
root nodes.
“Show Source Position” PLC Engineering jumps to the occurrence location of the block in the
source code of the program.
“Set as New Root Node” The entry selected in the call tree is displayed in “Block name”. The
tree is refreshed automatically for the new root nodes.

R911403764, Edition 08 Bosch Rexroth AG


908 / 1158 ctrlX PLC Engineering
Menu commands

The “Call list” view is provided for immediate information when stepping
through a program, as opposed to the static call tree that provides call informa-
tion about a block. The call list always shows the full call path of the current
position that is reached.
See also
● ⮫ Chapter 21.4 Stepping Through a Program on page 275
● ⮫ Chapter Command 'Call Stack' on page 906
● ⮫ Chapter Command 'Browse Call Tree' on page 889

Command 'Memory'
Symbol:
Function: In PLC Engineering V3.5 version earlier than SP11, the command
opens the “Memory” view.
Call: Menu bar: “View 🠂 Memory”.
As of SP11, the command provides the notice that you must install the COD-
ESYS Memory Tools package (available in the PLC Engineering Store) in order
to use the memory view. After installation, you can open the “Memory” view by
clicking “View 🠂 Show Memory View”.

Command 'Security Screen'


Symbol:
Function: The command opens the “Security Screen” view.
Call:
● “View” menu
● icon or in the status bar
The icon is displayed in blue when a valid certificate is specified for the dig-
ital signature. When only one client certificate is specified for the encrypted
communication, the icon remains gray, resulting in the client certificate pro-
viding no increased security for the user.
The following security features of PLC Engineering are configured and dis-
played in the view:
● Personal user certificate
● Encrypted communication
● Encryption and signatures of IEC projects
● Encryption and signature of download, online change, and boot application
● Security level
When the “Security Screen” is opened and closed, the
NOTICE
current settings are applied in the user options, even
when no active changes have been made.
If the CODESYS Security Agent add-on product is installed, then the “Security
Screen” view provides an additional “Devices” tab. This allows for the configu-
ration of certificates for the encrypted communication with controllers.

Tab 'User'
On this tab, certificates are configured that are required for the encrypted com-
munication and the digital signature of the user. Only certificates with private
keys can be specified here. The user profile is saved as an XML file in the user
options.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 909 / 1158
Menu commands

“User Profile and By default, the login name for Windows is specified as the user profile.
Certificate Selection”
List box with existing user : Opens the “User Profiles” dialog. Here you specify the name for a
profiles new user profile.
: Deletes the selected user profile. This user profile is no longer
displayed in the list box.
“Digital Signature” : Opens the “Certificate Selection” dialog for selecting the certifi-
cate for the digital signature.
One certificate can be selected. The certificate has to have a private
key.
: Deletes the displayed certificate.

User interface
One certificate can be selected. The certificate has to have a private
key.
“Project File Decryption” : Opens the “Certificate Selection” dialog for selecting the certifi-
cate for decrypting project files.
One certificate can be selected. The certificate has to have a private
key.
: Deletes the displayed certificate.
See also
● ⮫ Chapter 33.4.19 'Certificate selection' dialog on page 1046
Table 101: “Security Level”
“Activate the Use of Certificates for Enhanced Security”
“Enforce encrypted : When the user communicates with the controller, the server certifi-
communication” cate of the controller is used for establishing an encrypted connection.
Then the entire communication is encrypted.
“Enforce encryption of : All project files of the user are encrypted with a certificate. When
project files” the project is saved, it is encrypted with the certificate specified
in the project settings (“Project Settings 🠂 Security” dialog). The
selected certificate is displayed on the “Project” tab in the “Project
file encryption” group.
To open this project, the certificate to be encrypted has to be speci-
fied in “Project file decryption” with a private key.
“Enforce signing of project : All project files of the user are signed with a certificate. In “Digital
files” Signature”, a certificate has to be specified with a private key.
When a project is saved, a signature file <project
name>.project.p7s is generated in the project directory containing
the signature.
“Enforce encryption of : The data that is downloaded to the controller has to be encrypted
downloads, online changes with a controller certificate.
and boot applications” This certificate is defined directly either in the properties dialog of the
application on the “Encryption” tab, or in the security screen, on the
“Project” tab, in the “Encryption of Boot Application, Download and
Online Change” group.
Controller certificates are located in the local Windows Certificate
Store in the “PLC Certificates” directory. If the certificates of your
controller are not available in the directory, then they first have to be
loaded from the controller and installed to the directory. For instruc-
tions, see the "“Controller Certificates”" chapter.

R911403764, Edition 08 Bosch Rexroth AG


910 / 1158 ctrlX PLC Engineering
Menu commands

“Enforce signing of : The online code (downloads, online changes, and boot applica-
downloads, online changes tions) have to be signed with a certificate with a personal key. The
and boot applications” certificate is selected from the “Digital Signature” area.
Requirement: The “Encryption of boot application, download and
online change” option is selected.
“Enforce signing of : The “File 🠂 Save Project as Compiled Library” command generates
compiled libraries” a signed library <library name>.compiled-library-v3.
Requirements
● A certificate with a private key that supports code signing is avail-
able.
● A library compatibility >= PLC Engineering V3 SP15 is set in the
project information.
“Enforce timestamping of signed compiled libraries”: : The
URL of the time stamp server which created the time stamp
has to be entered in the “Timestamping server” field. Example:
timestamp.comodoca.com/rfc3161.
See also
● ⮫ Chapter Command 'Save Project as Compiled Library' on page 875
● ⮫ Chapter 27.3 Information for library developers on page 330

Tab 'Project'
All project-specific settings are configured on this tab. These elements are
active only when a primary project is loaded.
“Project file encryption”
“Technology” : Opens the “Project Settings 🠂 Security” dialog
When you select the “Encryption” project setting and then
“Certificates” in the dialog, you can choose a corresponding certifi-
cate by clicking . For more information, see the description of the
"Project Settings: Security" dialog.
“Certificates of Users Area for listing the certificates that encrypt the project file.
Sharing this Project”

“Encryption of Boot Application, Download and Online Change”


List of the applications of Double-clicking an application in the list opens the “Properties
the controller 🠂 Encryption” dialog. Depending on the settings of the “Security
Level” on the “User” tab of the “Security Screen”, the following fields
are available in the open properties dialog:
● “Encryption” tab with active “Certificates” area
● “Encryption” tab with “Encryption Technology” list box.
In the “Properties 🠂 Encryption” dialog, click the button to
select the controller certificate for “Encryption of Boot Application,
Download and Online Change”. For more information, see the descrip-
tion of the "Properties: Encryption" dialog.
Controller certificates are located in the local Windows Certificate
Store in the “PLC Certificates” directory. If the certificates of your
controller are not available in the directory, then they first have to be
loaded from the controller and installed to the directory. For instruc-
tions, see the "Protecting and Saving a Project" - " Encryption with
Certificates" chapter.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 911 / 1158
Menu commands

See also
● ⮫ Chapter 'Project settings' dialog - 'Security' on page 1064
● ⮫ Chapter Dialog 'Properties' - 'Encryption' on page 1049
● ⮫ Chapter 11.12 Encrypting the project with a certificate on page 84

Tab 'Devices'
This tab is available only after you have installed the CODESYS Security Agent
add-on. For a description of this tab, see the help for the CODESYS Security
Agent.

Command 'Settings of Memory Reserve for Online Change'


Function: This command opens the “ Online Change Memory Reserve” view.

User interface
Call: Menu bar: “View”.
In the view, memory reserves are configured for the function blocks during the
online change.
“Scan Application” ● Searches the selected application for function blocks and displays
them in the “Function blocks” area
● Updates the “Function blocks” area after the application is built
again.
● Updates the “Function blocks” area after an online change.
Drop-down list with the Selection of the application whose function blocks should be dis-
applications of the open played and/or edited in this view.
project
Table 102: “Function Blocks”
“All” All function blocks of the selected application are displayed.
“Pool” All function blocks of the “POUs” view that are displayed which are
referenced in the application.
“No memory-reserve” All function blocks with a memory reserve of 0 bytes are displayed.
“<memory reserve> bytes” Display of all function blocks with the number of bytes is displayed
that is defined in “Memory reserve”.
Information about the function blocks
Multiple selection is also possible when selecting a POU for the configuration of the memory
reserve.
“Function block” Name of the function block
“Size” Size of the function block
Size of an instance of a function block
Specified in bytes
“Number of instances ” Number of instances of a function block in the project
“Memory reserve” Display of the memory reserve for each instance of the function block
“Additional memory for all Product of “Number of instances” and “Memory reserve”
instances”
“Remaining memory Number of bytes that are available as reserve.
reserve”

R911403764, Edition 08 Bosch Rexroth AG


912 / 1158 ctrlX PLC Engineering
Menu commands

Table 103: “Settings”


“Memory reserve (in Input field for the memory reserve for the selected function block.
bytes)” Specified in bytes
Requirement: the application is not located on the controller yet or you
have allowed the memory reserve to be changed by clicking the “Edit”
button in the “Allow editing” area.
“Apply for Selection” The “Memory reserve (in bytes)” is assigned to the function block and
the table column “Memory Reserve” is updated.
In multiple selection, the specified value is assigned to each function
block.
In order to update the columns “Size”, “Number of Instances”,
“Additional Memory for All Instances”, and “Remaining Size of the
Memory Reserve”, click “Build 🠂 Build”, and then click the “Scan
Application” button.
Table 104: “Enable Editing”
“Enable” The input field “Memory reserve (in bytes)” is editable.
This button is modified in “Editable”.
Table 105: “Information”
“Number of FBs” Total number of function blocks in the application
“Additional memory for all Sum of the memory reserves of all function block instances of the
instances” application.
Specified in bytes

See also
● ⮫ Chapter 18.3 Configuring the Memory Reserve for an Online Change
on page 129
● ⮫ Chapter "Online change" command on page 943

33.3.5 Menu “Project”


Command “Logging in device user...”
Comprehensive information:
⮫ Logging in and logging off to/from the control

Symbol:

Call:
The command can be called either via the context menu of the ctrlX device
node in the device tree or optionally via the “Project” menu

Function:
The command opens the “Login - [Control IP address]” dialog, to establish a
connection with a ctrlX device.

Related topics:
● ⮫ Chapter Command “Log out current device user” on page 913
● ⮫ Chapter 33.4.3 Dialog “Login - [Control IP address]” on page 1037

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 913 / 1158
Menu commands

Command “Log out current device user”


Comprehensive information:
⮫ Logging in and logging off to/from the control

Prerequisite:
A device user is logged in to the control.

Symbol:

Call:

User interface
The command can be called either via the context menu of the ctrlX device
node in the device tree or optionally via the “Project” menu

Function:
The command terminates the connection to the currently logged in ctrlX device.

Related topics:
● ⮫ Chapter Command “Logging in device user...” on page 912
● ⮫ Chapter 33.4.3 Dialog “Login - [Control IP address]” on page 1037

Command 'Attach device'


Function: The command opens the “Append device” dialog for selecting a
device object to be inserted in the device tree below the currently selected
object.
Call: context menu of a device object in the device tree.
Prerequisite: an object is selected in the device tree below which a device
object can be inserted.
Also refer to
● ⮫ Chapter 17.2 Device tree and device editor on page 111

‘Attach device' dialog


Function: depending on the currently selected position in the device tree, the
dialog offers a selection of the devices that can be inserted at this point. In
addition, it contains the commands that are also available in the context menu:
“Attach device”, “Insert device”, “Plug in device”, “Update device”.
Prerequisite: The devices are installed in the device repository on the local
system.
If you have opened the dialog, it always displays the selection to suit the object
currently selected in the device tree until you click “Close”.
“Name” Name with which the device is to appear in the device tree. Must be a
valid IEC identifier.
Table 106: “Action”
“Attach device” PLC Engineering inserts the selected device indented below the
selected object in the device tree.
“Insert device” PLC Engineering inserts the selected device at the same level as the
selected object below it in the device tree.

R911403764, Edition 08 Bosch Rexroth AG


914 / 1158 ctrlX PLC Engineering
Menu commands

“Plug in device” PLC Engineering inserts the selected device in the selected slot. If the
slot is already occupied, the existing module is replaced by the new
one.
“Update device” PLC Engineering replaces the device selected in the device tree by the
one selected.
Please note: depending on the device, this may cause the configura-
tion already done in the device editor to be overwritten with the
default values!
“Character string for full- This field is editable after clicking in it. For any character string
text search in all devices” entered, only those devices that include the character string are dis-
played in the lower view. The matching character string is highlighted
in yellow for these devices.
“Manufacturer:” Drop-down list with manufacturers whose available devices are dis-
played.
“Group by category” : The available devices (newest version) are sorted by category. The
category is defined in the device description file.
: The available devices appear flat and alphabetically sorted.
“Show all versions (for : In addition, all other available versions of the devices can also be
experts only)” selected.
: Only the newest version of each device is available for selection
“Show outdated versions” : In addition, outdated versions of the devices can also be selected.
Outdated versions result, for example, from the update of plug-ins.
: Outdated device versions are not displayed.
The information provided by the device description file is displayed:
device name, vendor, categories, version, order number and a short description, device-specific
bitmap.
Also refer to
● ⮫ Chapter Command 'Update device' on page 914

Command 'Update device'


Function: As with the “Mount device” command, the command opens the
“Mount device” dialog for selecting a device object. This object is inserted in
the device tree in place of the currently selected object.
Call: context menu of a device object in the device tree.
Prerequisite: an object is selected in the device tree below which a device
object can be inserted.
With this command you can insert either a different version of a device or a
different type of device in place of the previous one.
The symbolic device name used in the device tree is retained, but the device
type specified in parentheses behind it changes if a different type has been
selected. Thus if only the device version is changed, the object entry appears
unchanged.
If the device type does not change, the configuration tree indented below the
device entry concerned is retained. In this case, the configuration settings also
remain the same.
Inconsistencies in the configuration caused by the device update are reported
by PLC Engineering the next time the application is compiled. This also applies
to implicitly inserted libraries that PLC Engineering does not remove accord-
ingly during a device update.
Also refer to
● ⮫ Chapter Command 'Attach device' on page 913

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 915 / 1158
Menu commands

Command 'Edit Object'


Function: This command opens the object in its editor.
Call: Main menu “Project”, context menu.
Requirement: An object is selected in the device tree or in the “POUs” view.

Command 'Edit Object with'


Function: When multiple objects are available for an object, this command
opens a dialog box for selecting an editor.
If only one editor is available for an object, then this command opens the
object in that editor.
Call: Main menu “Project” or shortcut menu (right-click)

User interface
Requirement: An object is selected in the device tree or in the “POUs” view.
In the standard installation of PLC Engineering, there is no object that has
multiple available editors.

Command 'Project settings'


Symbol:
Function: The command opens the “Project Settings” dialog.
Call: “Project” menu or double-click on the “Project settings” object in the
“POUs” view
Prerequisite: A project is open
Also refer to
● ⮫ Chapter 8.3.2 Selecting project settings on page 60
● ⮫ Chapter 33.2.2 ‘Project settings’ object on page 761

Command “Communication settings...”


The command opens the tab “Communication” in the generic device editor of
the ctrlX device, where the communication settings to the ctrlX device can be
configured, see:
⮫ Tab “Communication”

Call:
The command can be called via the context menu of the ctrlX device in the
device tree or optionally via the “Project” menu.

Command “Project synchronisation...”


Prerequisite:
The “Project synchronisation...” command is exclusively supported by the ctrlX
CORE, ctrlX CORE Virtual and ctrlX CORE I/O devices.

Symbol:

Call:
The command has two access options:
● In the menu “Project 🠂 Project synchronisation...”
● In the context menu of the “device (ctrlX CORE)” object in the device tree

R911403764, Edition 08 Bosch Rexroth AG


916 / 1158 ctrlX PLC Engineering
Menu commands

Function:
The command opens the “Project synchronization” dialog in which basic set-
tings to synchronize the project data between the control and the Engineering
PC, see:
⮫ Dialog “Project synchronization”.
Without active synchronization, only the data required for the control flow is
stored. The data is available in the “Manage app data” window of the ctrlX
CORE web interface in the following configuration data folder: “plc 🠂 run…”
The project synchronization functionality allows to transfer a project from the
control to the Engineering PC and to save it on the local file system. Moreover,
it can be defined for which actions the project is transferred or synchronized
from the Engineering PC to the control.
The data is stored on the control in the configuration data in the following
folder: “plc 🠂 run…”
If you are not the project owner of the project sources, the project can be
retrieved directly from the control by means of the project synchronization, you
can connect to the running project and to edit it and load it to the control
again, see:
⮫ Project data source - introduction.

Command “Equalize project PC <-> ctrlX CORE”


Call:
The command has two access options:
● In the menu “Project 🠂 Equalize project PC <-> ctrlX CORE”
● In the context menu of the “device (ctrlX CORE)” object in the device tree

Function:
By using the command, the project folder on the Engineering PC and the
project folder on the ctrlX device are compared, analogously to the check when
opening the project.
Please refer to: ⮫ Project data source - Introduction

Command “Synchronization cache...”


Prerequisite:
The “Synchronization cache...” command is exclusively supported by the ctrlX
CORE, ctrlX CORE Virtual and ctrlX CORE I/O devices.

Symbol:

Call:
The command has two access options:
● In the menu “Project 🠂 Synchronization cache...”
● In the context menu of the “device (ctrlX CORE)” object in the device tree

Function:
The “Synchronization cache...” command opens the “Project synchronization”
dialog to manage the project cache on the Engineering PC, see:
⮫ Dialog “Project synchronization” (Synchronization cache...)
The synchronization cache serves as a temporary file repository for project data
exchanged between the ctrlX device and PLC Engineering.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 917 / 1158
Menu commands

Related topics
⮫ Project data source - Introduction

Command 'Document'
Symbol:
Function: This command opens the “Document Project” dialog box, where you
can define the project documentation. This includes the selection of objects in
the open project that you want to print.
Call: Main menu “Project”
Table 107: “Document Project” dialog box
“Please select the objects Project tree view

User interface
which are to be printed” In this view, you can select or clear objects for printing.
All objects are selected by default.
“Title page” PLC Engineering creates a title page named "Project Documentation"
with the following information:
● File: project file name
● Date: Creation date of the project documentation
● Profile: PLC Engineering profile of the project
“Table of contents” PLC Engineering creates a table of contents for the project documen-
tation.
“Preview” PLC Engineering creates and opens a print preview of the project doc-
umentation.
“Select” PLC Engineering opens a drop-down list of all or single object types for
the project documentation.
“Deselect” PLC Engineering opens a drop-down list of all or single object types
that should be excluded from the project documentation.
“OK” The “Print” dialog box opens.
See also
● ⮫ Chapter Dialog 'Project Settings' - 'Page Setup' on page 1063
● ⮫ Chapter Command 'Print' on page 874

'Compare’ command
Symbol:
Function: The command opens the “Project compare” dialog. In this dialog, you
define the reference project to compare with the current project. You configure
the comparison process by means of options. When closing the dialog, the
comparison starts and the result is displayed in the “Project comparison -
Differences” view.
Call: “Comparing 🠂 project”.
Prerequisite: A project is opened.
Also refer to
● ⮫ Chapter Command 'Commit Accepted Changes' on page 922

R911403764, Edition 08 Bosch Rexroth AG


918 / 1158 ctrlX PLC Engineering
Menu commands

‘Project comparison’ dialog


Table 108: “Compare the currently opened project with:”
“Project on disk” Path of the reference project on the file system.
“Project in a source control “Host:” Name of the host where the source code management is
database” located.
“Port:” Number of the port for connecting to the source code manage-
ment
“Memory location:” Path of the reference project
Prerequisite: The project is connected to a source code management
(for example CODESYS SVN) .
Table 109: “Comparison options:”
“Ignore whitespace” : Deviations of the current project from the reference project based
only on blanks are ignored.
“Ignore comments” : Comments in the programming code are excluded from the com-
parison.
“Ignore properties” : Object properties are excluded from the comparison.
“OK” Starts the project comparison and displays the result in the “ Project
Comparison - Differences” view.

View 'Project compare' - 'Differences'


The project compare view appears when closing the “Project compare” dialog
with “OK”. The example shown exemplifies the project comparison of a PLC
project, but is also applicable to I/O engineering projects in terms of function-
ality.

(1) Objektbaum des aktuellen Projekts


(2) Objektbaum des Referenzprojekts

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 919 / 1158
Menu commands

(3) Befehl 'Block übernehmen', Befehl 'Einzeln übernehmen'


(4) Vergleichsoptionen, konfiguriert im Dialog
'Projektvergleich'
Vergleichsstatistik: hinzugefügte, gelöschte, geänderte
Objekte
Table 110: Toolbar
Switches to the detailed compare view “Project comparison' - '<Object
name> Differences” for the object selected in the tree. Option: Double-
click on the object.
Selects the next bottom object in the device tree where differences
were detected.
Selects the next top object in the device tree where differences were

User interface
detected.
“Accept Block” The block (selected object with all subordinate objects and units) is
selected for acceptance from the reference block to the current block.
Repeated clicking of “Accept Block” undoes the effects of its last
change.
“Accept Single” The object is selected in the current object for acceptance from the
reference line.
Prerequisite: The object selected in the object tree differs with regard
to properties, access rights or folder affiliation.
Opens the “Accept” dialog.
Table 111: Display of differences with colors, and symbols
Black font Objects are identical.
Object name with Child objects of the object are different
Gray highlight Objects are different.
Gray highlight + bold blue Object is only in the reference project.
font
Gray highlight + bold green Object is only in the open project (not in reference project).
font
Gray highlight + red font + Object has different properties.

Gray highlight + red font + Access rights of object and reference object are different.

Gray highlight + bold red Implementation of objects is different.


font + Double-click on the row to display the object-specific compare view.
Yellow highlight Object is activated for acceptance.
Yellow highlight + Adding the reference object to the open project is activated.
Yellow highlight + Deleting the object (in the open project) is activated.
Yellow highlight + Acceptance of the properties of the reference project is activated.
Yellow highlight + red font + Acceptance of the access rights of the reference project is activated.

Gray highlight + bold red Acceptance of the implementation of the reference project is acti-
font + vated.
“Comparison options” The comparison options defined in the “Project comparison” dialog.
“Compare statistics” Number of additions, deletions, and changes in the current project, as
compared to the reference project. “Change” means differences of an
object available in both projects.

R911403764, Edition 08 Bosch Rexroth AG


920 / 1158 ctrlX PLC Engineering
Menu commands

The dialog prompt opens: “Do you want to commit the changes which
you made in the diff view?”
“Yes”: The contents, properties or access rights of the yellow high-
lighted objects are changed in the project. Now they correspond to the
reference project. The project comparison view is closed.

View 'Project comparison' - '<Object name> Differences'


Function: Detailed compare view
Call in the project compare view:
● Select an object that is identified as having different contents which you
need to view in detail. Click .
● Double-click the object.
Table 112: Toolbar
Switches back to the project compare view.
Selects the next row below in the code where differences were
detected.
Selects the next row above in the code where differences were
detected.
“Accept Block”2 The block (with all subordinate rows) is selected to apply the refer-
ence blocks into the current project.
A block in the detailed compare view consists of the unit where the
cursor is located and all corresponding units that have the same differ-
ence markers. A unit is a row, network, or element. Subsequent rows
of a row are examples of corresponding units.
Repeated clicking of “Accept Block” undoes the effects of its last
change.
“Accept Single” The row is selected in the current object to apply reference row.
Switches between the standard display, in which different units (rows,
networks, elements) are displayed in red, and another display: In the
open project, the units are displayed recently inserted. In the refer-
ence project, they are displayed as deleted.
Available within the detailed compare view only.
Note: Depending on the representation, differences found are counted
in the statistics as a change, or as an insertion and deletion!
Third view in the detailed compare view.
The button opens or closes a third pane below the comparison of the
current view and reference view (see figure below). This third view
shows the result of the actions taken to resolve the differences found.
Respective rows are marked by a yellow bar at the beginning of the
row.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 921 / 1158
Menu commands

User interface
(1) Third compare view
(2) Result of action "Use right row"
(3) Button "Use right row"
The left row, that is the implementation in the current project, is used.
The left block, that is the implementation of the block into the current
project, is used.
The right row, that is the implementation in the reference project, is
used.
The right block, that is the implementation of the block in the refer-
ence project, is used.
Only available if the differences are not directly compared .
The left row is inserted above the right one in the third (result) view.
Only available if the differences are not directly compared .
The right row is inserted above the left row in the third (result) view.
Table 113: Display of differences with colors, and symbols
Black font Objects are identical.
Object name with The child objects of the object are different.
Gray highlight + bold blue Code is only in the reference project.
font
Gray highlight + bold green Code is only in the current project (not in reference project).
font
Yellow highlight The object is activated for acceptance.
The dialog prompt opens: “Do you want to commit the changes which
you made in the diff view?”
“Yes”: The code highlighted in yellow is transferred to the project. The
code corresponds to the reference project. The detailed view is closed
and the project view is displayed. You can continue working in the
project comparison.

R911403764, Edition 08 Bosch Rexroth AG


922 / 1158 ctrlX PLC Engineering
Menu commands

'Apply' dialog
Table 114: “Which meta data should be accepted?”
“Access rights” : Access rights that are selected for acceptance.
“Accepted groups” Grouping with access rights accepted by the reference project.
A group is accepted if it exists in both projects with different access
rights.
Example: Group_A
“Unaccepted groups The group is not accepted if it is not present in one of the two proj-
(missing in a project)” ects.
“Properties” : Properties activated for accept
Prerequisite: The properties of the reference object and the object are
different.
“OK” Settings are accepted.

Command 'Commit Accepted Changes'


Symbol:
Function: This command commits the accepted differences from the project
comparison to the current project.
Call: “Project 🠂 Commit Accepted Changes”.
Requirement: Changes from the project comparison have been accepted.
The changes are only copied to the project. This command does not save them
to the hard disk.
See also
● ⮫ Chapter 10.2 Open detailed compare view on page 71

Command 'Export'
Function: This command opens a dialog box for exporting objects from a
project to an XML file.
Call: Menu bar: “Project”.

Dialog 'Export'
This dialog box lists all objects from the device tree, POU tree, and module tree
that PLC Engineering can export.
One file per subtree : PLC Engineering generates a separate export file for each subtree
that is located directly under the root node and includes selected files.
: PLC Engineering generates one export file for all selected objects.
“Saved version” This version should correspond to the target version where the export
file will later be imported.
If the current project contains plug-ins or add-ons that are not avail-
able in the selected memory format (profile), then the “Extend Profile”
dialog box opens. In this dialog box, the selected profile can be
extended with the add-ons.
See also
● ⮫ Chapter Command 'Save project as' on page 871
● ⮫ Chapter 'Import...’ command on page 922
● ⮫ Chapter 9.2 Exporting and Importing Projects on page 67

'Import...’ command
Function: The command opens a dialog for importing objects from an XML file.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 923 / 1158
Menu commands

Call: Menu “Project”


Prerequisite: A project is opened.
Before importing the project, PLC Engineering checks whether the project
requires add-ons that are not yet installed. If this is the case, a dialog with
the missing add-ons is shown. The add-ons can be installed later via this dialog.

Dialog 'Import'
The dialog lists all objects from the export file that PLC Engineering can import
at the current location.
“Currently selected target Object currently selected in the device tree
objects”

User interface
“Insertable items” Displays all objects in the export file that PLC Engineering can insert
below the selected object.
“Show Contents” Displays the contents of the export file in a tree structure
Also refer to
● ⮫ Chapter Command 'Export' on page 922
● ⮫ Chapter 9.2 Exporting and Importing Projects on page 67

Command 'Export PLCopenXML'


Function: This command opens a dialog box for exporting objects from a
project into an XML file in the PLCopen format.
Call: Menu “Project”

Dialog box 'Export PLCopenXML'


The dialog box lists all objects from the Device tree that PLC Engineering can
export into an XML file in accordance with the PLCopen format.
The PLCopenXML scheme does not permit VAR_GLOBAL and VAR_GLOBAL
CONSTANT POUs to be in the same variable list. Therefore, if you wish to
export both, you must first divide the variables into two separate variable lists.
See also
● ⮫ Chapter Command 'Import PLCopenXML' on page 923
● ⮫ Chapter 9.2 Exporting and Importing Projects on page 67

Command 'Import PLCopenXML'


Function: This command opens a dialog box for importing objects from an XML
file in PLCopen format.
Call: Menu “Project”
Requirement: A project is open.

Dialog box 'Import PLCopenXML'


The dialog box lists all objects from the PLCopen export file that PLC Engi-
neering can import at this point.
“Currently selected target Object that is selected in the Device tree
object”
“Insertable items” Displays all objects of the export file that PLC Engineering can insert
below the selected object.

R911403764, Edition 08 Bosch Rexroth AG


924 / 1158 ctrlX PLC Engineering
Menu commands

“Conflict Resolution” When objects are imported which have the same names as existing
objects, the conflicts can be resolved for each object as follows:
● Replace the existing object:
The object which exists in the project is overwritten by the
imported object.
● Rename the new object:
The new object is imported with the changed name. The string
_<no> is appended to the end of the name.
● Skip the new object:
The object is not imported.
“Select” Opens a list box for selecting object types.
“Deselect” Opens a list box for deselecting object types.
“Conflicts” Opens a list box for resolving all conflicts.
“Show Contents” Opens a dialog where the objects of the XML file are displayed.
The PLCopenXML scheme does not permit VAR_GLOBAL and VAR_GLOBAL
CONSTANT POUs to be in the same variable list. Therefore, if you wish to
export both, the variables must first be divided into two separate variable lists.
See also
● ⮫ Chapter Command 'Export PLCopenXML' on page 923
● ⮫ Chapter 9.2 Exporting and Importing Projects on page 67

Command 'Generate Sercos SCI XML'


The command is not integrated in the standard menu. You can add it via the
dialog “Tools 🠂 Adapt” from the category “Devices”.
Function: The command opens the standard dialog for saving a file to the
local file system. You can define a name and storage location for an XML
file in which PLC Engineering should store the EtherCAT configuration of the
EtherCAT master currently selected in the device tree. This may be necessary in
order to operate an external sercos stack.
Call: context menu of a sercos master device object in the device tree.
Also refer to
● ⮫ Chapter 7.2.1 Customizing Menus on page 47

Command 'Generate EtherCAT XML'


The command is not integrated in the standard menu. You can add it via the
dialog “Tools 🠂 Adapt” from the category “Devices”.
Function: The command opens the standard dialog for saving a file to the
local file system. You can define a name and storage location for an XML
file in which PLC Engineering should store the EtherCAT configuration of the
EtherCAT master currently selected in the device tree. This may be necessary in
order to operate an external EtherCAT stack.
Call: context menu of an EtherCAT master device object in the device tree.
Also refer to
● ⮫ Chapter 7.2.1 Customizing Menus on page 47

Command 'User management' – 'Log in User'


Symbol:
This command opens the dialog box “Login”. Here you specify the project
that you wish to edit and enter the login data for a user account with the
corresponding rights. In addition, you can open the password manager from
this dialog box.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 925 / 1158
Menu commands

The command is available in the menu “Project 🠂 User Management”.


See also
● ⮫ Chapter 11.11 Logging in via user account and password manager
on page 82

Command 'User management' - 'Logout user'


Symbol:
The user currently logged in to the project is logged out again with this com-
mand. This takes place without a dialog or message, unless no user is currently
logged in.
The command is available in the menu “Project 🠂 User administration”.

User interface
If the user is currently logged in to multiple projects or libraries included in
this one (does not have to be the same user account), the “Logout” dialog is
displayed. The project or library project from which the current user is to be
logged out can be specifically selected in this dialog.
The status bar always displays the user who is currently logged into the project.
A double-click the field “Current user” in the status bar enables quick access to
the “Login” or “Logout” dialog.
Also refer to:
● ⮫ Chapter 11.11 Logging in via user account and password manager
on page 82
● ⮫ Chapter Command 'User management' – 'Log in User' on page 924

Command 'User management' – 'Rights…'


This command opens the dialog box “Rights”, in which you define the actions
that may be carried out, the user groups that may carry them out and the
project objects on which they may be carried out.
The command is available in the menu “Project 🠂 User Management”.
See also
● ⮫ Chapter 11.10 Protecting Objects in the Project by Access Rights
on page 81

Command 'Adding SoftMotion SoE axis'


Function
The command adds a SoftMotion SoE axis below a SoftMotion object, in the
device tree below the device node ethercat_master_instances_ethercatmaster,
see also:
⮫ Object “ethercat_master_instances_ethercatmaster”

Prerequisite
A SoftMotion device has to be present in the device configuration for a Soft-
Motion axis to be added ctrlX I/O Engineering device configuration has to be
available.

Call
The command can be called via the following locations:
● Via the context menu of the SoftMotion object in the device tree.
● Via the menu item “Project” if the Softmotion object is selected in the
device tree.

R911403764, Edition 08 Bosch Rexroth AG


926 / 1158 ctrlX PLC Engineering
Menu commands

Command 'Adding SoftMotion CoE axis'


Function
The command adds a SoftMotion CoE axis below a SoftMotion object, in the
device tree below the device node ethercat_master_instances_ethercatmaster,
see also:
⮫ Object “ethercat_master_instances_ethercatmaster”

Prerequisite
A SoftMotion device has to be present in the device configuration for a Soft-
Motion axis to be added ctrlX I/O Engineering device configuration has to be
available.

Call
The command can be called via the following locations:
● Via the context menu of the SoftMotion object in the device tree.
● Via the menu item “Project” if the Softmotion object is selected in the
device tree.

Command “Insert templates...”


Prerequisite:
The command is only available, if the application node in the device tree is
selected.

Symbol:

Call:
The command has two access options:
● In the menu “Project 🠂 Insert templates...”
● In the context menu of the application node in the device tree

Function:
The command opens the dialog “Insert templates”, refer to ⮫ Dialog “Insert
templates”.
Via the dialog, project templates under Check Functions and MotionInterface
can be implemented in the project which considerably facilitates project plan-
ning.

Command 'Acknowledge Diagnosis', 'Acknowledge Diagnosis for Subtree'


Function: The command acknowledges a diagnosis message.
Call: Context menu of a device object in the device tree
Requirement: The project is in online mode.
The “Acknowledge diagnosis” command acknowledges the diagnosis messages
of an individual device. The “Acknowledge Diagnosis for Subtree” command
also acknowledges the diagnosis messages of all subordinate devices. The
diagnosis message of a pending malfunction is indicated by a red exclamation
mark at the device object. The diagnosis message of a corrected malfunction is
indicated by a gray exclamation mark.
See also
● ⮫ Device tree in online mode on page 114

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 927 / 1158
Menu commands

"Edit I/O mapping" command


Function: The command opens the “Edit I/O mapping” dialog. This displays all
I/O mappings of the currently selected device object, including I/O mappings
of all additional device objects that are inserted in the device tree below this
object.
Call: context menu of a device object in the device tree.

"Edit I/O mapping” dialog


You can edit the I/O mapping in this dialog in exactly the same way as in
the dialog “I/O mapping” of the individual device editors. The respective other
dialogs are directly updated accordingly.
“Search” Input field for a character string to search for the mapping table. The

User interface
search results are marked in yellow.
“Filter” Selection list with filters for the I/O assignments shown in the map-
ping table:
● “Show all”
● “Show only outputs”
● “Show only inputs”
● “Show only unmapped variables”
● “Show only mapped variables”
● “Show only mappings to existing variables”
● “Show only mappings to new variables”
In the context menu you will find the following commands among other things:
“Export I/O mapping to CSV”: Serves to save the mappings of a device and its
subdevices to an external file. To do this you select the device in the device tree
or in the mapping list.
“Import I/O mapping from CSV”: inserts mappings from a file created before-
hand by export.
Also refer to
● ⮫ Chapter 17 Configuring the I/O connection on page 111
● ⮫ Chapter "Edit I/O mapping" command on page 927
● ⮫ Chapter Command 'Export Mappings to CSV' on page 931
● ⮫ Chapter Command 'Import Mappings from CSV' on page 929

Command 'Project Localization' - 'Toggle Localization'


Symbol:
Function: This command switches between the currently set project localiza-
tion and the <original version>.
Call: Menu bar: “Project 🠂 Project Localization”; button in the “Manage
Localizations” dialog; button on the toolbar.
Requirement: A project is open. A default localization for the project is defined
in the “Manage Localizations” dialog.
See also
● Help about CODESYS Visualization: Multi-language capability
● ⮫ Chapter Command 'Project Localization' - 'Manage Localizations'
on page 928

R911403764, Edition 08 Bosch Rexroth AG


928 / 1158 ctrlX PLC Engineering
Menu commands

Command 'Project Localization' - 'Manage Localizations'


Function: This command opens the “Manage localizations” dialog. Select the
desired localization language in the dialog or the original version of the project.
You can still accept the localization files *.<language>.po into the project or
remove them.
Call: Menu bar: “Project 🠂 Project localization”.
Requirement: A project is open.

Dialog 'Manage localizations'


“Available Localizations” List of the localization files available in the project. Example:
proj1-de.po
proj1-en.po
<original version>
The original version is always available. The project can be edited only
in the original version.
“Add” This button opens the dialog for selecting an additional po file from
the file system.
“Remove” This button removes the po file, which is selected on the left side,
from the project.
“Default localization” : The selected localization is for the default localization. The entry is
display in bold.
“Switch Localization” Use this button to switch to the selected localization.
“OK” The project is displayed in the language that is provided by the file
selected below the files. If you select “<original version>”, then the
project appears in the editable non-localized version.
See also
● ⮫ Help about CODESYS Visualization: Multi-language capability

Command 'Project Localization' - 'Create Localization Template'


Function: This command opens the “Create Localization Template” dialog.
Define here which information should be exported from the project to a transla-
tion template (*.pot file).
Call: Menu bar: “Project 🠂 Project Localization”.
Requirement: A project is open.

Dialog 'Create Localization Template'


This dialog is used for selecting the textual information that should be used in
the localization template.
Table 115: “Include the Following Information”
“Names” Texts, such as dialog captions and object names in the device tree
“Identifier” Variable identifier (example: Counter)
“ Strings” Example: 'count' in the following declaration: strVar: STRING :=
'count';
“Comments” Comment texts in the POUs

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 929 / 1158
Menu commands

“Position information” Selection of which positions of the selected text categories in the
project should be included in the translation file. The position infor-
mation is located in the first line(s) of a segment for a translation.
Example:
#: D:\Proj1.project\Project_Settings:1
msgid "Project settings"
msgstr ""
● “All”: All detected positions of the text are listed.
● “First appearance”: In the translation file, the position is included
in the project where the text to be translated appears for the first
time.

User interface
● “None”
“Generate” This button opens the dialog for saving a file. The translation template
is created in a text file of type *.pot (portable object template). Each
further generation creates a completely new template file.
See also
● Help about CODESYS Visualization: Multi-language capability

Command 'Import Mappings from CSV'


Function: The command opens the default dialog for opening a file in the local
file system. The filter is set to the file format CSV in order to import the I/O
mapping configuration of a device from the file which was exported previously
by means of the “Export Mappings to CSV” command. PLC Engineering writes
the configuration to the selected device.
Call: Context menu of a device object in the “Devices” view.
Requirement: A project is open with a device and an I/O mapping configuration.
The device matches the exported CSV file.
I/O mapping configurations are stored in CSV files with
NOTICE
the semicolon separator. These files can be edited man-
ually. If the files are edited manually, then it is imperative
that this format is retained in order to import success-
fully. Note: The entries of the file to the I/O mapping
of the device are assigned by the device name and the
parameter name. Parameter names that are not unique
are numbered sequentially in this file (@<n>).
Fields without contents in the CSV file are ignored at
import. To remove an existing entry in the I/O mapping
by importing, you have to add a space in the respective
field in the CSV file.
See also
● ⮫ Chapter Command 'Export Mappings to CSV' on page 931
● ⮫ Chapter 17.4 Configuring Devices and I/O Mapping on page 118

Command 'Edit Object (Offline)'


Function: The command opens the object offline in the editor.
Call: Main menu “Project”, Context menu
Requirement: The application is in online mode. An object is selected in the
device tree or in the “POUs” view.
The command allows you to edit objects in online mode. After editing you
transfer the changes to the controller by use of the command “Online 🠂 Online
Change” or “Online 🠂 Load”.

R911403764, Edition 08 Bosch Rexroth AG


930 / 1158 ctrlX PLC Engineering
Menu commands

See also
● ⮫ Chapter "Online change" command on page 943
● ⮫ Chapter Command 'Load' on page 942

Command 'Online Config Mode'


Function: This command is for switching the online configuration mode on and
off. At switch-on it establishes a connection to the PLC and loads an implicitly
created application “HiddenOnlineConfigModeApp” to the PLC. Depending on
the device, PLC Engineering goes into simple online configuration mode or a
dialog box appears for selecting between simple and advanced online configu-
ration mode.
Call: Context menu of the PLC object in the device tree
Requirement: The communication settings for the PLC device are correctly set.

Simple online configuration mode:


This command creates the implicit application HiddenOnlineConfigModeApp
and loads it to the controller. The application automatically initializes all inputs
and outputs of the controller once. After that you can access the I/Os as fol-
lows:
● Read I/Os
● Write outputs
● Diagnosis (in the device tree and on the “Status” tab of the device editor)
● Scan (of the current hardware)
● Interactive online functions, if supported (for example, writing asynchronous
messages)
Advanced online configuration mode (parameter mode):
If there are already applications on the PLC and the controller supports it, the
command first opens the dialog box “Devices”, which displays the applications
existing on the controller. From this dialog you can connect via the button
“Parameter mode” to the PLC and then access the values of the device parame-
ters without having to log in with a real application.
Writing and forcing in the I/O mapping
In online configuration mode the writing and forcing of values on the “I/O
Mapping” tab works differently to the way it works in real online mode. The
outputs are written immediately after insertion into the table. There is no
“Prepared Value” column; instead, the initial values can be changed directly
after a double-click on the column “Current Value”.

Dialog box 'Config application mode'


This dialog box appears after the command “Online Config Mode” if the device
supports the advanced online configuration mode and there are already real
applications on the controller.
“Parameter mode” The controller configuration in the project is compared with that on
the device. If they correspond, PLC Engineering establishes a connec-
tion to the PLC. Unlike the simple online configuration mode it permits
the reading and – if supported by the driver – the writing of parame-
ters in the generic device editor. The applications already loaded to the
device remain unchanged in this case!
“Config application mode” PLC Engineering switches to the 'simple online configuration mode'.
See also
● ⮫ Checking the control configuration using the 'Online configuration opera-
tion' command on page 117

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 931 / 1158
Menu commands

Command 'Read PLC Parameter File to Configuration'


Function: This command reads the configuration file IoConfig.par of the PLC
and stores the values in the project. Such a file is created if the parameters of
the PLC have been changed by another device, for example via a visualization.
Then these parameters are changed only in the memory of the PLC, but not in
the configuration of the project.
Call: Context menu of the PLC device object
Requirement: You have made the command available using the dialog in “Tools
🠂 Customize”.
See also
● ⮫ Read PLC parameter file to configuration on page 119

User interface
Command 'Export Mappings to CSV'
Function: The command opens the default dialog for saving a file to the local
file system. The filter is set to file format CSV. After specifying a name and a
location, PLC Engineering stores the I/O mapping configuration in a CSV file
with the semicolon separator.
Call: Context menu of a device object in the “Devices” view.
Requirement: A device object with an I/O mapping configuration is selected in
the device tree.
Parameter names that are not unique are numbered sequentially in this file
(@<n>).
See also
● ⮫ Chapter Command 'Import Mappings from CSV' on page 929
● ⮫ Chapter 17.4 Configuring Devices and I/O Mapping on page 118

Command 'Project Environment'


Function: This command opens the “Project Environment” dialog box.
Call: “Project” menu
Requirement: A project is open.
this command is for checking the currentness of software and files integrated
in the project and enables them to be updated.
See also
● ⮫ Chapter Dialog 'Project Environment' – 'Library Versions' on page 1070
● ⮫ Chapter Dialog 'Project Environment' – 'C Code Modules' on page 1072
● ⮫ Chapter Dialog 'Project Environment' - 'Compiler Version' on page 1070
● ⮫ Chapter Dialog 'Project Environment' - 'Device Versions' on page 1071
● ⮫ Chapter Dialog 'Project Environment' – 'Visualization Profile' on page 1071
● ⮫ Chapter Dialog 'Project Environment' – 'Visualization Styles' on page 1071
● ⮫ Chapter Dialog 'Project Environment' – 'Visualization Symbols'
on page 1072

Command 'Set Active Application'


Function: This command sets the selected application as the active application.
Call: Main menu “Project”, or right-click the “Application” object.
Requirement: The project has at least two applications. The selected applica-
tion is not active.
Online actions apply only to the active application. The name of an active appli-
cation is displayed in bold typeface in the device tree.

R911403764, Edition 08 Bosch Rexroth AG


932 / 1158 ctrlX PLC Engineering
Menu commands

Command ‘Add Folder’


Symbol:
Function: This command opens a dialog box for defining a new folder in the
Devices or POUs view.
Call: “Project” menu, context menu in the Devices or POUs view
You cannot structure the arrangement of device nodes and device objects
through folders that you have created yourself.
This command inserts the folder below the object that has just been selected
in the tree. If no object is selected, PLC Engineering inserts the folder right at
the top in the tree directly under the root node.
See also
● ⮫ Chapter 8.3.4 Adding objects on page 61

Command 'Add Object'


Symbol:
Function: The command opens a submenu of objects that contains all objects
that can be inserted, depending on the current position in the “Devices” or the
“POUs” view.
Call: Menu “Project”, context menu in the “Devices” or “POUs” view.
Prerequisite: If PLC Engineering is to insert the object in the device tree, select
an existing object below which the new object can be created indented. If you
want PLC Engineering to insert the object in the POUs tree, set the focus at any
free place in the PLC Engineering window.
Also refer to
● ⮫ Chapter 8 Creating and configuring a project on page 53

33.3.6 Menu “Build”


Command 'Generate Code'
Symbol ; shortcut: [F11]
Function: The command starts the code generation for the active application.
Call: Menu bar: “Build”
When generating code with this command, code is generated as when down-
loading the application to the PLC, but the code is not transferred to the PLC.
At this time, other source code tests are performed As a result, you can check
the code for bugs that were not detected by the compiler and for fixing any
bugs before the code is used in online mode.
See also
● ⮫ Chapter 20.5 Generating Application Code on page 265

Command 'Clean'
Function: This command deletes the build information for the active applica-
tion.
Call: Main menu “Build”.
During the last download, the build information was created and saved to a file
(*.compileinfo).
After a cleaning process, an online change is no longer possible for the affected
application. The application must be fully downloaded to the controller again.
See also
● ⮫ Chapter Command 'Clean All' on page 933

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 933 / 1158
Menu commands

Command 'Clean All'


Function: This command deletes the build information for all applications in the
project.
Call: Main menu “Build”.
During the last download, the build information was created in the local file
system and saved to a file (*.compileinfo).
This command requires a download before another login An online change is
no longer possible. As compared to the “Clean” command (only the active
application), PLC Engineering regenerates the language model for all objects,
which is very time-consuming.
Reconsider carefully whether or not executing this com-
NOTICE

User interface
mand is really necessary. If you only want to rebuild
and download the active application, then execute the
“Clean” command.
See also
● ⮫ Chapter Command 'Clean' on page 932

Command 'Build'
Function: The command starts the build operation for the active application.
Call: The command is not in any menu by default. You can add it to a menu by
using the dialog from “Tools 🠂 Customize” (command category “Build”).
During the build operation, PLC Engineering performs a syntactic validation of
all objects in the application. However, code is not generated like at log in to
the target system or download of the application. The build operation is always
performed automatically when you log in with a changed program.
When the check is complete, PLC Engineering displays any error messages or
warnings in the message view (“Build” category).
If the program has not been changed since it was compiled without errors the
last time, then it is not recompiled. The message "The application is current"
appears. If the syntactic validation is repeated, then you must execute the
“Rebuild” command.
See also
● ⮫ Chapter Command 'Rebuild' on page 933

Command 'Rebuild'
Function: The command starts the build operation for the active application,
even if the last build contained errors.
Call: The command is not in any menu by default. You can add it to a menu by
using the dialog from “Tools 🠂 Customize” (command category “Build”).
See also
● ⮫ Chapter Command 'Build' on page 933

Command 'Generate Runtime System Files'


Function: The command generates a C stub file and an M4 interface file from
the current library project. These files are used as the basis for creating an
external library file.
Call: Menu bar: “Build”
Requirement: A library project is open.
The command opens the “Generate Files for Runtime System” dialog.

R911403764, Edition 08 Bosch Rexroth AG


934 / 1158 ctrlX PLC Engineering
Menu commands

“Output directory” Directory where PLC Engineering creates the runtime system files.
Click the button to open the default dialog for browsing the file
system.
“Component names” Name of the library project
“Which files do you want to create?”
“M4 interface file” : Interface file <project name>Itf.m4 with definitions. Example of m4
file:

“C stub file” : Stub file for reprogramming the library in C. Example of stub file:

“Options”

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 935 / 1158
Menu commands

“Export referenced types : The referenced types are included in the export.
included in libraries”
“Use original type names ” : The type names of the library project are used.

Command 'Check all Pool Objects'


Symbol ; shortcut: [F11]
Function: The command starts a build operation (a syntax check) for all pool
objects that are managed in the POU view and as a result are available
throughout the project. First and foremost, this is useful when creating libra-
ries.
Call: Menu bar: “Build”

User interface
Requirement: A library project is open.
The command does not result in code generation. In
NOTICE
addition, no file is created in the project directory with
information about the build operation.
See also
● ⮫ Chapter Dialog 'Customize' - 'Menu' on page 1094
● ⮫ Chapter 27.3 Information for library developers on page 330

Command 'Generate Code for Active Application'


Function: The command generates the code for the application of a library
project.
Call: Menu bar: “Build”
Requirement: The project contains an application.
● A library project is open.
● The library project contains an application.
When generating code with this command, code is generated as when down-
loading the application to the PLC, but the code is not transferred to the PLC.
At this time, other source code tests are performed As a result, you can check
the code for bugs that were not detected by the compiler and for fixing any
bugs before the code is used in online mode.
See also
● ⮫ Chapter Command 'Generate Runtime System Files' on page 933

Command 'Check All Application Objects'


Function: This command starts a build operation for all objects of the active
application, even for the POUs that are not used by the application. After the
build operation, the errors that were found in the unused objects are also
displayed in the message window.
Call: The command is not in any menu by default. You can add it to a menu by
using the dialog from “Tools 🠂 Customize” (command category “Build”).
Requirement: An application of the open project is active.
The command does not result in code generation. In
NOTICE
addition, no file is created in the project directory with
information about the build operation.
See also
● ⮫ Chapter Dialog 'Customize' - 'Menu' on page 1094

R911403764, Edition 08 Bosch Rexroth AG


936 / 1158 ctrlX PLC Engineering
Menu commands

Command 'Check Library Compatibility'


Function: The command triggers a check whether the currently opened library
project is compatible with the last installed version of this library (next lower
version number) .
Call: By default the command is not available in any menu. You can add it to a
menu by using the “Tools 🠂 Customize” dialog, command category “Build”.
Requirement: A library project is opened.
The check regards differences in the implemented interfaces of a method. So,
after the check you will get displayed error messages in the messages window
in the following cases:
● Adding or removing inputs or outputs of function blocks, functions or
methods
● Changing the data type of inputs or outputs
● Modifying the implemented interfaces of a method
See also
● ⮫ Chapter Dialog 'Customize' - 'Menu' on page 1094
● ⮫ Chapter 27.3 Information for library developers on page 330

Command 'C Integration' - 'Update C Sources'


Function: this command opens the dialog “Update C Sources” for updating the
objects in the project that have changed in the source directory on the disk.
Call: Menu bar: “Build”; context menu.
Requirement: An object “C Code Module” or “C Implemented Library” is
selected. When adding the C-code module in the dialog “Add C Code Module”,
you have activated the option “Check folder for source code changes”.
“File” File that has changed on the disk.
“Action” Action that is executed in PLC Engineering if you click “Update”.
“Update options” ● “Remove IEC interfaces due to changed header files”
● “Export source files to the monitored project folder”
“Refresh” PLC Engineering updates the listed files.
See also
● linktarget doesn't exist but @y.link.required='true'
● ⮫ Chapter Command 'C Integration – Open in IDE' on page 936
● ⮫ Chapter 18.10 Integrating C Modules on page 146

Command 'C Integration – Open in IDE'


Function: The command opens the “C Code Module” in the associated IDE
(Integrated Development Environment).
Call: Main menu “Create”, context menu
Requirement: You have opened an object “C Code Module” and the associated
IDE is not opened.
If the IDE is closed, PLC Engineering checks whether the files have been
changed and, in such a case, a dialog box appears for confirming the update of
the C-code module in PLC Engineering.
See also
● ⮫ Chapter Dialog 'Properties' – 'Build' (C-integration) on page 1051
● ⮫ Chapter Command 'C Integration' - 'Update C Sources' on page 936
● ⮫ Chapter 18.10 Integrating C Modules on page 146

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 937 / 1158
Menu commands

Command 'C Integration' - 'Export C sSurces'


Function: The command exports all C-code files of a C-code module and saves
them in the folder that you select in the dialog “Find Folder”.
Call: Menu bar: “Build”; context menu.
Requirement: A C code module is selected in the device tree.
See also
● ⮫ Chapter 18.10 Integrating C Modules on page 146

Command 'C Integration – Create Stub Implementation in C'


Function: This command creates C-stubs for the selected POU and stores
them in the “Extensions” folder in the objects “iec_external.c” and

User interface
“iec_external.h”.
Call: Main menu “Build”, context menu
Requirement: A POU that is inserted under the object of the type “C Code
Module” is selected in the device tree. The application has been compiled
without errors.
See also
● ⮫ Chapter 18.10 Integrating C Modules on page 146

Command 'Create IEC Interface'


Function: The command creates corresponding IEC objects from the selected
file with the format *.h or *.hhp and stores these IEC objects in the folder
“IEC interface”.
Call: Main menu “Build”, context menu
Requirement: You have selected an imported C-code file of the format *.h or
*.hpp in the device tree below the object “C Code Module”.
If you select the command and the header file is free of errors, the dialog
box “C Functions” opens with a list of the functions of the file that is to be
exported.

Dialog box 'Create IEC interface'


“Function” List of the functions
You select the functions for which a corresponding IEC object is to be
created.
“Import” PLC Engineering generates corresponding IEC objects for the selected
C-functions and stores them in the folder “IEC interface” below the
object “C Code Module”.
See also
● ⮫ Chapter 18.10 Integrating C Modules on page 146

Command 'Generate Disassembly File'


Function: This command generates a disassembly file <project name>.asm
from the current project and saves it in the file directory in the project folder.
Call: The command is not in any menu by default. You can add it to a menu by
using the dialog box from “Tools 🠂 Customize” (command category “Build”).
See also
● ⮫ Chapter Dialog 'Customize' - 'Menu' on page 1094

R911403764, Edition 08 Bosch Rexroth AG


938 / 1158 ctrlX PLC Engineering
Menu commands

33.3.7 Menu “Online”


Command “Compare project with ctrlX”
Symbol:

Call:
In thectrlX I/O Engineering interface in the “Online” menu

Function:
The command opens a comparison view of the project data sources on the
Engineering PC and on the ctrlX device, see also:
⮫ 'Compare’ command
⮫ Project data source - Introduction

Command 'Choose Active Application'


Symbol:
The command is implemented as a list box from which you can set an applica-
tion active. By default, the list box is located on the toolbar.
Function: The list box displays the currently active application with its device
path.
Call: The list box contains all applications that are organized in the “Devices”
view. By clicking an entry in the list box, you activate the selected application.
Requirement: The project has multiple applications.

Example

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 939 / 1158
Menu commands

When you call commands in the “Build” oder “Online” menus, these commands
are applied to the active application. This is displayed in the list box, and also
displayed in bold in the device tree. In particular, this applies to the “Build

User interface
🠂 Build” and “Online 🠂 Login” commands.
You can also access these commands using the command icons on the toolbar
where the list box is located. When the command icons are called, they are also
applied to the active application.
However, if you call a command from the context menu of a device object in
the device tree, then the command is applied to the corresponding object. For
example, by calling , you can establish a connection to an application on the
device which is not active.

See also
● ⮫ Chapter Command 'Set Active Application' on page 931
● ⮫ Chapter Command 'Build' on page 933
● ⮫ Chapter Command 'Login' on page 939

Command 'Login'
Symbol: , keyboard shortcuts: [Alt] + [F8]
Function: The command connects the application to the target system (control
to simulated device) and starts the online mode.
Call: Menu “Online”, context menu of the object “Application”.
Prerequisite: The application contains no errors and the communication set-
tings are configured.
A dialog prompt opens if the communication settings are incorrect. Then,
switch directly to the “Communication settings” of the control.
If you click “Login” from the online menu, then the currently active application
is connected to the target system. If you choose this command from the con-
text menu (right-click) while an application is selected in the device tree, then
that application is logged in, even if it is not set as the active application.
If an online user management is configured on the target device, then you are
prompted for user data when you log in. The “Device user login” dialog opens.
Check controller accessibility
CAUTION
For security reasons, controllers should not be acces-
sible from the Internet or untrusted Networks under any
circumstances! In particular, the TCP/IP programming
ports (usually UDP-Ports 1740..1743 and TCP-Ports 1217
+ 11740 or the controller specific ports) should not be
accessible from the internet without protection. In case
Internet access to the controller is needed, using a a safe
mechanism is absolutely mandatory, such as VPN and
password protection of the controller.
see also: ⮫ Chapter 20.4 Handling of Device User Man-
agement on page 262

R911403764, Edition 08 Bosch Rexroth AG


940 / 1158 ctrlX PLC Engineering
Menu commands

If a safety controller is inserted below a controller, then


NOTICE
this command can interrupt the communication connec-
tions temporarily.
Connections of the safety controller to other safety con-
trollers (via safety network variables), to field devices,
and to the development system are affected. The safe
field devices or other safety controller can enter the safe
state as a reaction. The connection to the development
system is affected only when a safety controller that is
connected to the main controller via a fieldbus.
For more information, see the "Subordinate Safety Con-
trollers" chapter.
Possible situations when logging in:
● A later version of the device description (than in the project) is on the con-
trol. A warning prompt is displayed with the option to cancel the process.
● The application does not exist yet on the PLC: You are prompted to confirm
the download.
● The application is already on the control and has not been changed since
the last download. The login continues without any more prompts.
● The application exists on the control, but it has been changed since the last
download.
You are prompted to select one of the following options:
– Login with online change (Note the information about online changes in
the help page "Command 'Online Change' ".)
– Log in with download
– Login without any change
The position also provides the option of updating the boot application on
the PLC.
● There is an unknown version of the application on the control. PLC Engi-
neering prompts you to replace it.
● There is a version of the application on the control and it is running. PLC
Engineering prompts you to log in anyway and overwrite the currently run-
ning application.
● The application on the control is currently stopped at a breakpoint. You are
logged out and the program has been changed: PLC Engineering prompts
you with a warning that the PLC will be stopped completely if an online
change or download occurs. This also happens if several tasks exist and the
breakpoint affects only one of them.
Click “Details” in the dialogs above to open the “Application Information”
dialog.
From PLC Engineering version V3.5 SP17, only one PLC Engineering instance
can be logged in to a control application. If a second PLC Engineering instance
tries to log in to the same application on the same control, an error message is
displayed.
Also refer to
● ⮫ Chapter "Online change" command on page 943
● ⮫ Chapter 19.3 Subordinate Safety Controller on page 232

"Application information" dialog (details)


The dialog provides two tabs with comparative information about the applica-
tion changed in the development system and its previous version currently
located on the PLC. There are two tabs:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 941 / 1158
Menu commands

● “Application Information”: The application properties of the “Application in


the IDE” (Integrated Development Environment) are compared with those of
the “Application in the PLC”: Project name, last modification, IDE version,
author, description. In addition PLC Engineering shows the objects that have
changed since the last download.
● “Application Content”: When the option “Download Application Info” is
selected, the contents of the applications on both the (1) development
system and (2) PLC can be compared. The “Download Application Info”
option is located in the “Application Build Options” tab of the application
properties.
If the code in the development system is not current, the following com-
mand is displayed in the lower left “Application not up to date. Generate
code again now?” (3). Execute this command to update the application

User interface
source code.
This detailed information can help you to better assess the effects of login
in the current situation and to make a decision about downloading the new
application.

The comparison can also be displayed in the device editor (“Applications” tab)
by clicking “Content”.
Also refer to
● ⮫ Chapter 10 Comparing Projects on page 71

Compiling the project before login


If an application program has not been compiled since the last change, then
PLC Engineering compiles the project before login. This process is the same as
the “Generate code” command when logged out.
If compile errors occur, then a dialog prompt opens. The errors are printed
to the messages view (“Build” category). Decide whether to log in without
downloading the program to the control.
Also refer to
● ⮫ Chapter Command 'Build' on page 933

Error upon login


If an error occurs when logging in to the PLC, then PLC Engineering cancels
the loading operation with an error message. The error dialog gives you the
options of showing the error details. If an exception was thrown and the text

R911403764, Edition 08 Bosch Rexroth AG


942 / 1158 ctrlX PLC Engineering
Menu commands

*SOURCEPOSITION* is included in the log, then you can display the affected
function in the editor by clicking “Show in Editor”. The cursor jumps to the line
containing the error.

Messages during the download operation


If PLC Engineering downloads the project to the control at login, then the
following information is printed to the message view:
● Generated code size
● Size of global data
● Resulting memory requirement on the control
● List of the affected blocks (for online change)

In online mode, you cannot change the settings of the devices or modules.
You must log out of the application for changing device parameters. Depending
on the bus system, there may be some special parameters that you can also
change in online mode.
PLC Engineering saves the view configuration separately in online and offline
mode. In addition, views are closed that cannot be used in any operating mode.
Due to this, the view can change automatically at login.

Command 'Logout'
Symbol: , keyboard shortcut: [Ctrl]+[F8].
Function: This command disconnects the application from the target system
(controller or simulated device) and returns to offline mode.
Call: Main menu “Online”, or context menu of the “Application” object.

Command 'Create Boot Application'


Function: This command generates a boot application.
Call: Main menu “Online”.
A boot application is the application that is started automatically when the
controller is switched on or started.
In offline mode, you can save the boot application in any directory. In online
mode, PLC Engineering save the boot application to the target device. The file
name is <application name>.app.
See also
● ⮫ Chapter 20.7 Generating Boot Applications on page 268
● ⮫ Chapter 33.2.6 “Application” object on page 763

Command 'Load'
Function: This command causes a compilation of the active application with
subsequent download to the controller.
Call: Menu bar: “Online”.
Requirement: The application is in online mode.
When you execute this command, PLC Engineering performs a syntax check
and generates the application code. This code is downloaded to the PLC. Fur-
thermore, PLC Engineering generates the build log <project name>.<device
name>.<application ID>.compile info in the project directory.
During loading all variables are re-initialized with the
NOTICE
exception of persistent variables.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 943 / 1158
Menu commands

If a safety controller is inserted below a controller, then


NOTICE
this command can interrupt the communication connec-
tions temporarily.
Connections of the safety controller to other safety con-
trollers (via safety network variables), to field devices,
and to the development system are affected. The safe
field devices or other safety controller can enter the safe
state as a reaction. The connection to the development
system is affected only when a safety controller that is
connected to the main controller via a fieldbus.
For more information, see the "Subordinate Safety Con-
trollers" chapter.

User interface
The description of the “Login” command describes the possible situations
when logging in and loading.
If you attempt to download an application when the same version of the appli-
cation is already on the PLC, then you get the message: "Program is unchanged.
Application was not downloaded". PLC Engineering downloads the application
to the PLC.
During loading a record of the actions being executed (generation of code,
execution of initialization, etc.) appears in the Message window in the mes-
sage category “Compile”. Furthermore, information is displayed regarding the
memory ranges, the size of the code, the global data and the allocated memory.
For the purpose of clarity, as opposed to the online change, the modified
function blocks are no longer listed.
See also
● ⮫ Chapter Command 'Login' on page 939
● ⮫ Chapter 19.3 Subordinate Safety Controller on page 232

"Online change" command


Function: The command initiates an online change on the currently active appli-
cation. When this is done, PLC Engineering re-downloads only the changed
parts of an application that is already running on the PLC.
Call: Menu “Online”, context menu of the object “Application”.
Prerequisite: The application is in online mode.
The command is available in the context menu if an application is selected in
the device tree. In this way, you can perform an online change just for one
application, even if that application is not currently active.
An online change changes the running application pro-
CAUTION
gram and requires a restart.
Make sure that the new application code still has the
required effect on the controlled system.
Depending on the controlled plant, the plant and work-
pieces may be damaged or the health and life of persons
could be endangered.

R911403764, Edition 08 Bosch Rexroth AG


944 / 1158 ctrlX PLC Engineering
Menu commands

1. When an online change is performed, the application-


NOTICE
specific initializations (for example, homing) are not exe-
cuted, as the machine retains its status. For this reason,
the new program code might not have the intended
effect.
2. Variables on pointers maintain their value from the
last cycle. If a pointer refers to a variable whose value
was changed in an online change, then the variable no
longer yields the correct value. Ensure that the pointers
are reassigned in each cycle.
No initialization code with fast online change
NOTICE
Since compiler version>=3.5.0.0, a "fast online change" is
performed for small changes. With a fast online change,
only the changed block is compiled and reloaded. In par-
ticular, no initialization code is generated.
For variables with the init_on_onlchange attribute,
this also results in no initialization code being gener-
ated. In the usual scenarios this will have no effect:
The attribute is usually used to initialize variables with
addresses. However, the fast online change does not
cause a variable to change its address.
To ensure the effect of the init_on_onlchange
attribute on the entire application code nevertheless,
you can generally switch off the fast online change
for the application with the help of the compiler
define no_fast_online_change. To do this, select your
application object in the device tree and choose the
Properties context command. Add the compiler define
no_fast_online_change under the Build tab.
For further information, see: ⮫ 'Properties' dialog - 'Build'
At the time of download, PLC Engineering also lists the changed interfaces,
affected variables, and all blocks with new generated code in the “Build” cate-
gory of the message view. If memory locations change, a dialog box will inform
you of possible problems in conjunction with pointers.
In the “Online Change Memory Reserve” view, memory reserves can be config-
ured for the online change so that instance variables do not have to be moved
in the memory when changing a function block in an online change.

What prevents online change?


There are actions in PLC Engineering, after which an online change on a control
is not possible anymore. A complete recompilation of the application is always
required. A typical case is the “Clean all” action, which deletes the compilation
information stored during the last download. However, such actions typically
generate a warning and have to be acknowledged.
But there are also "normal" editing actions that result in an online change not
being possible anymore upon the next login. Therefore, when editing in the pro-
gram function blocks, pay attention to the following symbol in the status bar:
. When this icon becomes red: , only a complete download to the control
can be performed afterwards. Double-click on the icon to open the “Application
information” dialog with a list of differences from the last download. The dialog
also provides information on which changes prevent and online change.
Actions and changes in various areas of an application that prevent an online
change:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 945 / 1158
Menu commands

Check func- Enabling or removing a check function(CheckBounds,


tions CheckRange, CheckDiv etc.)
Change in the interface of a check function (also inserting and
deleting local variables)
Task config- Change in the configuration settings
uration
Project set- Change of the “Compile options” in the “settings” section (Uni-
tings code, replacing constants, logging into breakpoints),
Change in the “Compiler defines”
Application Change of the “target system memory settings” (“Build” tab)
properties

User interface
POU proper- Change of the “External implementation” option (“Build” tab)
ties
Task local All changes
global vari-
able list
Function Changing the basic function block of a function block(EXTENDS
block FBbase), also the insertion or deletion of such a basic function
block
Change in the interface list (IMPLEMENTS ITF). Exception:
Adding a new interface to the end of the list
Data type Change of the data type of a variable from one customized data
type to another customized data type (for example, from TON to
TOF)
Change of the data type from a customized data type to a basic
data type (for example, from TON to TIME)
Note: As a workaround, always change the name of the variable at
the same time as the data type. The variable is initialized as new
variable and the old one is removed. An online change is possible
afterwards.
alarm con- Change in the alarm database configuration
figuration Changing the number of latch variables (also affects the storage
format in the database)
Change to the configuration of the distributed alarms
Data source All changes in the configuration
Device con- Change in the device tree (also via the command “Update
figuration device”)
Change in a device configuration: Changes made to device
parameters are not online changeable by default However, excep-
tions may be configured in the device description.
Note: I/O mapping to variables is possible via online change.
Visualization Switching the Overlay function
Before V3.5 SP6: Change in the configuration of the Trace ele-
ment
Note: As of V3.5 SP6 applies: In the case of online changes
affecting visualizations or data of the application (for example:
new variable inserted), the visualization reinitializes itself com-
pletely. For TargetVisu, the visualization closes and reopens with
the start page for example. In the case of WebvVisu, the visualiza-
tion also restarts with the start visualization after a short waiting
time.

R911403764, Edition 08 Bosch Rexroth AG


946 / 1158 ctrlX PLC Engineering
Menu commands

Unit Conver- Inserting or removing objects for unit conversion


sion
Trend Change of the number of variables or the maximum number of
variables. Change of the number of variables with description or
special line settings

Also refer to
● ⮫ Chapter Command 'Clean All' on page 933
● ⮫ Chapter 20.5 Generating Application Code on page 265
● ⮫ Chapter 23.2 Executing the Online Change on page 315
● ⮫ "Application information" dialog (details) on page 940
● ⮫ Chapter Attribute "init_on_onlchange" on page 625
● ⮫ Chapter 18.3 Configuring the Memory Reserve for an Online Change
on page 129
● ⮫ Chapter “Configuration” tab on page 865
● ⮫ Chapter 'Project settings' dialog - 'Compiler options' on page 1062
● ⮫ Chapter 'Properties' dialog - 'Build' on page 1048

Command 'Source Download to Connected Device'


Function: This command loads the project source code (as project archive) to
the controller currently connected.
Call: Main menu “Online”.
Requirement: The application is in online mode.
See also
● ⮫ Chapter Command 'Source Upload' on page 876
● ⮫ Chapter Command 'Source Download' on page 877

'Multiple download’ command


Function: The command causes the code generation of the applications con-
tained in the project and the loading of the applications to the corresponding
controls.
Call: Menu “Online”
The command opens a dialog with a list of the applications. In this dialog,
select the applications that are to be loaded. Then, PLC Engineering performs
the syntax check of these applications and generates the respective code. The
code is downloaded to the respective control. In the project directory PLC
Engineering creates a translation log for each selected application with the
name <project name>.<device name>.<application ID>.compileinfo.
If a safety controller is inserted below a controller, then
NOTICE
this command can interrupt the communication connec-
tions temporarily.
Connections of the safety controller to other safety con-
trollers (via safety network variables), to field devices,
and to the development system are affected. The safe
field devices or other safety controller can enter the safe
state as a reaction. The connection to the development
system is affected only when a safety controller that is
connected to the main controller via a fieldbus.
For more information, see the "Subordinate Safety Con-
trollers" chapter.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 947 / 1158
Menu commands

"Multiple download” dialog


“Please select the : Selection of the applications. The applications are thereby also
applications” loaded to different controllers.
“Up”, “down” Change of the download order of the applications.
The applications are downloaded to the PLCs in the order of this list.
By default, this list is alphabetically sorted. Parent-child relationships
of applications are thereby taken into account.
“OK” Checks the syntax of all selected applications. Afterwards, the commu-
nication with the associated controller is verified for each application
before the download takes place.
Table 116: “Online Change Options”

User interface
If an earlier version already exists on the control and is different from the current version, then the
following options are provided:
“Try to execute an online Enabled by default. If an online change cannot be executed for one of
change. If not possible, the applications, then a download is performed.
perform download”
“ Force online change. If If an online change cannot be performed for (at least) one of the
this is not possible, cancel applications, then no download is performed and the online change
the operation” is terminated (for example, if you have executed the command “Clean
All” beforehand).
“Always execute complete Downloads all parts of the applications to the control, regardless of
download” any existing versions.
For selected applications that do not exist on the PLC yet, PLC Engineering
performs a download automatically to the PLC.
Table 117: “Other Options”
“Delete all applications : Corresponding applications are deleted
from the controller that
are not contained in the
project”
“Start all applications after : The applications are started after the download or online change.
download or online change”
“Do not release forced : If there is an application with forced variables on the control and
variables” the implementation of this application has been changed in the mean-
time, no download is performed for this application.
In the “Multiple download - Result” window, the following message is
displayed for this application: “Error: Skipped as one or more variables
have been forced”.
Note that variables with the key attribute PERSISTENT RETAIN are not gener-
ally initialized. If you change the data layout, however, the persistent variables
are automatically re-initialized.
After completion of the download a listing of all selected applications appears
in the download order that you configured. In addition, for each application
information about the success of the download is provided in the“ Multiple
download - Result” dialog:
● “Created” A new application was created and loaded to the control.
● “Not buffered” The application already existing on the control was not
changed
● “Executing the online change”: The application already existing on the con-
trol was changed by an online change
● “Download completed”: The application already existing on the control was
replaced by a newly created application

R911403764, Edition 08 Bosch Rexroth AG


948 / 1158 ctrlX PLC Engineering
Menu commands

● “Skipped due to online change that is not possible”: No online change could
be performed for the application, it was not changed
● “Error”: An error occurred during the download for this application. If neces-
sary, further details are displayed
● “Command was aborted by the user”: The operation was aborted by the
user

Also refer to
● ⮫ Chapter 19.3 Subordinate Safety Controller on page 232
● ⮫ Chapter 18.22 Data persistence on page 211
● ⮫ Chapter 20.5 Generating Application Code on page 265
● ⮫ Chapter Command 'Load' on page 942

Command 'Reset Cold'


Function: The command results in a cold start of the active application on the
controller.
Call: Menu bar: “Online”
Requirement: The application is in online mode.

If a safety controller is inserted below a controller, then


NOTICE
this command can interrupt the communication connec-
tions temporarily.
Connections of the safety controller to other safety con-
trollers (via safety network variables), to field devices,
and to the development system are affected. The safe
field devices or other safety controller can enter the safe
state as a reaction. The connection to the development
system is affected only when a safety controller that is
connected to the main controller via a fieldbus.
For more information, see the "Subordinate Safety Con-
trollers" chapter.

After restarting with “Reset Cold”, the following happens:


● Application code is retained on the controller.
● Variables are initialized (with the initialization value or the default initializa-
tion value 0), and the previous values are lost.
● Retain variables are initialized, and the previous values are lost.
● Persistent variables are retained with values.
● Breakpoints that were set in the code are retained with their status (for
example, activated or deactivated).
● The application goes into the “STOP” state.
You can also select the command while debugging the application when it
halts at a breakpoint in the “HALT ON BP” state. Then either the warm start
is executed immediately, or the remaining statements of the current cycle are
processed. Therefore, a message window opens for you to select the next
action. However, the message window opens only if the runtime system is
capable of restarting the cycle without terminating it first.
After the reset, you can run the application as usual and, for example, start the
execution by clicking “Debug 🠂 Start”.

See also
● ⮫ Chapter 21.6 Resetting applications on page 281
● ⮫ Chapter 18.22.5 Preserving Data with Persistent Variables on page 214

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 949 / 1158
Menu commands

● ⮫ Chapter 21.3 Using Breakpoints on page 271


● ⮫ Chapter 32.2.13 Persistent Variable - PERSISTENT on page 447
● ⮫ Chapter 19.3 Subordinate Safety Controller on page 232
● ⮫ Chapter Command 'Reset Warm' on page 949
● ⮫ Chapter Command 'Reset Origin' on page 949

Command 'Reset Warm'


Function: The command results in a warm start of the active application on the
controller.
Call: Menu bar: “Online”
Requirement: The application is in online mode.

User interface
After restarting with “Reset Warm”, the following happens:
● Application code remains loaded on the controller.
● Variables are initialized (with the initialization value or the default initializa-
tion value 0).
● Retain variables are retained with values.
● Persistent variables are retained with values.
● Breakpoints that were set in the code are retained with their status (for
example, activated or deactivated).
● The application goes into the “STOP” state.
You can also select the command while debugging the application when it
halts at a breakpoint in the “HALT ON BP” state. Then either the warm start
is executed immediately, or the remaining statements of the current cycle are
processed. Therefore, a message window opens for you to select the next
action. However, the message window opens only if the runtime system is
capable of restarting the cycle without terminating it first.
After the reset, you can run the application as usual and, for example, start the
execution by clicking “Debug 🠂 Start”.

See also
● ⮫ Chapter 21.6 Resetting applications on page 281
● ⮫ Chapter 18.22.5 Preserving Data with Persistent Variables on page 214
● ⮫ Chapter 21.3 Using Breakpoints on page 271
● ⮫ Chapter 32.2.13 Persistent Variable - PERSISTENT on page 447
● ⮫ Chapter 19.3 Subordinate Safety Controller on page 232
● ⮫ Chapter Command 'Reset Cold' on page 948
● ⮫ Chapter Command 'Reset Origin' on page 949

Command 'Reset Origin'


Function: The command results in a reset origin of the active application on the
controller.
Call: Menu bar: “Online”
Requirement: The application is in online mode.

After restarting with “Reset Origin”, the following happens:


● The application code is deleted, and as a result the application has no state.
● Variables are deleted, and the values are lost.
● Retain variables are deleted, and the values are lost.
● Persistent variables are deleted, and the values are lost.
● Breakpoints that were set in the code are lost.

R911403764, Edition 08 Bosch Rexroth AG


950 / 1158 ctrlX PLC Engineering
Menu commands

See also
● ⮫ Chapter 21.6 Resetting applications on page 281
● ⮫ Chapter 18.22.5 Preserving Data with Persistent Variables on page 214
● ⮫ Chapter 21.3 Using Breakpoints on page 271
● ⮫ Chapter 32.2.13 Persistent Variable - PERSISTENT on page 447
● ⮫ Chapter 19.3 Subordinate Safety Controller on page 232
● ⮫ Chapter Command 'Reset Warm' on page 949
● ⮫ Chapter Command 'Reset Cold' on page 948

Command 'Reset Origin Device'


Function: The command opens a dialog to reset the device to its factory
settings. All applications, boot applications, and remanent variables will be
deleted from the device. Depending on the version of the device, a selection
of the elements to be deleted can be made in this dialog. When these ele-
ments are unselected in the dialog, they are not deleted during the reset and
remain on the controller. By default, all elements are selected and everything is
deleted. Elements that are not available for selection are generally also deleted.
Call: Right-click a programmable device in the device tree.
If a safety controller is inserted below a controller, then
NOTICE
this command can interrupt the communication connec-
tions permanently.
Connections of the safety controller to other safety con-
trollers (via safety network variables), to field devices,
and to the development system are affected. The safe
field devices or other safety controller can enter the safe
state as a reaction. The connection to the development
system is affected only when a safety controller that is
connected to the main controller via a fieldbus.
For more information, see the "Subordinate Safety Con-
trollers" chapter.
After restarting with “Reset Origin Device”, the following happens:
● All applications are reset as with the “Reset Origin” command.
● All files, which are not deleted by the “Reset Origin” command, are deleted
(for example, files from visualization, alarms, and recipes).
● The user management is deleted.
● All certificates which are currently managed by the runtime system are
deleted.
Note: When resetting the device, the objects selected in this dialog are also deleted. If not all
displayed objects are selected in this dialog, then possibly other objects can no longer be used or
they are also deleted. .
“Delete” : The object is deleted when the “Reset Origin Device” command is
executed.
“Object” Objects that can be excluded from “Delete”.
The listed objects depend on the version of the controller. In version
3.5.16.20 and higher, the following objects can be excluded from the
delete operation.
● “User Management”
● “PLC Logic”
● “Certificates”
See also
● ⮫ Chapter Command 'Reset Origin' on page 949
● ⮫ Chapter Command 'Reset Warm' on page 949

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 951 / 1158
Menu commands

● ⮫ Chapter Command 'Reset Cold' on page 948


● ⮫ Chapter 19.3 Subordinate Safety Controller on page 232

Command 'Logoff Current Device User'


Symbol:
Function: This command logs out the user currently logged in to the controller
(device). If PLC Engineering still has a connection to the controller, then it will
be disconnected.
Call: Main menu “Online”.
Requirement: The application is in online mode.

You can manage the device user management in the “Users and Groups”

User interface
tab and “Access control” of the device editor. The commands in the “Online
🠂 Security” menu provide another simple option for protecting access to the
target device.
See also
● ⮫ Chapter 33.1.16 "Users and groups” tab on page 754
● ⮫ Chapter 20.4 Handling of Device User Management on page 262

Command 'Add Device User'


Symbol:
Function: This command configures a new device user and adds this user to the
administrator group.
Call: Menu bar: “Online 🠂 Security”
Requirement: The device supports a device user management. You are logged
in to the device as a user.

You can manage the device user management in the “Users and Groups”
tab and “Access control” of the device editor. The commands in the “Online
🠂 Security” menu provide another simple option for protecting access to the
target device.
See also
● ⮫ Chapter 33.1.16 "Users and groups” tab on page 754
● ⮫ Chapter 20.4 Handling of Device User Management on page 262

This command opens the “Add Device User” dialog. Here you define the access
data of the new user.
The dialog corresponds to the dialog in the “Users and Groups” tab of the
device editor for adding a new user.
Please use a strong password as follows:
● Password length >= 8 characters (best >= 12)
● Use uppercase and lowercase
● Include numbers
● Use special characters
● Do not use existing names or sequence of characters that are easy to guess
(for example, “123”, “abc”, “qwerty”)
After performing this action, you can no longer use a
CAUTION
blank user name and password to log in. You must
remember your password.
See also
● ⮫ Chapter Command 'Remove Device User' on page 952
● ⮫ Chapter Command 'Change Password Device User' on page 952

R911403764, Edition 08 Bosch Rexroth AG


952 / 1158 ctrlX PLC Engineering
Menu commands

Command 'Remove Device User'


Symbol:
Function: This command removes a user from the user management on the
target system (device).
Call: Menu bar: “Online 🠂 Security”
Requirement: You are logged in to the device as a user.

You can manage the device user management in the “Users and Groups”
tab and “Access control” of the device editor. The commands in the “Online
🠂 Security” menu provide another simple option for protecting access to the
target device.
See also
● ⮫ Chapter 33.1.16 "Users and groups” tab on page 754
● ⮫ Chapter 20.4 Handling of Device User Management on page 262

This command opens the “Remove Device User” dialog. Specify the user name
and password of the user to be removed and click “OK” to confirm.
After performing this action, you can no longer use this
CAUTION
removed user account to log in. If this user is the only
one on the target system, then a dialog prompt notifies
you that this user cannot be removed.
See also
● ⮫ Chapter Command 'Add Device User' on page 951
● ⮫ Chapter Command 'Change Password Device User' on page 952

Command 'Change Password Device User'


Symbol:
Function: The command changes the password for the user who is currently
logged on the PLC.
Call: “Online 🠂 Security” menu
Requirement: You are logged in to the device as a user.
The command opens the “Change Password for Device User” dialog for
defining a new password. You have to specify the old password again.
After performing this action, you can no longer use the
NOTICE
previous password to log in.
Make sure that you use a strong password. Note the following:
● Password length >= 8 characters (best >= 12)
● Use uppercase and lowercase
● Include numbers
● Use special characters
● Do not use existing names or sequence of characters that are easy to guess
(for example, "123", "abc", "qwerty")
See also
● ⮫ Chapter Command 'Add Device User' on page 951
● ⮫ Chapter Command 'Remove Device User' on page 952
● ⮫ Chapter 20.4 Handling of Device User Management on page 262

Command 'Stop Execution on Handled Exceptions'


Function: This command halts the application where the error is located
despite a programmed exception handling.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 953 / 1158
Menu commands

Call: This command is not available by default, but it can be configured from
the “Tools 🠂 Customize”, “Add Command” dialog box (“Online” category).
Requirement: The application is in online mode and contains a programmed
exception handling with the __TRY and __CATCH operators.
If you have configured this command from the “Online” menu and you call it
from there, then the currently active application is affected. Furthermore, this
command can help you to detect errors.
See also
● ⮫ Chapter 32.3.75 Operators '__TRY', '__CATCH', '__FINALLY', '__ENDTRY'
on page 529
● ⮫ Adding commands on page 48
● ⮫ Chapter Command 'Customize' on page 965

User interface
Command 'Wink'
Symbol:
Function: The command causes an LED of a connected controller to blink. As a
result, the hardware can be identified clearly.
Call: The command is not in any menu by default. You can add it to a menu by
means of the “Tools 🠂 Customize” dialog, in the “Online” command category.
Requirement: The controller supports this function and the connection parame-
ters are configured correctly.

Command 'Simulation
Function: The command switches the development system to simulation mode.
Call: Menu bar: “Online”
In simulation mode, you can start and debug the active application an on a
simulated target device. A physical target device is not necessary for testing
the online behavior of an application. When logging in for the first time, you
are prompted whether the application should be created or loaded. For a simu-
lated device, you do not have to configure the communication settings. In PLC
Engineering simulation mode, the entry of the controller in the device tree is
displayed in italics.
No C code for simulation mode
NOTICE
In simulation mode, C code is not generated and loaded
to the runtime system. To simulate the code contained in
the C modules anyway, you can implement it for this pur-
pose in the respective IEC objects of the C code module.
After successful login, the red triangle symbol ( ) in the device tree indicates
simulation mode. You can use the corresponding online commands for testing
the application.
To switch off simulation mode, log out of the controller and execute the
“Simulation” command again.
The command affects the active application only.

Differences between simulation mode and operation with a physical controller


Simulation Physical Controller
Real-time ● Runs in the PLC Engineering ● Real-time operating system
behavior / mul- process with normal priority ● Single-core or multicore
ticore ● Single-core
--> Worse real-time behavior

R911403764, Edition 08 Bosch Rexroth AG


954 / 1158 ctrlX PLC Engineering
Menu commands

Simulation Physical Controller


Architecture ● Simulation 64-bit (depends ● Controller 32-bit
scope on the PLC Engineering
installation): --> Possible
compile error in the IEC
application if the applica-
tion has been previously run
only as 32-bit (for example,
use of DWORD as POINTER)
FPU (rounding ● Uses FPU of the PC ● Uses FPU of the controller
error) ● Different configuration of or FPU emulation
the FPU exceptions ● Different configuration of
the FPU exceptions
Handling of ● Exception handling of the ● Exception handling of the
exceptions Windows Runtime System controller
External libra- ● Only a few external Cmp/ ● "Unresolved Reference
ries SysLibs are physically avail- error" on download when
(Cmp/Sys/CAA able. As compared to external libraries do not
/OEM/…) embedded, more SysLibs exist in the controller
could also be available.
● Other implementa-
tion/behavior of the SysLibs
(Windows in contrast to the
OS of the controller)
● "Unresolved Reference
error“ on download is
ignored. The application
can still be downloaded to
the controller and started.
If the missing functions are
actually called, they return
nonsense values.
Therefore, an IEC imple-
mentation can also be
specified for external POUs.
This substitute IEC code is
then executed in the simula-
tion.
I/O drivers ● I/O configuration is gener- ● Mostly no restriction, but
ated but not evaluated. depends on the capabilities
● Fieldbus stacks are not eval- of the controller
uated.
● I/O channels are not
updated and no bus tele-
grams are sent.
SoftMotion ● All SoftMotion axes are ● Mostly no restriction, but
drivers set to virtual and therefore depends on the capabilities
simulated. of the controller

See also
● ⮫ Chapter 21.2 Testing in Simulation Mode on page 271
● linktarget doesn't exist but @y.link.required='true'

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 955 / 1158
Menu commands

Command 'Operating Mode'


Function: The commands set the controller to a state which prevents accidental
change to the project.
Call: Menu bar: “Online 🠂 Operating Mode”
You can use these commands, for example, to lock the state of a controller
in order to prevent the controller from switching to another state while you
program another controller.
When programming is complete, the controller should then be switched to
a defined and externally visible state that is set exactly the same way after
restarting.
The , , and symbols in the status bar indicate the current operating
mode. Double-clicking one of these symbols opens a help window.

User interface
If it supports the controller, then you can switch the controller to the following
operating modes:
● “Debug”: No restrictions
● “Locked”: The current state of debugging is locked on the application.
No additional breakpoints can be set and no additional variables can be
forced. Writing variables is still possible and breakpoints which are already
set remain active.
Only the "RUN" state of an application is preserved in “Locked” operating
mode even if the controller is restarted.
With this operating mode, a developer can prevent himself or another devel-
oper from changing the application on the controller, for example by setting
or deleting a breakpoint, by forcing, or by making changes to the file system.
This operating mode is helpful to prevent a download to an incorrect con-
troller when, for example, multiple controllers of a plant are programmed.
● “Operational”:
This operating mode makes sure that the controller reloads the same appli-
cations after a restart and that no debug features are active anymore. The
operating mode is set when a controller is completely programmed and
should be accepted or already is.
Conditions for activating the “Operational” mode
– A boot application for each application has to exist on the controller.
– There must not be any active breakpoints set.
– All applications have to be running.
– There must not exist any forced values.
– Furthermore, the device can define more of its own restrictions.
The “Locked” and “Operational” operating modes are different in the use cases
and in the requirements for activating the operating mode. However, for both
operating modes the runtime system prevents the following actions:
● Regarding the application
– Download of an application
– Online change
– Force variables
– Set breakpoints
– Stop application
– Reset application
– Start application
– Delete application
● Regarding the file transfer of the controller
– Download of a file to the controller
– Delete a file on the controller

R911403764, Edition 08 Bosch Rexroth AG


956 / 1158 ctrlX PLC Engineering
Menu commands

– Rename a file on the controller


– Create a directory on the controller
– Delete a directory on the controller
– Rename a directory on the controller
You cannot switch the operating mode between “Locked” and “Operational”.

33.3.8 "Debug" menu


Command 'Start'
Symbol: ; keyboard shortcut: [F5]
Function: This command starts the application (status: “RUN”).
Call: Menu bar: “Debug”; context menu of object: “Application”
Requirement: The application is in online mode and its status is “STOP”.
Executing this command from the “Debug” menu will affect the application that
is currently in focus.
See also
● ⮫ Chapter 20.6 Downloading the Application Code, Logging in, and Starting
the PLC on page 267

Command 'Stop'
Symbol: ; keyboard shortcut: [Shift]+[F8]
Function: This command stops the application (status: “STOP”).
Call: Menu bar: “Debug”; context menu of object: “Application”
Requirement: The application is in offline mode and its status is “RUN”.
Executing this command from the “Debug” menu will affect the application that
is currently in focus.

Command 'Single Cycle'


Keyboard shortcut [Ctrl]+[F5]
Function: This command executes the active application for one cycle.
Call: Main menu “Debug”.
Requirement: The application is in online mode and the program is halted at a
program step.

Command 'New Breakpoint'


Symbol: , keyboard shortcut [Alt]+[F7].
Function: This command opens the “Breakpoint Properties” dialog box.
Call: Main menu “Debug”.
Requirement: The application must be in online mode.
With the “Toggle Breakpoint” command, you can set a new breakpoint directly
at the current cursor position in online mode.
See also
● ⮫ Chapter 33.4.9 Dialog 'Breakpoint Properties' on page 1040
● ⮫ Chapter 21.3 Using Breakpoints on page 271

Command 'New Data Breakpoint'


Symbol:
Function: The command opens the “New breakpoint” dialog.
Call: Menu bar: “Debug”

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 957 / 1158
Menu commands

Requirement:
● The application is in online mode.
● The device description file of the target device contains the entries for the
"data breakpoints" functionality. Currently, data breakpoints are possible
only with the ctrlX CORE.
See also
● ⮫ Chapter 33.4.11 Dialog 'New Breakpoint' on page 1041
● ⮫ Chapter 21.3 Using Breakpoints on page 271

Command 'Edit Breakpoint'


Symbol:

User interface
Function: This command opens the “Breakpoint Properties” dialog box.
Call: Main menu “Debug”.
Requirement: The application is in online mode and the cursor is halted at a
breakpoint.
See also
● ⮫ Chapter 21.3 Using Breakpoints on page 271
● ⮫ Chapter 33.4.9 Dialog 'Breakpoint Properties' on page 1040

Command 'Enable Breakpoint'


Function: This command enables a disabled breakpoint.
Call: Main menu “Debug”.
Requirement: The application is in online mode and the cursor is halted at a
disabled breakpoint.
See also
● ⮫ Chapter 21.3 Using Breakpoints on page 271

Command 'Disable Breakpoint'


Function: This command disables an enabled breakpoint.
Call: Main menu “Debug”.
Requirement: The application is in online mode and the cursor is halted at an
enabled breakpoint.
See also
● ⮫ Chapter 21.3 Using Breakpoints on page 271

Command 'Toggle Breakpoint'


Keyboard shortcut [F9]
Function: This command sets a breakpoint or clears an existing breakpoint.
Call: Main menu “Debug”.
Requirement: The application is in online mode. The cursor is positioned at a
breakpoint.
See also
● ⮫ Chapter 21.3 Using Breakpoints on page 271

Command 'Step Over'


Symbol , shortcut [F10]
Function: The command executes the statement where the program is currently
located and halts before the next statement in the POU.
Call: Menu bar: “Debug”

R911403764, Edition 08 Bosch Rexroth AG


958 / 1158 ctrlX PLC Engineering
Menu commands

Requirement: The application is in online mode and the program is halted at


the current break position (debug mode).
If the executed statement contains a call (from a program, function block
instance, function, method, or action), then the subordinate POU is processed
completely in one step and returned to the call. Then it halts before the next
statement (in the next line of code).
Click “Step Into” to jump to a subordinate POU and process it in single steps.

See also
● ⮫ Chapter 21.4 Stepping Through a Program on page 275
● ⮫ Chapter Command 'Step Into' on page 958

Command 'Step Into'


Symbol , shortcut [F11]
Function: The command executes the statement where the program is currently
located and halts before the next statement.
Call: Menu bar: “Debug”
Requirement: The application is in online mode and the program is halted at
the current break position (debug mode).
If the executed statement contains a call (from a program, function block
instance, function, method, or action), then the program execution jumps to
this subordinate POU. Its code opens in a separate editor. The first statement
there is executed and the program execution halts before the next statement.
The new current breakpoint position is then in the called POU.
Click “Step Over” to remain in the currently active POU and execute the call in
one step.

See also
● ⮫ Chapter 21.4 Stepping Through a Program on page 275
● ⮫ Chapter Command 'Step Over' on page 957

Command 'Step Out'


Symbol , shortcut [Ctrl]+[F11]
Function: The command executes the program until the next return and halts
afterwards.
Call: Menu bar: “Debug”
Requirement: The application is in online mode and the program is halted at
the current break position (debug mode).
If the current breakpoint position is in a subordinate POU, then this is run
through to the end. Then the program execution jumps back to the calling point
in the calling POU and halts there (in the line with the call).
If the current breakpoint position is in the main program, then the POU is run
through to the end. Then the program execution jumps back to the beginning
(to the program start at the first line of code in the POU) and halts there.

See also
● ⮫ Chapter 21.4 Stepping Through a Program on page 275

Command 'Run to Cursor'


Symbol:
Function: The command executes a program until a specified position as
marked by the cursor.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 959 / 1158
Menu commands

Call: Menu bar: “Debug”


Requirement: The application is in online mode and the program is halted at
the current break position (debug mode). Moreover, you have marked any line
of code in any POU with the cursor.
The statements between the current breakpoint position and the cursor posi-
tion are executed in one step. Then the execution halts at the cursor position,
which then becomes the next breakpoint position. Remember that the line of
code where you placed the cursor is reached but not executed.

See also
● ⮫ Chapter 21.4 Stepping Through a Program on page 275

User interface
Command 'Set Next Statement'
Symbol:
Function: The command determines which statement is executed next.
Call: Menu bar: “Debug”
Requirement: The application is in online mode and the program is halted at
the current break position (debug mode). Moreover, you have marked any line
of code in any POU with the cursor.
The line of code marked with the cursor becomes the current breakpoint posi-
tion without executing the statements in between or the statement that jumped
to it.

See also
● ⮫ Chapter 21.4 Stepping Through a Program on page 275

Command 'Show Next Statement'


Symbol:
Function: The command displays the program statement that is processed in
the next step.
Call: Menu bar: “Debug”
Requirement: The application is in online mode and the program is halted at
the current break position (debug mode). The break position is in a line of code
that you cannot see.
The command makes the window with the current breakpoint position active
(in the code highlighted in yellow and marked with the symbol) and makes
the breakpoint position to become visible. This is useful if you have multiple
editors open and the breakpoint position is hidden in an inactive editor.

See also
● ⮫ Chapter 21.4 Stepping Through a Program on page 275

Command 'Force Values'


Keyboard shortcut: [F7]
Function: The command sets a permanent predefined value to a variable on the
controller.
Call: Menu bar: “Debug”
Requirement: The application is in online mode.

R911403764, Edition 08 Bosch Rexroth AG


960 / 1158 ctrlX PLC Engineering
Menu commands

Unusual changes to variable values in an application cur-


CAUTION
rently running on the controller can lead to undesired
behavior of the controlled machinery.
Evaluate possible dangers before forcing variable values.
Take the respective safety precautions. Depending on the
controlled machinery, the result may lead to damage to
machinery and equipment or injury to health and life of
personnel.
With this command, PLC Engineering permanently sets one or more variables
of the active application to defined values on the PLC.
A forced value is marked with the forced symbol ( ).
For more information about the functionality of forcing and the p of values, see
the "Forcing and Writing of Variables" help page.
By default, the “Force Values [All Applications]” command, which applies to all
application in the project, and is not included in a menu.
See also
● ⮫ Chapter 21.5 Forcing and writing of variables on page 277
● ⮫ Chapter 33.4.10 Dialog 'Prepare Value' on page 1041
● ⮫ Chapter Command 'Unforce Values' on page 960

Command 'Write Values'


Keyboard shortcut [Ctrl]-[F7]
Function: This command sets a predefined value to a variable on the controller
one time.
Call: Main menu “Debug”.
Requirement: The application is in online mode.
Unusual changes to variable values in an application cur-
CAUTION
rently running on the controller can lead to undesired
behavior of the controlled machinery.
Evaluate possible dangers before forcing variable values.
Take the respective safety precautions. Depending on the
controlled machinery, the result may lead to damage to
machinery and equipment or injury to health and life of
personnel.
With this command, one or more variables of the active application are set
to defined values on the controller one time. Writing is done one time at the
beginning of the next cycle.
Values are prepared by
● Clicking in the field “Prepared value” in the declaration section
● Clicking in the inline monitoring field in the implementation section
● Clicking in the field “Prepared value” in the watch window
The command “Write Values [All Applications]” affects all application in the
project and is not included in a menu by default.
See also
● ⮫ Chapter Command 'Force Values' on page 959
● ⮫ Chapter 21.5 Forcing and writing of variables on page 277

Command 'Unforce Values'


Keyboard shortcut [Alt]+[F7]
Function: This command resets the forcing of all variables. The variables receive
their current values from the PLC.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 961 / 1158
Menu commands

Call: “Debug”.
Requirement: The application is in online mode.
The “Remove Force List” command has the same functionality as this command
with one difference. If the “Remove Force List” command cannot be executed
for all forced values, then no message is displayed.
Unusual changes to variable values in an application cur-
CAUTION
rently running on the PLC can lead to undesired behavior
of the controlled machinery.
Evaluate possible dangers before forcing variable values.
Take the respective safety precautions. Depending on
the controlled system, the result may lead to damage to
machinery and equipment or injury to health and life of

User interface
personnel.
The command “Force Values [All Applications]” affects all application in the
project and is not included in a menu by default.
See also
● ⮫ Chapter Command 'Force Values' on page 959
● ⮫ Chapter 21.5 Forcing and writing of variables on page 277

Command 'Flow Control'


Function: This command activates and deactivates the flow control.
Call: Menu“Debug”
Requirement: The application is in online mode.
An active flow control extends application runtime.
NOTICE
When “Confirmed Online Mode” is activated in the
communication settings, a dialog prompt appears when
switching on the flow control to cancel the process.
When flow control is activated, it is not possible to use
breakpoints or step through the program.
See also
● ⮫ Chapter 21.7 Sequential control on page 282

Command 'Display Mode' - 'Binary', 'Decimal', 'Hexadecimal'


Function: These commands in the “Display Mode” submenu are used for setting
the format of values in the display mode when monitoring in online mode.
Call: Main menu “Debug”.
Requirement: The project is in either online or offline mode.
The "Binary" and "Hexadecimal" display modes are unsigned, and "Decimal" is
signed.
See also
● ⮫ Chapter 22.3.2 Calling of Monitoring in Programming Objects on page 291

"Core Dump" menu

Command 'Load Core Dump'


Function: PLC Engineering scans the project directory for core dump files.
When a new core dump is forced with the “Create Core Dump” command, the
dump file is automatically loaded from the controller to the project directory.
If multiple core dump files are available, then PLC Engineering prompts you to
choose whether the latest file should be opened in the project. You can also
select one of the other files.

R911403764, Edition 08 Bosch Rexroth AG


962 / 1158 ctrlX PLC Engineering
Menu commands

When a file is loaded into the project, an online view of the application appears
with state of the application at the time when the core dump was generated.
You can then view the variable values afterwards. Finally, the call tree is also
available.
Call: Main menu “Debug 🠂 Core Dump”.
Requirement: The application is in offline mode.
You can close the core dump view only by clicking “Close
NOTICE
Core Dump”. The “Logout” command has no effect in
this view.
See also
● ⮫ Chapter 22.5.6 Analysing Errors with Core Dump on page 309
● ⮫ Chapter Command 'Create Core Dump' on page 962
● ⮫ Chapter Command 'Close Core Dump' on page 962

Command 'Create Core Dump'


Function: This command causes PLC Engineering to check whether a core
dump file is already available on the controller.
If a core dump file is available, then PLC Engineering prompts you to load this
file to the project directory.
With the following requirements, PLC Engineering generates a new dump file
with the current application data:
● A core dump file is still not available or PLC Engineering has rejected a core
dump file from being loaded.
● The application is currently stopped at breakpoint or an exception has
occurred.
The generated core dump file is saved directly to the project directory:
<project name>.<device name>.<application name>.<application
Guid>.core. You can cancel the file generation by clicking the button in the
status bar.
The amount of detail in the dump depends on the support from the runtime
system. Runtime systems that are appropriate for this purpose generate just
one dump in the case of an exception error. The core dump output from
clicking “Load Core Dump” can therefore be used for error analysis.
Call: Main menu “Debug 🠂 Core Dump”.
Requirement: The application is in online mode.
See also
● ⮫ Chapter 22.5.6 Analysing Errors with Core Dump on page 309
● ⮫ Chapter Command 'Load Core Dump' on page 961

Command 'Close Core Dump'


Function: This command closes the core dump view of the application that is
open in the project.
Call: Main menu “Debug 🠂 Core Dump”.
Requirement: The application is in offline mode and you have loaded a core
dump file to the project from the controller.
See also
● ⮫ Chapter 22.5.6 Analysing Errors with Core Dump on page 309

Command 'Load Device Log from Core Dump'


Function: This command imports the controller log list that was saved with the
last generated core dump. The log list is displayed in the same view as in online
mode in the “Log” tab of the device editor.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 963 / 1158
Menu commands

Call: Main menu “Debug 🠂 Core Dump”.


Requirement: The application is in offline mode and a core dump is open in the
project.
See also
● ⮫ Chapter 22.5.6 Analysing Errors with Core Dump on page 309
● ⮫ Chapter 33.1.14 "Log” tab on page 751

33.3.9 Menu “Tools”


Command 'Add-on Installer'
The command opens the dialog “Add-on Installer” for managing software add-
ons in ctrlX PLC Engineering and ctrlX I/O Engineering, see:

User interface
⮫ 'Add-on installer' dialog

Symbol

Call
Menu “Tools 🠂 Add-on Installer”

Further topics:
⮫ Chapter 29.2 Installing/uninstalling add-ons on page 335

Command 'Device Repository'


Symbol:
Function: This command opens the “Device Repository” dialog. This dialog is
used for managing the devices that are installed on the local system and can be
integrated into PLC Engineering projects.
Call: Menu bar: “Tools”.

Dialog 'Device Repository'


Do not change the internal device repository manually.
CAUTION
Do not copy any files to or from the repository. Always
use the device repository dialog to install or uninstall
devices.

“Location” Shows the device repository directory on the local system. The list box
shows the currently set save locations. By default, PLC Engineering
creates the system repository during installation. The devices of the
selected location are listed in the “Installed device descriptions” field.
“Edit Locations” Opens the “Edit Repository Locations” dialog.
Table 118: Dialog 'Edit Repository Locations'
List of the repositories with “Location” and “Name”.
“Add” Creates a new repository.
Opens the “Repository Location” dialog. The selected directory
(“Location” input field) must be empty or it must be a valid repository.
“Edit” Opens the “Repository Location” dialog (see “Add”).
“Remove ” A dialog prompt opens for you to decide whether the respective direc-
tory should also be deleted from the hard disk.

R911403764, Edition 08 Bosch Rexroth AG


964 / 1158 ctrlX PLC Engineering
Menu commands

Table 119: “Installed Device Descriptions”


List of device descriptions in multilevel tree structure. Shows all device descriptions with “Name”,
“Vendor”, and “Version”. The top nodes represent device categories, for example PLCs, fieldbuses,
and logical devices.
“String for full-text search This field is editable after clicking in it. For any character string
in all devices” entered, only those devices that include the character string are dis-
played in the lower view. The matched string is highlighted in yellow
for these devices.
“Vendor” Drop-down list with manufacturers whose available devices are dis-
played.
“Install” Opens the “Install Device Description” dialog.
For the default devices with file type "*.devdesc.xml". You can also
select manufacturer-specific description files, such as "*.gsd" files for
PROFIBUS DP modules, "*.eds" and "*.dcf" files for CAN devices.
When you click “OK” to confirm the selection, PLC Engineering inserts
the new device into the device repository. If an error occurs during
installation (for example, missing files that are referenced by the
device description), then PLC Engineering reports the error to the
lower part of the device repository dialog.
“Uninstall” Removes the selected device. If you delete the device from the device
repository, then it is no longer available for use in the programming
system.
“Renew Device Repository” Updates all devices in the device repository.
When new versions of import plug-ins are available, some device
descriptions may be outdated. The affected devices are marked with
a warning symbol ( ). This command opens a dialog to confirm the
update.
“Download Missing Device Opens when you use devices in your project that are not available
Descriptions” in the device repository. When you execute this command, a list of
missing devices is displayed. There you can select the corresponding
devices for download.
“Details” Opens the “Details” dialog for the selected device description. This
dialog provides additional information from the device description file.
During installation, PLC Engineering copies the device
NOTICE
description files and all additional reference files to
an internal location. Therefore, any changes to the orig-
inal files no longer influence the installed devices. You
must reinstall the devices to make any changes effective.
We recommended that you change the internal version
number of a device description after a modification.
See also
● ⮫ Chapter 28.2 Installing Devices on page 333
● ⮫ Chapter 'Options' dialog - 'Download device descriptions' on page 1081

Command 'Scripting' - 'Run script file'


Symbol:
Function: The command opens a dialog to select the script file ( *.py) and then
executes the selected script file.
Call: Menu “Tools 🠂 Scripting”
Also refer to
● ⮫ Calling scripts from toolbar icons

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 965 / 1158
Menu commands

Command 'Scripting' - 'Enable script tracing'


Symbol:
Function: The command makes PLC Engineering print all commands from the
script file to the message view. Use this command for monitoring and debug-
ging scripts. A blue frame around the symbol indicates that the option is active.
Call: “Tools 🠂 Scripting” menu
Also refer to
● ⮫ Calling scripts from toolbar icons

‘Scripting’ command - 'Scripts


Function: The command executes a script stored in the ScriptDir folder.

User interface
Call: “Tools 🠂 Scripting 🠂 Scripts”
Prerequisite: The ScriptDir subdirectory is created in the PLC Engineering
installation directory. Python scripts are stored in this folder with the file exten-
sion .py.
All scripts that are contained in the ScriptDir folder are executable as menu
commands and are sorted alphabetically by file name.
Also refer to
● ⮫ Calling scripts from toolbar icons

Command 'Customize'
Function: This command opens the “Customize” dialog box, where you can
customize the menus, toolbars, and keyboard shortcuts according to your indi-
vidual requirements.
Call: Main menu “Tools”
See also
● ⮫ Chapter 7.2.1 Customizing Menus on page 47
● ⮫ Chapter 7.2.2 Customizing Toolbars on page 48
● ⮫ Chapter 7.2.4 Customizing Keyboard Shortcuts on page 50

Command 'Options'
Function: The command opens the “Options” dialog for configuring the PLC
Engineering options. These options define the behavior and appearance of the
PLC Engineering user interface. PLC Engineering saves the settings in your
current user profile on your local system. The current profile specifies the
standard settings.
Call: Menu “Tools”
Also refer to
● ⮫ Chapter “Options” - “SFC editor” dialog on page 1089
● ⮫ Chapter “Options” - “CFC editor” dialog on page 1091
● ⮫ Chapter ‘Options’ dialog - ‘Declaration editor' on page 1081
● ⮫ Chapter 'Options' dialog - 'Device editor' on page 1082
● ⮫ Chapter 'Options' dialog - 'Download device descriptions' on page 1081
● ⮫ Chapter “Options” - “FBD, LD and IL” dialog on page 1091
● ⮫ Chapter Dialog 'Options' – 'International Settings' on page 1084
● ⮫ Chapter 'Options' dialog - 'Libraries' on page 1080
● ⮫ Chapter Dialog 'Options' – 'Library Download' on page 1093
● ⮫ Chapter ‘Options’ dialog - ‘Load and save' on page 1084
● ⮫ Chapter Dialog 'Options' - 'PLCopenXML' on page 1085
● ⮫ Chapter 'Options' dialog - 'Proxy settings' on page 1085
● ⮫ Chapter 'Options' dialog - 'Refactoring' on page 1086

R911403764, Edition 08 Bosch Rexroth AG


966 / 1158 ctrlX PLC Engineering
Menu commands

● ⮫ Chapter 'Options' dialog - 'Intelligent coding' on page 1082


● ⮫ Chapter 'Options' dialog - 'Text editor' on page 1087

Command 'Import and Export Options'


Function: This command opens the “Import and Export Options” dialog. Here
you can configure the export and import of selected settings of the PLC Engi-
neering options. The settings are saved to an XML file with the default exten-
sion (options.xml).
Call: Menu bar: “Tools”.

Dialog 'Import and Export Options'


“Export selected options” “Select options”: In the table, you can select the categories of options,
either user-specific or machine-specific (computer), whose current set-
tings are to be exported to the XML file.
“File”: Path of the export file in the local file system. Example:
D:\system1.options.xml.
Button : Opens the default dialog to search for an existing file in
the local file system, or to create one. The “File type” option export
(*.options.xml) is preset.
“Import selected options” “File”: Path of the options export file whose contents are to be
imported.
Button : Opens the default dialog to search for an existing file of
type option export (*.options.xml) in the local file system.
After you click “OK” to close the dialog, the settings described in the
file are applied to the project.
See also
● ⮫ Chapter 7.1 Setting PLC Engineering Options on page 47

'License Manager’ command


Symbol
Function: The command opens the wizard for configuring licenses for PLC Engi-
neering add-on products. The wizard starts with the “License Manager - Select
target device” dialog.
Call: Menu “Tools”
The License Manager can handle licenses for PLC Engineering add-on products
on the local computer, as well as licenses for RTS add-on products on devices.
It supports both the installation in a soft container and on a dongle.

License Manager dialog - Select target device


This is the start dialog of the License Manager wizard. Here you decide where
the license will be installed.
“Workstation” Local computer
“Device” Control device. The connection to this device must be configured cor-
rectly in order to license (“Communication Settings” tab of the device
editor).
Click on “Next” and then decide which container to be used to manage the
licenses.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 967 / 1158
Menu commands

'License Manager dialog - Select container'


“Dongle” A corresponding dongle must be connected to the computer or device.
Not all devices support dongles.
“Soft container” "Codesys Security Key. A corresponding soft container must be regis-
tered in the CodeMeter Control Center. The PLC Engineering installa-
tion provides an existing soft container.
If you are in the process of licensing a product on your local com-
puter“(workstation”), after deciding on one of the container types and after
clicking on “Next >”, the “License Manager” dialog is displayed and a dongle or
soft container as well as the next actions can be selected.
If you are in the process of licensing the add-on product for a control device,

User interface
clicking on “Next >” opens the dialog for selecting the device in the network.
The dialog corresponds to the classic view of the “Communication Settings”
tab of the device editor.

Dialog 'License Manager'


“Container” Depending on whether “Dongle” or “Soft container” was selected:
Selection list with all PLC Engineering dongles or soft containers
found on the computer or device.
“Products”: List of all installed products that are subject to licensing. A prepended
symbol indicates the existence and validity of the license.
On the right side of the window, the following information is displayed
for the selected product and corresponding licenses:
“Name”
“Company”
“Unit counter”
“License quantity”
“Usage period”
“Feature map”
“Activation time”
“Expiration time”
“Company code”
“Product code”
“Description”
“Install licenses” Opens the “Install Licenses on <Computer> - Select operation” dialog:
● “Activate License”: Opens the “Install licenses on <computer> -
Activate license” dialog, see below
● “Request License”: Opens the “Install licenses on <computer> -
Request license” dialog, see below
● “Install licenses”: Opens the “Install licenses on <computer> -
Install license” dialog, see below
“Additional functions” Opens the menu with the following actions:
● “Return license” Opens the “Return licenses”, see below
● “Restore license” This function is available in the case of device
licensing only. Opens the “Restore Licenses” dialog (see more
below)

R911403764, Edition 08 Bosch Rexroth AG


968 / 1158 ctrlX PLC Engineering
Menu commands

Table 120: “Install licenses on <computer> - Activate license”


This is the recommended way to activate a license available via the License Server when you have
an Internet connection. Requirement: The computer has an Internet connection.
“Ticket ID” Input field for the ticket ID that you received from the software pro-
vider. Ticket ID consists of 5 blocks of 5 alphanumeric characters each
(for example, LYSQ3-ZU93K-24LWC-XGWJ8-5AY7H).
“License server” List box of the license server that provides the license for activating
the product. The software provider provides the server URL.
“Select Ticket from Opens the “License Repository” dialog.
Repository”
“Next” PLC Engineering connects to the license server.
● If the specified ticket contains only 1 license, a dialog confirming
the successful activation is displayed after the server action is com-
pleted.
● If the specified ticket contains multiple licenses, then the dialog
“Install Licenses - Select Licenses” opens with a list of these
licenses (see description below).
Table 121: “Install Licenses - Select Licenses”
Selection of the licenses to be activated for the ticket which you specified in the “Install Licenses -
Activate License” dialog.
“Name” Product name
“Available” Number of available licenses
“Used” Number of used licenses
Total Sum of all used and available licenses
Next PLC Engineering connects to the license server. After successful com-
pletion of the server action, a dialog is displayed confirming the activa-
tion

Table 122: “Install licenses on <Computer> - Request license”


If the computer does not have an Internet connection, then you can generate a context file from this
dialog. The file "WibuCmRaC" is then transmitted to the license server via an Internet-enabled com-
puter. When activation is complete, a license update file "WibuCmRaU" is provided for download.
“Software provider” Input field for firm codes of the software provider that provides the
license to activate the product. Optionally, you can select the software
provider from the drop-down list.
“Context file” Location and name

Table 123: “Install licenses on <computer> - Install license”


If you downloaded a license update file from the Internet during software activation, then you can
use this dialog to install the license on your dongle. To do this, specify the path of the license
update file in the input field.

Table 124: “Return License”


License allowing, you can "return" it to activate it to subsequently activate it again on another
system.
“Ticket ID” Field for specifying the ticket ID that was used for licensing.
“License server” List box for selecting the license server that provides the license for
activating the product. The software provider provides the server URL.
“Load License(s)” Button for showing all current licenses installed for the given ticket ID
on the server in the “Licenses” window.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 969 / 1158
Menu commands

“Licenses” List of licenses available on the server for the given ticket ID. The
following information for the selected license is displayed next to the
window on the right:
● “Name”
● “Number of activations”
● “Return allowed”
● “Activation type”
● “Activation date”
● “Company code”
● “Comment”
“Return License(s)” Button for returning the selected license(s). These can be reactivated

User interface
later on another system.

Table 125: “Install Licenses - Restore Licenses”


When activated, device licenses are saved to a file (*.WibuCmRau) on the local computer and in the
"PLC Engineering Central License Server". If lost, they can be restored from this file to the identical
device.
“Ticket ID” Field for specifying the ticket ID that was used for licensing that has
already occurred.
“Restore” If a corresponding license backup file is found, then the license is
reactivated in the device.

Also refer to
● ⮫ Chapter 33.1.1 Tab “Communication” on page 735

Command 'Library Repository'


Symbol:
Function: The command opens the “Library repository” dialog. In this dialog
you define which libraries are installed on the local system and are thus avail-
able for your application.
Call: Menu “Tools”

Dialog 'Library Repository'


Table 126: “Memory location”
Display of the directory on the local system in which the library files are located. The libraries in
this “location” are listed in the “Installed libraries” area.
“Edit” Opens the “Edit repository locations” dialog.
1. You can only use empty directories for new repositories.
2. You can also use existing repositories as locations.
3. The "System" repository cannot be edited; PLC Engineering indicates it by
the italic lettering of the entry.
Table 127: Dialog “Edit Repository Locations”
List of the repositories with “storage location” and “name”.
“Add” Creates a new repository.
Opens the “storage location for repository” dialog. The selected direc-
tory (input field “Place”) must either be empty or an already existing
valid repository. “Name” is the input field for a symbolic repository
name.

R911403764, Edition 08 Bosch Rexroth AG


970 / 1158 ctrlX PLC Engineering
Menu commands

“Edit” Opens the “Location for repository” dialog (see “Add”)


“ Remove” A query appears, asking whether only the entry is to be removed from
the list of repositories, or whether the directory with the library files is
to be deleted from the file system. If you wish to delete the directory,
you must confirm this.
Table 128: “Installed libraries”
List of the libraries in a tree structure. Display of each library with category, name, company and
version. The icon to the left of the name indicates whether the library is digitally signed or
unsigned.
“Company:” Selection list for filtering the displayed libraries.
“Install” Opens the “Select library” dialog. Possible filters:
● “Compiled PLC Engineering library files (* .compiled-library)”.
● “Compiled PLC Engineering library files (* .compiled-library-v3)” ab
V3 SP15
● “Library files (*.library)” for still uncompiled library projects
● “All files (*.*)”
“Uninstall” Uninstalls the selected library.
“Export”: Opens the standard dialog to save the library project to the local file
system. The file type is Library files (*.library), Compiled
library files (*.compiled-library), or Compiled library
files (*.compiled-library-v3).
“Search” Searches for libraries and function blocks.
Opens the “Browse library” dialog. When you enter a string in the
input field, PLC Engineering displays the libraries that it finds with a
corresponding string.
“Details” Opens the “Details” dialog with details from the project information of
the library for the selected version of a library. For the following addi-
tional information, click on the “More” button in the “Details” dialog:
● “Size”: Specified in bytes
● “Created”: date of creation
● “Changed”: Date of the last change
● “Last access”: Date
● “Attributes”
● “Properties”
“Dependencies” For the selected library the “Dependencies” dialog opens, showing the
dependencies on other libraries. “Title”, “Version” and “Company” are
shown for each library reference. References that function via place-
holders are displayed according to the syntax: #<placeholder name>.
“Group by category” ● : Grouping according to library categories
● : Alphabetical sorting
The categories are defined by external description files '*.libcat.xml'.
Table 129: “Library Profiles”
A library profile defines the library version with which PLC Engineering resolves a library place-
holder if a certain compiler version is set in the project.
“Importing” Imports a *.libraryprofile file.
If the import already contains existing placeholder entries, a query
appears asking whether PLC Engineering should overwrite it.
“Export”: Exports an xml file with the extension *.libraryprofile with the
assignments of the selected placeholder entries; you can only select a
single entry of a “Compiler version”.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 971 / 1158
Menu commands

Placeholder resolutions can also be defined in the target device currently in


use and even by a specific local specification in the Placeholders dialog in the
library manager.
Also refer to
● ⮫ Chapter 27.3 Information for library developers on page 330
● ⮫ Chapter 33.2.19 "Library manager” object on page 780
● ⮫ Chapter 33.4.6 Dialog 'Library Reference Conversion' on page 1039
● ⮫ Chapter 27.6 Exporting Library Files on page 332

'OPC UA information model repository' command


Function: The command opens the “OPC UA information model” dialog. The
dialog manages the OPC UA information models that are installed on the local

User interface
system and can be integrated into PLC Engineering projects.
Call: Menu “Tools”
Table 130: 'OPC UA information model’ dialog
“Memory location” OPC UA information model directory display on the local system.
The list box shows the currently set locations. By default, PLC Engi-
neering creates the system repository during installation. The informa-
tion models of the selected location are listed in the “Installed OPC UA
information models ” area.
“Change location” Opens the “Edit Repository Locations” dialog.

“Installed OPC UA information models”


Listing the installed information models. Installed information model documentation can be opened
by double-clicking.
Info: The information models of this repository can also be added to repositories.
“Instal” Opens the “Select Install OPC UA information model(s)” dialog.
● File type: OPC UA information models *NodeSet2.xml: for example
“Informationmodel.NodeSet2.xml”. When you click on “Open”, the
selected information model is inserted into the repository
● File type: All files *.*: You can select an OPC UA documentation
in PDF or Word format, for example. When clicking on “Open”,
the dialog “Assign documentation to OPC UA information models”
opens. The dialog description can be found below
“Uninstall” Uninstalls the selected OPC UA information model. If you delete the
information model from the repository, it is no longer available for use
in the ctrlX I/O Engineering System in the programming system.
“Details” Opens the “Details” dialog for the selected information model. The
dialog shows additional information about the information model. In
“Alias”, enter an alias name for the URI. It also indicates whether docu-
mentation is available for the information model.
● “Model URI”
● “Release date”
● “Publish”
● “Repository”
● “Alias”
● “Documentation available”:
– “Yes”: “Uninstall documentation” button is available
– “No”: “Install documentation” button is available
● “Install documentation”: Opens the “OPC UA information model
documentation” dialog. In the dialog, the default file type is OCP
UA information model documentations (*.pdf)

R911403764, Edition 08 Bosch Rexroth AG


972 / 1158 ctrlX PLC Engineering
Menu commands

“Documentation” Opens the installed documentation for the selected information model.
If no documentation is installed for the selected information model,
the command cannot be activated.
“Display all versions” All installed versions of the information models are displayed in a tree
structure.

Command 'Device Reader'


Function: The command opens the standard “Select Device” dialog and reads
the license and product information of the selected controller. This license and
product information is displayed in the “Device Reader” dialog.
Call: Menu bar: “Tools”
Requirement: No applications exist on the controller.
If the command is selected although an application exists on the controller,
then a dialog prompts the user whether or not all applications should be
removed from the controller. When the user click “No” to this dialog, the
“Device Reader” command is aborted.
Table 131: Dialog “Device Reader”
“Status of Available Device Features”
“Product” PLC Engineering product (example: SoftMotion)
“Feature” Feature of “Product”
Example: CNC is a “Feature” of SoftMotion.
“License Active/Count ” Yes: A license exists for the feature.
No: A license does not exist for the feature.
“Count”: Number of licenses
See also
● ⮫ List license information for products and device features of a control
on page 338

33.3.10 Menu “Window”


Command 'Next Editor'
Keyboard shortcut: [Ctrl]+[F6]
Function: This command switches focus from the currently active view to the
next view. The next view is identified by the tab to the right of the currently
active tab.
Call: Main menu “Window”
Requirement: At least one object is open.
See also
● ⮫ Chapter Command 'Previous Editor' on page 972

Command 'Previous Editor'


Keyboard shortcut: [Shift]+[Ctrl]+[F6]
Function: This command switches focus from the currently active view to the
previous view. The previous view is identified by the tab to the left of the
currently active tab.
Call: Main menu “Window”
Requirement: At least one object is open.
See also
● ⮫ Chapter Command 'Next Editor' on page 972

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 973 / 1158
Menu commands

Command 'Close all editors'


Symbol:
Function: The command closes all currently open editor views.
Call: Menu “Window”
Prerequisite: At least one editor is open.
Also refer to
● ⮫ Chapter Command 'Close all editors of inactive applications' on page 973
● ⮫ Chapter Command 'Close All Editors But This' on page 975

Command 'Close all editors of inactive applications'


Function: The command closes all editor views for objects that are located

User interface
directly below a currently inactive application. Object editors in the POU view
remain open.
Call: Menu “Window”
Prerequisite: At least one object of an inactive application is open.
Also refer to
● ⮫ Chapter Command 'Close all editors' on page 973
● ⮫ Chapter Command 'Close All Editors But This' on page 975

Command 'Reset Window Layout'


Function: This command resets all currently open windows and views to their
default positions. You are prompted for a confirmation before the command is
executed.
Call: Main menu “Tools”

Command 'New Horizontal Tab Group'


Symbol:
Function: This command moves the currently active view to a new, separate tab
group below the existing one.
Call: Main menu “Window” or context menu of the tab
Requirement: Several editor views are open as tabs next to each other.
If you open another object in the editor, then this is automatically included in
the tab group that is currently in focus.
See also
● ⮫ Chapter Command 'New Vertical Tab Group' on page 973

Command 'New Vertical Tab Group'


Symbol:
Function: This command moves the currently active view to a new, separate tab
group to the right of the existing one.
Call: Main menu “Window” or context menu of the tab
Requirement: Several editor views are open as tabs next to each other.
If you open another object in the editor, then this is automatically included in
the tab group that is currently in focus.
See also
● ⮫ Chapter Command 'New Horizontal Tab Group' on page 973

Command 'Float'
Function: This command releases a docked view from its frame in the user
interface and repositions it on the screen as a floating window.

R911403764, Edition 08 Bosch Rexroth AG


974 / 1158 ctrlX PLC Engineering
Menu commands

Call: Main menu “Window”


Requirement: The application is in online mode.
This window can then be positioned outside of the user interface. Use the
“Dock” command to return a floating window to the frame of the user interface.
See also
● ⮫ Chapter Command 'Dock' on page 974

Command 'Dock'
Function: This command returns a floating window, which was released by the
“Float” command, to the frame of the user interface.
Call: Main menu “Window”
See also
● ⮫ Chapter Command 'Float' on page 973

Command 'Auto Hide'


Keyboard shortcut: [F7]
Function: This command shows or hides a view.
Call: Main menu “Window”
Hide simply means that PLC Engineering minimizes the view to a tab at the
bottom of the user interface which is visible only when you move the mouse
over the tab. The command functions like a check box. When a window is
hidden, the check box is selected in the menu. When you click the command
again, the checkbox is cleared and the window is shown.
See also
● ⮫ Chapter 7.2.7 Auto-Hiding Windows on page 51

Command 'Next Pane'


Keyboard shortcut: [F6]
Function: This command sets the focus on the next pane.
Call: Main menu “Window”
Requirement: An object is open that contains two or more panes.
Example: If an object is open in the ST editor and the cursor is currently in the
declaration section, then command sets the focus to implementation section.
See also
● ⮫ Chapter Command 'Previous Pane' on page 974

Command 'Previous Pane'


Keyboard shortcut: [Shift]+[F6]
Function: This command sets the focus on the previous pane.
Call: Main menu “Window”
Requirement: An object is open that contains two or more panes.
Example: If an object is open in the ST editor and the cursor is currently in the
declaration section, then command sets the focus to implementation section.
See also
● ⮫ Chapter Command 'Next Pane' on page 974

Command 'Windows'
Function: This command opens the “Windows” dialog box, which lists all open
objects. You can then activate or close any of the listed views.
Call: Main menu “Window”

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 975 / 1158
Menu commands

Commands of the Submenu 'Window'


Function: The command activates the selected window.
Call: Main menu “Window”
For each opened editor window the menu “Window” contains a command
“<n><object name>”. Choosing this command activates the corresponding
window. In offline mode PLC Engineering adds the extension “(Offline)”. To
differentiate between the implementation or the instances of a function block
the extension “(Impl)” or “<instance path>” is added.

Command 'Toggle First Pane'


Keyboard shortcut [Alt]+[F6]
Function: This command shows and hides the declaration view.

User interface
Call: “Window”.
Requirement: The cursor is positioned in the editor of one of the following
objects:
● POU
● Transition
● Method
● Get accessor method of a property
● Set accessor method of a property
● Visualization
You can also toggle the subviews by means of the buttons.

See also
● ⮫ Chapter Command 'Toggle Second Pane' on page 975

Command 'Toggle Second Pane'


Function: This command shows and hides the implementation view.
Call: “Window”.
Requirement: The cursor is positioned in the editor of one of the following
objects:
● POU
● Transition
● Method
● Get accessor method of a property
● Set accessor method of a property
● visualization
You can also toggle the subviews by means of the buttons.

See also
● ⮫ Chapter Command 'Toggle First Pane' on page 975

Command 'Close All Editors But This'


Function: This command closes all editor views except the currently open one.
Call: Right-click the tab
Requirement: At least two objects are open.
See also
● ⮫ Chapter Command 'Close all editors' on page 973
● ⮫ Chapter Command 'Close all editors of inactive applications' on page 973

R911403764, Edition 08 Bosch Rexroth AG


976 / 1158 ctrlX PLC Engineering
Menu commands

Command 'Select Object in Navigator'


Function: This command selects the object of the active editor in the device
tree.
Call: Right-click the tab
Requirement: At least one object is open.
This command is executed automatically when you select the “Track active
editor” option for the device tree.
See also
● ⮫ Chapter Command 'Select Parent Object in Navigator' on page 976

Command 'Select Parent Object in Navigator'


Function: This command selects the parent object in the device tree.
Call: Right-click the tab
Requirement: At least one object is open.
See also
● ⮫ Chapter Command 'Select Object in Navigator' on page 976

33.3.11 Menu “Help”


Command '3S Homepage'
Function: This command opens the Bosch Rexroth AG home page.
Call: Main menu “Help”

Command 'Find'
Symbol:
Function: This command opens the PLC Engineering help.
Call: Menu bar: “Help”.
In the online help, you can run a full-text search from the input field on the top
right of the help page. The “Find” tab opens in the offline help.
Table 132: Tab 'Search'
“Search for” Combo box for defining the search term or for selecting the 25 most
recent search terms.
“ Search in titles only” The search is performed only in the titles of the help pages.
“Display partial matches” Displays terms also as search results that include the search term.
“Limit to .... matches ” Limits the number of search results.
Maximum value: 1000
“Find” Starts the full-text search.

Command 'Index'
Symbol: ; keyboard shortcut: [Ctrl]+[Shift]+[F2]
Function: This command opens the PLC Engineering help.
Call: Menu bar: “Help”.
An index search is not possible in the online help. The “Index” tab opens in the
offline help.
All index entries of the help are listed alphabetically in the index view.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 977 / 1158
Menu commands

“ Look for ” As you type letters into the input field, PLC Engineering searches auto-
matically for matches in the index list.
“Display” Opens the help page for the highlighted index entry in the list and
displays the title of the help page and location of the help file (*.chm)
in the “Index results for <index entry>” view. When several pages are
found and then displayed in this view, then you view a specific help
page by clicking its entry in the list.
Clicking an entry in the index list achieves the same result.

Command 'Contents'
Symbol: ; keyboard shortcut: [Ctrl]+[Shift]+[F1]
Function: This command opens the PLC Engineering help.

User interface
Call: Menu bar: “Help”.

Command 'About'
Function: This command opens a splash screen with information about the
PLC Engineering version and copyright. In addition, buttons are available for
detailed information about the version, license, and acknowledgments.
Call: Main menu “Help”.
“Version Info” Opens the “Detailed Version Information” dialog box with a list of PLC
Engineering components and information about the operating system.
“Export”: Exports the detailed version information as a *.txt file or in
any other format.
“License Info” Opens the “License Information” dialog box.
● “Plug-in”: Drop-down list for the plug-in to display the license infor-
mation
● “Software License”: License information about selected “Plug-in”
“Acknowledgments”

33.3.12 “SFC” menu


Command 'Init Step'
Symbol:
Function: This command converts the selected step into an initial step.
Call: Main menu “SFC”
After you choose this command, the borders of the step element change to a
double line. The previous initial step is automatically displayed as a normal step
with a single-line border.
You can also activate and deactivate the property “Init step” in the properties
dialog of a step. However, PLC Engineering does not automatically adjust the
settings of other steps.
This command is useful if you want to convert a diagram. When you create a
new SFC object, it automatically includes an initial step followed by a transition
(TRUE) and a jump back to the initial step.
Please note: In online mode, it is possible to reset the diagram to the initial
step using the SFCInit and SFCReset flags.
See also
● ⮫ Chapter SFC Flags on page 396
● ⮫ Chapter SFC Element Properties on page 408

R911403764, Edition 08 Bosch Rexroth AG


978 / 1158 ctrlX PLC Engineering
Menu commands

Command 'Insert Step'


Symbol:
Function: This command inserts a step before the selected point.
Call: Menu bar “SFC”; context menu in SFC editor
The new step is named Step<n> by default, where n is an incremental number
starting at 0 for the first step that is inserted in addition to the initial step. The
name can be edited by clicking on it.
See also
● ⮫ Chapter Command 'Insert Step-Transition After' on page 979
● ⮫ Chapter Command 'Init Step' on page 977
● ⮫ Chapter SFC Elements 'Step' and 'Transition' on page 400

Command 'Insert Step After'


Symbol:
Function: This command inserts a step after the selected point.
Call: Menu bar “SFC”; context menu in SFC editor
The new step is named Step<n> by default, where n is an incremental number
starting at 0 for the first step that is inserted in addition to the initial step. The
name can be edited by clicking on it.
See also
● ⮫ Chapter Command 'Insert Step-Transition After' on page 979
● ⮫ Chapter Command 'Init Step' on page 977
● ⮫ Chapter SFC Elements 'Step' and 'Transition' on page 400

Command 'Insert Transition After'


Symbol:
Function: This command inserts a transition after the selected point.
Call: Menu bar “SFC”; context menu in SFC editor
The new transition is named Trans<n> by default, where n is an incremental
number beginning at 0 for the first transition. The name can be edited by
clicking on it.
See also
● ⮫ Chapter Command 'Insert Step-Transition After' on page 979
● ⮫ Chapter SFC Elements 'Step' and 'Transition' on page 400

Command 'Insert Transition'


Symbol:
Function: This command inserts a transition before the selected point.
Call: Menu bar “SFC”; context menu in SFC editor
The new transition is named Trans<n> by default, where n is an incremental
number beginning at 0 for the first transition. The name can be edited by
clicking on it.
See also
● ⮫ Chapter Command 'Insert Step-Transition After' on page 979
● ⮫ Chapter SFC Elements 'Step' and 'Transition' on page 400

Command 'Insert Step-Transition'


Symbol:
Function: This command inserts a step and a transition before the selected
point.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 979 / 1158
Menu commands

Call: Main menu “SFC”


If you have selected a step, then PLC Engineering inserts a new step-transition
combination. If you have selected a transition, then a new transition-step com-
bination is inserted.
The new step is named Step<n> by default, where n is an incremental number
beginning at 0 for the first step that was inserted in addition to the initial step.
The new transition is named Trans<n> by default. You can edit the default
names directly by clicking the names.
See also
● ⮫ Chapter Command 'Insert Step-Transition After' on page 979
● ⮫ Chapter Command 'Init Step' on page 977

User interface
● ⮫ Chapter SFC Elements 'Step' and 'Transition' on page 400

Command 'Insert Step-Transition After'


Symbol:
Function: This command inserts a step and a transition after the selected point.
Call: Main menu “SFC”
If you have selected a step, then PLC Engineering inserts a new transition-step
combination. If you have selected a transition, then a new step-transition com-
bination is inserted.
The new step is named Step<n> by default, where n is an incremental number
beginning at 0 for the first step that was inserted in addition to the initial step.
The new transition is named Trans<n> by default. You can edit the default
names directly by clicking the names.
See also
● ⮫ Chapter Command 'Insert Step-Transition' on page 978

Command 'Add Entry Action'


Symbol:
Function: This command opens the “Add Entry Action” dialog box where you
define a new entry action. Depending on the SFC options, a dialog prompt may
open for selecting the duplication mode for the new step action.
Call: Menu bar: “SFC”; context menu of the selected step element.
Requirement: A step element in SFC is selected.
The entry action is opened automatically in the ST editor. The step element
contains an E in the lower left corner.

Confirmation prompt for selecting the duplication mode


Options:
● “Copy reference: A new step will call the same actions”: If the step is copied
in SFC, the link to the step action(s) is also copied. The steps copied by
each other will therefore call the same actions.
● “Copy implementation: New action objects are created for a new step.”: This
means that the step actions for a copied step are embedded. By default,
the generated action objects appear below an SFC box in the device tree or
“POUs” view. These objects contains a copy of the original implementation
code of the respective action.
The display of the embedded objects can be activated and deactivated in
the tree by means of the “Show Embedded Objects” and “Hide Embedded
Objects” commands in the context menu of an SFC object.

R911403764, Edition 08 Bosch Rexroth AG


980 / 1158 ctrlX PLC Engineering
Menu commands

See also
● ⮫ Chapter “Options” - “SFC editor” dialog on page 1089
● ⮫ Chapter Programming in SFC on page 193
● ⮫ Chapter SFC Element 'Action' on page 402
● ⮫ Chapter Command 'Do Not Display Embedded Objects' on page 985

Command 'Add Exit Action'


Symbol:
Function: This command opens the “Add Exit Action” dialog box where you
define a new exit action. Depending on the SFC options, a dialog prompt may
open for selecting the duplication mode for the new step action. For more
information, refer to the help page for the “Add Exit Action” command.
Call: Menu bar: “SFC”; context menu of the selected step element.
Requirement: A step element in SFC is selected.
See also
● ⮫ Chapter Command 'Add Entry Action' on page 979
● ⮫ Chapter “Options” - “SFC editor” dialog on page 1089
● ⮫ Chapter Programming in SFC on page 193
● ⮫ Chapter SFC Element 'Action' on page 402
● ⮫ Chapter Command 'Do Not Display Embedded Objects' on page 985

Command 'Parallel'
Symbol:
Function: This command converts the selected alternative branch into a parallel
branch.
Call: Main menu “SFC”
Requirement: The horizontal connecting line of a branch is selected.
Please note that after you convert a branch, you must check and modify the
layout of the steps and transitions before and after the branch.
See also
● ⮫ Chapter Command 'Alternative' on page 980

Command 'Alternative'
Symbol:
Function: This command converts the selected parallel branch into an alterna-
tive branch.
Call: Main menu “SFC”
Requirement: The horizontal connecting line of a branch is selected.
Please note that after you convert a branch, you must check and modify the
layout of the steps and transitions before and after the branch.
See also
● ⮫ Chapter Command 'Parallel' on page 980

Command 'Insert Branch'


Symbol:
Function: This command inserts a branch to the left of the selected point.
Call: Main menu “SFC”
This command functions similar to the “Insert Branch Right” command.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 981 / 1158
Menu commands

See also
● ⮫ Chapter SFC Element 'Branch' on page 405
● ⮫ Chapter Command 'Insert Branch Right' on page 981

Command 'Insert Branch Right'


Symbol:
Function: This command inserts a branch to the right of the selected point.
Call: Main menu “SFC”
The type of inserted branch depends on the selected element.
● If the uppermost element of the selected elements is a transition or an
alternative branch, then PLC Engineering inserts an alternative branch.

User interface
● If the uppermost element of the selected elements is a step, a macro, a
jump, or a parallel branch, then PLC Engineering inserts a parallel branch
with the Branch<x> jump marker, where x is an incremental number. You
can edit the default name of the jump marker or define the jump marker as a
jump destination.
● If a common element of an existing branch (horizontal line) is selected, then
PLC Engineering inserts the new branch line as a branch line on the far
right. If an entire branch line of an existing branch is selected, then PLC
Engineering inserts the new branch line directly to the right as a new branch
line.
Please note: You can convert a branch into another type with the “Alternative”
and “Parallel” commands.

Example of parallel branch


The following image shows a new inserted parallel branch generated by the
“Insert Branch Right” command while the Step11 step was selected. PLC
Engineering automatically inserts a step (Step2 in the example).
Processing in online mode: If t2 yields TRUE, then PLC Engineering executes
Step2 immediately after step11 and before t3 is passed.
Thus, PLC Engineering processes both branch lines as opposed to alternative
branches.

R911403764, Edition 08 Bosch Rexroth AG


982 / 1158 ctrlX PLC Engineering
Menu commands

Example of alternative branch


The following image shows a new inserted alternative branch generated by
the “Insert Branch Right” command while the t4 transition was selected. PLC
Engineering automatically inserts a step (Step32 in the example), a preceding
transition, and a subsequent transition (t41, t42).
Processing in online mode: If Step3 is active, then PLC Engineering passes
the subsequent transitions (t4, t41) from left to right. The first branch line
of the main branch with the first transition yielding TRUE is passed. Therefore,
only one branch line is processed as opposed to with a parallel branch.

See also
● ⮫ Chapter SFC Element 'Branch' on page 405
● ⮫ Chapter Command 'Insert Branch' on page 980
● ⮫ Chapter Command 'Parallel' on page 980
● ⮫ Chapter Command 'Alternative' on page 980

Command 'Insert Action Association'


Symbol:
Function: This command assigns an IEC action to a step.
Call: Main menu “SFC”
Requirement: A step is selected.
PLC Engineering inserts the action element to the right of the selected step
element.
If you have already assigned one or more actions to the step, they are displayed
in an action list. The new action is then inserted as follows:
● If you selected the step element, the action is inserted as the first action of
the step at first position of the action list.
● If you selected one of the available actions in the action list, then the action
is inserted directly above the selected action.
The left section of the action element includes the qualifier (N by default). You
enter the action name in the right section. To set this value, click in the box to
obtain an editing frame. You must have already created this action as a POU in
the project.
You can also edit the qualifier. Valid qualifiers are described in the chapter
“Qualifiers for Actions in SFC".

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 983 / 1158
Menu commands

See also
● ⮫ Chapter Command 'Insert Action Association After' on page 983
● ⮫ Chapter Qualifiers for Actions in SFC on page 394

Command 'Insert Action Association After'


Symbol:
Function: This command assigns an IEC action to a step.
Call: Main menu “SFC”
Requirement: A step is selected.
This command functions similar to the “Insert Action Association” command.
The difference between the two commands is that PLC Engineering inserts the

User interface
new action in the last position of the action list, not the first position. If you
select an action in the action list, then PLC Engineering inserts the new action
at the bottom of the list, not at the top.
See also
● ⮫ Chapter Command 'Insert Action Association' on page 982
● ⮫ Chapter Qualifiers for Actions in SFC on page 394

Command 'Insert Jump'


Symbol:
Function: This command inserts a jump element before the selected element.
Call: Main menu “SFC”
Requirement: A step is selected.
PLC Engineering automatically inserts the jump with the Step destination.
Then, you still have to replace this jump destination with an actual destination
by using the input assistant.
See also
● ⮫ Chapter SFC Element 'Jump' on page 407
● ⮫ Chapter Command 'Insert Jump After' on page 983

Command 'Insert Jump After'


Symbol:
Function: This command inserts a jump element after the selected element.
Call: Main menu “SFC”
PLC Engineering automatically inserts the jump with the Step destination.
Then, you still have to replace this jump destination with an actual destination
by using the input assistant.
See also
● ⮫ Chapter SFC Element 'Jump' on page 407
● ⮫ Chapter Command 'Insert Jump' on page 983

Command 'Insert Macro'


Symbol:
Function: This command inserts a macro element before the selected element.
Call: Main menu “SFC”
The new macro is named Macro<x> by default, where x is an incremental
number beginning at 0 for the first macro. You can edit the default name
directly by clicking the name.
To edit the macro, click “Zoom Into Macro” in the macro editor.

R911403764, Edition 08 Bosch Rexroth AG


984 / 1158 ctrlX PLC Engineering
Menu commands

See also
● ⮫ Chapter Command 'Zoom Into Macro' on page 984
● ⮫ Chapter Command 'Insert Macro After' on page 984

Command 'Insert Macro After'


Symbol:
Function: This command inserts a macro element after the selected element.
Call: Main menu “SFC”
This command functions similar to the “Insert Macro” command.
See also
● ⮫ Chapter Command 'Zoom Into Macro' on page 984
● ⮫ Chapter Command 'Insert Macro' on page 983

Command 'Zoom Into Macro'


Symbol:
Function: This command opens a macro for editing in the macro editor.
Call: Main menu “SFC”
Requirement: A macro is selected.
By choosing this command, PLC Engineering closes the main view of the SFC
editor and opens the macro editor. This is also an SFC editor for editing the
section of the SFC diagram that is displayed as a macro box in the main view.
Click “Zoom Out of Macro” to return to the main view.
See also
● ⮫ Chapter Command 'Zoom Out of Macro' on page 984

Command 'Zoom Out of Macro'


Symbol:
Function: This command closes the macro editor and returns to the main view
of the SFC editor.
Call: Main menu “SFC”
Requirement: A macro is open in the macro editor.
See also
● ⮫ Chapter Command 'Zoom Into Macro' on page 984

Command 'Paste After'


Symbol:
Function: This command pastes the elements from the clipboard after the
selected position.
Call: Main menu “SFC”.

Command 'Change Duplication' - 'Set'


Function: This command embeds every step action or transition, which is called
by a step or transition in the SFC box, with the caller. In this way, the action
or transition object can be called only from exactly this caller (pseudo-embed-
ding). The result is that copying step and transition elements that call cations
or transitions automatically creates new action or transition objects. the imple-
mentation code is also copied.
Call: Menu bar: “SFC”.
For more details about duplication mode, refer to the help page for the SFC
element properties and the instructions for adding step actions.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 985 / 1158
Menu commands

Pseudo-embedded objects can be hidden in the “Devices” or “POUs” view by


means of a command.
See also
● ⮫ Chapter SFC Element Properties on page 408
● ⮫ Chapter Programming in SFC on page 193

Command 'Change Duplication' - 'Remove'


Function: This command removes the embedding of action, transition, and
property objects by a step or transition that calls it for the entire SFC box.
In this way, the pseudo-embedding of the action, transition, or property objects
is removed. If step or transition elements are copied, which call actions, transi-
tions, or properties, then the copying calls the same actions and transitions as

User interface
the source.
Call: Menu bar: “SFC”.
For more details about duplication mode, refer to the help page for the SFC
element properties and the instructions for adding step actions.
Pseudo-embedded objects can be hidden in the “Devices” or “POUs” view by
means of a command.
See also
● ⮫ Chapter SFC Element Properties on page 408
● ⮫ Chapter Programming in SFC on page 193
● ⮫ Chapter Command 'Do Not Display Embedded Objects' on page 985

Command 'Do Not Display Embedded Objects'


Function: This command causes action and transition objects, which are
embedded in an SFC box by a step or transition, do not appear in the tree.
Call: Context menu of an SFC box in the “Devices” or “POUs” view.
See also
● ⮫ Chapter Programming in SFC on page 193

33.3.13 "CFC" menu


Command 'Edit Worksheet'
Function: This command opens the “Edit Worksheet” dialog box in which you
set the size of the worksheet.
Call: Main menu “CFC”
Requirements: A CFC editor is active.

Dialog box 'Edit worksheet'


“Use following dimensions” Here is where you set the size of the worksheet. Your change is only
accepted if the size is sufficient for the existing program.
“Adapt the dimensions Automatically adapts the size of the worksheet to the size of your
automatically” program.
“Move the working sheet Shifts the worksheet along the x or y axis. The input of negative num-
origin relatively” bers is permitted.

Command 'Edit Page Size’


Function: This command opens the “Edit Page Size” dialog box, in which you
change the size of the page-oriented CFC editor.
Call: Main menu “CFC”
Requirements: A page-oriented CFC editor is active.

R911403764, Edition 08 Bosch Rexroth AG


986 / 1158 ctrlX PLC Engineering
Menu commands

Dialog box 'Edit page size' dialog box


“Width” Width of the page (minimum 24, maximum 1024). Elements outside of
the working area are marked red.
“Height” Height of the page (minimum 24, maximum 1024). Elements outside of
the working area are marked red.
“Margin width” Width of the margin (minimum 6, maximum 25% or page width).
“Set as standard for new : The current settings are selected as standard for new CFC objects.
CFC objects”
See also
● ⮫ Chapter CFC Element 'Page' on page 434

Command 'Negate'
Symbol:
Function: This command negates the selected function block input or function
block output.
Call: Main menu “CFC”, context menu
Requirements: A CFC editor is active. A function block input or function block
output is selected.

Command 'EN/ENO'
Symbol:
Function: This command adds a boolean input “EN” (Enable) and a boolean
output “ENO” (Enable Out) to the selected function block.
Call: Main menu “CFC”, context menu
Requirements: A CFC editor is active. A function block is selected.
The added input “EN” activates the function block. The function block is exe-
cuted only if the input is TRUE. The value of this signal is output at the “ENO”
output.

Command 'None'
Symbol: ; keyboard shortcut : [Ctrl]+[M] (to toggle between “S”, “R”, “REF”,
and None)
Function: The command removes a Reset (R), Set (S), or REF from the input of
the “Output” element.
Call: Menu bar: “CFC 🠂 Set/Reset”; context menu: “Set/Reset”
Requirement: A CFC editor is active. The input of an “Output” element is
selected.

Command 'R (Reset)'


Symbol: ; keyboard shortcut : [Ctrl]+[M] (to toggle between “S”, “R”, “REF”,
and None)
Function: The command adds a Reset to the input of a Boolean “Output” ele-
ment.
Call: Menu bar: “CFC 🠂 Set/Reset”; context menu: “Set/Reset”
Requirement: A CFC editor is active. The input of an “Output” element is
selected.
If an “Output” element has a Reset input, then the Boolean output value is set
to “FALSE” as soon as the value of the input is “TRUE”. The “FALSE” value at
the output is retained, even if the input value changes.
See also
● ⮫ Chapter Command 'S (Set)' on page 987

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 987 / 1158
Menu commands

Command 'S (Set)'


Symbol: ; keyboard shortcut : [Ctrl]+[M] (to toggle between “S”, “R”, “REF”,
and none)
Function: The command adds a Set (S) to the input of a Boolean “Output”
element.
Call: Menu bar: “CFC 🠂 Set/Reset”; context menu: “Set/Reset”
Requirement: A CFC editor is active. The input of an “Output” element is
selected.
If an “Output” element has a Set input, then the Boolean output value is set to
“TRUE” as soon as the value of the input is “TRUE”. The “TRUE” value at the
output is retained, even if the input value changes.

User interface
See also
● ⮫ Chapter Command 'R (Reset)' on page 986

Command 'REF= (Reference Assignment)'


Symbol: ; keyboard shortcut : [Ctrl]+[M] (to toggle between “S”, “R”, “REF”,
and None)
Function: The command assigns a reference to an “Output” element.
Call: Menu bar: “CFC 🠂 Set/Reset”; context menu: “Set/Reset”
Requirements: A CFC editor is active. The input of an “Output” element is
selected.

Example:
Declaration:
ref_int : REFERENCE TO INT;
a : INT;
CFC:

This corresponds to the ST code: ref_int REF= a;

For more information, see the description for the data type REFERENCE TO.
See also
● ⮫ Chapter Programming in the CFC editor on page 184
● ⮫ Chapter 32.5.17 Reference on page 567

Command 'Display Execution Order'


Function: The command temporarily shows a numbered tag for all CFC ele-
ments of the programming object.
Call
● Menu bar: “CFC 🠂 Execution Order”
● Context menu in the CFC editor
Requirement: A CFC editor is active and the “Auto Data Flow Mode” property is
selected.
The numbers represent the automatically determined execution order. The exe-
cution order is determined by data flow. In the case of multiple networks, it is
determined by their topological position in the editor.
The tags are hidden as soon as you click in the CFC editor.

R911403764, Edition 08 Bosch Rexroth AG


988 / 1158 ctrlX PLC Engineering
Menu commands

See also
● ⮫ Chapter Automatic execution order according to data flow on page 180
● ⮫ Chapter Command 'Set Start of Feedback' on page 988
● ⮫ Chapter Dialog 'Properties' - 'CFC Execution Order' on page 1055

Command 'Set Start of Feedback'


Symbol:
Function: The command defines the selected element as the starting point
within a feedback.
Call:
● Menu bar: “CFC 🠂 Execution Order”
● Context menu: “Execution Order”
Requirement: A CFC editor is active and the “Auto Data Flow Mode” property
is selected. Moreover, a network of the CFC POU contains a feedback, and an
element within the feedback is selected.

In the CFC editor, the starting point within the feedbacks is decorated with
the symbol. Then the element has the lowest number in the execution order
within the feedbacks. At runtime, the processing of the feedback begins with
this element.

See also
● ⮫ Chapter Automatic execution order according to data flow on page 180
● ⮫ Chapter Command 'Display Execution Order' on page 987
● ⮫ Chapter Dialog 'Properties' - 'CFC Execution Order' on page 1055

Command 'Send to Front'


Symbol:
Function: The command numbers the elements so that the selected elements
are located at the front of the execution order.
Call: Menu bar: “CFC 🠂 Execution Order”; context menu: “Execution Order”
Requirements: A CFC editor is active and the “Explicit Execution Order Mode”
property is selected. At least one element is selected.

The selected elements get the lowest numbers beginning at 0 while keeping the
previous order. The remaining elements are numbered so that their execution
order remains the same. The topological positions of the elements are retained
anyway.

See also
● ⮫ Chapter Automatic execution order according to data flow on page 180
● ⮫ Chapter Dialog 'Properties' - 'CFC Execution Order' on page 1055
● ⮫ Chapter Command 'Send to Back' on page 988
● ⮫ Chapter Command 'Move Up' on page 989
● ⮫ Chapter Command 'Move Down' on page 989
● ⮫ Chapter Command 'Order by Data Flow' on page 990
● ⮫ Chapter Command 'Order by Topology' on page 991

Command 'Send to Back'


Symbol:
Function: The command numbers the elements so that the selected elements
are located at the end of the execution order.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 989 / 1158
Menu commands

Call: Menu bar: “CFC 🠂 Execution Order”; context menu: “Execution Order”
Requirements: A CFC editor is active and the “Explicit Execution Order Mode”
property is selected. At least one element is selected.

The selected elements get the highest numbers while keeping the previous
order. The remaining elements are numbered so that their execution order
remains the same. The topological positions of the elements are retained
anyway.

See also
● ⮫ Chapter Automatic execution order according to data flow on page 180
● ⮫ Chapter Dialog 'Properties' - 'CFC Execution Order' on page 1055

User interface
● ⮫ Chapter Command 'Send to Front' on page 988
● ⮫ Chapter Command 'Move Up' on page 989
● ⮫ Chapter Command 'Move Down' on page 989
● ⮫ Chapter Command 'Order by Data Flow' on page 990
● ⮫ Chapter Command 'Order by Topology' on page 991

Command 'Move Up'


Symbol:
Function: The command numbers the elements so that the selected elements
are located one position forward.
Call: Menu bar: “CFC 🠂 Execution Order”; context menu: “Execution Order”
Requirements: A CFC editor is active and at least one element is selected. The
“Explicit Execution Order Mode” property is selected.

The selected elements get a numbering decreased by one while keeping the
previous order. The selected elements are processed one position earlier. The
remaining elements are numbered so that their execution order remains the
same. The topological positions of the elements are retained anyway.

See also
● ⮫ Chapter Automatic execution order according to data flow on page 180
● ⮫ Chapter Dialog 'Properties' - 'CFC Execution Order' on page 1055
● ⮫ Chapter Command 'Send to Front' on page 988
● ⮫ Chapter Command 'Send to Back' on page 988
● ⮫ Chapter Command 'Move Down' on page 989
● ⮫ Chapter Command 'Order by Data Flow' on page 990
● ⮫ Chapter Command 'Order by Topology' on page 991

Command 'Move Down'


Symbol:
Function: The command numbers the elements so that the selected elements
are located one position backward.
Call: Menu bar: “CFC 🠂 Execution Order”; context menu: “Execution Order”
Requirements: A CFC editor is active and at least one element is selected. The
“Explicit Execution Order Mode” property is selected.

The selected elements get a numbering increased by one while keeping the
previous order. The elements are processed one position later. The remaining
elements are numbered so that their execution order remains the same. The
topological positions of the elements are retained anyway.

R911403764, Edition 08 Bosch Rexroth AG


990 / 1158 ctrlX PLC Engineering
Menu commands

See also
● ⮫ Chapter Automatic execution order according to data flow on page 180
● ⮫ Chapter Dialog 'Properties' - 'CFC Execution Order' on page 1055
● ⮫ Chapter Command 'Send to Front' on page 988
● ⮫ Chapter Command 'Send to Back' on page 988
● ⮫ Chapter Command 'Move Up' on page 989
● ⮫ Chapter Command 'Order by Data Flow' on page 990
● ⮫ Chapter Command 'Order by Topology' on page 991

Command 'Set Execution Order'


Function: The command opens a dialog for setting the number of the selected
element to any value.
Call: Menu bar: “CFC 🠂 Execution Order”; context menu: “Execution Order”
Requirements: A CFC editor is active and the “Explicit Execution Order Mode”
property is selected. Exactly one element is selected.

The selected element gets the number specified in the dialog. The remaining
elements are numbered so that their execution order remains the same. The
topological positions of the elements are retained anyway.

See also
● ⮫ Chapter Automatic execution order according to data flow on page 180
● ⮫ Chapter Dialog 'Properties' - 'CFC Execution Order' on page 1055
● ⮫ Chapter Command 'Send to Front' on page 988
● ⮫ Chapter Command 'Send to Back' on page 988
● ⮫ Chapter Command 'Move Up' on page 989
● ⮫ Chapter Command 'Move Down' on page 989
● ⮫ Chapter Command 'Order by Data Flow' on page 990
● ⮫ Chapter Command 'Order by Topology' on page 991

Command 'Order by Data Flow'


Function: The command numbers the elements in the program by data flow, or
in the case of multiple networks by their topological position in the editor.
Call: Menu bar: “CFC 🠂 Execution Order”; context menu: “Execution Order”
Requirements: A CFC editor is active and the “Explicit Execution Order Mode”
property is selected.
The command is also available when no element is selected.

The execution order is determined by data flow. In the case of multiple net-
works, it is determined by their topological position of the networks. All num-
bered elements of the POU are set accordingly. Afterwards, the execution order
is identical to that in auto data flow mode. The topological positions of the
elements are retained anyway.

See also
● ⮫ Chapter Automatic execution order according to data flow on page 180
● ⮫ Chapter Dialog 'Properties' - 'CFC Execution Order' on page 1055
● ⮫ Chapter Command 'Send to Front' on page 988
● ⮫ Chapter Command 'Send to Back' on page 988
● ⮫ Chapter Command 'Move Up' on page 989
● ⮫ Chapter Command 'Move Down' on page 989
● ⮫ Chapter Command 'Order by Topology' on page 991

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 991 / 1158
Menu commands

Command 'Order by Topology'


Function: The command orders the execution order of the elements by their
topological position from right to left and from top to bottom.
Call: Menu bar: “CFC 🠂 Execution Order”; context menu: “Execution Order”
Requirements: A CFC editor is active and the “Explicit Execution Order Mode”
property is selected. At least one element is selected.

The command applies to all elements in the program, even if not all elements
are selected when the command is executed. The topological positions of the
elements are retained anyway.

See also

User interface
● ⮫ Chapter Automatic execution order according to data flow on page 180
● ⮫ Chapter Dialog 'Properties' - 'CFC Execution Order' on page 1055
● ⮫ Chapter Command 'Send to Front' on page 988
● ⮫ Chapter Command 'Send to Back' on page 988
● ⮫ Chapter Command 'Move Up' on page 989
● ⮫ Chapter Command 'Move Down' on page 989
● ⮫ Chapter Command 'Order by Data Flow' on page 990

Command 'Edit Parameters'


Function: This command opens the “Edit Parameters” dialog box, where you
change the constant input parameters of a function block.
Call: Main menu “CFC 🠂 Edit Parameters”, or “Right-Click 🠂 Edit Parameters”,
click the “Parameter” function block.
Requirements: A CFC editor is active. An instantiated function block has
VAR_INPUT CONSTANT variables in its declaration.
This functionality applies only to blocks that are inserted in a CFC with PLC
Engineering >= V3.5 SP4.
PLC Engineering displays blocks with VAR_INPUT CONSTANT variables by the
word “Parameter” in the lower left corner of the block.

Dialog Box 'Edit Parameters'


“Parameters” Name of the variable
“Type” Data type of the variables
“Value” Click into the field to type a value.
“Initial Value” Initialization Value
“Category” Additional information about the parameters; these values are defined
“Unit” by attributes and cannot be changed in this dialog box.
“Min” ● parameterCategory
“Max” ● parameterUnit
● parameterMinValue
● parameterMaxValue
“Delete Prepared This command is active when you write a prepared value (“Debug
Parameters” 🠂 Write Value”).
When you exit the field and the dialog box by clicking “OK”, the value changes
are applied to the project.

R911403764, Edition 08 Bosch Rexroth AG


992 / 1158 ctrlX PLC Engineering
Menu commands

Example of a block with constant inputs


FUNCTION_BLOCK FB1
VAR_INPUT CONSTANT
{attribute 'parameterCategory':='General'}
{attribute 'parameterUnit':= 'm/s'}
{attribute 'parameterMinValue':= '0'}
{attribute 'parameterMaxValue':= '100'}
fbin1:INT;
fbin2:DWORD:=24354333;
fbin3:STRING:='abc';
END_VAR

This functionality and the declaration of variables with keyword VAR_INPUT


CONSTANT applies only to the CFC editor. In the FBD editor, PLC Engineering
always shows all input parameters on the block, regardless of whether or not
they are declared as VAR_INPUT or VAR_INPUT CONSTANT. PLC Engineering
also does not make a distinction about this in text editors.
See also
● ⮫ Chapter CFC Editor in Online Mode on page 430
● ⮫ Chapter Command 'Save Prepared Parameters to Project' on page 992

Command 'Save Prepared Parameters to Project'


Function: This command saves the prepared parameter values to the project.
Call: Main menu “CFC”.
Requirements: A CFC editor is active. Parameter values of function block
instances are changed in online mode. You are in offline mode.
If the values of constants on the controller are different from the values in
the application, then this is indicated by a red asterisk next to the parameter
field. Clicking “Incur Prepared Parameters” saves the controller values to the
application.
See also
● ⮫ Changing of constant input parameters of function block instances
on page 432
● ⮫ Chapter Command 'Edit Parameters' on page 991

Command 'Connect Selected Pins'


Symbol:
Function: The command establishes a connection between the selected pins.
Call: Main menu “CFC”, context menu
Requirements: A CFC editor is active. Precisely one output and several inputs
are selected.
In order to select the pins you must keep the [CTRL] key pressed while clicking
on the pins. Then you execute the command.
See also
● ⮫ Chapter Command 'Select Connected Pins' on page 993

Command 'Unlock Connection'


Symbol:
Function: This command unlocks a disabled connection.
Call: Main menu “CFC 🠂 Routing”, context menu “Routing”
Requirements: A CFC editor is active. A connection or a connection mark is
selected.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 993 / 1158
Menu commands

You obtain a disabled connection if you change the connections of the auto-
matic routing. If you wish to carry out automatic routing again, you must first
unlock a disabled connection.
With a mouse-click on the icon of a disabled connection you can similarly
unlock this connection.
See also
● ⮫ Chapter Programming in the CFC editor on page 184
● ⮫ Chapter CFC Element 'Connection Mark - Source/Sink' on page 437

Command 'Show Next Collision'


Function: This command displays the next collision in the editor and marks the
place concerned.

User interface
Call: Menu menu “CFC 🠂 Routing”, context menu “Routing”
Requirements: A CFC editor is active and at least one connection with a colli-
sion is present.
This function is very useful if you operate with large networks and see only one
sub-area. A collision is additionally indicated to you by the red bordered symbol
in the top right corner of the editor.

Command 'Select Connected Pins'


Symbol: ; shortcut: [Ctrl]+[Left Arrow], or [Ctrl]+[Right Arrow]
Function: The command selects all pins that are connected to the currently
selected line, or connected to the currently selected connection mark in page-
oriented CFC.
Call: “CFC” menu; context menu
Requirements: A CFC editor or a page-oriented CFC editor is active. One
line and therefore exactly one connection or exactly one connection mark is
selected.

See also
● ⮫ Chapter CFC editor on page 425
● ⮫ Chapter CFC editor, page-oriented on page 428
● ⮫ Chapter CFC Element 'Connection Mark - Source/Sink' on page 437

Command 'Reset Pins'


Symbol: , [Ctrl]+[U]
Function: The command restores the deleted pins of a box.
Call: “CFC 🠂 Pins” menu; “Pins” in the context menu
Requirements: A CFC editor is active and a box is selected.
The command restores all inputs and outputs of the box as they are defined in
their implementation.
See also
● ⮫ Chapter Command 'Remove Unused Pins' on page 993

Command 'Remove Unused Pins'


Symbol:
Function: The command removes all unused pins of the selected element.
Call: Menu “CFC 🠂 Pins”, context menu “Pins”
Requirements: A CFC editor is active. An element is selected.
See also
● ⮫ Chapter Command 'Reset Pins' on page 993

R911403764, Edition 08 Bosch Rexroth AG


994 / 1158 ctrlX PLC Engineering
Menu commands

Command 'Add Input Pin'


Symbol:
Function: The command adds a further input to the selected function block.
Call: Main menu “CFC 🠂 Pins”, context menu “Pins”
Requirements: A CFC editor is active. A function block is selected.
See also
● ⮫ Chapter Command 'Add Output Pin' on page 994

Command 'Add Output Pin'


Symbol:
Function: The command adds a further output to the selected function block.
Call: Main menu “CFC 🠂 Pins”, context menu “Pins”
Requirements: A CFC editor is active. A suitable function block is selected.
See also
● ⮫ Chapter Command 'Add Input Pin' on page 994

Command 'Route All Connections'


Symbol:
Function: This command cancels all manual changes to the connections in the
program and re-establishes the original state.
Call: Main menu “CFC 🠂 Routing”, context menu “Routing”
Requirements: A CFC editor is active.
PLC Engineering cannot automatically route connections that are fixed by con-
trol points. You must remove the control points before executing the command.
Use the “Remove Control Point” command to do this. Furthermore you must
disconnect connections that have been changed manually and are marked by
the icon. Use the “Disconnect Connection” command to do this.
See also
● ⮫ Chapter Command 'Remove Control Point' on page 994
● ⮫ Chapter Command 'Unlock Connection' on page 992

Command 'Remove Control Point'


Function: This command removes a control point.
Call: Context menu “Routing”
Requirements: A CFC editor is active. You have selected a connecting line.
If you move the mouse pointer over a selected connecting line, the existing
control points are displayed with yellow circle symbols. Set the cursor on the
control point to be deleted and execute the command from the context menu.
See also
● ⮫ Chapter CFC Element 'Control Point' on page 435
● ⮫ Chapter Command 'Create Control Point' on page 994

Command 'Create Control Point'


Symbol:
Function: The command creates a control point on a connecting line.
Call: Context menu “Routing”
Requirements: A CFC editor is active. The cursor is over a connection.
The control point is created in the position on the connection at which the
cursor is located when calling the command. The command corresponds to the
“Control Point” element in the “Tools” window.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 995 / 1158
Menu commands

See also
● ⮫ Chapter CFC Element 'Control Point' on page 435
● ⮫ Chapter Command 'Remove Control Point' on page 994

Command 'Connection Mark'


Symbol:
Function: This command switches the display of the connection between two
elements back and forth between a connecting line and the use of connection
marks.
Call: Main menu “CFC”, context menu
Requirements: A CFC editor is active. A connection or a connection mark is

User interface
selected.
If you have selected a connecting line, the command removes this line and adds
a “Connection Mark - Source” at the output of one element and a “Connection
Mark - Sink” at the input of the other. Both are given the same name by default,
“C-<n>”, where n is a sequential number.
If you select a pair of connection marks, the command converts these marks
into a connecting line.
See also
● ⮫ Chapter CFC Element 'Connection Mark - Source/Sink' on page 437

Command 'Create group'


Symbol:
Function: This command groups the selected elements.
Call: Main menu “CFC 🠂 Group”, context menu “Group”
Requirements: A CFC editor is active. Several elements are selected.

Grouped elements can only be moved together. The position of the elements is
not affected by the grouping.
See also
● ⮫ Chapter Command 'Ungroup' on page 995

Command 'Ungroup'
Symbol:
Function: The command undoes a previous grouping.
Call: Main menu “CFC 🠂 Group”, context menu “Group”
Requirements: A CFC editor is active. A grouping is selected.
See also
● ⮫ Chapter Command 'Create group' on page 995

Command 'Prepare Box for Forcing'


This command is required when using compiler versions 3.5.11.x and 3.5.12.x.
The command is no longer required for compiler versions >= 3.5.13.0.
Function: The command activates and deactivates the forceability of the inputs
for a function block element.
Call:
● CFC
● Context menu
Requirements: The CFC editor is in offline mode and a function block element
is selected.

R911403764, Edition 08 Bosch Rexroth AG


996 / 1158 ctrlX PLC Engineering
Menu commands

After executing the command, the “Force Function Block Input” command is
available in online mode to open a dialog for forcing the box input values.
See also
● ⮫ Chapter Command 'Force Function Block Input' on page 996
● ⮫ Chapter CFC editor on page 425
● ⮫ Chapter 21.5 Forcing and writing of variables on page 277

Command 'Force Function Block Input'


This kind of forcing uses a data breakpoint internally
NOTICE
and is therefore different from forcing with the “Force
Values” command or [F7].
Values that were forced by the command “Force FB
Input” do not respond to the commands “Show All
Forces” or “Unforce Values”.
Function: The command opens the “Force Value” dialog to force the selected
input of a function block. Forcing can be canceled with the same command and
dialog.
Call:
● CFC
● Context menu
Requirements:
● The CFC editor is in online mode and the input of the function block is
selected.
● For compiler versions 3.5.11.x and 3.5.12.x, the "forceability" of the function
block is enabled by the “Prepare Box for Forcing” command.
In the “Force Value” dialog, you can either specify a value that the input of the
function block should be forced, or remove the currently forced value.
After forcing, the input is highlighted in green again. Boolean inputs get a small
monitoring view with the forced value. The forced value is displayed in the
“Value” column of monitoring views (in the declaration part of the POU or in a
watch list).

Dialog 'Force Value'


“Expression” Name of the function block input. Example: TON_1.IN.
“Type” Data type of the input
Table 133: “What do you want to do?”
“Set a new value to force” : You can specify a new value in the input field. The format has to
correspond to the data type.
“Remove value” : Forcing at the input is canceled.
See also
● ⮫ Chapter CFC editor on page 425
● ⮫ Chapter 21.5 Forcing and writing of variables on page 277
● ⮫ Chapter Command 'Prepare Box for Forcing' on page 995

Command 'Use Attributed Member as Input'


Symbol:
Function: This command allows for connecting a structure member to a scalar
type input.
Call: Menu bar: “CFC 🠂 Pins”; context menu: “Pins”
Requirements: A CFC editor is active and a function block input is selected.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 997 / 1158
Menu commands

The member of the structure that is connected to the input of the sub-
sequent function block must be provided with the pragma {attribute
'ProcessValue'}. The data type of the structure member has to be compat-
ible with the data type of the subsequent input. Inputs connected in this way
are flagged with the "V" symbol.

Example

TYPE QINT :
STRUCT
Status : STRING;
{attribute 'ProcessValue'}
Value1 : INT;

User interface
Value2 : INT;
END_STRUCT
END_TYPE

PROGRAM PLC_PRG
VAR
input1: QINT;
output1: QINT;
intValue: INT;
END_VAR

If you do not execute the command “Use attributed member as input” for this
link, then a compiler error is issued.

See also
● ⮫ Chapter Attribute 'ProcessValue' on page 645

33.3.14 “FBD/LD/IL” menu


Command 'Insert Network'
Symbol: , shortcut: [Ctrl] + [I]
Function: This command inserts a further network in the FBD/LD/IL editor.
Call: Main menu “FBD, LD, IL”, context menu
Requirements: The FBD, LD or IL editor is active. No box is selected.
See also
● ⮫ Chapter FBD/LD/IL Element 'Network' on page 419
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter Command 'Insert Network (Below)' on page 997

Command 'Insert Network (Below)'


Symbol: , shortcut: [Ctrl]+ [T]
Function: This command inserts a further network in the FBD/LD/IL editor
below the selected network.
Call: Main menu “FBD, LD, IL”, context menu

R911403764, Edition 08 Bosch Rexroth AG


998 / 1158 ctrlX PLC Engineering
Menu commands

Requirements: The FBD, LD or IL editor is active. A network is selected. No box


is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Toggle Network Comment State'


Symbol: , shortcut: [Ctrl] + [O]
Function: The command comments the selected network in or out.
Call: Main menu “FBD, LD, IL”, context menu
Requirements: The FBD, LD or IL editor is active. A network is selected, but no
box is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Insert Assignment'


Symbol , shortcut: [Ctrl] + [A]
Function: This command inserts an assignment in the FBD or LD editor.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The FBD, LD or IL editor is active. A network is selected, but no
box is selected.
In IL an assignment is programmed via the operators LD and ST.

See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Insert Box'


Symbol: , shortcut: [Ctrl] + [B]
Function: This command inserts a box that is available in the project at the end
of the selected network.
Call: Main menu “FBD, LD, IL”, context menu
Requirements: The FBD, LD or IL editor is active. A network is selected, but no
box is selected.
If you select this command the input assistant opens, where you can select the
desired box.
See also
● ⮫ Chapter FBD/LD/IL Element 'Box' on page 419
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter 18.5 Using the input assistance on page 131

Command 'Insert Box with EN/ENO'


Symbol: , shortcut: [Ctrl] + [Shift ]+ [E]
Function: This command inserts a box with a boolean input “Enable” and a
boolean output “Enable Out” at the end of the selected network.
Call: Main menu “FBD, LD, IL”, context menu
Requirements: the FBD, LD or IL editor is active. A network is selected, but no
box is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter 18.5 Using the input assistance on page 131

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 999 / 1158
Menu commands

Command 'Insert Empty Box'


Symbol: , shortcut: [Ctrl] + [Shift] + [B]
Function: This command inserts an empty function block at the end of the
currently selected network.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The FBD, LD or IL editor is active. A network is selected, but no
box is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Insert Empty Box with EN/ENO'

User interface
Symbol:
Function: The command inserts an empty box with a Boolean input “Enable”
and a Boolean output “Enable Out” at the end of the selected network.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The FBD editor, the IL editor or the LD editor is active. A net-
work must be selected. No other box may be selected.
If “Enable” has the value FALSE at the time of the function block call, then the
operations defined in the fb are not executed. Otherwise, if “Enable” has the
value TRUE, these operations are executed. The ENO output acts as a repeater
of the EN input.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Insert Box Parallel (Below)'


Function: This command inserts an empty box parallel below the selected func-
tion block.
Call: Menu bar: “FBD/LD/IL”; context menu.
Requirements: A box is selected in the LD editor.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Insert Jump'


Symbol , shortcut: [Ctrl]+[L]
Function: This command inserts a jump element before the selected element.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The FBD, LD or IL editor is active. A connecting line is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter FBD/LD/IL Element 'Jump' on page 421

Command 'Insert Label'


Symbol:
Function: This command inserts a jump label into the currently selected net-
work.
Call: Main menu “FBD, LD, IL”, context menu
Requirements: The FBD, LD or IL editor is active. A network is selected. No
jump label is selected.

R911403764, Edition 08 Bosch Rexroth AG


1000 / ctrlX PLC Engineering
1158 Menu commands

See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter FBD/LD/IL Element 'Label' on page 420

Command 'Insert Return'


Symbol:
Function: This command inserts an element “Return” in the selected place.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The FBD, LD or IL editor is active. A box output is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter FBD/LD/IL Element 'Return' on page 421

Command 'Insert Input'


Symbol: , shortcut: [Ctrl]+[Q]
Function: This command adds a further input to an extendable box (ADD, OR,
ADD, MUL, SEL) above the selected input.
Call: “FBD/LD/IL” menu
Requirements: The FBD or LD editor is active. An input of a box is selected.
If a box is selected, the command “Append Input” is available in the context
menu. The input is inserted at the lower end of the box.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Insert Coil'


Symbol: , shortcut: [Ctrl] + [A]
Function: This command inserts a coil into the network.
Call: Main menu “FBD, LD, IL”, context menu
Requirements: The LD editor is active. A network, a coil or a connecting line is
selected, but no box is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter LD Element 'Coil' on page 423

Command 'Insert Set Coil'


Symbol:
Function: This command inserts a set coil into the network.
Call: Main menu “FBD, LD, IL”, context menu
Requirements: The LD editor is active. A network, a coil or a line is selected,
but no box is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

"Insert reset coil" command


Symbol:
Function: this command inserts a reset coil into the network.
Call: Menu “FBD/LD/IL”, context menu
Prerequisites: the LD editor is active. A network, a coil or a line is selected. No
function block is selected.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1001 /
Menu commands 1158

Also refer to
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter LD Element 'Coil' on page 423
● ⮫ Chapter Ladder diagram (LD) on page 175

Command 'Insert Contact'


Symbol , shortcut: [Ctrl] + [K]
Function: This command inserts a contact to the left of the selected element.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The LD editor is active. A line or a contact is selected.
See also

User interface
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter LD Element 'Contact' on page 423

Command 'Insert Contact (Right)'


Symbol: , shortcut: [Ctrl] + [D]
Function: This command inserts a contact to the right of the selected element.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The LD editor is active. A line, a contact or a box is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter LD Element 'Contact' on page 423

Command 'Insert Contact in Parallel (Below)'


Symbol: ; keyboard shortcut: [Ctrl]+[R]
Function: This command inserts a contact with lines in parallel with and below
the selected element.
Call: Menu bar: “FBD/LD/IL”; context menu.
Requirements: The LD editor is active. A line or a contact or a box is selected.

You can program closed parallel branches in a LD network as short circuit


evaluation (SCE) or OR constructs. SCE branches are displayed with double
vertical lines, and OR branches with single lines. Refer to the help page for
"Closed branches".

See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter Command 'Insert Contact in Parallel (Above)' on page 1001
● ⮫ Chapter Closed Branch on page 421

Command 'Insert Contact in Parallel (Above)'


Symbol: ; keyboard shortcut: [Ctrl]+[P]
Function: This command inserts a contact with lines in parallel with and above
the selected element.
Call: Menu bar: “FBD/LD/IL”; context menu.
Requirements: The LD editor is active. A line, a contact or a box is selected.

You can program closed parallel branches in a LD network as short circuit


evaluation (SCE) or OR constructs. SCE branches are displayed with double
vertical lines, and OR branches with single lines. Refer to the help page for
"Closed branches".

R911403764, Edition 08 Bosch Rexroth AG


1002 / ctrlX PLC Engineering
1158 Menu commands

See also
● ⮫ Chapter LD Element 'Contact' on page 423
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter Closed Branch on page 421

Command 'Toggle Parallel Mode'


Function: This command toggles a parallel branch between an OR construct
and the Short Circuit Evaluation (SCE) .
Call: Menu bar: “FBD/LD/IL”; context menu.
Requirements: The LD editor is active. A vertical line of a parallel branch is
selected.

You can program closed parallel branches in a LD network as short circuit


evaluation (SCE) or OR constructs. SCE branches are displayed with double
vertical lines, and OR branches with single lines. Refer to the help page for
"Closed branches".

See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter Closed Branch on page 421

Command 'Insert Negated Contact'


Symbol: , shortcut: [Ctrl] + [K]
Function: This command inserts a negated contact to the left of the selected
element.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The LD editor is active. A line or a contact is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter LD Element 'Contact' on page 423

Command 'Insert Negated Contact Parallel (Below)'


Symbol:
Function: The command inserts a negated contact with lines in parallel with
and below the selected element.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The LD editor is active. A line, a contact or a box is selected.
See also
● ⮫ FBD and LD editor on page 410
● ⮫ Chapter Programming Ladder Diagrams (LD) on page 176

Command 'Paste Contacts: Paste Below'


Shortcut: [Ctrl] + [F]
Function: This command inserts a previously copied contact with lines below
the selected element.
Call: Main menu “FBD/LD/IL 🠂 Paste”, context menu
Requirements: the LD editor is active.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter LD Element 'Contact' on page 423

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1003 /
Menu commands 1158

Command 'Paste Contacts: Paste Above'


Shortcut: [Ctrl] + [F]
Function: This command inserts a previously copied contact with lines above
the selected element.
Call: Main menu “FBD/LD/IL 🠂 Paste Contacts”, context menu
Requirements: the LD editor is active. A line or a contact is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter LD Element 'Contact' on page 423

Command 'Paste Contacts: Paste Right (After)'

User interface
Shortcut: [Ctrl] + [G]
Function: this command inserts a previously copied contact to the right of the
selected element.
Call: Main menu “FBD/LD/IL 🠂 Paste Contacts”, context menu
Requirements: The LD editor is active. A line or a contact is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter LD Element 'Contact' on page 423

Command 'Insert IL Line Below'


Symbol:
Function: The command inserts an instruction line below the selected line.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The IL editor is active. A line is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Delete IL Line'


Symbol: , shortcut: [Ctrl]+[Del]
Function: This command deletes the selected instruction line.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The IL editor is active. A line is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Negation'
Symbol: , shortcut: [Ctrl] + [N]
Function: This command negates the following elements:
● Input/output of a box
● Jump
● Return
● Coil
Call: Main menu “FBD/LD/IL”, context menu
Requirements: the FBD or LD editor is active. The corresponding element is
selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

R911403764, Edition 08 Bosch Rexroth AG


1004 / ctrlX PLC Engineering
1158 Menu commands

Command 'Edge Detection'


Symbol FBD: , symbol LD: , shortcut: [Ctrl] + [N]
Function: This command inserts an edge detector before the selected box input
or box output.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The FBD or LD editor is active. A box input or box output is
selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Set/Reset'
Symbol: , shortcut [Ctrl] + [M]
Function: In the case of an element with a boolean output, this command
switches between reset, set and no mark.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The FBD or LD editor is active. An element with a boolean
output is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Set Output Connection'


Symbol: , shortcut [Ctrl]+ [W]
Function: This command turns the selected box output into the forwarding box
output.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The FBD or LD editor is active. One of several box outputs is
selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Insert Branch'


Symbol: , shortcut [Ctrl] + [Shift] + [V]
Function: This command creates an open line branch on the selected line.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The FBD or LD editor is active. An input or an output of a box is
selected.
See also
● ⮫ Chapter FBD/LD/IL Element 'Branch' on page 424
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Insert Branch Above'


Symbol:
Function: This command inserts a line branch above the selected open line
branch.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The FBD or LD editor is active. An open line branch is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter FBD/LD/IL Element 'Branch' on page 424

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1005 /
Menu commands 1158

Command 'Insert Branch Below'


Symbol:
Function: This command inserts a line branch below the selected open line
branch.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The FBD or LD editor is active. An open line branch is selected.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter FBD/LD/IL Element 'Branch' on page 424

Command 'Set Branch Start Point'

User interface
Symbol
Function: This command sets the starting point of a line branch on the selected
line.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The LD editor is active. A line is selected.
See also
● ⮫ Chapter Closed Branch on page 421
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Set Branch End Point'


Symbol
Function: This command sets the end point of a line branch on the selected
line.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The LD editor is active. A line is selected. A starting point of the
line branch has been set.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410
● ⮫ Chapter Closed Branch on page 421

Command 'Update Parameters'


Function: This command enters changes to the declaration of the selected
element in the diagram.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The FBD, LD or CFC editor is active. A box is selected. An
extending change has been made to the declaration.
The command checks whether a box and its declaration in the declaration
editor correspond. The change is accepted for the box only if the declaration
was extended. Deletions and overwrites are not updated.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Remove Unused FB Call Parameters'


Symbol:
Function: This command deletes inputs and outputs of the selected box to
which no variable and no value were assigned. However, the default inputs and
outputs are always retained.
Call: Main menu “FBD/LD/IL”, context menu

R911403764, Edition 08 Bosch Rexroth AG


1006 / ctrlX PLC Engineering
1158 Menu commands

Requirements: The FBD or LD editor is active. A box is selected. The box has
interfaces to which no value is assigned.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Repair POU'


Symbol:
Function: This command repairs internal inconsistencies in the selected box.
Call: Main menu “FBD/LD/IL”, context menu
Requirements: The FBD or LD editor is active. The defective box is selected.
The editor has found internal inconsistencies in the programming module that
can possibly be resolved automatically. PLC Engineering reports the inconsis-
tencies in the Message window.
This situation is conceivable when editing a project that was created with an
older programming system version that did not yet handle the inconsistency
concerned as an error.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'View as Function Block Diagram'


Loss of data! An error-free conversion requires syntacti-
CAUTION
cally correct code. Otherwise parts of the implementa-
tion can be lost.
Shortcut: [Ctrl] + [1]
Function: This command converts the active instruction list or the active ladder
diagram into the function block diagram.
Call: Menu “FBD/LD/IL 🠂 View”
Requirements: The LD or IL editor is active.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'View as Ladder Logic'


Loss of data! An error-free conversion requires syntacti-
CAUTION
cally correct code. Otherwise parts of the implementa-
tion can be lost.
Shortcut: [Ctrl] + [2]
Function: This command converts the current function block code or the active
instruction list into a ladder diagram.
Call: Menu “FBD/LD/IL 🠂 View”
Requirements: The FBD or IL editor is active.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'View as Instruction List'


If necessary, IL can be activated in the PLC Engineering options.

Loss of data! An error-free conversion requires syntacti-


CAUTION
cally correct code. Otherwise parts of the implementa-
tion can be lost.
Shortcut: [Ctrl] + [3]

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1007 /
Menu commands 1158

Function: This command converts the active function block code or the active
ladder diagram into an instruction list.
Call: Menu “FBD/LD/IL 🠂 View”
Requirements: The LD or FBD editor is active.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

Command 'Go to'


Symbol:
Function: This command allows you to jump to any network.
Call: Main menu “FBD/LD/IL”

User interface
Requirements: The LD, FBD or IL editor is active. A network is selected.
This command opens a dialog box with an input field. Enter the number of the
desired network in the input field.
See also
● ⮫ Chapter FBD/LD/IL Editor on page 410

33.3.15 "Library" menu


Command 'Add Library'
Function: The command opens the “Add Library” dialog. In this dialog, you can
add libraries to the Library Manager and then integrate them in your applica-
tion.
Call: Menu bar: “Libraries”
Requirement: The Library Manager is open in the editor.

Dialog 'Add Library'


In the line above the library list, you can search for library names or library modules by typing an
appropriate string.
“Library” Suitable libraries that are installed in the library repository. For
example, the selection of libraries is defined in the device description
or by the system integrator.
By default, the displayed libraries are grouped into categories.
“Company” Vendor of the library
“Advanced” Opens the advanced “Add Library” dialog
The displayed libraries are grouped into categories.
The displayed libraries are listed in alphabetical order.
All available libraries are displayed.
Specific libraries can be blacklisted in a device description. These libraries
cannot be added below this device in the Library Manager.
See also
● ⮫ Chapter Command 'Library Repository' on page 969

Dialog 'Add Library' – 'Advanced'


You should use this dialog only if you have expert knowledge of library refer-
encing. Using this dialog, you can link special versions or change placeholder
definitions.
We recommend seriously that you follow the guidelines for the creation of
libraries when developing and referencing libraries.

R911403764, Edition 08 Bosch Rexroth AG


1008 / ctrlX PLC Engineering
1158 Menu commands

Table 134: Tab 'Library'


“Company” Filtering the list according to vendor
“Group by category” : Display of the libraries in a tree structure grouped in categories.
: Display of the libraries in alphabetical order in a flat structure.
“Display all versions” : Display of all versions of the libraries. Version specification '*'
means the latest version available in the repository.
: Display of the latest versions of the libraries only. A multiple selec-
tion of libraries is possible in this display. To do this, hold down the
[Shift] key and select the entries.
“Details” Opens a detailed view with the library modules.
“Library Repository” Opens the “Library Repository” dialog. There you can install more
libraries to your local system.
Table 135: Tab 'Placeholder'
“Placeholder name” The input field provides a combo box for entering the valid placeholder
names that are read from the currently accessible device descriptions.
You can also enter a new placeholder name in order to define a free
placeholder, which is not resolved by the device or by the library pro-
file.
“Default library” PLC Engineering uses this library when for any reason no device is
available that the resolution defines. In this way it is possible to com-
pile the current project without errors.
Note about placeholder resolution
For compiler version V3.5.8.0 and later, the following statement applies in the
case of library placeholders with a resolution in the device description that
are located in the Library Manager of the POU pool. This placeholder is always
resolved automatically according to the description of the device that compiles
the application.
See also
● ⮫ Chapter 27.3 Information for library developers on page 330
● ⮫ Chapter 'Placeholder' command on page 1010

Command 'Try to Reload Library'


Function: This command tries to reload the selected library.
Call: Main menu “Library”.
Requirement: A library is selected that failed to load.
If for any reason a library is not available in the defined repository location
when a project is opened, PLC Engineering displays a corresponding error
message. Once you have rectified the error, i.e. when the library is properly
available again, you can reload the library with this command without having to
leave the project.
See also
● ⮫ Chapter Command 'Library Repository' on page 969

Command 'Properties'
Function: The command opens the “Properties” dialog for the library selected
in the Library Manager.
Call
● Menu bar: “Library”
● Context menu of the selected library
● Symbol in the toolbar of the Library Manager
Requirement: A library is selected.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1009 /
Menu commands 1158

This dialog is intended for library developers. Use this


NOTICE
only if you have profound knowledge of library refer-
encing. In addition, follow the guidelines for library
developers.
See also
● ⮫ Chapter 27.3 Information for library developers on page 330

Dialog 'Properties'
Table 136: “General”
“Namespace” Namespace of the selected library. By default, this is identical to the
library name, unless it was defined explicitly in the project information

User interface
when the library was created. You can change the namespace for the
open project.
Example: LA
“Default”: Library that triggers the placeholder when no other trigger is defined
or is possible.
Requirement: The selected library is a library placeholder, and there-
fore the setting is available.
Note: For compiler version 3.5.8.0 and higher, the following state-
ment applies in the case of library placeholders with a resolution
in the device description that are located in the Library Manager of
the “POUs” view. This placeholder is always resolved automatically
according to the description of the device that compiles the applica-
tion.
If the selected library is developed in compliance with the "Guidelines for
Developing Libraries", then we do not recommend that you change the fol-
lowing settings.
Table 137: “Version”
Selection of version constraint
Requirement: The settings are available only if the selected library is not a library placeholder.
Note: Container and interface libraries are created automatically with library references with ver-
sion constraint. As far as possible, do not create libraries that include library references with
version constraint. Otherwise, you reference the libraries by placeholders. Edit a placeholder reso-
lution in the “Placeholders” dialog.
“Exact version” : (selected from list box) Version is integrated into the project.
Note: This option is strongly recommended for container libraries, and
it is usually preset for this library type.
“Always newest version” : The library repository is scanned and the latest detected version is
integrated.
Note: If a newer library version is available, then the library POUs that
are actually used can change. This option is strongly recommended for
interface libraries, and it is usually preset for this library type.
Table 138: “Visibility”
“Allow only qualified access : Library POUs (and variables) are called in the project only with
to all identifiers” prepended namespace paths.
“When the current project Note: Changing the following settings makes sense only if you created
is referenced as a library in a library with your project and therefore opened a library project. In
another project ” this way, the selected library is referenced in the new library.

R911403764, Edition 08 Bosch Rexroth AG


1010 / ctrlX PLC Engineering
1158 Menu commands

“Make visible all IEC : As a container library, the selected library makes the contents of
symbols in the project if is the referenced library visible at the top level (later in a project).
this reference were directly Requirement: A container project is created with a library project. A
integrated here.” container library does not implement its own POUs, but references
other libraries exclusively. It bundles libraries. A container library can
be employed sensibly to bundle multiple libraries (in a reference) in a
project. This option must be activated for each library reference.
Symbolic access to library POUs: <namespace of container
library>.<POU name>
: The contents of the referenced library is accessed uniquely by
means of the namespace. The path name consists of the library name
and the unique name (library reference), and it is prepended to the
POU name.
Requirement: No container project is created with a library project.
“Do not show this reference : The selected library is not displayed in the Library Manager as a
in the dependency tree.” library reference (later in a project). The library is a hidden reference.
Warning: If there are compile errors resulting from hidden library
errors, then detecting the errors may be difficult.
: The selected library is displayed as a library reference (later in a
project).
“Optional (if the library is : The selected library is treated as optional. When downloading the
missing, no error will be project that references the library, no error is reported, even if the
reported).” library is not available in the library repository.
See also
● ⮫ Chapter 'Placeholder' command on page 1010

'Placeholder' command
Function: The command opens the “Placeholder” dialog. The dialog provides
information about the selected placeholder library and allows to assign a reso-
lution specifically valid for the project.
Remark
NOTICE
The compilation process always takes place for a specific
application. Consequently, libraries have to be available
for the library entries contained in a library manager.
The resolution of placeholders in the various library man-
agers of a project (applications, POUs pool) is a complex
process. The result of a resolution is only visible during
the compilation and cannot be reliably read beforehand
from the placeholder information in the library man-
agers.
Call:
● “Libraries” menu
● symbol in the top part of the toolbar of the Library Manager
● Quickfix command in case of an error message about an unresolved library.
For further information, see: ⮫ 'Messages’ command
Remark
NOTICE
As of compiler version 3.5.18.0, the library profile is
ignored in favor of the placeholder resolution. The place-
holders become "Free placeholders".
Prerequisite: A placeholder library is selected in the library manager.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1011 /
Menu commands 1158

To resolve a placeholder library, the following is subsequently browsed:


● The current placeholder definition in the Placeholder dialog of the library
manager(s) of the application(s).
● The device descriptions of the devices used.
● The installed add-ons.
● The placeholder table of the library manager in the POUs view.
The result is shown in the Library Manager below the Effective version. More
detailed information can be found in the tooltip of the symbol . If none of
the resolution steps succeed, the library is marked with (not resolved) and
the library is not taken into consideration during the compilation.
Also refer to
● ⮫ Chapter 27 Using libraries on page 329

User interface
● ⮫ Chapter 33.2.19 "Library manager” object on page 780
● ⮫ Chapter 27.3 Information for library developers on page 330

'Placeholder' dialog
“Name” Identifier of the placeholder
“Library” Current resolution for the project
Double-click the entry to edit the placeholder resolution. A drop-down
list of available versions of the library is displayed. In addition, the
“Other libraries” command appears.
Command “Other library” The “Search libraries” dialog opens for searching for and installing
libraries. Select this command to redirect to a special library, and not
to switch to another version.
“Info” Type of placeholder resolution
● Resolved by device description
● Resolved by library profile
● Resolved by <special library>
“Set all unresolved For the resolution of not yet resolved placeholder libraries in the
unbound placeholders to library manager, the latest available version is entered.
the newest available
versions”

Command 'Export Library'


Function: This command is used for saving the library file to the hard disk.
Call: Context menu of the Library Manager
Requirement: A library is selected in the Library Manager.
The command opens the standard dialog for saving a file in the local file
system. The library file can have the file type Library files (*.library),
Compiled library files (*.compiled-library), or Compiled library
files (*.compiled-library-v3).
See also
● ⮫ Chapter 33.2.19 "Library manager” object on page 780
● ⮫ Chapter 27.6 Exporting Library Files on page 332

33.3.16 "Image collection" menu


Command 'Insert Image'
Symbol:
Function: This command inserts a new line into an image pool.
Call: Main menu “Imagepool”, or right-click.

R911403764, Edition 08 Bosch Rexroth AG


1012 / ctrlX PLC Engineering
1158 Menu commands

Requirements: An image pool is active and a line is selected in the image pool.
See also
● ⮫ Chapter 33.2.18 "Image pool” object on page 779

33.3.17 “Declarations” menu


Command 'Insert'
Symbol
Function: This command inserts a new line for a variable declaration in the
declaration editor and the input field for the variable name opens.
Call: Context menu in the tabular declaration editor; button in the declaration
heading.
To edit the other fields of the declaration lines, double-click the fields and
select the data from the drop-down lists or by means of the respective dialogs.
See also
● ⮫ Chapter 18.16.3 Using the Declaration Editor on page 165

“Edit declaration header” command


Function: The command opens the “Edit declaration header” dialog used to
configure the header of a POU in the tabular declaration editor.
Call: Context menu of the tabular declaration editor.
Prerequisite: The tabular declaration editor has the focus.
Also refer to
● ⮫ Declaring in the tabular declaration editor on page 165

"Edit declaration header” dialog


Function: Configure the header of the tabular declaration section of a POU in
the header.
Call: click the header of the tabular declaration editor, context menu in the
tabular declaration editor.
“Declaration” Selection list to change the POU type
● “PROGRAM”
● “FUNCTION_BLOCK”
– “EXTENDS”: Input field for a basic function block
– “IMPLEMENTS”: Input field for an interface
● “FUNCTION”
– “Return type”
Input field with current POU name: you can change the name of the
POU.
“Automatically adapt all : “Refactoring” dialog opens.
references when renaming” : Renaming is only effective in the declaration header of the POU.
“Attributes” The dialog “Attributes” opens for the input of attributes and pragmas.
Also refer to
● ⮫ Chapter 18.16.3 Using the Declaration Editor on page 165
● ⮫ Chapter 32.6 Pragmas on page 596
● ⮫ Chapter 18.12 Refactoring on page 150

Command 'Move Down'


Symbol:
Function: This command shifts a variable declaration downwards by one row.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1013 /
Menu commands 1158

Call: Context menu


Requirement: A row with a variable declaration is selected in the tabular decla-
ration editor.
See also
● ⮫ Chapter 18.16.3 Using the Declaration Editor on page 165

Command 'Move Up'


Symbol:
Function: This command shifts a variable declaration upwards by one row.
Call: Context menu
Requirement: A row with a variable declaration is selected in the tabular decla-

User interface
ration editor.
See also
● ⮫ Chapter 18.16.3 Using the Declaration Editor on page 165

33.3.18 "Declarations" menu (persistence)


"Rearrange list and clean gaps” command
Function: this command cleans the gaps that can result when you make
changes to the declaration of persistent variables. The memory requirement
is reduced by this cleaning. When executing the command, PLC Engineering
displays a warning message alerting the user to the possible loss of data.
Call: Menu “Declarations”, context menu
Prerequisite: the persistence editor (persistent variable list) is active.
Before cleaning you should consider saving the current values of the persistent
variables to a recipe (command “Save current values to recipe”). Then you can
load the values to the controller again after the next download.
Also refer to
● ⮫ Chapter 18.22 Data persistence on page 211
● ⮫ Chapter "Restore values from recipe” command on page 1014
● ⮫ Chapter "Save current values to recipe" command on page 1013

"Save current values to recipe" command


Function: The command creates a new recipe definition in the Recipe Manager
and stores the current values of the persistent variables in it. You should exe-
cute this command before the command “Rearrange list and clean gaps” in
order to avoid a possible loss of data. You can restore the data afterwards by
means of the “Restore Values from Recipe” command.
Call: Menu “Declarations”
Prerequisite: The application is online and the persistence editor (persistent
variable list) is active.
If a list already exists in the recipe manager with the corresponding name when
saving a persistent variable list, then the current persistent variables are sorted
into this list:
− New persistent variables are added to the list
− Variables that are not included in the list of persistent variables are deleted
Therefore, it is possible to add more recipes to the list in the recipe manager
and these will be retained. However, if new variables are added to the list, they
are deleted upon the next execution of the command “Save current values in
recipe”.

R911403764, Edition 08 Bosch Rexroth AG


1014 / ctrlX PLC Engineering
1158 Menu commands

Also refer to
● ⮫ Chapter 18.22 Data persistence on page 211
● ⮫ Chapter "Rearrange list and clean gaps” command on page 1013
● ⮫ Chapter "Restore values from recipe” command on page 1014
● ⮫ Chapter 33.2.17 Object 'Persistent variable list' on page 778

"Restore values from recipe” command


Function: The command restores the values of the persistent variables that you
have stored in a recipe using the command “Save current values to recipe”.
You usually select the command after executing the “Reorder list and clean up
gaps” command.
Call: Menu “Declarations”
Prerequisite: the persistence editor (persistent variable list) is active. The appli-
cation is in online mode.
Also refer to
● ⮫ Chapter 18.22 Data persistence on page 211
● ⮫ Chapter "Save current values to recipe" command on page 1013
● ⮫ Chapter "Rearrange list and clean gaps” command on page 1013
● ⮫ Chapter 33.2.17 Object 'Persistent variable list' on page 778

Command 'Add all instance paths'


Function:
● When you execute the command in the persistence editor, the application
is searched for declarations of persistent variables with the PERSISTENT
keyword which are outside of the persistence editor. For each declaration
found, an instance path of this variable is added in the persistence editor.
● When you execute the command in a variable configuration, an instance path
is added for each variable with an incomplete address. All function blocks of
the application are considered in this case.
Call: Menu bar: “Declarations”, right-click.
Requirement
● the persistence editor (global persistent variable list) is active or a variable
configuration (global variable list with VAR_CONFIG declarations) is opened.
● The application was compiled successfully.

See also
● ⮫ Chapter 32.2.13 Persistent Variable - PERSISTENT on page 447
● ⮫ Chapter 32.2.14 Retain variable - RETAIN on page 449

33.3.19 "Device communication" menu (gateway)


'Add new gateway' command
Function: The command opens the “Gateway” dialog where you can define a
gateway channel and add it to the current device configuration.
Call: “Gateway” menu in the “Communication” dialog of the Device Editor.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1015 /
Menu commands 1158

Dialog 'Gateway'
“Name” Name of the gateway.
“drivers” Driver type from a list box.
Driver-specific settings, for Editable after double-clicking the predefined value. A short description
example: for each parameter is displayed in the lower part of the dialog.
IP address, port Note: You can also specify the address of a DNS domain. This has to
begin with dns: (example: dns:MyDynDNSAdress).
The dialog is also used for later editing of the gateway entries of your project.
Also refer to
● ⮫ Chapter 33.1.1 Tab “Communication” on page 735

User interface
'Configure local gateway’ commad
Function: The command opens the “Gateway Configuration” dialog where you
can set the block driver configuration for the local gateway, as an alternative to
editing the Gateway.cfgconfiguration file manually.
Call: Context menu if a gateway entry is selected in the device editor in the
“Communication” dialog.
A correct configuration of the gateway requires detailed
NOTICE
knowledge. If in doubt, leave the default configuration
settings unchanged!

'Gateway configuration' dialog


The configuration tree shown in the dialog corresponds to the description in
the currently valid configuration file gateway.cfg. It shows the parameters
with the current settings for the interfaces involved. Changes to the configu-
ration in the dialog, confirmed with “OK” cause an immediate update of the
configuration file.
If the gateway configuration file gateway .cfg has been changed, the gateway
must first be stopped and restarted to make the changes effective.
“Add” Menu with commands for adding interfaces and settings. The com-
mands are also available in the dialog's context menu. The selection
depends on which entry is selected and which settings are already
inserted:
“Add interface”: Select an interface for communication via the
gateway. It is inserted at the upper level of the tree. See the table
below for the possible block driver interfaces.
“Add configuration setting”: Select a setting for the selected interface.
It is inserted below the interface in the tree. To edit the value of the
setting, double-click in the “Setting” column to open an edit box. See
the table below for the possible settings per block driver interface.
“Delete” Deletes the selected configuration setting
“Up”, “down” Moves the selected configuration entry one place up or down.

R911403764, Edition 08 Bosch Rexroth AG


1016 / ctrlX PLC Engineering
1158 Menu commands

Table 139: Possible block driver interfaces


“COM Port” Serial port on the device, e.g. for data exchange
according to the RS232 standard on a COM port pro-
vided for this purpose.
Possible configuration settings:
“Name”: only symbolic
“Port”: physical serial port used for this interface, for
example COM 5 on a Windows computer
“Baud rate”: 2400, 4800, 9600, 19200, 38400, 57600,
115200
“Enable auto-addressing”: (Default = ): The
Local address setting is evaluated; the two devices
communicating via the serial port will then nego-
tiate their addresses independently before starting
to exchange messages; if the addresses of the
two devices are the same, they will be negotiated
again; this setting is useful in cases where the local
addresses cannot be set explicitly, for example in the
case of physically separated devices.
“Local address”: is only evaluated if “Enable Auto
addressing” is activated! Default = actual value for
port
“Shared memory” Shared memory driver
Possible settings:
“Name”: only symbolic
“Forced address”: Default = -1 (= no forced
address); example: 42 means that the driver has
to use the fixed address defined here and that
addresses are freely assigned in the range 0-255; this
setting can be useful if more than one shared memory
driver is enabled in the configuration.
“Ethernet UDP/IP” Ethernet interface for data exchange according to
"User Datagram Protocol".
Possible settings:
“Name”: only symbolic
“Port index”: Port number for communication; port
indices are in the range 0 to 3; they are mapped to
the following Ethernet port: 1740 to 1743
“IP address”: default = 127.0.0.1; this setting can
be useful to explicitly set an interface if there are mul-
tiple network interfaces on the device; for example,
127.0.0.1 represents any local network interface,
also known as localhost; any other address - for
example, 10.27.7.72 - represents a real IP address
that has to be available on the device
“Network mask”: Default = 255.255.255.0; Example:
255.255.252.0; this setting can be useful to explicitly
set an interfaceI if there are multiple network inter-
faces on the device;

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1017 /
Menu commands 1158

“PPP remote address”: default = 127.0.0.1;


example: 10.13.42.240; establishes a logical point-
to-point connection between the UDP interface and
the node designated with the address given here;
causes the UDP interface to communicate exclusively
with this node and no broadcasts are sent on the
network
“Ethernet TCP/IP” Ethernet interface for data exchange according to
"Transmission Control Protocol".
Possible settings:
“Name”, “port”, “IP address”: see above for Ethernet
UDP/IP

User interface
“Inactivity timeout”: default = 0; this setting defines
the time span in seconds after which the TCP connec-
tions are closed if no more data is exchanged
“CAN client” “Name”: only symbolic
A description of the other settings can be found
directly in the dialog.
“USB port” “Name”: only symbolic
A description of the other settings can be found
directly in the dialog.
Also refer to:
● ⮫ Chapter 33.1.1 Tab “Communication” on page 735

33.3.20 “Recipes” menu


Command ‘Insert Variable'
Symbol:
Function: The command inserts a variable into the currently opened recipe
definition before the selected position.
Call: Menu “Recipes”
Prerequisite: You have opened a recipe definition in the editor and selected the
normal view.
PLC Engineering inserts the default text "NewVariable" in the column
“Variable”. You must replace this name with the respective variable name. Open
the input help via button or enter the variable name directly into the table
field.
Also refer to
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter 33.3.20 “Recipes” menu on page 1017

Command ‘Insert recipe'


Symbol:
Function: The command opens a dialog for adding a new recipe (new column)
to the recipe definition.
Call: Menu “Recipes”
Prerequisite: You have opened a recipe definition in the editor.
After choosing the command, a dialog opens for you to define the name of the
new recipe. The dialog also provides the capability of copying existing recipes
into the new recipe.

R911403764, Edition 08 Bosch Rexroth AG


1018 / ctrlX PLC Engineering
1158 Menu commands

Also refer to
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter 33.3.20 “Recipes” menu on page 1017

'Remove recipe' command


Symbol:
Function: The command removes a recipe from the currently opened recipe
definition.
Call: Menu “Recipes”
Prerequisite: You have selected a field in the recipe column of a recipe defini-
tion.
Also refer to
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter 33.3.20 “Recipes” menu on page 1017

“Load Recipe” command


Symbol:
Function: The command loads a recipe from a file.
Call: Menu “Recipes”
Prerequisite: You have selected a field in the recipe column of a recipe defini-
tion.
This command overwrites the values of the selected recipe of the recipe defini-
tion.
If the option “Recipe management in the PLC” was enabled, please note the
following:
If you change recipes in the project by choosing the command “Load Recipe” or
“Read Recipe”, then an online change is required when logging in again.
If you want to overwrite only individual recipe variables with new values, then
remove the values for the other variables before loading to the recipe file.
Entries without value definitions are not read, and therefore updating leaves
these variables unchanged on the PLC and in the project.
For values of the data type REAL/LREAL, the hexadecimal value is also written
to the recipe file in some cases. This is necessary so that the exact identical
value is restored when converting back. In this case, change the decimal value
and delete the hexadecimal value.
Also refer to
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter 33.3.20 “Recipes” menu on page 1017

'Save recipe' command


Symbol:
Function: The command saves the variable values of a recipe to a file.
Call: Menu “Recipes”
Prerequisite: You have selected the value of a recipe in the recipe definition.
When you choose this command, PLC Engineering saves the values of the
selected recipe to a file. The format results from the settings of the recipe
manager in the “Storage” tab.
Also refer to
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter 33.3.20 “Recipes” menu on page 1017

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1019 /
Menu commands 1158

'Read recipe’ command


Symbol:
Function: The command reads the variable values of a recipe from the PLC.
Call: Menu “Recipes”
Prerequisite: The application is in online mode and you have selected the value
of a recipe in the recipe definition.
When you choose this command, PLC Engineering overwrites the values of the
selected recipe with the read values from the PLC.
If you have activated the “Recipe management in the PLC” option, please note
the following:
If you change recipes in the project by choosing the command “Load Recipe” or

User interface
“Read Recipe”, then an online change is required when logging in again.
Also refer to
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter 33.3.20 “Recipes” menu on page 1017

Command ‘Write recipe'


Symbol:
Function: The command writes the values of a recipe to the variables in the
PLC.
Call: Menu “Recipes”
Prerequisite: The application is in online mode and you have selected the value
of a recipe in the recipe definition.
When you choose this command, PLC Engineering overwrites the values in the
PLC with the values of the selected recipe.
Also refer to
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter 33.3.20 “Recipes” menu on page 1017

'Load and write recipe' command


Symbol:
Function: The command loads a recipe from a file and writes the values to the
variables in the control.
Call: Menu “Recipes”
Prerequisite: The application is in online mode. You have selected the value of a
recipe in the recipe definition.
After choosing the command, you are prompted either to write the variable
values also to the recipe in the project or only to write them to the PLC.
Updating the values in the recipe could require an online change when logging
in again.
When you choose this command, PLC Engineering overwrites the values of
the selected recipe of the recipe definition. In addition, these recipe values
overwrite the variable values in the PLC.
If you want to overwrite only individual recipe variables with new values, then
remove the values for the other variables before loading to the recipe file.
Entries without value definitions are not read, and therefore updating leaves
these variables unchanged on the PLC and in the project.
For values of the data type REAL/LREAL, the hexadecimal value is also written
to the recipe file in some cases. This is necessary so that the exact identical
value is restored when converting back. In this case, change the decimal value
and delete the hexadecimal value.

R911403764, Edition 08 Bosch Rexroth AG


1020 / ctrlX PLC Engineering
1158 Menu commands

Also refer to
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter 33.3.20 “Recipes” menu on page 1017

'Read and save recipe' command


Symbol:
Function: The command reads the variable values of a recipe from the control
and saves them to a file.
Call: Menu “Recipes”
Prerequisite: The application is in online mode and you have selected the value
of a recipe in the recipe definition.
After choosing the command, you are prompted either to read the variable
values to the recipe or only to save them. Updating the values in the recipe
could require an online change when logging in again.
The values are saved with the default name for recipe files according to the
settings for the recipe manager (tab “Storage”).
Also refer to
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter 33.3.20 “Recipes” menu on page 1017

'Remove variables' command


Symbol
Function: The command removes the selected variable(s) from a “Recipe
definition”.
Call: By default the command is not part of any menu. By means of the“Tools
🠂 Adjust” dialog of the command category “Recipe”, the command can be
inserted in a menu.
Also refer to
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter 33.3.20 “Recipes” menu on page 1017

Command 'Load Recipes from Device'


Symbol:
Function: This command initiates the synchronization of the recipes from the
open recipe definition in the project and the recipes located on the device in
the form of recipe files.
Call: Menu bar: “Recipes”.
Requirement: The application is in online mode and a recipe definition is open
in the editor.
In detail, the synchronization is described as follows:
● The current values for the recipe variables located in the project are over-
written by the values from the recipes on the controller. As a result, there is
likely an online change at the next login.
● If recipe variables are defined in the recipe files on the controller, and the
recipe variables are missing in the recipe definition of the project, then
these variables are ignored when at the time of download. Before that, a
message appears for each recipe file regarding the variables in question.
● If recipe variables are missing in the recipe files on the controller, and these
recipe variables are included in the recipe definition of the project, then a
message appears for each recipe file with the variables in question.
● If more recipes for these variables have been created on the controller, then
they are added to the recipe definition in the project.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1021 /
Menu commands 1158

'Update structured variables' command


Symbol:
Function: The command opens the “Update Structured variables” dialog.
Call: Menu “Recipes”
In this dialog, you can update recipe definitions if the declaration of a struc-
tured variable or a block has changed. For example, if the dimension of an array
is changed, then you can automatically add or remove the entries in the recipe
definition.
Table 140: 'Update structured variables’ dialog
“Remove not existing : Variables are removed from the recipe definition when they no
variables” longer exist in the project due to a change to a structured element.

User interface
“Update instances of : If the declaration of a structure or function block is extended and
structures and function available in the recipe definition with an instance, then the respective
blocks” variables are added to the recipe definition.
“Update array dimensions : If the dimension of an array is extended and available in the recipe
of array instances” definition with an instance, then the respective variables are added to
the recipe definition.
“Update contained global : If the declaration of a global variable list is extended and available
variable lists” in the recipe definition with an instance, then the respective variables
are added to the recipe definition.
“Update contained : If the declaration of a program is extended and instantiated in the
programs” recipe definition, then the respective variables are added to the recipe
definition.
Also refer to
● ⮫ Chapter 22.2 Changing values with recipes on page 287
● ⮫ Chapter 33.3.20 “Recipes” menu on page 1017

33.3.21 "Text list" menu


Command 'Add Language'
Symbol:
Function: This command adds a further language column to the text list.
Call: Main menu “Textlist”, context menu
Requirement: A text list or a global text list is open and active.
In the dialog box “Enter Language”, enter a code for the new language, for
example “en-US”. PLC Engineering inserts the code as column header.

Command 'Create Global Text List'


Symbol:
Function: This command creates the global text list in the “POUs” view.
Call: “Visualization”, context menu.
Requirements: A visualization is open.
See also
● ⮫ Chapter 33.2.14 Object 'GlobalTextList' on page 776
● ⮫ Removing the global text list and creating current IDs again on page 141

Command 'Export Everything as Text'


Symbol:
Function: This command exports all the text lists of the project.
Call: Main menu “Textlist”, context menu

R911403764, Edition 08 Bosch Rexroth AG


1022 / ctrlX PLC Engineering
1158 Menu commands

Requirement
● A text list or a global text list is open and active.
● The visualization does not code the characters of the texts in Unicode.
PLC Engineering creates a file as plain text in the format .txt for each text list.
The name of the text list becomes the name of the file. The directory into which
the files are exported is set in “Project 🠂 Project Settings 🠂 Visualization”,
category “General” in “Text list files”.
A controller can read and use this format. For example, you can copy the file to
a controller and, by means of a configuration in the visualization manager, pre-
vent the text lists from being transmitted again when loading the application.

Command 'Export All Unicode .txt Text List Files'


Symbol:
Function: This command exports all the text lists of the project.
Call: Main menu “Textlist”, context menu
Requirement
● A text list or a global text list is open and active.
● The visualization codes the characters of the texts in Unicode.
– The option “Use Unicode strings” in the visualization manager is acti-
vated.
– The compiler instruction VISU_USEWSTRING in the application is set.
Check this by selecting the command “Properties” in the context menu of
the application. Then select the “Compile” tab. VISU_USEWSTRING must
be entered in the input field for “Compiler defines”.
PLC Engineering creates a file as plain text in the format .txt for each text list.
The name of the text list becomes the name of the file. The directory into which
the files are exported is set in “Project 🠂 Project Settings 🠂 Visualization”,
category “General” in “Text list files”.
A controller can read and use this format. For example, you can copy the file to
a controller and, by means of a configuration in the visualization manager, pre-
vent the text lists from being transmitted again when loading the application.
See also
● ⮫ Chapter 18.8 Managing Text in Text Lists on page 137

Command 'Insert Text'


Symbol:
Function: This command inserts a new line into the text list above the selected
line. An input field under “Standard” opens, in which you input the source text.
Call: Main menu “Textlist 🠂 Insert Text”, context menu
Requirement: A text list, not a “GlobalTextList”, is open and active. A field in
the table is selected.
See also
● ⮫ Chapter 18.8 Managing Text in Text Lists on page 137

Command 'Import/Export Text Lists'


Symbol:
Function: This command exports an active text list, imports a file, or matches
a text list with a file. The file has the CSV format. The “Import/Export” dialog
provides options for this.
Call: Menu bar: “Text List 🠂 Import/Export Text Lists”; context menu
Requirement: A text list or global text list is active.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1023 /
Menu commands 1158

Dialog 'Import/Export'
“Select File for Import” File that PLC Engineering reads.
opens the dialog “Select Text List File” for you to select a file.
“Select export file” File that PLC Engineering writes to.
opens the dialog “Select Text List File” for you to select a file and
directory.
Table 141: “Import/Export Type”
“Import” Requirement: A file is selected in “Select file for compare or import”.
The file can contain text list entries for both the global text list and
text lists.

User interface
Global text list
● PLC Engineering reads the file, compares the text list entries for
the same source text, and accepts differences in the translations.
PLC Engineering overwrites any translations in the project.
Text lists
● PLC Engineering reads the file, compares the text list entries for
the same ID, and accepts differences in the source text and trans-
lations into the project. PLC Engineering overwrites any text list
entries in the project.
● If the file contains a new ID, then the text list entry is imported into
the text list of the project and the text list is added.
“Import replacement file” Requirement: A replacement file is selected in “Select file for compare
or import”.
The replacement file contains replacements for the global text list.
PLC Engineering processes the replacement file row by row and per-
forms the specified replacements in the global text list.
The structure of the replacement file is described in the section "Man-
aging static text in a global text list".
“Export” Requirement: The file that PLC Engineering writes to is selected in
“Select export file”.
PLC Engineering exports all texts from all text lists of the current
project. All languages available in the project are inserted as columns
in the export file. The file can be used for the external translation of
the language-dependent texts.
“Export text differences Requirement: An import file is selected for the comparison in “Select
only” file for compare or export”, and an export file that PLC Engineering
writes to is selected in “Select export file”.
PLC Engineering reads the import file and then uses that information
to compare the rows of the active text list. PLC Engineering ignores
the rows that match. If rows differ, then PLC Engineering writes the
row to the export file and, if necessary, copies translations from the
text list. PLC Engineering accepts the translations from the import file
and overwrites them if necessary.
See also
● ⮫ Chapter 18.8 Managing Text in Text Lists on page 137
● ⮫ Updating the global text list with a replacement file on page 141

Command 'Remove Language'


Symbol:
Function: Removes the selected language column from the text list.
Call: Main menu “Textlist”, context menu

R911403764, Edition 08 Bosch Rexroth AG


1024 / ctrlX PLC Engineering
1158 Menu commands

Requirement: A text list or a global text list is open and active. A field is
selected in the column of the language that you wish to remove.
See also
● ⮫ Chapter 18.8 Managing Text in Text Lists on page 137

Command 'Rename Language'


Symbol:
Function: Opens a dialog for specifying a new name for a language that is
displayed in the text list as a column heading.
Call: Menu bar: “Text List”; context menu.
Requirement: A text list or global text list is active. A field in the language
column to be renamed is selected.
See also
● ⮫ Chapter 18.8 Managing Text in Text Lists on page 137

Command 'Remove Unused Text List Entries'


Symbol:
Function: This command checks whether a text list entry in the project is used
as static text. If not, PLC Engineering removes it from the text list.
Call: Main menu “Textlist”, context menu
Requirement: The “GlobalTextList” is open and active. A field in the table is
selected.
See also
● ⮫ Chapter 18.8 Managing Text in Text Lists on page 137

Command 'Check Visualization Text IDs'


Symbol:
Function: This command checks whether the ID of a text list entry in the
project is correct and reports the result.
Call: Main menu “Textlist”, context menu
Requirement: The “GlobalTextList” is open and active. A field in the table is
selected.
If PLC Engineering finds during checking that the global text list and the static
texts of the visualizations do not correspond, this could be because the global
text list is or was write protected. The requirement for this is that you have set
up a user management system in the project.
See also
● ⮫ Chapter 18.8 Managing Text in Text Lists on page 137
● ⮫ Chapter 11.10 Protecting Objects in the Project by Access Rights
on page 81

Command 'Update Visualization Text IDs'


Symbol
Function: This command updates all inconsistent IDs in a static text list.
Call: Main menu “Textlist 🠂 Paste Text”, context menu
Requirement: The “GlobalTextList” is open and active. A field in the table is
selected. The object is write protected.
If PLC Engineering finds during checking that the global text list and the static
texts of the visualizations do not correspond, this could be because the global
text list is or was write protected. The requirement for this is that you have set
up a user management system in the project.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1025 /
Menu commands 1158

See also
● ⮫ Chapter 18.8 Managing Text in Text Lists on page 137
● ⮫ Chapter 11.10 Protecting Objects in the Project by Access Rights
on page 81

Command 'Add Text List Support'


Symbol:
Function: This command adds text list support to the selected DUT object
(type: enumeration).
Call: Context menu of a standard DUT object (type: enumeration ).
Text list support allows the localization of the enumeration component identi-

User interface
fier and the display of the symbolic component value in a text output of a
visualization.
See also
● ⮫ Chapter Object 'DUT' on page 815
● ⮫ Chapter Command 'Remove Text List Support' on page 1025

Command 'Remove Text List Support'


Symbol:
Function: This command removes text list support from the selected enumera-
tion object.
Call: Context menu of an object of an enumeration with text list support ( ).
Text list support allows the localization of the enumeration component identi-
fier and the display of the symbolic component value in a text output of a
visualization.
47293
See also
● ⮫ Chapter Object 'DUT' on page 815
● ⮫ Chapter Command 'Add Text List Support' on page 1025

33.3.22 "Trace" menu


Command 'Add Variable'
Function: This command adds a trace variable to the configuration.
Call: Main menu “Trace”.
A new variable is displayed in the tree view of the trace configuration. The
associated variables configuration appears to the right in “Variable Settings”.
See also
● ⮫ Subdialog 'Variable settings' on page 1099
● ⮫ Chapter 22.4.3 Creating Trace Configuration on page 301

Command 'AutoFit'
Symbol:
Function: When this command is called, the Y-axis of the trace diagram is
automatically scaled so that all graphs are susequently displayed optimally. The
Y-values fit into the visible area of the diagram. Meanwhile, the command is
displayed as active in the menu (command with a check mark).
Call: Menu “Trace”, context menu
Prerequisite: The trace is running. To do this, you have previously created a
trace, specified a fixed scale for the Y-axis, and executed the Dwonload Trace
command.

R911403764, Edition 08 Bosch Rexroth AG


1026 / ctrlX PLC Engineering
1158 Menu commands

The command can be switched. If you click on the checkmarked command in


the menu, the display automatically adjusted to the Y-axis changes back to the
previously configured fixed display.
The command works with both single-channel and multi-channel displays.

Trace in a single-channel display


When all trace variables are displayed in one diagram, the trace is in single-
channel display.

Trace in a multi-channel display


When the trace variables are displayed in multiple diagrams, the trace is in
multi-channel display.

Also refer to
● ⮫ Subdialog 'Display mode' on page 1100
● ⮫ Chapter 22.4.5 Navigating into Trace Data on page 304

Command 'Compress'
Symbol:
Function: This command compresses the trace graph by zooming into the dis-
played time range by a fixed percentage.
Call: Main menu “Trace”, or context menu.
See also
● ⮫ Chapter Command 'Stretch' on page 1033
● ⮫ Chapter 22.4.5 Navigating into Trace Data on page 304

Command 'Configuration'
Function: This command opens the “Trace Configuration” dialog box for ena-
bling the configuration of the data recording.
Call: Main menu “Trace”, or context menu.
See also
● ⮫ Chapter “Trace configuration” dialog on page 1096

Command 'Cursor'
Symbol:
Function: This function
● inserts a trace cursor into the trace diagram when no trace cursor is avail-
able
● inserts a second trace cursor into the trace diagram when 1 trace cursor is
available
● removes the trace cursors when 2 trace cursors are available
Call: Menu bar: “Trace”; context menu.
A trace cursor is a small black triangle with a vertical black line running parallel
to the y-axis.

Trace diagram without trace cursors


In this mode, you can process the trace diagram with the mouse pointer. The
x-value that focuses on with the cursor is displayed in the status bar with
normal style. Example: “Time: 1m23s456ms; Value: 1 ”

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1027 /
Menu commands 1158

Trace diagram with one trace cursor


In the status bar and y-value, PLC Engineering prints the time that was marked
by the trace cursor. Example: “Time: 1m23s456ms ”

Trace diagram with two trace cursors


In the status bar, PLC Engineering prints the two times and the time interval
that are marked by the two trace cursors. Example: “Time: 1m23s456ms - Time:
1m24s456ms (∆ 1s) ”.

User input in the trace diagram


If one or two trace cursors are available, then you can move them along the
x-axis.

User interface
Mouse Input Symbol Effect
Drag the triangle of a trace While the mouse button is
cursor to another position. pressed, the cursor can be
moved without restriction. The
current y-value is always dis-
played in the status bar. When
the mouse button is released,
the cursor jumps to the nearest
measuring point
Keyboard Shortcuts Effect
[Left arrow] PLC Engineering moves the black trace cursor to
[Right arrow] the next measuring point.
[Shift]+[Left Arrow] PLC Engineering moves the gray trace cursor to
[Shift]+[Right Arrow] the next measuring point.

See also
● ⮫ Chapter 22.4.5 Navigating into Trace Data on page 304

Command 'Download Trace'


Symbol:
Function: This command transfers the trace configuration on the controller to
the associated application, and starts the data recording. The recorded data
is transferred back to the development system. The trace diagram shows the
current samples and continues.
Call: Menu bar: “Trace”; context menu.
Requirement: The command is available when the assigned application is in
online mode.
See also
● ⮫ Chapter 22.4.4 Operating the Data Recording on page 304

Command 'Export Symbolic Trace Config'


Function: This command exports a trace configuration to a traceconfig file.
Call: Main menu “Trace”, or context menu.
Requirement: The origin application includes a symbol configuration that
defines the configured trace variables as symbols. Access to the IEC variables
where data was recorded is therefore symbolic. Then you can use the trace
configuration for various similar applications.

R911403764, Edition 08 Bosch Rexroth AG


1028 / ctrlX PLC Engineering
1158 Menu commands

Using the configuration file


You can transfer this file to any runtime system. At runtime, its CmpTraceMgr
runtime system component can access and perform data recording. The config-
uration file also includes information about the application context in addition
to the configuration data.
The configuration file defines the following context:
● Application name
● Trace name
● Task name
The application that is executed at runtime must fulfill the following conditions:
● The application has the same name as the origin application.
● The trace that is configured in the application has the same as the trace that
is configured in the origin application
● The task that is running in the data recording has the same name as the task
that is configured in the origin application.
The configuration is not loaded automatically. You must
NOTICE
execute the command explicitly.
You can proceed as follows:
− Access the trace manager programmatically via IEC
code by using library interfaces.
− Register the configuration file with the trace man-
ager. Then the trace manager loads the configuration
file when the application is started.
For more information about the functionality of the trace manager, refer to
"Trace Manager Runtime System Component Description".

Sample configuration file

Configuration file Trace_Trigger.traceconfig

[key]; [value]
Version; 0x03050000
Name; Application.Trace_Trigger
ApplicationName; Application
ApplicationDataGuid; 00000000-0000-0000-0000-000000000000
IecTaskName; MainTask
Comment;
Trigger.Flags; 5
Trigger.Edge; 2
Trigger.Position; 0
Trigger.UpdatesAfterTrigger; 50
Trigger.Variable.Name; PLC_PRG.B.OUT
Trigger.Variable.AddrFlags; 0x00000101
Trigger.Variable.Class; 0
Trigger.Variable.Size; 1
Trigger.Level;
Condition.Name;
Condition.AddrFlags; 0x00000000
Condition.Class; 0
Condition.Size; 0
EveryNCycles; 1
BufferEntries; 100
Flags; 16
0.Variable; PLC_PRG.S5.OUT

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1029 /
Menu commands 1158

0.Address.AddrFlags; 0x00000101
0.Class; 7
0.Size; 2
0.GraphColor; 4278190335
0.GraphType; 3
0.MinWarningColor; 4278190080
0.MaxWarningColor; 4294901760
0.CriticalLowerLimit; 0
0.CriticalUpperLimit; 0
0.ActivateMinWarning; 0
0.ActivateMaxWarning; 0
0.YAxis; 0

User interface
0.Data;
1.Variable; PLC_PRG.B.OUT
1.Address.AddrFlags; 0x00000101
1.Class; 0
1.Size; 1
1.GraphColor; 4278222848
1.GraphType; 1
1.MinWarningColor; 4278190080
1.MaxWarningColor; 4294901760
1.CriticalLowerLimit; 0
1.CriticalUpperLimit; 0
1.ActivateMinWarning; 0
1.ActivateMaxWarning; 0
1.YAxis; 0
1.Data;

See also
● ⮫ Chapter 22.4.6 Managing Trace on page 305

Command 'Load Trace'


Function: This command makes it possible to load a file, which contains the
configuration and data, and was saved to the file system of the development
system. The “Load Trace” dialog box opens.
Call: Main menu “Trace”, or context menu.

Dialog box “Load Trace”


“File name” Name of the file that is loaded
“File type” File format
● *.trace: “Trace file” that includes the trace configuration
● *.csv: Text file in CSV format that includes a trace configuration

See also
● ⮫ Chapter Command 'Save Trace' on page 1032
● ⮫ Chapter 22.4.6 Managing Trace on page 305

Command 'Mouse Zooming'


Symbol: (command disabled), (command enabled)
Function: This command enables and disables mouse zooming in the trace
diagram.
Call: Menu bar: “Trace”; context menu.

R911403764, Edition 08 Bosch Rexroth AG


1030 / ctrlX PLC Engineering
1158 Menu commands

User input in the trace diagram


If the command is enabled, then you can stretch a box with the mouse. When
you release the mouse button, the display zooms in on the box and the data is
enlarged.

See also
● ⮫ Chapter 22.4.5 Navigating into Trace Data on page 304

Command 'Convert to Multi-Channel'


Function: This command switches the display in the trace editor from single-
channel to multi-channel.
Call: Menu bar: “Trace”; context menu.

Multi-channel display
Multi-channel display means that the trace variables are displayed in multiple
diagrams.

See also
● ⮫ Chapter “Trace configuration” dialog on page 1096
● ⮫ Chapter 22.4.5 Navigating into Trace Data on page 304

Command 'Convert to Single-Channel'


Function: This command switches the display in the trace editor from multi-
channel to single-channel.
Call: Menu bar: “Trace”; context menu.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1031 /
Menu commands 1158

Single-channel display
If a trace is displayed as single-channel, then all trace variables are included in
one diagram.

User interface
See also
● ⮫ Chapter “Trace configuration” dialog on page 1096
● ⮫ Chapter 22.4.5 Navigating into Trace Data on page 304

Command 'Reset Trigger'


Symbol:
Function: This command resets the trace configuration after a triggered data
recording. Then the application can record new data and react to a trigger
again.
Call: Main menu “Trace”, or context menu.
Requirement: After triggering, the complete data is in the buffer of the develop-
ment system.
See also
● ⮫ Chapter 22.4.4 Operating the Data Recording on page 304

Command 'Reset View'


Symbol:
Function: This command resets the trace diagram to the default view.
Call: Main menu “Trace”, or context menu.
Requirement: The display in the trace diagram has been changed by zooming,
scrolling, or “AutoFit”.

R911403764, Edition 08 Bosch Rexroth AG


1032 / ctrlX PLC Engineering
1158 Menu commands

See also
● ⮫ Chapter Command 'AutoFit' on page 1025
● ⮫ Chapter 22.4.5 Navigating into Trace Data on page 304

Command 'Save Trace'


Function: This command saves the data to a file on the development system.
Depending on the file format, the configuration may also be saved. The “Save
Trace” dialog box opens.
Call: Main menu “Trace”, or right-click.

Dialog Box 'Save Trace'


“File name” Name and location of the trace file
“File type” File format
● *.trace:
“Trace file” contains the data and configuration.
You can run the “Load Trace” command to load the file to the trace
editor when offline.
● *.txt:
“Text file” contains the recorded data. You can load this file type
and edit it with tools that support CSV format.
It cannot be loaded to the trace editor when offline because the
trace editor cannot read this format.
● *.trace.csv
“Trace CSV file (data only)” contains the recorded data. Address
information is provided for each trace variable. The created file can
be read in the runtime system. The data is imported but the trace
cannot be started because the variable addresses are not saved.

See also
● ⮫ Chapter Command 'Load Trace' on page 1029
● ⮫ Chapter 22.4.6 Managing Trace on page 305

Command 'Start Trace'


Symbol:
Function: This command starts the data recording on the controller when it is
stopped.
Call: Main menu “Trace”, or context menu.
Requirement: The assigned application on the runtime system is running and a
trace configuration is loaded.
See also
● ⮫ Chapter 22.4.4 Operating the Data Recording on page 304

Command 'Stop Trace'


Symbol:
Function: This command stops the data recording of a trace.
Call: Main menu “Trace”, or context menu.
Requirement: The assigned application on the runtime system is running and
executes a trace.
See also
● ⮫ Chapter 22.4.4 Operating the Data Recording on page 304

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1033 /
Menu commands 1158

Command 'Stretch'
Symbol:
Function: This command stretches the trace graph by zooming out of the dis-
played time range by a fixed percentage.
Call: Main menu “Trace”, or context menu.
See also
● ⮫ Chapter Command 'Compress' on page 1026
● ⮫ Chapter 22.4.5 Navigating into Trace Data on page 304

'Statistics' command
Function: The command opens the “Trace Statistics” dialog, which shows sta-

User interface
tistics about each trace variable.
Call: Menu “Trace”, context menu
Prerequisite: Traceeditor contains samples.

‘Trace statistics' dialog


The analyzed time range and duration are shown in the caption.
The table contains one line per signal.
“Signal” Name of the trace variable, for example PLC_PRG.S1
“Index” 0-based index of the signal order
“N” Number of measurements for the calculations
“Min” Minimum value
“Avg” Average
“Median” Middle value when the values are ordered by size
“RMS” Root mean square
“StdDev” Standard deviation
“Max” Maximum value
“Integral” Integral
“Min Δt [s]” Minimum value of the time intervals of successive values
“Avg Δt [s]” Average change of time intervals for successive values
“Median Δt [s]” Median change of time intervals for successive values
“StdDev Δt [s]” Standard deviation of change of time intervals for successive values
“Max Δt [s]” Maximum value of the time intervals of successive values
Click a column head in the PLC Engineering sorts the table by that column, changing the order
table. from ascending to descending and back.
Default: The table is sorted ascending by the “Index” column. The
signals are then sorted in the same order as in the signal tree.
Click in the line. The line is selected. You can select more lines with [Shift] + [Arrow]
and also deselect them again.
[Ctrl]+[C] PLC Engineering copies the selected lines as text to the clipboard. The
values of the individual columns are tab-separated, and the lines are
delimited with the control character [CR] or [LF].
Prerequisite: At least one line is selected.

Also refer to
● ⮫ Chapter 22.4 Data recording with "Trace" on page 298

R911403764, Edition 08 Bosch Rexroth AG


1034 / ctrlX PLC Engineering
1158 Menu commands

33.3.23 "Miscellaneous" menu


'Add to watch list' command
Symbol:
Function: The command adds the variable of the current location of the cursor
to a watch list for the purpose of online monitoring.
Call: The command is available in the context menu when the application is in
online mode and the cursor is on a variable in an editor.
The command adds the variable to the currently opened watch list. If a watch
list is not open, then the variable is added to the “Watch 1” list and that view
opens.
Also refer to
● ⮫ Chapter 22.3.3 Using Watch Lists on page 297
● ⮫ Chapter 22.3 Monitoring values on page 291

Command 'Implement Interfaces'


Function: This command updates the implemented interfaces for a function
block.
Call: Context menu of the selected function block (FB) in the device tree.
Requirement: The function block implements an interface that you have modi-
fied. For example, an additional method was added to the interface.
In object-oriented programming, if you derive a function block (FB) from a base
function block, which implements one or more interfaces, for the purpose of
inheritance, then the following applies:
When you execute the “Implement Interfaces” command for the derived FB, all
interface methods and interface attributes of the base FB are accepted into
the derived FB in the form of stubs (without implementation). Then you are
responsible for making sure that an "empty" method/attribute in the derived
FB does not conflict with an implemented one in the base FB. The following
actions are taken to support you in this case: If there es a base implementation
for a method/attribute, then PLC Engineering adds a pragma attribute {error..}
in the first line of the affected derived interface method or interface attribute
that will generate the error message. If there is no base implementation for the
method/attribute, then there is a pragma attribute entry for a warning. After
editing the block, you must remove the error pragma attribute entry explicitly.
See also
● ⮫ Chapter Object 'Interface' on page 827
● ⮫ Chapter 18.24.3 Implementing Interfaces on page 221

Command 'Limit Results to Current Declaration'


Function: When multiple declarations have been found, this command collapses
the display in the cross-reference list. It shows only the results for the declara-
tion that you selected explicitly in the list.
Call: Right-click.
Requirement: The cross-reference list is active. Multiple declarations for the
searched symbol are listed as cross-references.
See also
● ⮫ Chapter 18.20.1 Using the Cross-Reference List to Find Occurrences
on page 204

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1035 /
Dialogs 1158

33.4 Dialogs
33.4.1 'Import Wizard' dialog
Function: The dialog facilitates applying PLC Engineering options and package
installations of an older PLC Engineering installation found on a local computer.
Call: The dialog is displayed when a newly installed PLC Engineering version
is started for the first time and an older version is already installed on the
computer.
“Program settings” : The user-specific PLC Engineering options are transferred from the
older installation to the new installation.
“Packages” : The packages installed with the older PLC Engineering version are

User interface
transferred to the Package Manager of the new version. See the list
of discovered package installations with the “Name”, “Version”, and
“Installation date”.
“Importing” The program settings and/or options are transferred to the current
PLC Engineering version.
“Skip” The program settings and/or options are not transferred to the current
PLC Engineering version.
Also refer to
● ⮫ Chapter 7.1 Setting PLC Engineering Options on page 47

33.4.2 Dialog 'Permissions'


Function: The permissions of user groups are defined here with which they can
execute specific actions on specific objects in the project.
Call: Menu bar: “Project 🠂 User Management”.
Every change made in the dialog is applied immediately.

Actions
All possible actions on objects of the projects are listed in “Actions”. The
actions are divided into four categories and assignments to all current objects
of the project are listed below each action. For each "action->object" assign-
ment, you can define the permission for each existing user group.
Action categories:
“Commands” Actions regarding the execution of commands
“Users, groups and Actions regarding the configuration of user accounts, user groups, and
permissions” their permissions
“Object types” Actions regarding the creation of object types
“Project objects” Actions regarding the viewing, modification, removal, and child-object
handling of objects of the project
Actions in detail:
“Execute” Execute a menu command
“Create” Create a new object in the project
“Add or remove children” Add or remove a child object below an existing object
“Modify” Modify an object in the editor or modification of user, group, and
permission settings in the corresponding editor/dialog
“Remove” Delete or remove an object
“View” Open the view of an object in the editor
Possible target of an action. This can be specific objects of the project,
or the user, group, and permission configuration.

R911403764, Edition 08 Bosch Rexroth AG


1036 / ctrlX PLC Engineering
1158 Dialogs

Permissions
All defined user groups (except the "Owner" group) are listed in “Permissions”
with a toolbar for configuring the permissions of a group.
Granted The action, which is selected in the actions view, on the selected target(s) is
granted for the selected group.
Denied The action, which is selected in the “Actions” view, on the selected target(s)
is denied for the selected group.
The permission that executes the actions, which are selected in the “Actions”
view, on the selected targets has not been defined explicitly. However, the
actions are granted by default; for example, because the corresponding per-
missions have been granted to the parent object. Example: The group has the
permission for the object "myplc". As a result, it also has the permission by
default for the object "myplc.pb_1".
The action, which is expanded in the actions view, on the selected targets
has not been denied explicitly. However, it is denied by default; for example,
because it has been denied to the parent object.
No symbol There are currently multiple actions selected in the Actions view for which the
group does not have the same permission.
Toolbar:
“Grant” The selected action on the selected target object is granted explicitly for the
selected group.
“Deny” The selected action on the selected target object is denied explicitly for the
selected group.
“Clear” The permission for the selected action on the selected target object is reset
to the default value for the selected group.

“Export/Import” Opens a menu with the commands


● “Export all permissions”
● “Export selected permissions”
● “Import permissions”
“Export all permissions” Exports all actions and their configured access permissions of the
current project to a user-specific file of data type *.perms.
To do this, the “Export Permissions” dialog opens for you to specify a
file name and to select a location in the file directory. The default file
type is Permissions (*.perms).
“Export selected Exports all selected actions and their configured access permissions
permissions” of the current project to a user-specific file of data type *.perms.
To do this, the “Export Permissions” dialog opens for you to specify a
file name and to select a location in the file directory. The default file
type is Permissions (*.perms).
“Import permissions” The contents of a *.perms file is merged with the actions and per-
missions of the current project. Groups that are part of the file but
not part of the project are ignored. The actions and permissions are
aligned by name.
To do this, the “Import Permissions” opens for you to select the
*.perms file from the file system.
See also
● ⮫ Chapter 11.10 Protecting Objects in the Project by Access Rights
on page 81

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1037 /
Dialogs 1158

33.4.3 Dialog “Login - [Control IP address]”


Comprehensive information:
⮫ Logging in and logging off to/from the control

Call:
Call the dialog using the Logging in device user... command, see ⮫ Chapter
Command “Logging in device user...” on page 912

Function:
The dialog is used to log in a user to a ctrlX device.
To log in, the user name and the password has to be entered in the dialog.

User interface
The Engineering system “remembers” the entered login data until the next
restart. Consequently, the login dialog is not displayed each time the user
wants to log in.
When enabling the checkbox “Save login data for this device”, the login data
in the Windows Credential Manager and are available after a restart of the
Engineering system.

33.4.4 'Add-on installer' dialog


The dialog is used to manage additional installable software packages in ctrlX
PLC Engineering and ctrlX I/O Engineering, see also:
⮫ Installing/uninstalling add-ons

Symbol

Call
Menu “Tools 🠂 Add-on Installer”

Description
The dialog is divided into two sections:
● Header
● Add-on overview

Header
The header contains the following information and setting options:
Information/setting Description
“Version” Name of the installation with version number and plat-
form specification
“Location” Storage location of the installation.
It is possible to change the location by clicking
on“Browse”.
“Channel for setups” Service channel for setups
“Channel for AddOns” Service channel for add-ons

Add-ons overview
The overview is divided into three tabs and contains commands for managing
add-ons.
Tabs Description
“Installed” Lists all currently installed add-ons.

R911403764, Edition 08 Bosch Rexroth AG


1038 / ctrlX PLC Engineering
1158 Dialogs

Tabs Description
“Browse” Lists all available and compatible add-ons that have
not yet been installed.
To install the add-ons, select the add-on in the list and
execute the installation command that appears.
“Updates” Lists all currently installed add-ons for which at least
one update is available.
To install the update, select the add-on in the list and
execute the installation command that is displayed.
Commands Description
“Install File” Opens the file selection dialog, for selecting an add-
on.
● Confirming the dialog starts the installation of the
add-on
● Confirm the following license agreements and sig-
nature information
● The user is informed about the progress during the
installation
● A message is output once the installation is com-
pleted
“Export config” Opens the file selection dialog so that it is possible to
create and store a configuration file.
The file contains information about all settings of the
dialog.
“Import config” Opens the file selection dialog so that you can select a
previously stored configuration file.
The file contains information that is used to preset all
other settings in the dialog.

The ctrlX Add-on Installer is based on functions of the CODESYS installer of the
CODESYS GmbH.
The complete documentation can be found on the CODESYS website, see:
⮫ Web documentation

33.4.5 Dialog 'Library Parameters'


Function: The dialog shows the library parameters of the libraries available in
the library manager of the application and POU pool. The values of the parame-
ters can be changed in the dialog. Furthermore, an export and import of the
parameters is available.

“Export” Opens the Export library parameters


dialog for selecting the parameter lists
to be exported. A CSV file is generated
for each parameter list.
“Import” Opens the dialog to select the param-
eter lists to be imported.
“Reset (toolbar)” Resets the values of all parameters to
their default value.
“Value (editable)” Value for the parameter. The value can
be edited.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1039 /
Dialogs 1158

“Default value” Default value of the parameters as


defined in the library
“Reset” By clicking on the icon, individual
parameters, all parameters of a param-
eter list or all parameters of all param-
eter lists can be reset to their default
value.

33.4.6 Dialog 'Library Reference Conversion'


Function: The dialog defines how references to libraries that are no longer avail-
able are to be handled. Note: The undefined library references can be found in
the Global Library Manager located in the “POUs” view.

User interface
Call: When opening a CoDeSys V2.3 project in V3, the dialog opens when the
converter detects a library which cannot be used anymore in the current PLC
Engineering version.
A CoDeSys V2.3 project can be converted into a PLC Engineering V3 project
only if the CODESYS V2.3 Converter package is installed in PLC Engineering V3.
The package is available in the CODESYS Store.
Table 142: “What do you want to do?”
“Convert and install the The converter also converts the library file into the new format. It
library as well.” remains referenced in the project. It is installed automatically in the
library repository in the "Other" category. If the library does not pro-
vide the necessary project information for an installation, then the
“Enter Project Information” dialog opens for the information to be
added.
“Use the following library The previously used library is replaced by another library. The
that has already been “Browse” button opens a dialog for selecting from the local library
installed” repository.
“Ignore the library. The The library reference is removed from the project.
reference will not appear in
the converted project”
“Remember this mapping The settings made here in the dialog are also used for future project
for all future occurrences of conversions.
that library reference”
See also
● ⮫ Chapter Command 'Library Repository' on page 969

33.4.7 Dialog 'Select Function Block'


Function: The dialog is used for selecting a function block for I/O mapping. The
function block should be mapped to the I/O channel selected in the “<device
name> I/O Mapping” tab or to the object selected in the “<device name> IEC
Objects” tab.
Call:
● Tab “<device name> I/O Mapping”, command button “Add FB for I/O
channel”
● Tab “<device name> IEC Objects”, command button “Add”
The dialog provides all function blocks from the active application and the
libraries included in the project which fulfill the following:
● The function block has the {attribute 'io_function_block'} attribute.
● The function block contains input or output parameters that match
the channel type (input, output, data type) and has the {attribute
'io_function_block_mapping'} attribute.

R911403764, Edition 08 Bosch Rexroth AG


1040 / ctrlX PLC Engineering
1158 Dialogs

When a function block is selected that provides multiple matching parameters,


only the first one is mapped automatically to the channel. The others can only
be assigned manually in the “<device name> I/O Mapping” tab.
After the function block is assigned, the parameter of the function block
instance is entered in the “Variable” column of the mapping table. Then the
path is composed as follows:
<application name>.<device channel name>_<FB name>_<continuous
FB instance number>. <FB parameter name>
Example: App1.Out_4_Int_myScale_Output_Int_1.iOutput for the param-
eter iOutput of the first inserted instance of the function block
myScale_Output.
“Find” Input field for searching for function block names
“Type” Function blocks in the tree structure that match the channel type.
Nodes: application, library name(s)
“Documentation” Shows the available documentation for the library selected in the tree
or the library block.
See also
● ⮫ Chapter 33.1.9 Tab '<Device name> I/O mapping' on page 739
● ⮫ Chapter Attribute 'io_function_block', 'io_function_block_mapping'
on page 626

33.4.8 Dialog 'Device Conversion'


Function: The dialog defines how references to devices that are no longer avail-
able are to be handled.
Call: When opening a CoDeSys V2.3 project in V3, the dialog opens when the
converter detects a device reference which cannot be used anymore.
A CoDeSys V2.3 project can be converted into a PLC Engineering V3 project
only if the CODESYS V2.3 Converter package is installed in PLC Engineering V3.
The package is available in the CODESYS Store.
Table 143: “What do you want to do?”
“Use the following device PLC Engineering replaces the previously used device in the device tree
that has already been with another device. The “Browse” button opens a dialog for selecting
installed” from the local device repository.
“Ignore the device. All The device entry with all objects inserted below it is removed from the
device specific objects will device tree.
not be available in the new
project”
“Remember this mapping The settings made here in the dialog are saved in the PLC Engineering
for all future occurrences of Options, in the “PLC Engineering V2.3 Converter” category. As a result,
that device” they are also valid for future project conversions.
See also
● ⮫ Chapter Command 'Device Repository' on page 963

33.4.9 Dialog 'Breakpoint Properties'


Function: The dialog is used to display or change the properties of the selected
breakpoint in the “Breakpoints” view.
Call:
● “Breakpoints” view, “Properties” button
● “Breakpoints” view, “New” button, “New Breakpoint” command or “New
Data Breakpoint” command
Requirement: An entry is selected in the list of breakpoints.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1041 /
Dialogs 1158

The dialog is identical to the “New Breakpoint” dialog which is opened in


the “Debug” menu by means of the respective commands. Therefore, see the
description in the help for the “New Breakpoint” dialog.
See also
● ⮫ Chapter 33.4.11 Dialog 'New Breakpoint' on page 1041

33.4.10 Dialog 'Prepare Value'


Function: This dialog is used for preparing a value for a forced variable. PLC
Engineering executes the prepared action with the next forcing.
PLC Engineering opens the dialog in the following situations:
● When clicking in the field “Prepared value” of a forced variable in the decla-

User interface
ration section
● When clicking in the inline monitoring field of a forced variable
● When clicking in the field “Prepared value” of a forced variable in the moni-
toring window
“Prepare a new value for Value that PLC Engineering writes to the variable with the next force
the next write or force operation
operation”
“Remove a preparation with PLC Engineering deletes the prepared value.
a value”
“Release the force, without PLC Engineering retains the forced value and ends forcing. PLC Engi-
modifying the value” neering marks the variable <Unforce>.
“Release the force and PLC Engineering resets the forced value and ends forcing. The variable
restore the variable to the is marked with <Unforce and restore>.
value it had before forcing
it”
See also
● ⮫ Chapter Command 'Force Values' on page 959

33.4.11 Dialog 'New Breakpoint'


Function: In the dialog, you define the settings for a new breakpoint or data
breakpoint. It is identical to the “Breakpoint Properties” dialog which is used in
the “Breakpoints” view.
Call:
● “Debug 🠂 New Breakpoint”
● “Debug 🠂 New Data Breakpoint”
Requirement: The application is in online mode.

Tab 'Condition'
The dialog defines the requirements for which program processing should halt
at a breakpoint.
Using conditional breakpoints slows down code execu-
NOTICE
tion, even when the condition does not yield TRUE.
Conditional breakpoints required a PLC Engineering runtime >= V3.5.4.0.

Table 144: “Tasks”


“Break only when the : PLC Engineering evaluates the breakpoint only if it is reached by
breakpoint is hit in one of specific tasks. The required tasks must be activated.
the following tasks” For example, you can define a single debug task and also prevent other
tasks that use the same block from being affected when debugging.

R911403764, Edition 08 Bosch Rexroth AG


1042 / ctrlX PLC Engineering
1158 Dialogs

Table 145: “Hit Count”


“Hit Count” “Break always”: The program always halts at this breakpoint.
Alternative: The program halts at the breakpoint when the breakpoint
has been hit as often as defined in the following (type in the required
hit count or select it from the number list):
● “Break when the hit count is equal to”
● “Break when the hit count is a multiple of ”
● “Break when the hit count is greater than or equal to”
Table 146: “Condition”
“Break, when true” : PLC Engineering evaluates the specified condition and halts the
program at the breakpoint only when the result yields TRUE. You can
define a condition as a valid Boolean expression. Examples: x>100,
x[y]=z, a AND b, boolVar.

Tab 'Data'
Requirement: This is used for the properties of a data breakpoint.
The function of data breakpoints depends on the target system. Currently, data
breakpoints are possible only with the ctrlX CORE.
On the tab, the variable or memory address is specified for which the data breakpoint is set or will
be set.
“Break execution when the ● Input of a qualified variable name
value of the variable or ● : Selection of a variable in the “Input Assistant” dialog, in the
address changes” “Watch Variables” category
Examples: variable: PLC_PRG.fb_DoSth.dwVariable; address:
16#12A, 0x12A, 129
“Size” Number of bytes of the specified variable or memory address above
which should be monitored for changes. When a new variable or
memory address is specified, a value that matches the data type or
memory is set automatically at first.
Note: The “Size” and quantity depend on the target system. For the
ctrlX CORE, a maximum of four data breakpoints with a maximum size
of 8 bytes can be defined.
Example: 4 for data type DWORD
Example: 2 for data type DWORD: Only the two first bytes of the variable
are monitored.

Tab 'Execution Point Settings'


Here. an existing breakpoint or data breakpoint can be converted into an execu-
tion point.
“Execution point (execution : The breakpoint becomes an execution point. Processing does not
does not stop at halt at this point and the given code is executed.
breakpoint)” ● Execution point of a breakpoint: activated: ; deactivated:
● Execution point of a data breakpoint: activated: ; deactivated:
“Execute the following Code that is executed when the execution point is reached.
code” Looping structures (For, While) and IF or CASE expressions are not
possible.
“Print a message in the This option is available only when you select the “Enable logging in
device log” breakpoints” option in “Project Settings 🠂 Compile Options”.
PLC Engineering can print variables with the placeholder {variable
name} in the message text.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1043 /
Dialogs 1158

Tab 'Location'
Requirement: The command “New breakpoint” was selected.
“POU” POU of the active application where the breakpoint is placed.
“Position” Position of the breakpoint in the POU. Entry as row and column num-
bers (text editor) or as network or element numbers.
“Instances” In the case of function blocks, you have to define whether the break-
point should be set in the implementation or in an instance.
PLC Engineering sets the breakpoint in the instance. For this option,
select “Instance Path”.
PLC Engineering sets the breakpoint in the implementation.

User interface
“Enable breakpoint : The breakpoint is activated.
immediately” : The breakpoint is not activated. To activate later, click the button
in the “Breakpoints” view.

See also
● ⮫ Chapter 33.4.9 Dialog 'Breakpoint Properties' on page 1040
● ⮫ Chapter 21.3 Using Breakpoints on page 271

33.4.12 Dialog 'Monitoring Range'


Function: This dialog restricts the range of array elements whose values are
displayed during monitoring.
Call: Click in the column field “Data Type” that belongs to the array variable.
Requirement: A POU is in online mode and is being monitored. In addition, a
variable of the POU has the data type “ARRAY”.

“Valid range” The validity range of the array elements that are monitored.
Example of a three-dimensional array: [1..10][-3..3][-10..10]
“Maximum number of array Number of elements of the array variables
elements” Example: 1470
When you edit one of the settings “Start”, “End”, or “Scroll range of 1000 elements”, both of the
other settings are adapted automatically.
“Start” Index of the first array element whose value is displayed.
“End” Index of the last array element whose value is displayed.
“Scroll range of 1000 Scrollbar for selecting a range from the set of array elements.
elements”

See also
● ⮫ Chapter 22.3.2 Calling of Monitoring in Programming Objects on page 291

33.4.13 Dialog 'Trend Storage'


Function: This dialog includes the configuration for buffering the trend data of
a trend recording.
Call: “Trend Storage” button in the editor of a trend recording.

R911403764, Edition 08 Bosch Rexroth AG


1044 / ctrlX PLC Engineering
1158 Dialogs

“Maximum number of Maximum number of trend variables that can be managed in the data-
variables” base. If you increase this value afterwards, then will PLC Engineering
perform a download and reconfigure the database.
“Store every N Time interval (in ms) when the CmpTraceMgr runtime system compo-
milliseconds” nent buffers the recorded data before storing it persistently in the
database. The application calculates internally the number of task
cycles from the time interval. The duration of a task cycle is defined
in the task configuration.
A high value results in better runtime performance. The disadvantage
is the increased risk of losing data if the controller crashes or shuts
down. A low value reduces this risk. The disadvantage is the slower
control over a trend visualization with large amounts of data.
“Limit” : Limit the recording
● “No Limit”: Unlimited number of data records (not recommended)
● “Maximum number of records”: Maximum number of data records
that are stored in the database. A data record consists of time
stamp and the values of the trend variables at this time.
● “Maximum storage size”: Maximum size of the trend storage. The
application calculates internally the number of data records.
Clicking the "down" symbol ( ) of the drop-down list will set the
units to kilobytes (KB), megabytes (MB), or gigabytes (GB).

See also
● ⮫ Chapter 22.5.2 Getting Started with Trend Recording on page 306

33.4.14 Dialog 'Advanced Trend Settings'


Function: The dialog provides more settings for configuring trend recording.
Call: Click on “Advanced” in the editor of a “Trend recording” object.
“Measurement in every nth Frequency that the runtime system records data, depending on the
cycle” number of processed task cycles. Select a value from the list box or
type a value into the input field.
Using the settings from the task configuration, PLC Engineering calcu-
lates the time interval according to the frequency. Therefore, the calcu-
lation is possible only if at least the task cycle time is set. The result
is displayed to the right of the input field in normalized notation. For
example: “1h1m1s1ms”
Default: 1 means that data is recorded in each task cycle.
“Additional runtime buffer Length of the time interval during which the runtime system can addi-
for” tionally acquire data. For example: 1000 ms
If a delay occurs when writing data in the runtime system component,
then there is a risk of data loss due to overwriting. In this case, the
runtime system uses the addition buffer.

Also refer to
● ⮫ Chapter 22.5 Data recording with "Trend" on page 305
● ⮫ Chapter 22.5.3 Configuring the trend recording on page 306

33.4.15 Dialog “Selecting real-time data online from ctrlX CORE”


Call:
The dialog can be called via the “Selectively from ctrlX CORE..” command, see:
⮫ Command “Selectively from ctrlX CORE..”

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1045 /
Dialogs 1158

Function:
Via the dialog, add an EtherCAT master as a Data Layer instance in the device
tree.

Add EtherCAT master instance


1. Open the dialog via the “Selectively from ctrlX CORE..” command.
🡆 The “Selecting real-time data online from ctrlX CORE” dialog is
opened and the list entry “ethercat_master_instances_ethercatmaster”
is selected via the checkbox.
2. Confirm the dialog.
🡆 The object“ethercat_master_instances_ethercatmaster” is added below

User interface
the “DataLayer_Realtime” object in the device tree.
3. If there are slave devices below the EtherCAT master, the dialog remains
open and shows the slave devices. If slave devices are to be applied to the
project, confirm the device application to the project.
Exit the dialog via the button“Close” without changing the configuration.

33.4.16 Dialog “New Project” ctrlX CORE


Being prepared

33.4.17 Dialog “Selecting real-time data online from ctrlX CORE”


Use the dialog to apply DataLayer real-time system data to the PLC project. The
dialog provides a comparison between the source configuration on the ctrlX
device and the target configuration in the PLC project. By using the comparison
function, real-time data of the source configuration can be selected in groups
or individually and can be applied to or removed from the PLC project.
The scope supported by the PLC real-time data was extended by the ctrlX
system version V-0114. In addition to the previous field bus real-time data,
scheduler real-time data and Motion real-time data are supported. The exten-
sion affects all real time data registered in the DataLayer node "datalayer/
nodesrt".

Call:
The dialog can be opened via the “Selectively from ctrlX CORE..” command,
see :
⮫ Command “Selectively from ctrlX CORE..”

The dialog is divided into three segments:


● Left window
The window to the left shows the current real-time data configuration of the
target node in the PLC project (node used to call the dialog in the device
tree).
The target node can be subsequently selected or switched via the drop-
down box in the dialog header.
● Right window
The window to the right shows the current real-time data configuration on
the ctrlX device for the selected target node.
Data groups or individual data can be selected to be applied to the project
via the displayed check boxes.
● Apply button
Changes can be applied to the target configuration in the real-time data
configuration by using the apply button between the two windows.

R911403764, Edition 08 Bosch Rexroth AG


1046 / ctrlX PLC Engineering
1158 Dialogs

The apply button is only enabled in case of differences between the device
and target configuration.

File display behavior


If the dialog is opened via the “DataLayer_Realtime” node in the device tree, no
data is displayed in the window for target and device configuration as the node
is only used to “collect” data for the subordinate real-time nodes. In this case,
call the dialog via the context menu of the real-time node in the device tree
to show its configuration. Optionally, select the target node via the drop-down
box in the dialog header.
If data fields are already configured in the project and are available on the ctrlX
device, the checkbox is automatically checked.

Apply/remove data to/from the configuration


1. Open the dialog via the context menu of the target node in the device tree
🡆 The dialog shows the current target and device configuration
2. In the device configuration, navigate to the data field
3. By enabling/disabling the checkbox, it can be selected to apply or remove
the data field:
● Enabled: Applying data field into the target configuration
● Disabled: Data field is not applied or is removed from the target config-
uration
4. Confirm the selection by confirming the confirming the transfer button
between both dialog windows
🡆 The selection is applied to the target configuration and is refreshed in
the left window.

33.4.18 Dialog “Insert templates”


Call:
The dialog is called via the “Insert templates...” command, see:
⮫ Command “Insert templates...”

Function:
The dialog provides project templates under “Check Functions” and MotionIn-
terface. By implementing the project templates, specific template elements are
automatically added to the application nodes.
Available templates under “Check Functions”:
● Array limits
● Division by 0
● Pointer accesses
● Range limits
Available templates under “MotionInterface”
● AxisInterface
● KinematicInterface and AxisInterface

33.4.19 'Certificate selection' dialog


Symbol:
Function: The dialog is used to select the certificates for encryption, decryption
and digital signature.
Call:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1047 /
Dialogs 1158

● “Security Screen” view, “User” tab


● Menu “View 🠂 Properties”, “encryption” tab, if the “Application” is selected
in the device tree
● Menu “Project 🠂 Project settings”, category “Security”

'Certificate selection' dialog


The purpose of the certificate that is selected in the dialog depends on the call location:
● Call point: “Security Screen” view, “User” tab
– Certificate for digital signatures
– Certificate for the decryption of project files
– Certificate for encrypted communication

User interface
● Call point: “View 🠂 Properties” of the application
– “Certificates of devices that share the encrypted download and the boot application”
● Call point: “Project 🠂 Project settings”, category “Security”
– “Certificate for project encryption”
Listing of the selected cer- The following properties are displayed for each selected X.509 certifi-
tificates in a table cate:
● “Created for”
● “Created by ”
● “Valid as of”
● “Valid until ”
● “Thumb print”: SHA1 fingerprint
Double-clicking on an entry opens the “Certificate” dialog with the
“General”, “Details” and “Certification path” tabs. In that tab, you will
find a reference to Windows help with more information about the
dialog.
Adds the selected available certificate to the list of selected certifi-
cates.
Deletes the certificate selected in the list.
“Available certificates in the Double-clicking on an entry opens the “Certificate” dialog with the
local Windows Certificate “General”, “Details” and “Certification path” tabs. In that tab, you will
Store:” find a reference to Windows help with more information about the
dialog.
Certificate icons ●
● : Certificate with private key
● : Untrusted certificate

33.4.20 Dialog “Tranfer plc project data source from PC to ctrlX”


Being prepared

33.4.21 Dialog “Tranfer plc project data source from ctrlX to PC”
Being prepared

33.4.22 “Properties” dialog


'Properties' dialog – General information
The dialog is used to configure the following settings of an object in PLC Engi-
neering. For this purpose, it contains different tabs depending on the object,.
Each of the tabs handles a category of properties.

R911403764, Edition 08 Bosch Rexroth AG


1048 / ctrlX PLC Engineering
1158 Dialogs

Call: Menu “View”, context menu of the object in the “Devices”, “POUs” or
“Modules” view.

Dialog 'Properties' - 'Common'


Function: This dialog shows common information about the selected object.
Call: Main menu “View 🠂 Properties”, or context menu of the object
(“Common”).
Requirement: An object is selected in the device tree or POUs view.
“Name ” Object name as shown in the device tree or POUs view
“Object type ” Type of object (for example, POU, application, or interface)
“Open with ” Type of editor to display or edit the object

'Properties' dialog - 'Build'


Symbol
Function: The dialog contains options for compiling (build process) the object.
Call: Menu “View 🠂 Properties”, context menu of the object in the device tree
Name Description
“Exclude from build” : The object and recursively its child objects are not included in the
next compilation run.
The object entry in the “Devices” or “POUs” view is displayed in green.
“External implementation” : PLC Engineering does not generate code when compiling the
“(Late link in the runtime project for this object. The object is not linked until the project is
system)” running on the target system, assuming it exists on the target system
(for example, in a library).
The object name in the “Devices” or “POUs” view is assigned the addi-
tion (EXT)
“Enable system call” : A system call (runtime system) for functions is possible.
Background information: In contrast to CoDeSys V2.3, in V3 the ADR
operator can be used with function names, program names, function
block and method names. It replaces the INSTANCE_OF operator.
BUT: It is not possible to call function pointers within PLC Engineering.
“Always bind” : The object is marked at the compiler and thus always included in
the compile information. This means that it is always compiled and
loaded on the control.
Note: Optionally, the {attribute 'linkalways'} pragma can be
used to instruct the compiler to always include an object.
“Compiler-Defines” Here you can enter “Defines" and conditions for compiling the object
(conditional compilation). You can also enter the expression expr used
in such pragmas. Multiple entries are possible in the form of a comma
separated list (see {define} statements).
Example: hallo, test:='1'

“Additional compiler definitions from the device description”


“Defined in the device” Listing of the compiler definitions that originate from the device
description. These compiler definitions are taken into account during
the compilation if they are not listed in the “Ignored definitions” field.
“Ignored definitions” Listing of compiler definitions from the device description that are not
taken into account during the compilation.
Copies the selected compiler definition from the “Defined in device”
field to the “Ignored definitions” field.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1049 /
Dialogs 1158

Name Description
Moves the selected compiler definition from the “Ignored definitions”
field to the “Defined in device” field. The compiler definition is taken
into account during the compilation.
Also refer to
● ⮫ Chapter 32.6.3 Conditional pragmas on page 597
● ⮫ Chapter Attribute 'linkalways' on page 628

Dialog 'Properties' - 'Access Control'


Function: The dialog defines the access rights of user groups for objects.
Call: Main menu “View 🠂 Properties”, context menu of an object in the view

User interface
“Device” or “POUs”.
Requirement: An object is selected in the view “Device” or in the view “POUs”.
“Groups, actions and permissions” A table which displays the following user groups access
rights on objects:
● “View”
● “Modify”
● “Remove”
● “Add/remove children”
Perform a double click on the access right symbol to open
the drop down list with the available rights.
See also
● ⮫ Chapter 11.10 Protecting Objects in the Project by Access Rights
on page 81
● ⮫ Chapter 33.4.2 Dialog 'Permissions' on page 1035

Dialog 'Properties' - 'Boot Application'


Function: The settings on this tab define when and how a boot application is
created from the application.
Requirement: The device supports the settings.
Call: Select the application object; context menu: “Properties”; menu bar:
“View 🠂 Properties”, “Boot Application” category
“Create implicit boot A boot application is created automatically when downloading the
application on download” application.
“Create implicit boot A boot application is created automatically when for an online change.
application on Online
Change”
“Remind boot application Before closing the project, PLC Engineering prompts to create the boot
on project close” application.
“Verify boot application After the boot application is created, an independent service checks
after creation” whether or not the boot application has been created correctly.
Regardless of the presets defined here, you are always able to create a boot
application explicitly when you login.
See also
● ⮫ Chapter 20.7 Generating Boot Applications on page 268
● ⮫ Chapter "Online change" command on page 943

Dialog 'Properties' - 'Encryption'


Function: The dialog contains the properties of the application regarding
encryption. If the CODESYS Security Agent is installed, then you can start a
wizard for the encryption of downloads, online changes, and boot applications.

R911403764, Edition 08 Bosch Rexroth AG


1050 / ctrlX PLC Engineering
1158 Dialogs

Call:
● Menu bar: “View 🠂 Properties”
● Context menu of an application object
Important
NOTICE
Encryption with a dongle is no longer classified as a
secure encryption method.
It is recommended to encrypt with certificates instead.
Table 147: “Encryption Technology”
If the “Enforce encryption of downloads, online changes, and boot applications” option is selected
in the “Security Screen” view in the “Security Level” group, then the encryption technology is set to
“Encryption with certificates” and cannot be changed in this dialog.
“No Encryption”
“Simple Encryption” You can download the boot application to the controller only when the
defined dongle (license key) is connected to the computer.
The dongle is provided by Bosch Rexroth AG or the respective hard-
ware manufacturer. The firm code is displayed. Please enter the pro-
vided product code.
“Encryption with license You can download the boot application to the controller only after
management” you have specified the product code and firmcode, and the respec-
tive dongle is connected to both the development computer and the
controller. You receive the codes from the vendor that manages the
licenses.
“Encryption with You can download the boot application to the controller only when a
certificates” valid certificate exists for it. The “Certificates” group is enabled. See
the description below.
The option is already selected if the “Enforce signing of downloads,
online changes, and boot applications” option is selected on the
“User” tab of the “Security Screen” view.
Table 148: “Certificates”
Note: If the option “Encryption of downloads, online changes, and boot applications” is enabled
in the “Security screen” view under “Security level”, the encryption technique “Encryption with
certificates” is set in the “Properties” dialog and cannot be changed.
: The “Certificate selection” dialog opens. Here you can select previ-
ously installed certificates of devices for which the encryption of
download, online change, and boot application is enabled. The list
can contain several entries if several devices are authorized to run this
application.
“Digitally sign application The application is signed with a digital signature. The certificate for
code” the digital signature is specified in the “Security Screen” view on the
“User” tab.
Area for the display of the Information per certificate:
selected certificates with ● “Created for”
corresponding information ● “Issued by”
● “Valid as of”
● “Valid until ”
● “Thumbprint”
“Encryption Wizard” This button is available only if the CODESYS Security Agent is
installed. It starts the wizard with the same name. See the help for
CODESYS Security Agent in this case.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1051 /
Dialogs 1158

Also refer to
● ⮫ Chapter 18.13 Encrypting the application on page 153
● ⮫ Chapter Command 'Security Screen' on page 908
● Help about CODESYS Security Agent

Dialog 'Properties' – 'Build' (C-integration)


Function: In this dialog, you configure the build environment and the necessary
data for the integration of the C development environment.
Call: Main menu “View”, context menu of the object “C Code Module”
Requirement: The object “C Code Module” is selected in the device tree.
The dialog in this form is valid only for ctrlX CORE and
NOTICE

User interface
Visual Studio. For other environments, the dialog can
look different or may not even be available at all.
“Visual Studio location” Installation path of Visual Studio on the hard disk
You can also select the path with the input assistant or search for it
with the magnifying glass.
“Windows SDK location” Installation path of Windows SDK on the hard disk
You can also select the path with the input assistant or search for it
with the magnifying glass.
“Temporary build folder Path on the hard disk for the temporary build files
Location”
See also
● linktarget doesn't exist but @y.link.required='true'
● ⮫ Chapter 18.10 Integrating C Modules on page 146

'Properties’ dialog - 'External File'


Function: The properties of the selected object (type external file) are dis-
played in this dialog. The properties were initially defined when the object
was added to the device tree or the pool and can be adjusted here in this
properties dialog.
Call: Main menu “View 🠂 Properties” or context menu of the object in the
Project Explorer
Prerequisite: The external file object is selected in the “Devices” view or in the
“POUs” view.
“File Handling” Defines how the external file is saved in the CODESYS project
“Remember the link” The file link that links to the external file in the Windows file system is
saved
Note: Access via the file link fails if the external location of the file
changes. The file is only available in the project as long as it exists in
the specified location.
“Remember the link and The file link that links to the external file in the Windows file system is
embed into project” saved. Additionally, to increase security, a copy of the file is stored in
the project.
Note on access behavior:
● Only if the access via the link fails, the copy in the project is
reverted to
● If the external file changes, the copy is handled according to the
option selected below under “If the external file changes”.
“Embed into project” A copy of the external file is stored in the Windows file system.
Note: The copy is always accessed. If the external file changes, the
project-internal copy is not updated.

R911403764, Edition 08 Bosch Rexroth AG


1052 / ctrlX PLC Engineering
1158 Dialogs

“If the external file The update type of the copy saved in the project for which a file link
changes” was saved at the same time.
Prerequisite: The option Save the link and embed it into the project is
enabled.
“Reload the file If the external file changes, the copy saved in the project is updated.
automatically”
“Prompt whether to reload If the external file changes, a dialog is displayed prompting the user
the file” whether or not to update the copy in the project.
“Do nothing” Although the external file changes, the copy in the project remains
unchanged.
“Linked file” Information about the file link stored in the project.
Prerequisite: The option Save the link or the option Save the link and
embed it into the project is enabled.
“Name, place, size, Information about the file link.
changed”
“Show file properties” Opens the standard dialog “Properties of <file name>” in the Windows
file system.
This dialog is identical to the Properties dialog that can be opened in
Windows via the file's context menu.
“Embedded file” Information about the copy stored in the project.
Prerequisite: The option Save the link and embed it into the project or
Embed into project is enabled.
“Size, changed” Information about the copy (embedded file).
“Update embedded file” : If the external file has changed, the copy embedded in the project
is updated .
“Online handling” Handling of the file during online operation.
“Transfer with download/ : During download and online change, the external file is also loaded
online change” onto the control and stored in the target system path.
“Target system path The target system path can be entered as follows:
(relative to "$PlcLogic$" on ● For root directory $PlcLogic$: Leave input field blank
the device)”
● Individual folder (not yet existing) in the root directory.
Example: MySubDirectory
● Folder of the application (below $PlcLogic$)
Example of application 'App123' App123
● Nested folder structure below the application folder.
Example: App123/Sub01/SubSub01
● Use another existing placeholder.
Example of visualization: $visu$
Remark: When using existing paths on the device, the paths have to be
case sensitive.
“OK” button Applies the settings to the object.
Also refer to
● ⮫ Chapter Object 'External File' on page 818

Dialog 'Properties' - 'Bitmap'


Function: The dialog is for assigning a bitmap file to the object. The image will
be used in the graphic view of the Library Manager and in the ToolBox view of
the FBD/LD/IL editor.
Call: Main menu “View 🠂 Properties”, context menu of the object

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1053 /
Dialogs 1158

Requirement: The object is selected in the view “Devices” or in the view


“POUs”
“Render pixels of this color The selected color will be displayed transparently.
transparently: ”
See also
● ⮫ Chapter 8.3.4 Adding objects on page 61

Dialog 'Properties - Application Build Options'


Function: The dialog includes settings that PLC Engineering uses for creating a
boot application for the controller.
Call: Menu bar: “View 🠂 Properties”; context menu of an application object

User interface
“Download application info” This feature requires compiler version >=3.5.0.0, runtime
version >= 3.5.0.0.
The information about the application contents is also
downloaded to the PLC. We recommend that you keep this
option enabled because it allows for a difference check
between the current application and the application on
the PLC. This compares the number of blocks, data, and
memory locations.
To get the information about the differences, click “Details”
in the “Applications” tab of the device editor. This is also
in the message view that opens when you are downloading
an application to the PLC when it is different from the one
already on the PLC.
“Dynamic memory settings” Memory is allocated dynamically for the application, for
example when using the operator __NEW. In this case, define
the “Maximum size of memory (bytes)”.
Caution: The entire memory is not available for creating
objects dynamically. Instead, the system always uses part
of it for management information.
See also
● ⮫ Chapter 20.5 Generating Application Code on page 265
● ⮫ Chapter 20.7 Generating Boot Applications on page 268
● ⮫ Chapter 33.2.6 “Application” object on page 763

Dialog 'Properties' - 'Target memory settings'


Function: The dialog allows for changing the memory settings of the target
device.
Call: Menu bar: “View 🠂 Properties”; context menu of the application
Requirement: The application is selected in the “Devices” view.
“Override target memory : The memory settings stored in the device description are over-
settings” ridden by the values specified in “Input size”, “Output size”, and
“Memory size”.
Note: If the memory settings of the target device are changed, then it
is no longer possible to log in to an existing application on the target
device, nor is it possible to perform an online change.
“Input size” Input fields for the memory sizes used to override the values
“Output size” "memory-layout\\input-size", "memory-layout\\output-size",
and "memory-layout\\memory-size" stored in the device descrip-
“Memory size”
tion.
Requirement: The “Override target memory settings” option is
selected.

R911403764, Edition 08 Bosch Rexroth AG


1054 / ctrlX PLC Engineering
1158 Dialogs

See also
● ⮫ Chapter 33.2.6 “Application” object on page 763

“Properties”- “Network variables” dialog


Symbol:
Function: In this dialog, you define network properties for the variable list that
is selected in the device tree. Furthermore, any variables in it that are declared
as network variables are also available.
Call: “Context menu of variable list in device tree 🠂 Properties”, “Network
Variables” tab
“Network type” UDP
“Task” Task of the current application that controls the variables to
be sent. PLC Engineering sent the variables always at the
end of a task.
“Variable list ID” To identify the network variable list. Has to be unambiguous.
“Pack variables” The size of the packages (telegrams) that are transmitted
depends on the network type. In the case of “UDP”, a
package is 256 bytes.
: PLC Engineering bundles the variables for sending in
packages in order to reduce as much as possible the
number of packages to send. In the case of variables of type
array or structured data types, this can lead to the splitting
of the variables into multiple telegrams. As a result, data
inconsistencies are possible within these variables, even if
the variable size is smaller than the package size.
: PLC Engineering generates one package per variable.
“Transmit checksum” : A checksum is provided for each variable packet. The
checksum is verified by the receiver in order to ensure
that the variable definitions of sender and receiver comply
with each other. A package with incorrect checksum is not
accepted.
“Confirmation” : PLC Engineering sends an acknowledgement message for
each received data package. If the sender does not receive a
confirmation before it sends again, then an error is written
to the diagnostic structure.
Note: From version 3.5.7.0 of the NetVarUdp library, no
reception channel is assigned anymore if no confirmed
transfer is selected. In this way, network variable exchange
is also possible between two controllers on one hardware
device .
“Cyclic transmission”, “interval” PLC Engineering sends the variables within the defined
interval. Example of time definition: "T#70ms".
“Transfer upon change”, “minimum : PLC Engineering sends the variables only if their values
gap” have changed. You can use "minimum gap" to define the
least amount of time between two transmissions.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1055 /
Dialogs 1158

“Transmit on event”, “variable” : PLC Engineering sends the variables as soon as the
defined variable yields TRUE.
“Settings” Log-specific settings; possible entries depend on the net-
work library:
“Port”: Number of the port that PLC Engineering uses for
data exchange with other network units. The “Default value”
is "1202". The current value can be changed in the “Value”
field at any time: Select the field, press the [spacebar],
enter the value.
Caution: The other nodes in the network must define the
same port! If more than one UDP connection is defined in
the project, the port number is automatically adjusted in all

User interface
configurations to the value set here.
“Broadcast Addr.”: The “preset value” is "255. 255. 255.
255" means that data is exchanged with all network devices.
Change the current value in the “Value” field: Select field,
press [spacebar], enter the address or the address range of
a subnetwork. Example: "197 . 200. 100 . 255" in case
of communication with all nodes having IP addresses in the
range from "197 . 200. 100 . x".
Also refer to
● ⮫ Chapter 19.5 Network variables on page 238
● ⮫ Chapter 19.5.2 Configuring a Network Variable Exchange on page 239
● ⮫ Chapter 33.2.21 Object 'Network Variable List (Receiver)' on page 783
● ⮫ Chapter 33.2.20 Object 'Network Variable List (Sender)' on page 783

Dialog 'Properties' - 'Network Settings'


If the device supports the network functionality, then the current network set-
tings for a GNVL (global network variable list) can be displayed and changed
in the “Properties” dialog of the object. These are the settings that were used
when adding the GNVL in the “Add Network Variable List (Receiver)” dialog.
See also
● ⮫ Dialog 'Add Network Variable List (Receiver)' on page 784
● ⮫ Chapter 19.5.2 Configuring a Network Variable Exchange on page 239

Dialog 'Properties' - 'CFC Execution Order'


Function: The tab switches the mode of the execution order for CFC objects.
Call: Context menu: “Properties” of a CFC object in the “Devices” view or
“POUs” view

R911403764, Edition 08 Bosch Rexroth AG


1056 / ctrlX PLC Engineering
1158 Dialogs

Tab 'CFC Execution Order'


“Execution order” In the CFC editor, you position the elements and therefore also the
networks freely. Two modes are available to prevent the execution
order in the CFC POU from being undefined.
“Auto Data Flow Mode” In this mode, the execution order is determined automatically by data
flow, or in case of ambiguity, by network topology. The POUs and the
outputs are numbered internally. The networks are executed from top
to bottom and left to right.
Advantage: The automatically defined execution order is optimized by
time and by cycle. You do not need any information about the inter-
nally managed execution order during the development process.
The following commands are provided afterwards in the “CFC
🠂 Execution Order” menu:
● “Display Execution Order”
● “Set Start of Feedback”
The elements in the CFC editor are displayed without markers and
without numbering. It is not possible to change the execution order
manually. For networks with feedback, you can also set a starting
point.
“Explicit Execution Order In this mode, you can define the execution order explicitly. To do this,
Mode” the elements are displayed in the CFC editor with markers and num-
bering, and menu commands are provided for defining the order.
The following commands are provided in the “CFC 🠂 Execution Order”
menu:
● “Send to Front”
● “Send to Back”
● “Move Up”
● “Move Down”
● “Set Execution Order”
● “Order by Data Flow”
● “Order by Topology”
Note: Up to PLC Engineering V3.5 SP1, this was the usual behavior
of CFC POUs. Pay attention that it is your responsibility to adapt the
execution order and assess the consequences and impacts. This is
another reason why the execution order is always displayed.
“Apply to All CFCs” Changes the mode for all other CFC objects in the project to the mode
selected in the list

See also
● ⮫ Chapter Automatic execution order according to data flow on page 180
● ⮫ Chapter Command 'Set Start of Feedback' on page 988
● ⮫ Chapter Command 'Send to Front' on page 988
● ⮫ Chapter Command 'Send to Back' on page 988
● ⮫ Chapter Command 'Move Up' on page 989
● ⮫ Chapter Command 'Move Down' on page 989
● ⮫ Chapter Command 'Order by Data Flow' on page 990
● ⮫ Chapter Command 'Order by Topology' on page 991

Dialog 'Properties' - 'SFC Settings'


Function: The dialog defines the default settings for all POUs used in the
project, which are programmed in SFC.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1057 /
Dialogs 1158

Call: Main menu “View 🠂 Properties”, context menu of a SFC POU in the view
“Device” or “POUs”.

Flag
List of all possible SFC “Use” : The SFC flag is activated and will be considered in the pro-
flags gram execution.
“Declare” : The SFC flag is declared automatically.
If “Declare” is activated, but “Use” is not activated, the variable will be
declared but the flag has no effect in the program execution.
Hint: If you have manually declared a SFC variable you have to disable
the declaration of this flag in the “SFC Settings”. Otherwise the auto-
matically generated flag will overwrite the manually declared flag.

User interface
Hint: A automatically declared flag variable is only visible in the online
mode in the declaration part of the SFC editor.
“Use defaults” : The settings of this dialog overwrites the “SFC settings” of the
single POUs.

Build
Table 149: “Code generation”
“Calculate active transitions : PLC Engineering generates code for the currently active transition
only” only.

Dialog 'Properties' – 'Link to File'


Function: The dialog defines the link of an external file with the contents of the
global variable list (GVL). You can either export the GVL to an external file or
import it from an external file.
Call: Menu bar: “View 🠂 Properties”; context menu of an object of type “Global
Variable List”
“File name” Input field of the file path
“Export before compile ” : Before each compile of the project (for example with [F11]), PLC
Engineering saves a file with the extension gvl in the path, which is
specified in the “File name” field.
“Import before compile ” : The export file which is specified in the “File name” field is read
automatically before each project compile. Therefore you can import a
GVL which was exported from another project, for example to set up a
communication by means of network variables.
See also
● ⮫ Chapter 33.2.15 Object 'GVL' - Global Variable List on page 777
● ⮫ Chapter 19.5.2 Configuring a Network Variable Exchange on page 239

Dialog 'Properties' - 'Cam'


Function: Use this dialog to define the global variables of the cam.
Table 150: “Dimensions”
“Master start/end position” The start and end positions of the master define the range of the
master values and therefore the scale of the horizontal axis of the cam.
The default settings are given in angular degrees with 0 and 360 as
limiting values.
“Slave start/end position” The associated slave positions are determined by the graph type that
is defined for the cam. However, the segment depicted by the curves
(this is also the scale of the vertical axis) can be defined by the slave
start and end positions given here.

R911403764, Edition 08 Bosch Rexroth AG


1058 / ctrlX PLC Engineering
1158 Dialogs

Table 151: “Period”


These settings affect the work in the cam editor and cam table. Depending on these parameters,
the slave start point is adjusted automatically when the end point is changed, as well as the other
way around. This adjustment optimizes the period transition to be as smooth and jerk-free as
possible.
“Smooth transition” : The values for position, velocity, and acceleration are adjusted
automatically.
“Slave period” Indicates when the slave period is repeated mechanically. The slave
position at the start and end of the master period may then be in an
interval of a whole number multiple of this value.
This value is effective only if the “Smooth transition” check box is
selected.
Table 152: “Continuity Requirements”
Activation of these options for the continuity of the curve does not have any effect when editing
the cam. It does, however, prompt a continuity check, which reports any violations to the message
view (CAM). It is not possible to edit jumps in the position curve. The default setting also requires
the continuity of velocity and acceleration. You can clear these options, for example in the special
case of a curve that consists of only linear segments. However, this will lead to kinks in the position
curve. By default, the jerk (3rd derivative) is not tested for jumps.
“Position”
“Velocity”
: The entire curve is tested for jumps.
“Acceleration”
“Jerk”
Table 153: “Compile Format”
When compiling, MC_CAM_REF structure variables are generated. A cam is described according to
the following options:
“polynomial (XYVA)” Polynomial description of the individual points consisting of the
master position, slave position, slave velocity, and slave acceleration.
“one dimensional point 1D table of slave positions
array”
“two dimensional point 2D table of composite master/slave positions
array”
“Elements” Number of elements in the arrays. This array has already been created
in SM3_Basic for the default cases “128” and “256”. If you type in
another value, you must create the structure in your application (see
the following example).

Example of an array with 720 elements

TYPE SMC_CAMTable_LREAL_720_2 :
STRUCT
Table: ARRAY[0..719] OF ARRAY[0..1] OF LREAL;
fEditorMasterMin, fEditorMasterMax: REAL;
fEditorSlaveMin, fEditorSlaveMax: REAL;
fTableMasterMin, fTableMasterMax: REAL;
fTableSlaveMin, fTableSlaveMax: REAL;
END_STRUCT
END_TYPE

Dialog 'Properties' - 'Image Pool'


Function: The dialog allows for setting the basic properties of the selected
image pool.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1059 /
Dialogs 1158

Call: “View 🠂 Properties” of an “Image Pool” object type; context menu of an


“Image Pool” object type.
“Download only used : Instead of loading all images from the image pool, PLC Engineering
images” loads only the images that are actually used in the application on the
PLC.
“Download by visualization” : The image pool is downloaded with the visualization to the con-
troller.
“Internal” : PLC Engineering does not provide the image pool in the “ToolBox”
view. You cannot drag these images to the visualization.
Table 154: “Symbol library settings”
“Mark library as symbol Marks the image pool as a symbol library for use in a visualization.

User interface
library” The symbol library receives the key VisuSymbolLibrary = TRUE as
file property in the project information. The VisuElements library is
inserted automatically as a placeholder library in the “POUs” pool of
the Library Manager.
Requirement: A library project is open.
PLC Engineering displays symbol libraries that are installed in the
repository in the “Project Settings” (“Visualization” category, “Symbol
Libraries” tab).
“Textlist for symbol Select the text list from the drop-down list that contains the translated
translation” texts for the image pool.
See also
● ⮫ Chapter 33.2.18 "Image pool” object on page 779
● ⮫ Displaying and Marking Visualization Elements
● ⮫ Chapter 18.9 Using Image Pools on page 144
● ⮫ Using Text Lists
● ⮫ Project Settings - Visualization

Dialog 'Properties' - 'TextList'


Function: The dialog allows for setting the basic properties of the selected text
list.
Call: “View 🠂 Properties” of an “Text List” object type; context menu of an
“Image List” object type.
“Download by visualization” : The text list is downloaded with the visualization to the controller.
“Internal” : The text list can be used only in a library. It is not available in an
ordinary PLC Engineering project.
See also
● ⮫ Chapter 33.2.24 Object 'Text List' on page 788
● ⮫ Using Text Lists

“Properties” - “Options” dialog


Options (control)
Function: The dialog contains the settings for monitoring and logging in for an
object of the type device. The options available depend on the device descrip-
tion.
Call: Context menu of the device object or the menu “View 🠂 Properties” if the
device object is selected.
“Monitoring interval (ms)” Monitoring interval (10 ms - 1000 ms)

R911403764, Edition 08 Bosch Rexroth AG


1060 / ctrlX PLC Engineering
1158 Dialogs

Table 155: “Interactive login mode”


This mode is used to impede an accidental login to another control.
“None” No interaction with the user upon login. Corresponds to the current
response of the older versions
“Enter ID” Upon login PLC Engineering requests an ID. The ID is stored on the
control. No login without valid ID
Upon the next login, PLC Engineering does not request the ID anymore
if computer name, user name, device name and device address were
not changed. The information is stored in the project options.
“Key down” When logging in, a dialog is displayed requesting you to press a key
on the control. The timeout for this action is defined in the device
description.
“Flashing (LED)” The connected control flashes upon login.
Table 156: “Symbol configuration”
“Variable access : Default setting, consistent access not permitted
synchronous to IEC task” : Consistent access permitted
The setting is only applied if all applications and boot applications are
loaded again to the control.
Note: If the option is enabled, the jitter can increase for all IEC applica-
tions on this device! The consistent access can disturb the real-time
capability.
Also refer to
● ⮫ Chapter 17.2 Device tree and device editor on page 111
● ⮫ Chapter 33.1 Generic Device Editor on page 735
● ⮫ Chapter 33.2.25 "Symbol configuration” object on page 788

Dialog 'Properties' - 'Monitoring'


Function: The tab contains options for the monitoring of transitions in SFC.
Call: Select transition object, click “Properties”; menu bar: “View
🠂 Properties”.
“Enable monitoring” : An implicit variable is created for the transition, which is then
always given the current property value when the application calls the
Transition method. The value stored last in this variable is displayed in
the monitoring.
“Monitoring using call” : The transition to be monitored is read by directly calling the transi-
tion.
Note: When you activate this option, you have to consider possible side
effects. These kinds of side effects can occur if additional operations
are implemented in the transition.
See also
● ⮫ Chapter Object 'Transition' on page 845
● ⮫ Chapter Attribute 'monitoring' on page 629

33.4.23 “Project settings" dialog


“Project settings" dialog - General information
The dialogs described below can be called in both ctrlX I/O Engineering as well
as in ctrlX PLC Engineering.
However, some of the dialogs are not relevant for working inctrlX PLC Engi-
neering as they are connected to the IO configuration in ctrlX I/O Engineering.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1061 /
Dialogs 1158

'Project settings' dialog - 'Users and groups'


Symbol:
Function: The dialog is for the configuration of the user management for the
current project.
Call: Menu “Project 🠂 Project settings”, “Users and groups” category

'User' tab
Displays the users and their memberships in groups
“Add” Opens the “Add user” dialog.
“Edit” Opens the “Edit User” dialog.
“Delete” An error message appears if you attempt to delete the last user of a

User interface
group, since a group must have at least one member.
Table 157: “Add user/edit user”
Input fields for setting up a new user account or changing an existing one
“Enabled” : You can use the user account which is the default.
: The user cannot login. If the user repeatedly tries to log in with
incorrect credentials, the account may be deactivated automatically,
see below: Settings.
“Memberships” List of all user groups that you have defined in addition to the group
“Everyone” (to which each new user automatically belongs).
<Group name> : the new user belongs to the group.
Table 158: “Export/Import”
“Export users and groups ” The command opens the standard dialog for saving a file to the local
file system. You can store the users and groups defined in the project
in a *.users file in xml format.
“Import users and groups ” The command opens the standard dialog for searching for a file with
the extension *.users in the local file system in order to read user and
group definitions into the project from the file system.

'Groups' tab
Display of the groups and their members. A group can also be a member of a group.
“Add” Opens the “Add group” dialog.
“Edit” Opens the “Edit Group” dialog.
“Delete” If you delete a group, the user accounts of the members remain
unchanged.
You cannot delete the groups “Everyone” and “Owner”.
For the “Export/Import” button, please see “Users” above.

'Settings' tab
Display of the groups and their members in a tree structure. A group can also be a member of a
group.
“Maximum number of login (default): If the user has tried to log in with an incorrect password
attempts” as many times as specified here, the user account is disabled.
: The number of the unsuccessful attempts is unlimited
“Log out automatically after : If PLC Engineering does not register any user actions via mouse or
inactivity” keyboard for the period of time (minutes) specified here, the user is
logged out automatically.

R911403764, Edition 08 Bosch Rexroth AG


1062 / ctrlX PLC Engineering
1158 Dialogs

Also refer to
● ⮫ Chapter 8.3.2 Selecting project settings on page 60
● ⮫ Chapter Command 'User management' – 'Log in User' on page 924

'Project settings' dialog - 'Compiler options'


Symbol:
Function: The dialog is used to configure the compiler options.
Call: Menu “Project 🠂 Project settings ”, “Compiler option” category.
Prerequisite: A project is open
Table 159: “Compiler version”
“Fix Version” Defines the compiler version that PLC Engineering uses when
compiling and during loading for compilation. Example: “3.5.6.0” for
version 3.5 SP6
Table 160: “Settings”
“Allow unicode characters Disabled by default as the use of Unicode characters in identifier
for identifiers” names is not allowed in the IEC standard. May be required for some
foreign languages (for example, Asian languages).
“Replace constants” (default): For each constant of scalar type, i.e. not for STRING,
ARRAY or structures, PLC Engineering directly loads the value. In online
mode, PLC Engineering identifies the constants in the declaration
editor or monitoring window by a symbol preceding the value. In this
case, access, for example via an ADR operator, forcing and writing,
is not possible.
: Access to constants is possible, but it prolongs the computation
time.
“Enable logging in For breakpoints defined as execution points, you can enter a message
breakpoints” text in the “Breakpoint properties” dialog. PLC Engineering prints this
text to the device log when the application halts at the execution
point.
Table 161: “Compiler warnings”
“Maximum number of Refers to the warnings that PLC Engineering prints to the message
warnings” view.
You define the selection of the displayed compiler warnings in the
“ Project settings” dialog in the “Compiler warnings” category.
Also refer to
● ⮫ Chapter 'Project settings’ dialog - 'Compiler warnings' on page 1062
● ⮫ Chapter 33.1.14 "Log” tab on page 751
● ⮫ Chapter 33.4.9 Dialog 'Breakpoint Properties' on page 1040

'Project settings’ dialog - 'Compiler warnings'


Symbol:
Function: The dialog is used to select the compiler warnings that PLC Engi-
neering displays in the message window during a compilation run.
Call: Menu “Project 🠂 Project settings ”, “Compiler warnings” category.
Prerequisite: A project is open
Set the maximum number of listed warnings in the “Compiler options” dialog.

Also refer to
● ⮫ Chapter 'Project settings' dialog - 'Compiler options' on page 1062
● ⮫ Chapter Command 'Build' on page 933

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1063 /
Dialogs 1158

'Project settings’ dialog - 'Download source code'


Symbol:
Function: The dialog defines the compilation and the storage of the source
code as a source-code download archive on one or more controllers.
Call: Menu “Project 🠂 Project settings”, category “Download source code”

A source code download archive is a project archive named Archive.prj.


Table 162: “Target device”
Defines the location of the project archive.
“<name of controller>” Selected control. PLC Engineering loads the project archive to this
control. Prerequisite: The project contains several controls.

User interface
“<all devices in the PLC Engineering loads the project archive to all controls of the project.
project>”
Table 163: “Scope”
Defines the content of the project archive.
“Use compact download” : The project archive contains only that device in the project that
contains the active application.
: The project archive contains all the devices in the project
“Additional files” Opens the “Additional files” dialog where you can select additional
files for download.
Table 164: “Time”
Defines when PLC Engineering creates a project archive.
“Implicit in program PLC Engineering loads the project archive to the target device(s) each
download and online time an application is loaded and each time an online change is per-
change” formed, without any further prompting.
“Implicitly when creating a PLC Engineering additionally loads the project archive to the target
boot application” device(s) each time a boot application is created, without any further
prompt.
“Implicitly when creating a PLC Engineering loads the project archive to the target device(s) each
boot application, download time a boot application is created, each time an application is loaded,
and online change” and each time an online change is performed without any further
prompt.
“Prompt during program PLC Engineering opens a prompt every time an application is loaded
download and online and every time an online change is made. Select, whether PLC Engi-
change” neering loads the project archive to the control.
“Only on request” Only when calling the command “Online 🠂 Load source code on
connected control” opens a command prompt. Select, whether PLC
Engineering loads the project archivey to the control.

Also refer to
● ⮫ Chapter Command 'Source Download to Connected Device' on page 946
● ⮫ Chapter Command 'Source Download' on page 877

Dialog 'Project Settings' - 'Page Setup'


Symbol:
Function: This dialog defines the layout for the print version of the project
contents. This layout is used for the printout of the project information by
clicking “File 🠂 Print” and the printout of the project documentation by clicking
“Project 🠂 Document”.
Call: Main menu “Project 🠂 Project Settings” (“Page Setup”)
You can change settings the following:

R911403764, Edition 08 Bosch Rexroth AG


1064 / ctrlX PLC Engineering
1158 Dialogs

● “Paper”
● “Margins”
● “Header and Footer”
● “Document”
● “Title Page”
Table 165: “Edit Header, Edit Footer”
The headers and footers are structured in table style. You can configure rows and columns, and add
text and images to the resulting cells.
“Row spanning” Number of rows that PLC Engineering should merge into a single
column.
“Column spanning” Number of columns that PLC Engineering should merge into a single
row.
Opens the list of available placeholders for the “Text” field. When
printing the page, PLC Engineering provides the placeholders with the
current values.
See also
● ⮫ Chapter Command 'Page Setup' on page 874
● ⮫ Chapter Command 'Document' on page 917
● ⮫ Chapter Command 'Print' on page 874

'Project settings' dialog - 'Security'


Symbol:
Function: The dialog is used to configure the project protection by a password,
a dongle or a certificate.
Call: Menu “Project 🠂 Project settings”, category “Security”
If the encryption password is lost you can no longer
NOTICE
open the project. You can also no longer restore it.
“No protection” : The project file is not protected from unauthorized access and data
manipulation.
Note: It is strongly recommended to use a security functionality.
: The “Password”, “Dongle”, and “Certificates” options cannot be
selected.
“Integrity check” When you create a new project, this option is enabled by default.
: The project file is stored in a proprietary format and its integrity is
checked each time the project is loaded. The file may be incompatible
with older versions of the development system.
Please note that the project file is not encrypted. To better protect
your data, activate one of the encryption functions.
“Encryption” : The “Password”, “Dongle”, and “Certificates” encryption functions
can be selected.
“Password” Entering, changing and confirming the encryption password.
If you save the project with these settings you must enter the pass-
word later in order to open the project again, even if it is to be loaded
as a library reference.
“Dongle” Prerequisite: You have connected the Codesys security key (dongle) to
the computer.
“Add”: The dialog “Add registered dongle” is displayed.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1065 /
Dialogs 1158

“Registered dongles” Selection list of registered dongles.


“Certificates” Certificates are used for the encryption of contents of the open
project file.
Prerequisite: The certificates for all users sharing the project have to
be installed in the local storage.
: The “Certificate selection” dialog opens.
Table 166: Adding a registered dongle
“Dongle” Selection list of all connected dongles.
“Refresh” PLC Engineering refreshes the drop-down list.
“Flash” The LEDs of the currently selected dongle flash for two seconds (if it
supports this function).

User interface
The dongle must be connected to the computer when PLC Engineering loads
the project, even if it is loaded as a library reference.
Also refer to
● ⮫ Chapter 11.7 Assigning passwords on page 79
● ⮫ Chapter 11.8 Protecting projects using a dongle on page 80
● ⮫ Chapter 11.12 Encrypting the project with a certificate on page 84
● ⮫ Chapter 33.4.19 'Certificate selection' dialog on page 1046

Dialog 'Project Settings' - 'SFC'


Symbol:
Function: This dialog is used for configuring the settings of SFC objects. The
properties of each new SFC object automatically have the configured settings.
Call: Menu bar: “Project 🠂 Project Settings” (“SFC”).
Requirement: A project is open.

Tab 'Flags'
Implicitly generated variables for checking and monitoring the processing in an SFC diagram
“Active” : The corresponding variable is used.
“Declare” : The corresponding variable is created automatically. Otherwise, you
have to declare the variable explicitly if you intend to use it (“Use” is
selected).
“Apply to all” In this dialog, PLC Engineering applies changes to existing SFC
objects. PLC Engineering selects the “Use defaults” check box in the
properties of the SFC POUs.
Automatically declared variables are visible in the decla-
NOTICE
ration part of the SFC editor only in online mode.

Tab 'Build'
Table 167: “Code Generation”
“Calculate active transitions : PLC Engineering generates code only for currently active transi-
only” tions.

R911403764, Edition 08 Bosch Rexroth AG


1066 / ctrlX PLC Engineering
1158 Dialogs

Table 168: “SFC Library”


This part of the dialog is available only for compiler versions < 3.4.1.0.
“Company ” Defines the SFC library that PLC Engineering uses by default.
“Title”
“Version”
“Namespace” Enables unique references to libraries. Required when various versions
of the library are available on the system. Please make sure that there
are no discrepancies between the namespace defined in the library
manager and the namespace defined for the individual object. The
SfcIec.library data is used for the default settings that PLC Engi-
neering provides with the default profile.
Each SFC block stores the information via the library version that applied when
you added the block. This can cause you to use multiple library versions within
the same project. In order to prevent this, you are prevented from defining spe-
cific versions of IecSfc.library (as of compiler version 3.4.1.0). The library
version, which you use for all SFC blocks in the project, is defined with a place-
holder. PLC Engineering resolves the placeholder depending on the compiler
version in use. The allocation of the library version to the compiler version is
defined in the library profile.
See also
● ⮫ Chapter 27.3 Information for library developers on page 330

Dialog 'Project Settings' - 'Static Analysis Light'


Symbol:
Function: This dialog activates the tests that the light version of PLC Engi-
neering Static Analysis performs each time code is generated.
Call: Menu bar: “Project 🠂 Project Settings” (“Static Analysis Light” category).
You can exclude lines of code from the static code analysis by marking
the code with the pragma {analysis ...} or the pragma {attribute
'analysis' := '...'}.

Additional compile tests


“SA0033: Unused variables” Finds variables that are declared, but not used within the compiled
program code.
For GVL variables: If there are multiple applications in one project,
then only the objects under the currently active application are
affected. If there is only one application, then the objects in the POUs
view are also affected.
“SA0028: Overlapping Detects the locations where two or more variables reserve the same
memory areas” storage space. For example, this occurs for the following declarations:
var1 AT %QB21: INT and var2 AT %QD5: DWORD. In this case, both
variables use byte 21, which means that the memory range of the
variables overlap.
“SA0006: Write access from Detects variables that are written by more than one task.
multiple tasks”
SA0004 “Multiple write Detects outputs that are written to more than one location.
access on output” Note: No error is reported when an output variable (VAR_IN_OUT) is
written in different branches of IF and CASE statements.
Note: A pragma cannot deactivate this rule.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1067 /
Dialogs 1158

“SA0027: Multiple use of Detects multiple uses of a name/identifier for a variable or an object
identifiers” (POU) within the scope of a project.
The following cases are detected:
● The name of an enumeration constant is the same as in another
enumeration in the application or used in an included library.
● The name of a variable is the same as an object in the application or
an included library.
● The name of a variable is the same as for an enumeration constant
in and enumeration in the application or an included library.
● The name of an object is the same as another object in the applica-
tion.
● The name of a variable is the same as the name of a method.

User interface
● The name of an object is the same as the name of a superordinate
object ("parent object").
“SA0167: Temporary The test detects function block instances that are declared as tempo-
function block instances” rary variables. This concerns instances that are declared in a method
or in a function or as VAR_TEMP, and therefore are reinitialized in each
processing cycle and for each POU call.

Examples
SA0003: Empty statements

;
(* Comment *);
iVar;
SA0006: Concurrent access
FUNCTION_BLOCK ADD_FB
g_iTemp1 := g_iTemp1 + INT#1;
PROGRAM PLC_PRG //controlled by MainTask
g_iTemp1 := g_iTemp1 + INT#2;
g_xTemp2 := g_iTemp1 > INT#10;
PROGRAM PLC_PRG_1 //controlled by SubTask
g_iTemp1 := g_iTemp1 - INT#3;
g_xTemp2 := g_iTemp1 < INT#-10;
SA0004 Multiple write access on output
VAR_GLOBAL
g_xVar AT %QX0.0 : BOOL ;
g_iTest AT %QW0 : INT ;
END_VAR
PROGRAM PLC_PRG
IF iCondition < INT#0 THEN
g_xVar := TRUE;
g_iTest := INT#12;
END_IF
CASE iCondition OF
INT#1:
g_xVar := FALSE;
INT#2:
g_iTest := INT#11;
ELSE
g_xVar := TRUE;

R911403764, Edition 08 Bosch Rexroth AG


1068 / ctrlX PLC Engineering
1158 Dialogs

g_iTest := INT#9;
END_CASE

SA0006: Write access from multiple tasks

FUNCTION_BLOCK ADD_FB
g_iTemp1 := g_iTemp1 + INT#1;

PROGRAM PLC_PRG // Controlled by MainTask


g_iTemp1 := g_iTemp1 + INT#2;
g_xTemp2 := g_iTemp1 > INT#10;

PROGRAM PLC_PRG_1 //Controlled by SubTask


g_iTemp1 := g_iTemp1 - INT#3;
g_xTemp2 := g_iTemp1 < INT#-10;
SA0027: Multiple use of name
PROGRAM PLC_PRG
VAR
ton : INT; // error SA0027
END_VAR
SA0029: Different notation in implementation and declaration
The PLC_PRG POU and a fnc function POU are in the device tree.

PROGRAM PLC_PRG
VAR
iVar:INT;
_123test_var_: INT;
END_VAR
ivar := iVar + 1; // notation different to that in the
declaration part -> SA0029
_123TEST_var_ := _123test_var_INT; // notation different
to that in the declaration part -> SA0029
Fnc(); // notation different to that in the devices tree
-> SA0029
END_VAR
SA0167: Temporary function block instances
PROGRAM PLC_PRG
VAR
END_VAR
VAR_TEMP
yafb: AFB;
END_VAR

FUNCTION Fun : INT


VAR_INPUT
END_VAR
VAR
funafb: AFB;
END_VAR

METHOD METH: INT


VAR_INPUT
END_VAR

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1069 /
Dialogs 1158

VAR
methafb: AFB;
END_VAR

See also
● ⮫ Chapter 18.19.3 Analyzing Code Statically on page 202

Dialog 'Project Settings' - 'Visualization Profile'


Symbol:
Function: The dialog enables the setting of the visualization profile.
Call: Menu “Project 🠂 Project Settings”, category “Visualization Profile”

User interface
Requirement: A project is open.
Table 169: “Visualization Profile”
“Certain profile” Profile that PLC Engineering uses in the project and that determines
the visualization elements that are available in the project.
The selection list contains all the profiles installed so far.

Dialog 'Project Settings' - 'Visualization'


Symbol:
Function: The dialog is used to configure the project-wide settings for objects
of type “Visualization”.
Call: Menu bar: “Project 🠂 Project Settings”, “Visualization” category
Requirement: A project is open.

Tab 'General'
Table 170: “Visualization Directories”
“Text list files” Directory which contains text lists that are available in the project
to configure texts for different languages. PLC Engineering uses the
directory, for example to import or export text lists.
After clicking , the “Select Directory” dialog opens which allows for
the selection of a directory in the file system.
“Image files” Directory which contains image files that are available in the project.
Multiple folders are separated with a semicolon. PLC Engineering uses
the directory, for example to import or export image files.
After clicking , the “Select Directory” dialog opens which allows for
the selection of a directory in the file system.
Table 171: “Advanced”
“Activate property handling : You can also configure a visualization element with a property in
in all element properties” those of its properties in which you select an IEC variable. Then PLC
Engineering creates additional code for the property handling when a
visualization is compiled.
Requirement: Its IEC code contains at least an object of type
“Interface property” (a property ).

Requirement: “Visible” is selected.

R911403764, Edition 08 Bosch Rexroth AG


1070 / ctrlX PLC Engineering
1158 Dialogs

“Enable implicit checks for : The implicit check is also performed for visualization POUs. As a
visualization POUs” result, additional code is generated, which increases memory usage.
When memory is limited, this option should be disabled.
See also
● ⮫ Object 'Property'

Tab 'Symbol Libraries'


Table 172: “Visualization Symbol Libraries”
“Symbol libraries” List of all installed symbol libraries (example: VisuSymbols)
“Assigned” : Symbol library is selected in the project and PLC Engineering
makes it available in the “Visualization ToolBox” view of a visualization.
: Symbol library is installed in the library repository, but PLC Engi-
neering does not make it available in the “Visualization ToolBox” view
of a visualization.

33.4.24 "Project environment" dialog


Dialog 'Project environment' – General information
Function: The dialog is used to check the up-to-dateness of software and files
included in the project. PLC Engineering, for example, checks the selected
compiler and determines whether a newer version is available. In this case, the
affected components can be updated.
Call: Menu “Project”

Dialog 'Project Environment' – 'Library Versions'


Function: This dialog displays the libraries of the opened project for which
newer versions are available.
Call: Main menu “Project 🠂 Project Environment”, tab “Library Version ”
This dialog opens automatically when you open a project containing outdated
libraries.
The list shows the name of the outdated library with version, the currently available version and the
planned action.
“Action” Double-click inside the field to select the desired actions.
“Check for updates when : Checking takes place each time the project is opened.
loading this project” : Checking takes place once only.
“Set all to newest” PLC Engineering uses the newest available version of the library.
“OK” PLC Engineering performs the selected action(s).

Dialog 'Project Environment' - 'Compiler Version'


Function: This dialog shows the current compiler version of the project and
provides the capability of updating.
Call: Main menu “Project 🠂 Project Environment” (“Compiler Version” tab).
“Current compiler version Shows the set compiler version for the open project.
in project”
“Recommended, newest Shows the latest version.
version”
“Action” ● “Do not update”: The compiler version of the project remains the
same.
● “Update to x.x.x.x”: The selected compiler version is set for the
project.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1071 /
Dialogs 1158

“Check for updates when : PLC Engineering checks for new versions each time the project is
loading this project” opened. If there is a new version, then the respective update dialog
opens automatically.
: The compiler version is not checked. The update dialogs do not
open automatically.
“Set all to newest” The compiler version is set to the latest version.

Dialog 'Project Environment' - 'Device Versions'


Function: This dialog shows the devices of the open project in which there are
new versions available.
Call: Main menu “Project 🠂 Project Environment” (“Device Versions” tab)

User interface
This dialog opens automatically when you open a project that contains an out-
dated device.
Names of the outdated devices and their versions, as well as the current version and the planned
action.
“Action” Double-click in the field to select the required actions.
“Check for updates when : The check is performed when the project is opened.
loading this project” : The check is performed one time only.
“Set all to newest” PLC Engineering uses the latest library version.
“OK” PLC Engineering executes the selected actions.

Dialog 'Project Environment' – 'Visualization Profile'


Function: This dialog shows the current visualization profile of the project. The
profile can be updated here.
Call: Menu bar: “Project 🠂 Project Environment” (“Visualization Profile” tab).
“Current visualization The set visualization profile of the open project.
profile in the project”
“Recommended, newest The newest version.
profile”
“Action” ● “Do not update”: The visualization profile of the project remains
unchanged.
● “Update to x.x.x.x”: PLC Engineering updates the project to the
selected visualization profile.
“Check for updates when : PLC Engineering checks for new profiles each time the project is
loading this project” opened. If there is a new version, then the respective update dialog
opens automatically.
: Not test of the profile when opening the project. The update dia-
logs do not open automatically.
“Set all to newest” PLC Engineering updates the .
See also
● Help about visualization

Dialog 'Project Environment' – 'Visualization Styles'


Function: This dialog shows the current visualization style of the project and
provides the capability of updating it.
Call: Menu bar: “Project 🠂 Project Environment” (“Visualization Styles” tab).
Table 173: “Newer versions are available for the following visualization styles currently in use”
“Visualization style” Version of the set visualization style in the open project
“Current” Current version of the visualization style (example: 3.5.6.0)
“Recommended” Recommended version of the visualization style (example: 3.5.7.0)

R911403764, Edition 08 Bosch Rexroth AG


1072 / ctrlX PLC Engineering
1158 Dialogs

“Action” ● “Do not update”: The visualization style of the project remains
unchanged.
● “Update to x.x.x.x”: PLC Engineering updates the project to the
version of the selected visualization style.
“Check for updates when : PLC Engineering checks for new versions each time the project is
loading this project” opened. If there is a new version, then the respective update dialog
opens automatically.
: The version is not checked. The update dialogs do not open auto-
matically.
“Set all to newest” PLC Engineering updates the version.
See also
● Help for visualization, section "Visualization style"

Dialog 'Project Environment' – 'C Code Modules'


Function: This dialog lists all C-code modules and their C-code files that have
changed in the source directory on the disk. You can update individual C-code
modules here.
Call: Menu “Project 🠂 Project Environment”, tab “C Code modules”
Table 174: “The sources of the following projects changed”
“Project” Display of the C-code module with its changed C-code files in the
project.
“Action” Selection option for the C-code module of the “Project” field
A double-click on the field displays all selection options:
● “Update”
● “Do not update”
For each C-code file this indicates what action is executed if you select
the action “Update” for the corresponding C-code module (“Project”).
“Delete IEC interfaces” Deletes the created IEC interface if the headers in the project have
changed. In this case you must create the IEC interface again.
“Check for updates when : checking takes place each time the project is opened.
loading this project”
“Set all to 'newest'” PLC Engineering refreshes all C-code modules.
“OK” PLC Engineering executes the selected actions in the project.
See also
● linktarget doesn't exist but @y.link.required='true'
● ⮫ Chapter Command 'Create IEC Interface' on page 937
● ⮫ Chapter 18.10 Integrating C Modules on page 146

Dialog 'Project Environment' – 'Visualization Symbols'


Function: The dialog lists installed symbol libraries and allows for you to assign
symbol libraries to a project.
Call: Menu bar: “Project 🠂 Project Environment”, “Visualization Symbols” tab
Requirement: The open project contains a visualization and has been saved
with a compiler version < 3.5.7.0. PLC Engineering recognizes symbol libra-
ries in compiler version 3.5.7.0 and higher.
“Symbol library” List of all installed symbol libraries
“Active” : Symbol library is selected for the project. PLC Engineering provides
its symbols in the “Visualization Toolbox” view.
: Symbol library has been previously installed only in the library
repository.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1073 /
Dialogs 1158

See also
● Help for visualization, "Using the symbol library in the visualization" chapter

33.4.25 “Project synchronization" dialog


Dialog “New Project”
Call:
The dialog is called automatically when creating a new project.
A new project can be created using the following menu command:
“File 🠂 New Project...”

Function:

User interface
When creating new ctrlX CORE control projects, basic settings have to be
selected.
The “New Project” dialog is used to configure the following settings:
● Selecting the control to be configured in the network
● Synchronization settings between control and Engineering PC

Dialog elements:
Element Description
“Project storage on Display of:
PC” ● Project name
● Project data storage in the file system of the Engi-
neering PC
The displayed settings cannot be changed in this
dialog!
To change the settings, the dialog has to be canceled
using the “Cancel” interface.
Subsequently, execute the steps to create a new
project and specify the settings, see ⮫ Chapter 8.2
Creating a new project on page 53.
ctrlX CORE Configuration of the following settings:
● “Control”:
Selecting the control to be configured in the net-
work
● “Configuration”:
Selecting the active configuration on the control on
which the project is to be operated on the selected
control

R911403764, Edition 08 Bosch Rexroth AG


1074 / ctrlX PLC Engineering
1158 Dialogs

Element Description
Synchronisation PC There is the option to additionally store all relevant
and ctrlX CORE project data at certain points in time on the ctrlX
CORE control or to open a project on the control.
Setting options:
● " Synchronization of project storages between PC
and ctrlX CORE if:"
Enabing/disabling the synchronization.
In case of an enabled synchronization, the following
conditions have to be configured:
– " The project is opened"
In this setting, the project is synchronized upon
opening of the project
– " the project is saved on the PC"
In this setting, the project is synchronized upon
saving of the project
– " an application is downloaded on the ctrlX
CORE"
In this setting, the project is synchronized upon
download of the project to ctrlX CORE
– " the project is closed"
In this setting, the project is synchronized upon
closing of the project
● " Synchronize device description files and libra-
ries"
With this setting, device description files and libra-
ries (only in the PLC context) that are not part of
the ctrlX WORKS installation are additionally stored
on the control. This option facilitates the direct
project login.
For more information about the project synchroniza-
tion, see: ⮫ Project data source - Introduction

Related topics
⮫ Chapter 8.2.1 Creating a project on the basis of a template for ctrlX CORE
Creating devices on page 54

Dialog “Project data comparison”


Call:
Automatically (no manual access option).

Function:
Upon the PLC Engineering start, the system compares the project configuration
on the control to the project configuration in PLC Engineering. If the compar-
ison showed differences, you can display the project data comparison. Addi-
tionally, extended project information can be displayed via button “Details...”.

Further information:
● ⮫ Chapter Command “Project synchronisation...” on page 915
● ⮫ Chapter 'Compare’ command on page 917

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1075 /
Dialogs 1158

Dialog “Project synchronization”


Prerequisite:
The “Project synchronization” dialog is exclusively supported by the ctrlX CORE
and ctrlX CORE Virtual devices.

Symbol:

Call:
Open the dialog as follows:
● Via the command “Project synchronisation...”, see: ⮫ Command “Project

User interface
synchronisation...”
● In the lower PLC Engineering status bar, double-click on the symbol

Function:
The dialog “Project synchronization” is used to configure the project synchroni-
zation between the ctrlX device and PLC Engineering on the Engineering PC.

Dialog elements:
Project storage on PC
“Name” Project name
“Location” Filing of the project data in the file system of the Engi-
neering PC
ctrlX CORE
“Control / IP” Selecting the target control from which the project is
to be opened. Enter the IP address or select a device
from drop-down menu list of the ctrlX CORE control
accessible in the network (“Project 🠂 New project”)
List of configured ctrlX CORE controls (“Project
🠂 Project synchronization...”)
“Connection test” When confirming the button with the “Arrow symbol”,
the connection to the control is tested and the current
status is displayed.
Synchronization PC and ctrlX CORE Description
(default setting)
Synchronization of project storages Enabling/disabling the synchroni-
between PC and ctrlX CORE if: zation function.
If active, then under the following
subconditions:
the project is opened Is automatically enabled if the syn-
chronization is active
the project is saved on PC Synchronization when saving the
project
a download / OnlineChange is Synchronization when down-
carried out and thus the project is loading an application to the con-
saved trol
A boot application is created Synchronization occurs when the
and login data is synchronized command “Generate boot applica-
tion" is executed in the logged-in
state .

R911403764, Edition 08 Bosch Rexroth AG


1076 / ctrlX PLC Engineering
1158 Dialogs

Synchronization PC and ctrlX CORE Description


(default setting)
the project is closed Synchronization when closing the
project
Synchronize device description files and Device description files and libra-
libraries ries that are not part of the ctrlX
WORKS installation are also saved
on the control.
This option facilitates direct login
to the project, if active.

Related topics
⮫ Command “Project synchronisation...”
⮫ Project data source - Introduction

Dialog “Project synchronization” (Synchronization cache...)

Prerequisite:
The dialog “Project synchronization” is exclusively supported by the ctrlX
CORE, ctrlX CORE Virtual devices.

Symbol:

Call:
In PLC Engineering via the “Synchronization cache...” command, see:
⮫ Command “Synchronization cache...”

Function:
The dialog is used to manage the cache of all projects on the Engineering PC

Dialog elements:
Element Description
Display “Size” Size of the assigned memory for the synchronization
cache
Display “Location:” Storage location of the cache in the file system.
The information provides a link. Via the link, the cur-
rent directory can be directly opened in the Windows
file Explorer.
Button “Clear cache” Button to delete the cache and the contents of the file
repository
Button “Close” Button to close the dialog

Related topics
⮫ Command “Synchronization cache...”
⮫ Project data source - Introduction

Dialog “Open project in ctrlX CORE”


Prerequisite:
The configured ctrlX CORE device has to be available in the network for the
PLC Engineering to connect to the ctrlX device.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1077 /
Dialogs 1158

Symbol:

Call:
Via the “Open project from ctrlX CORE...” command, see ⮫ Chapter Command
“Open project from ctrlX CORE...” on page 869

Function:
Use the “Open project in ctrlX CORE” dialog to retrieve a project from
the control that was saved on the control via ⮫ Chapter Dialog “Project
synchronization” on page 1075 with the corresponding sources.

User interface
The data is applied in two steps. First select the control.
1. Select the control.
ctrlX CORE
“Control / IP” Selecting the target control from which the project
is to be opened. Enter the IP address or select a
device from drop-down menu list of the ctrlX CORE
control accessible in the network (“Project 🠂 New
project”)
List of configured ctrlX CORE controls (“Project
🠂 Project synchronization...”)
“Connection test” When confirming the button with the “Arrow
symbol”, the connection to the control is tested
and the current status is displayed.
2. Confirm the data application via the “Next” button. Optionally, the opera-
tion can be canceled.
3. Before retrieving the data, authentication is required for access to the
control. Login to the control with your user data.
4. If you have the required access rights, a dialog to store the data is dis-
played. The name and the directory under which the project data are
stored in the file system of the PC are specified here.
Project storage on PC
“Name” Project name
“Location” Filing of the project data in the file system of the
Engineering PC
5. Enter the values in the corresponding fields.
If no project is stored on the ctrlX device, a new project is created
(project synchronization option active).
6. Confirm the data application via the “OK” button. Thus, the project is
opened and can be edited.
Optionally, the operation can also be canceled here.

R911403764, Edition 08 Bosch Rexroth AG


1078 / ctrlX PLC Engineering
1158 Dialogs

Opening of a project via the web interface of PLC App


Optionally to the “Open project from ctrlX CORE...” command in PLC Engi-
neering, the PLC project can also be called via the PLC App web interface by
clicking on , see ⮫ web documentation.
The project is called via the PLC App app or via the “Open project from ctrlX
CORE...” command and execute an identical function.
The following rules apply:
− If the project sources have not yet been saved on the Engineering PC, a
project repository has to be specified in the file system of the Engineering
PC via a drop-down dialog.
− If there is no project on the control, a new project is created in PLC Engi-
neering.

Dialog “Project synchronization” (PC > ctrlX)

Call
Automatically, if the project is called via PLC Engineering and the synchroniza-
tion function has detected differences in the project files of the ctrlX device
and the Engineering PC.

Function
Differences in the project files may occur, for example, if the project is edited
on the Engineering PC during offline project planning and there is no connec-
tion to the ctrlX device. The project changes cannot be transferred to the ctrlX
device in this case. The next time you connect to the ctrlX device, the differ-
ences in the project files are detected. In this case, the dialog offers a choice of
options on how to handle the project differences between ctrlX device and PLC
Engineering, see:
⮫ Synchronization – Online behavior

Dialog “Project synchronization” (ctrlX > PC)

Call
Automatically, when calling ctrlX PLC Engineering via the ctrlX CORE web inter-
face and the synchronization function detected differences in the ctrlX project
repositories and an Engineering PC.

Function
Differences in the project repositories can occur if the project is edited at the
Engineering PC but no connection to the control is established, e.g. in case of
offline configuration. In this case, project changes cannot be transferred to the
control. The differences are detected upon the next time, a connection to the
control is established. The dialog provides several objects on how to handle
project differences between control and PLC Engineering, see:
⮫ Synchronization – Online behavior

Dialog “Conflict: Project synchronization at login”


Symbol

Call
The dialog is called automatically if differences between the project file on the
engineering PC and the project file on the ctrlX device are detected during
project synchronization when logging in to the ctrlX device.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1079 /
Dialogs 1158

Function
The dialog offers a choice of options how to handle project differences
between the ctrlX device and the engineering PC, see:
⮫ Synchronization – Online behavior

Dialog “Conflict: Project synchronization at open”


Symbol

Call
The dialog is called automatically, for example if differences between the

User interface
project repository on the Engineering PC and the project repository on the
ctrlX device are detected when opening a project.

Function
The dialog offers a choice of options on how to handle project differences
between data repositories, see:
⮫ Synchronization – Online behavior

Dialog “Conflict: Project synchronization at close”


Symbol

Call
The dialog is automatically called if differences between the project repository
on the Engineering PC and the project repository on the ctrlX device are
detected when closing the project during project synchronization.

Function
The dialog provides a choice of options how to handle project differences
between the repository on the ctrlX device and the Engineering PC, see:
⮫ Synchronization – Online behavior

Dialog “Conflict: Project synchronization at save”


Symbol

Call
The dialog is automatically called if the project synchronization detects differ-
ences between the project repository on the Engineering PC and the project
repository on the ctrlX device when saving the project.

Function
The dialog provides several options on how to handle project differences
between the ctrlX device and PLC Engineering, see:
⮫ Synchronization – Online behavior

Dialog “Conflict: Project synchronization at equalize project data”


Symbol

R911403764, Edition 08 Bosch Rexroth AG


1080 / ctrlX PLC Engineering
1158 Dialogs

Call
The dialog is called up automatically if differences between the project files
of the Engineering PC and ctrlX device are detected during the project compar-
ison, see:
⮫ Command “Equalize project PC <-> ctrlX CORE”

Function
Differences in the project repositories can occur if the project is edited at the
Engineering PC but no connection to the control is established, e.g. in case of
offline configuration. In this case, project changes cannot be transferred to the
control. The differences are detected upon the next time, a connection to the
control is established. The dialog provides several objects on how to handle
project differences between ctrlX device and PLC Engineering, see:
⮫ Synchronization – Online behavior

Dialog “Conflict: Project synchronization at open” (IP address conflict

Symbol

Call
The dialog is called up automatically if it was detected during project synchroni-
zation that the address of the referenced or connected ctrlX device does not
match the destination address assigned in the project. This can occur after the
following actions:
● If the IP address of the ctrlX device was changed, refer to the ⮫ web docu-
mentation
● If the project planning data was changed on the ctrlX device via the “Manage
app data” window, refer to the ⮫ web documentation

Function
The dialog provides a selection of possibilities how project differences between
control and PLC Engineering should be handled, see:
⮫ Synchronization – Online behavior

33.4.26 'Options' dialog


'Options' dialog - General information
The options described below can be called in both ctrlX I/O Engineering as well
as in ctrlX PLC Engineering.
However, some of the options are not relevant for working inctrlX PLC Engi-
neering as they are connected to the IO configuration in ctrlX I/O Engineering.

'Options' dialog - 'Libraries'


Only relevant in the context of PLC programming

Symbol:
Function: The dialog helps to manage the mappings of library references that
PLC Engineering uses during the conversion of an old project. If you have not
yet stored any mapping for a certain library, you must redefine the mapping
each time when opening an old project in which this library is integrated.
Call: Menu “Tools 🠂 Options”, category“Libraries”
A mapping defines what a library reference looks like following the conversion
of the project to the current format. There are three possibilities:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1081 /
Dialogs 1158

● You retain the reference. This means that PLC Engineering similarly converts
the library into the current format (*.library) and installs it in the local
library repository.
● You replace a reference with another reference. This means that one of the
installed libraries replaces the library that was integrated until now.
● You delete the reference. This means that the converted project no longer
integrates the library.
PLC Engineering applies all the listed mappings to the library references of an old project the next
time it is converted. Hence, you must repeat the mapping definition if the same library is integrated
again in a project that is to be converted. You can enter a new mapping in the last line.
“Source library” Path of the library that is integrated in the project before the conver-
sion.

User interface
A double-click an entry makes the field editable and the button for the
input assistance appears.
“Target library” Name and location of the library that is to be integrated in the project
after the conversion.
Double-clicking on an entry opens the “Set target system library”
dialog.
Table 175: “Set target system library”
“Search” “Select library” dialog appears. You can select a library from the
library repository here. The dialog corresponds to the dialog in the
library repository.
“Ignore....” When PLC Engineering converts the project, PLC Engineering always
removes the existing source library from the project.

‘Options’ dialog - ‘Declaration editor'


Symbol:
Function: The dialog is for the configuration of the display settings for the
declaration editor.
Call menu “Tools 🠂 Options”, category “Declaration editor”
“Textual only” Textual view of the declaration editor
“Tabular only” Tabular view of the declaration editor
“Switchable between The declaration editor offers two buttons for switching between the
textual and tabular” textual and tabular views:
: text view
: tabular view
The following option defines the view that appears by default when
opening a programming object:
● “Always textual”
● “Always tabular”
● “Save last setting (per object)”
● “Save last setting (global)”
Also refer to
● ⮫ Chapter 18.16.3 Using the Declaration Editor on page 165

'Options' dialog - 'Download device descriptions'


Symbol:
Function: The dialog is for the configuration of addresses of download servers
for device descriptions.
Call: Menu “Tools 🠂 Options”, category “Download of the device descriptions”.

R911403764, Edition 08 Bosch Rexroth AG


1082 / ctrlX PLC Engineering
1158 Dialogs

Also refer to
● ⮫ Installing Devices

Table 176: “Download server”


List of download servers containing device descriptions. By default 'https://
store.codesys.com/CODESYSDevs' is entered as the download server.
When selecting the “Download missing device descriptions” button in the “Device repository”
dialog, PLC Engineering uses the servers entered here and uses the set access data for the proxy
server.
Double-click on “(Enter An input field opens in which you can enter the URL address of a
a new download server server.
here...)”
[Del] Deletes the selected download server.
Also refer to
● ⮫ Chapter Command 'Device Repository' on page 963
● ⮫ Chapter 'Options' dialog - 'Proxy settings' on page 1085

'Options' dialog - 'Device editor'


Symbol:
Function: The dialog contains settings for the representation of the device
editor.
Call: Menu “Tools 🠂 Options”, “Device editor” category

Tab 'View'
“Show generic device : The tab with the list of device parameters is available in the device
configuration views” editors of parameterizable devices.
“Creating cross-references : PLC Engineering creates the cross-references for unmapped I/Os.
for IEC addresses (cleanup
required) ”
“Communication page” ● “Classic mode”: The “Communication” tab of the device editors is
displayed as a two-part window: The left part shows the currently
configured gateway channels in a tree structure, the right part
shows the related data and information.
● “Simple mode”: The “Communication” tab is displayed as described
in the corresponding chapter in the help.
Additional modes can still be available as customer-specific exten-
sions.
“Show implicit files for : The tab for synchronized files is available in the device editors.
application download on Synchronized files are downloaded to the PLC at the time of applica-
the editor of a PLC” tion download. These can be external files that were added to the
application, or implicit files such as a source code archive.
“Show access rights page” : The “Access Rights” tab is available in the device editors.
Note: Depending on the device, the device description may overwrite
this setting.
Also refer to
● ⮫ Chapter 33.1.1 Tab “Communication” on page 735

'Options' dialog - 'Intelligent coding'


Only relevant in the context of PLC programming

Symbol:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1083 /
Dialogs 1158

Function: The dialog is used to configure the settings that facilitate the code
entry.
Call: Menu “Tools 🠂 Options”, “Intelligent coding” category
“Automatically declare : The “Declare variable” dialog opens as soon as an identifier that
unknown variables has not yet been declared is entered in a programming language editor
(AutoDeclare)” and the input line was left.
In order for the AutoDeclare function to be available in the ST editor as
well, the “Enable for ST editor” option also has to be enabled.
“Enable for ST editor” Prerequisite: The option “Automatically declare unknown variables
(AutoDeclare)” is enabled.
: The AutoDeclare function is also available in the ST editor.

User interface
: The AutoDeclare function is not available in the ST editor.
“Show all variables of : The "List Components" function also provides the local variables of
an instance in the input a function block instance for selection.
assistance” : The "List components" function only provides the input variables
and output variables of a function block instance for selection.
“Display system library System libraries are automatically inserted in the library manager and
symbols in the input displayed in light gray.
assistant” : Symbols such as global variables, data types, function blocks, etc
are provided in the input help.
: The symbols of the system libraries are not available in the input
assistance.
“List components after a : Enables the "List components" function. That means: When
dot (.) has been entered” entering a dot . at a position where PLC Engineering expects an iden-
tifier, a selection list with input options is displayed.
“List components Prerequisite: “List components after entering a dot (.)” option is ena-
immediately after entering a bled.
character” : After entering any character string, a selection list of available iden-
tifiers and operators is displayed
“Insert with namespace” : In front of the identifier, PLC Engineering automatically inserts the
namespace.
“Automatically convert : PLC Engineering automatically capitalizes all keywords.
keywords to uppercase
(Autoformat)”
“Update cross-references : The cross reference list automatically shows the references of the
automatically on selection variables/POUs/DUTs that you are currently selecting or on which the
change” cursor is positioned.
“Underline errors in the : Incorrect or unknown program code is underlined.
editor”
“Highlight symbols” : All the places of use of a symbol on which the cursor is positioned
are highlighted in the editor. Consequently, cross-references within the
editor are detected quickly.
“Maximum degree of Selection list for the number of parallel threads that can be used for
parallelism” precompile processing.
PLC Engineering determines the displayed number of threads from the
number of CPU cores of the processor. This preset number should only
be changed in exceptional cases.
Also refer to
● ⮫ Chapter 32.1 Programming languages and their editors on page 377
● ⮫ Smart tag functions on page 134

R911403764, Edition 08 Bosch Rexroth AG


1084 / ctrlX PLC Engineering
1158 Dialogs

● ⮫ Chapter 18.20.1 Using the Cross-Reference List to Find Occurrences


on page 204
● ⮫ Chapter ST Editor on page 379

Dialog 'Options' – 'International Settings'


Symbol:
Function: This dialog is for the setting of the language in the user interface and
in the help.
Call: Menu bar: “Tools 🠂 Options”, category “International Settings”.

‘Options’ dialog - ‘Load and save'


Symbol:
Function: The dialog contains settings for the behavior of PLC Engineering
when loading and saving a project.
Call: Menu “Tools 🠂 Options”, “Load and save ” category
“Create backup copy” : PLC Engineering saves the project each time it is saved, in
addition to the file <project name>.project, also as a <project
name>.backup file. You can rename the backup file and open it in the
programming system.
“Save automatically : PLC Engineering automatically saves the project at the specified
every ...minutes” time interval to a file <project name>.autosave, which you can
reload after a non-regular closing of the programming system.
When closing or saving the project regularly, PLC Engineering deletes
the .autosave file. In case of non-regular termination, PLC Engi-
neering retains the .autosave file. When opening a project for
which there is an associated autosave file, the “Auto Save backup”
dialog opens. In the dialog, choose whether the .autosave file or the
last version of the project saved by the user is opened.
“Save before compilation” PLC Engineering automatically saves the project before each compila-
tion run.
“Generate project recovery Prerequisite: In the project settings in the “Security” category, the
information” “No protection” option is enabled. That means: The project is not
protected from unauthorized access and data manipulation and there
is no integrity check when loading the project.
: If a project crashes during editing, the next time you open the
project, a prompt is displayed asking if you want to restore the
unsaved data and create a new project file. If you click on“Yes”,
another dialog is opened. In this dialog, select whether you want to
open the restored project or whether you want to open the project
comparison. This project comparison shows the differences between
the last saved project and the restored project.
NOTE: Project Restore records every change on the hard disk when
the change is executed. If a power or hard disk error occurs on the
hard disk during this process, the last change may be lost.
“Advanced settings” The “Advanced settings” dialog opens.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1085 /
Dialogs 1158

“Upon startup” Selection list for the start screen of PLC Engineering:
● “Show start page”: The home page of PLC Engineering is displayed
● “Open the last used project”
● “Display the "Open project" dialog”
● “Display the "New project" dialog”
● “Show an empty environment”
“News page” URL, which can be called with the command “Help 🠂 PLC Engineering
Homepage” is opened.
By default, http://www.codesys.com/startpage is entered.
Table 177: “Advanced settings” dialog
“Project compression”

User interface
“Step” Prerequisite: In the project settings in the “Security” category, the
“No protection” option is enabled. That means: The project is not pro-
tected from unauthorized access and data manipulation and there is
no integrity check when loading the project.
Selection list for the compression level that is applied when saving the
project:
● “Lowest compression - highest speed (recommended)”
● “Medium compression - medium speed”
● “Highest compression - smallest speed”
“Loading behavior” (only relevant in the context of PLC programming)
Loading libraries and translation information is done in the back-
ground while you are already editing the project.

Dialog 'Options' - 'PLCopenXML'


Symbol:
Function:This dialog contains settings for the behavior of PLC Engineering
when exporting or importing PLCopenXM.
Call: Main menu “Tools 🠂 Options”, category “PLCopenXML”
Table 178: “PLCopenXML Export Settings”
“Additionally export By default, PLC Engineering splits the declaration parts in accordance
declarations as plain text” with the PLCopenXML scheme into individual variables and thus loses
the formatting and some comment information.
: Formatting and comments are retained. PLC Engineering addition-
ally writes the plain text of the exported declaration part into the
PLCopenXML file and thus extends the PLCopenXML scheme.
“Export Folder Structure” : PLC Engineering also exports the folders if they contain one of the
selected objects. That is a PLC Engineering-specific extension to the
PLCopenXML scheme.
Table 179: “PLCopenXML Import Settings”
“Import folder structure” : If the import file contains information about the folder structure of
the objects, PLC Engineering also imports this structure.
: PLC Engineering imports objects without structure.
See also
● ⮫ Chapter 9.2 Exporting and Importing Projects on page 67
● ⮫ Chapter Command 'Export PLCopenXML' on page 923
● ⮫ Chapter Command 'Import PLCopenXML' on page 923

'Options' dialog - 'Proxy settings'


Symbol:

R911403764, Edition 08 Bosch Rexroth AG


1086 / ctrlX PLC Engineering
1158 Dialogs

Function: The dialog is used to save authentication data for the proxy server
currently used for accesses from PLC Engineering to the internet.
Call: Menu “Tools 🠂 Options”, “Proxy settings”Category
Prerequisite: The internet in the network can be accessed via a proxy server
“Enter proxy acess data” A double-click opens a prompt for user name and password for the
proxy server.
PLC Engineering uses the access data when connecting to the down-
load servers for libraries and device description, when connecting to
CODESYS Store and when using the command “View 🠂 Homepage”
when displaying the start page.
Prerequisite: The button is available if your workstation computer or
network accesses the internet through a proxy server.
Also refer to
● ⮫ Chapter 33.2.19 "Library manager” object on page 780
● ⮫ Chapter Command 'Start Page' on page 899

'Options' dialog - 'Refactoring'


Symbol:
Function: The dialog is used to specify the operations in the project for which
refactoring is automatically suggested. The refactoring functionality helps you
in your improvement endeavors.
Call: Menu “Tools 🠂 Options”, category: “Refactoring”

'Suggest refactoring for the following operations'


“Autodeclaration” When changing the name of a variable in a declaration by calling auto-
declaration[(][Shift+F2]) , the enabled option “Apply changes using
refactoring” is displayed. Then the “Refactoring” dialog opens and you
can change the variable throughout the project.
● “When adding or removing variables, or for changing the range of
validity:”
: You delete the names in the “Declare variable” dialog and click
on“OK” to close the dialog. Then the “Refactoring” dialog opens for
removing the variable throughout the project.
● “On renaming variables”
: You specify the names in the “Declare variable” dialog and click
on“OK” to close the dialog. Then the “Refactoring” dialog opens for
renaming the variable throughout the project.
See: Chapter "Refactoring", "Changing variable declaration and
applying refactoring automatically".
“Unit Conversion Editor” “ When renaming unit conversions”:
● : When changing the name of a conversion in the unit conver-
sion editor,he user is prompted if PLC Engineering should perform
"Automatic Refactoring" for renaming.
“Mapping editor” “On renaming variables”
● : When changing a variable name in the device editor (“I/O
Mapping” tab), the user is prompted if PLC Engineering should per-
form "Automatic Refactoring" for renaming.
“Navigator” “When renaming objects”:
● : When changing the name of an object in the device tree or in the
POU view, the user is prompted if PLC Engineering should perform
"Automatic Refactoring" for renaming.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1087 /
Dialogs 1158

“Tabular declaration editor” “On renaming variables”


● : When changing the name of a variable in the tabular declaration
editor, you are prompted whether PLC Engineering should perform
"Automatic Refactoring" when renaming.
“UML class diagram” Options for supporting refactoring, i.e. project-wide IEC code adapta-
tion, for changes made in the class diagram editor:
● “When adding or removing variables”:
: When adding or removing variables in the VAR_INPUT,
VAR_OUTPUT, and VAR_INOUT sections in the class diagram, refac-
toring is supported.
● “When renaming a block”:

User interface
: When changing a module name in the class diagram, refactoring
is supported.
● “When renaming variables or properties”:
: When removing a variable or a property in the class diagram,
refactoring is supported.
Note: If the “Skip refactoring preview” option is enabled in the UML
options, refactoring can be performed on all affected locations in
the project without first being displayed in the “Refactoring” dialog,
depending on the case. See the help page “Dialog 'Options' - 'UML'" in
the CODESYS UML help.

Also refer to
● ⮫ Chapter 18.12 Refactoring on page 150
● ⮫ Chapter 18 Programming the application on page 129
● ⮫ Chapter Command 'Refactoring' - 'Rename <...>' on page 894
● ⮫ Chapter Command 'AutoDeclare' on page 889
● ⮫ Chapter 33.2.27 Object 'Unit Conversion' on page 803

'Options' dialog - 'Text editor'


Symbol:
Function: The dialog contains settings for displaying and working in a text
editor.
Call: Menu “Tools 🠂 Options”, “Text editor” category

'Theme' tab
Set the desired "Theme" for the interface design of the ST editor.
“Theme” Color scheme for the text editor. The selected "Theme" is displayed in
the “Preview” window. The available color schemes are stored in the
installation directory in the Themes folder.

R911403764, Edition 08 Bosch Rexroth AG


1088 / ctrlX PLC Engineering
1158 Dialogs

'Edit' tab
“Number of undo steps” Maximum number of editing steps to which you can apply the com-
mand “Edit 🠂 Undo” command.
“Folding” Defines the structuring of the code by means of indentation.
When you select an indentation, you can expand or collapse the inden-
tation section with the help of a plus or a minus sign respectively
before the first line of the respective section.
● “Indent”: PLC Engineering collects all lines that are indented in
comparison with the preceding line in an indentation unit.
● “Explicit”: They explicitly identify the code section with comments
that should be combined into one indentation unit: The section has
to be preceded by a comment containing 3 opening curly braces
"{{", the section has to be followed by a comment containing 3
closing curly braces "}}". The comments can contain additional text.
Example:

“Word wrap” ● “Soft”: The line break occurs at the edge of the editor window if 0
is entered in the “break point”.
● “Hard”: The line break occurs after the number of characters speci-
fied in the “break point”.
“Tab width” Number of characters
“Keep tabs” : The empty space that you inserted with the [Tab] key is not
resolved into spaces afterwards by PLC Engineering.
“Indent width” If you have selected the “AutoIndent” option “Smart” or “Smart with
code completion”, then PLC Engineering inserts the number of spaces
at the beginning of the line.
“AutoIndent” ● “None”
● “Block”: A new line automatically takes over the indentation of the
previous line.
● “Intelligent”: Lines following a line containing a keyword (for
example VAR) automatically indent by the specified indent size.
● “Intelligent with code completion”: Indentation as for the
“Intelligent ” option , in addition PLC Engineering inserts the termi-
nating keyword (for example END_VAR).

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1089 /
Dialogs 1158

Tab 'Text Area'


“Highlight current line” : The line in which the cursor is positioned in is highlighted.
“Matching brackets” : If the cursor is positioned before or after a bracket within a code
line, the associated closing or opening bracket is marked by a frame.
“End of line selection” : The end of each editor line is marked by a small slash after the last
character (including spaces) of the line.
“Line break” : If a soft or hard line break is enabled, the defined line break loca-
tion is indicated by a vertical line.
“Font” Clicking the field opens the standard dialog for the configuration of
the font.

User interface
Tab 'Margin'
Settings for the left margin of the text editor window, which is separated from the input area by a
vertical line:
“Line numbering” : The declaration and implementation part of the editor have line
numbering on the left, starting with 1
“Highlight current line” : The line number of the line where the cursor is located is high-
lighted.
“Show bracket area” : Bracketing encompasses the lines between the keywords that open
and close a construct, for example IF and END_IF. If this option is
enabled and the cursor is located before, after or in one of the key-
words of a construct, the bracketed area is indicated by a square
bracket in the border.
“Mouse actions” You can assign one of the following actions to each of the specified
mouse actions or mouse button combinations. PLC Engineering per-
forms the selected action when you perform the mouse action on the
plus or minus sign in front of the header of a bracketed area:
● “None”: The mouse action does not trigger any action.
● “Select fold”: PLC Engineering selects all lines of the bracketed
area.
● “Toggle fold”: PLC Engineering opens or closes the bracketed area
or, if there are nested brackets, the first level of the bracketed area.
● “Toggle fold fully”: PLC Engineering opens or closes all levels of a
nested bracketed area.

Tab 'Monitoring'
Settings for the display of the monitoring fields
“Enable inline monitoring” : Display of the monitoring fields behind the variables in online mode
“Number of displayed Number of decimal places in the monitoring field
digits”
“String length” Maximum length of string variable values in the monitoring field
Also refer to
● ⮫ Chapter Programming in Structured Text (ST) on page 193

“Options” - “SFC editor” dialog


Symbol:
Function: The dialog is used to configure the settings for the SFC editor.
Call: Menu “Tools 🠂 Options”, category “SFC Editor”

R911403764, Edition 08 Bosch Rexroth AG


1090 / ctrlX PLC Engineering
1158 Dialogs

Also refer to
● ⮫ Chapter Programming in SFC on page 193
● ⮫ Chapter 33.3.12 “SFC” menu on page 977
● ⮫ Chapter SFC (sequential function chart) editor on page 391

Tab 'Layout'
Table 180: “Elements”
This defines the dimensions of the SFC elements: step, action, qualifier, property. The values are
specified in grid units. 1 grid unit = Font size currently set in the text editor options (Text area/
Font). The settings are always active immediately in all open SFC editor views.
“Step height” Possible values: 1-100
“Step width” Possible values: 2-100
“Action width” Possible values: 2-100
“Qualifier width” Possible values: 2-100
“Property width” Possible values: 2-100
Table 181: “Character set”
The example text shows the current font. Click it to change the font.
Table 182: “Step actions”
“Standard insertion ● “Copy reference”: The reference to the action objects called by the
method” step are copied when copying the step. The copied step and new
step call the same action.
● “Duplicate implementation”: The reference to the action objects
called by the step are fixedly connected to this step. When copying
the step element, new action objects are created for the new step,
and the implementation is duplicated.
● “Always ask”: When inserting a step action, it is always prompted
whether its actions are to be duplicated when copying the step
element or whether the reference is to be applied to an existing
action.
Note: If a step already includes an embedded action, newly inserted
actions of this step are also embedded. Likewise, new inserted
actions are not embedded when the step already contains a non-
embedded action. In these cases, you are no longer prompted for a
duplication mode.
Table 183: “Embedded objects”
“Show action and transition : Action and transition objects that are permanently linked
objects in the navigator” ("embedded") to a step in the SFC block are displayed in the “Devices”
or “POUs” tree view.

Tab 'View'
Table 184: “Visibility of properties”
List of element properties for the categories “Common” and “Specific” with definitions of the
display options.
“Property” Defines the element properties displayed next to the element in the
SFC diagram.
“Value” : Display of the property value.
“With name” : Display of the property value with name.
Table 185: “Online”
“Show step time” : In online mode, PLC Engineering displays the step time to the right
of the steps.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1091 /
Dialogs 1158

“Options” - “CFC editor” dialog


Symbol:
Function: The dialog is for the configuration of the settings for editing and
printing in the CFC editor.
Call: Menu “Tools 🠂 Options”, category “CFC Editor”

"General” tab
“Enable automatic : When dragging and dropping a CFC element onto the editor
connection” canvas, PLC Engineering automatically connects unlinked pins that
"touch" each other. Make sure that you do not create unwanted con-
nections when shifting elements!

User interface
“Prepare values in the : In online mode you can also prepare variable values for writing and
implementation part” forcing in the implementation part of the CFC module. In addition,
PLC Engineering displays the currently prepared values in the inline
monitoring box of the variable in angle brackets.

Tab 'View'
“Show grid points” : Grid points, at which you can position the elements, are a validity
range in the editor.
“Show function block : PLC Engineering displays existing function blocks in the CFC editor
symbol” that are linked to a bitmap as a symbol.
Prerequisite: You have either created the link for a function block or a
function in the object properties or loaded it via a library.
“Edit line colors” Opens the “Edit Line Colors” dialog for the definition of the colors
of the connecting lines, depending on the data type applied. The
lines appear in these colors in offline and online mode, except ifPLC
Engineering overpaints these colors with the bold black and blue line
display indicating a Boolean data flow.
● “Add type”: Adds a data type to the list.
● “Delete type”
“Font” Display of the font and button for changing the font.
Also refer to
● ⮫ Chapter Dialog 'Properties' - 'Bitmap' on page 1052

Tab 'Print'
Setting the “layout options”
“Page scaling” “Page” or “Poster”
“Scaling” Possible values: 20 % - 200 %
Also refer to
● ⮫ Chapter Programming in the CFC editor on page 184
● ⮫ Chapter 32.1 Programming languages and their editors on page 377

“Options” - “FBD, LD and IL” dialog


Symbol:
Function: This dialog is used for configuring the display options for the
FBD/LD/IL editor.
Call: Menu “Tools 🠂 Options”, category“FBD, LD and IL”

R911403764, Edition 08 Bosch Rexroth AG


1092 / ctrlX PLC Engineering
1158 Dialogs

"General” tab
Table 186: “View”
“Show network title” The network title is displayed in the upper left corner of the network.
“Show network comment” The network comment is displayed in the upper left corner of the
network. When the network title is also shown in PLC Engineering, the
comment is shown in the line below.
“Show function block The block symbol is displayed in the block element in the FBD and LD
symbol” editor. The standard operators also have symbols.
“Show operand comment” PLC Engineering shows the comment that you indicated for a variable
in the implementation part. The operand comment refers to the local
occurrence of the variable only, as opposed to the symbol comment.
The comment is truncated automatically depending on available space.
You can limit the comment to a defined width by activating the option
“Fixed size for operand fields”.
“Show symbol comment” The comment that you indicated for a variable or symbol in the decla-
ration is displayed in PLC Engineering above the variable name. You
can also assign a local operand comment in addition to or instead of
the symbol comment.
“Show symbol address” If an address is assigned to a symbol (variable), then this address is
displayed above the variable name.
“Show network separators” A separator is displayed between the individual networks.
Table 187: “Behavior”
“Placeholder for new The operand field of pins for the new function block is left blank
operands” (instead of "???").
“Empty operands for Adds blank operands instead of ???.
function block pins”
Table 188: “Font”
Click the input field to open the “Font” dialog.
“Specified size for operand : “Edit operand size” can be enabled.
fields”
“Edit operand size” The “Operand Sizes” dialog opens for setting the number of characters
and lines.

Tab 'FBD'
Table 189: “View”
“Networks with line breaks” : Display of the network with line breaks so that PLC Engineering
can show as many function blocks as possible in the current window
width.
“Connect function blocks : The length of the lines between the elements are fixed and short.
with straight lines”
Table 190: “Behavior”
“Network content” Drop-down list: Content of a new network.
“Selection after insertion” Drop-down list: Element that PLC Engineering selects after inserting a
new network.

Tab 'LD'
Table 191: “View”
“Networks with line breaks” : Display of the network with line breaks so that PLC Engineering
can show as many function blocks as possible in the current window
width.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1093 /
Dialogs 1158

Table 192: “Behavior”


“Network content” Drop-down list: Content of a new network.
“Selection after insertion” Drop-down list: Element that PLC Engineering selects after inserting a
new network.

Tab 'IL'
Table 193: “View”
“Enable IL” The IL implementation language is available in the development
system.
Table 194: “Behavior”
“Network content” Drop-down list: Content of a new network.

User interface
“Selection after insertion” Drop-down list: Element that PLC Engineering selects after inserting a
new network.

Tab 'Print'
Table 195: “Layout options”
“Fit method” Selection list for resizing.
“Avoid cutting of elements” Elements that do not fit on the page are printed on the next page.
“Mark connections on Enabled for selection when “Avoid cutting of elements” is selected.
adjacent pages”
Also refer to
● ⮫ Chapter 32.1 Programming languages and their editors on page 377

Dialog 'Options' – 'Library Download'


Symbol
Function: This dialog is for the setting of download servers.
Call: menu “Tools 🠂 Options”, “Library Download” category
If you click on the button “Download Missing Libraries” in the library manager, PLC Engineering
browses these download servers for libraries marked as missing in the library manager and uses
the set login details for the proxy server.
“Download servers” URL of a server containing library files
Double-click on “(Enter new An input field opens in which you can enter the URL address of a
download server here)” server.
See also
● ⮫ Chapter 33.2.19 "Library manager” object on page 780
● ⮫ Chapter 'Options' dialog - 'Proxy settings' on page 1085

33.4.27 “Customize” dialog


Dialog 'Customize' - General information
The options described below can be called in both ctrlX I/O Engineering as well
as in ctrlX PLC Engineering.
However, some of the options are not relevant for working inctrlX PLC Engi-
neering as they are connected to the IO configuration in ctrlX I/O Engineering.

⮫ Dialog 'Customize' - 'Menu'


⮫ Dialog 'Customize' - 'Command Icons'
⮫ Dialog 'Customize' - 'Toolbars'
⮫ Dialog 'Customize' - 'Keyboard'

R911403764, Edition 08 Bosch Rexroth AG


1094 / ctrlX PLC Engineering
1158 Dialogs

Dialog 'Customize' - 'Menu'


Function: With this dialog, you define the structure and contents of the user
interface.
Call: Main menu “Tools 🠂 Customize” (“Menu”).
When you click “OK” to close the dialog, the changes are visible in the menu
bar of the PLC Engineering user interface.
Table 196: “Menu”
Display of currently defined menus, submenus, and included commands. In PLC Engineering, a
menu or submenu caption is identified by the caption symbol ( ). The layout from top to bottom
corresponds to the layout displayed later in the PLC Engineering menu.
“Add Command” Enabled when a command is selected.
Adds a command above the selected command. Opens the “Add
Command” dialog.
Use the “Add Command” dialog for selecting one or more commands.
Left part: List of categories. Right part: List of commands in the
selected category.
“Add Separator” Adds a separator above the selected command.
“Add Popup Menu” Adds a popup menu above the selected menu, submenu, or command.
Opens the “Add Popup Menu” dialog.
“Edit Popup Menu” Opens the “Edit Popup Menu” dialog.
“Reset” Resets the default settings of the entire menu.
“Load” Loads the settings from a stored file (<file name>.opt.menu).
Table 197: “Add Popup Menu”
In PLC Engineering, a new menu is shown in the menu bar only when the menu contains at least
one command.
“Default text” Select this check box when localization is available.
“Localized Texts” List: Languages and localized texts.
“Add Language” Opens a drop-down list of available languages.
In PLC Engineering, the selected language is displayed in the area
“Localized Texts”. Use the “Text” column for typing the localized texts.
See also
● ⮫ Chapter 7.2.1 Customizing Menus on page 47
● ⮫ Chapter Dialog 'Customize' - 'Toolbars' on page 1094

Dialog 'Customize' - 'Command Icons'


Function: This dialog defines the icons of the menu commands.
Call: Menu bar: “Tools 🠂 Customize” (“Command Icons”).
Table 198: “Command icon”
“Assign” Opens a dialog for selecting the new icon (*.ico).
“Remove” Removes the user-defined icon. The default icon is active again.
“Reset” Resets all default settings of the command icons.
“Load” Loads the settings from a stored file (<file name>.opt.keyb).
“Save” Saves the current settings to a file (<file name>.opt.keyb).
See also
● ⮫ Chapter 7.2.3 Customize Command Icon on page 49

Dialog 'Customize' - 'Toolbars'


Function: Use this dialog for generating new toolbars or customizing existing
toolbars.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1095 /
Dialogs 1158

Call: Main menu “Tools 🠂 Customize” (“Toolbars”).


When you click “OK” to close the dialog, the changes are visible in the menu
bar of the PLC Engineering user interface.
Table 199: “Toolbars”
Display of currently defined toolbars. In PLC Engineering, the associated commands are listed
below each toolbar in the order they will appear in the toolbar.
Double-clicking a toolbar in the list switches to editing mode.
“Add Toolbar” Enabled when a toolbar is selected.
In PLC Engineering, this adds a toolbar above the selected toolbar and
places the cursor in the name field of the new toolbar.
“Add Command” Enabled when you select a command or blank command entry below a

User interface
toolbar.
Adds a command above the selected command. Opens the “Add
Command” dialog.
Use the “Add Command” dialog to select one or more commands. Left
part: List of categories. Right part: List of commands in the selected
category.
“Add Separator” Adds a separator above the selected command.
“Hide” Hide the selected toolbar from the user interface.
“Show” Shows the selected hidden toolbar in the PLC Engineering user inter-
face.
“Reset” Resets the default settings of the toolbars.
“Load” Loads the settings from a stored file (<file name>.opt.tbar).
See also
● ⮫ Chapter 7.2.2 Customizing Toolbars on page 48
● ⮫ Chapter Dialog 'Customize' - 'Menu' on page 1094

Dialog 'Customize' - 'Keyboard'


Function: This dialog is used for defining keyboard shortcuts (quick access keys
or keyboard combinations) for commands.
Call: Main menu “Tools 🠂 Customize” (“Keyboard”).
Table 200: “Keyboard”
“Shortcuts for selected Keyboard shortcuts for the selected command The drop-down list can
command” include more than one keyboard shortcut for the command.
“Press shortcut keys” Input field for the keyboard shortcut of the selected field. Permitted
combinations include [Ctrl], [Alt], [Shift], and other keys. You clicking
“Assign” to assign a recorded keyboard shortcut to a selected com-
mand.
“Shortcut keys currently Command assigned to the currently defined keyboard shortcut
used by”
“Reset” Resets the default settings of the keyboard shortcuts.
“Load” Loads the settings from a stored file (<file name>.opt.keyb).
See also
● ⮫ Chapter 7.2.4 Customizing Keyboard Shortcuts on page 50

33.4.28 "Trace configuration" dialog


Dialog 'Advanced Trace Settings'
Function: This dialog provides extended settings for recording data.

R911403764, Edition 08 Bosch Rexroth AG


1096 / ctrlX PLC Engineering
1158 Dialogs

Call: “Advanced” button in “Trace Configuration ” dialog, “Record Settings”


subdialog
Requirement: The trace editor is open and active. The dialog “Trace
configuration” is open and the top node of the trace record tree is selected
so that the subdialog “Record settings” is available.
For the calculation of the values, you have to select a task in the “Trace
Configuration” dialog.
The buffer size is defined as "number of samples". PLC Engineering calculates the time intervals
that corresponds to this number and displays the result in normal fonts on the right outside
the table (for example, “1h1m1s1ms”). The calculation is possible only with the help of the task
configuration settings and when the task cycle time is known.
“Measurement in every Data recording in every n task cycle Scanning interval of the
nth cycle” Preset: 1; then the application performs the data data recording
recording in each task cycle. Example: 100ms
“Recommended runtime Requirement: “Override runtime buffer size” is Maximum length of the
buffer size (samples)” deactivated. time interval during
The maximum number of samples that PLC Engi- which the application
neering calculates and recommends, which the collects data on the run-
application stores at runtime per trace variable. time system.
PLC Engineering calculates the number in the Example: 2s
task cycle time from the value in “Measure in
every n-th cycle” and the value in Measure in
every n-th cycle.
“Override runtime Maximum number of samples per trace variable Maximum length of the
buffer size” that saves the application per trace variable in time interval during
runtime mode. which the application
Example: 100 collects data on the run-
time system.
Value range: starting at 10
Example: 6s
: The application uses this value, not the
value calculated by PLC Engineering from
“Recommended runtime buffer size (samples)”.
“Trace editor buffer size Number of values that can be stored per variable The maximum time
per variable (samples)” in the trace editor. period for the display
Example: 10000 in the trace editor
results from the max-
imum number and the
scanning interval of the
data recording. You can
scroll back a maximum
of this time in the trace
editor.

See also
● ⮫ Chapter 33.2.26 Object 'Trace' on page 799
● ⮫ Chapter 22.4.3 Creating Trace Configuration on page 301

“Trace configuration” dialog


Symbol:
Function: The dialog contains the trace configuration for data recording.
Call
● “Trace 🠂 Configuration”; context menu
● Link “Configuration” in the trace editor
● Link “Add variable” in trace editor

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1097 /
Dialogs 1158

Prerequisite: The trace object editor is open and active.


Also refer to
● ⮫ Chapter 22.4.3 Creating Trace Configuration on page 301
● ⮫ Chapter 22.4 Data recording with "Trace" on page 298
● ⮫ Chapter Attribute 'monitoring' on page 629

Tree view 'Trace Record'


The tree view lists the variables that are traced and allows for access to the
variable settings.
Selected trace name The subdialog “Record settings” is displayed on the right.
Selected trace variable The subdialog “Variable settings” is displayed on the right.

User interface
Table 201: Context menu commands
“Add Variable” Adds a new trace variable. The “Variable Settings” subdialog opens on
the right and it is partially configured. Select a variable in the input
field of the “Variable” setting to trace its value curve.
“Assign to Diagram” Lists (in the submenu on the right) those diagrams in which the
selected variable is not currently displayed. Select a diagram to display
the variable in it.
The command is available when a variable is selected in the tree view.
Tip: If the command is disabled, the variable is already displayed in all
diagrams.
“Enabled” Enabled by default
Disabled variables are grayed out. They are neither displayed nor
recorded.

Tree view 'Presentation (Diagrams)'


The tree view lists the diagrams that are displayed in the trace editor and
allows for access to their display mode.
Selected node “Time axis” The “Display Mode” subdialog for the time axis is displayed on the
right. Specify the time axis display. See below.
Selected diagram name The settings for the coordinate system of the diagram and a preview
are displayed on the right. See below.
Selected node “Y-axis” The “Display Mode” subdialog is displayed on the right. Specify the
axis display. See below.
“Show variables”
Selected trace variable The subdialog “Variable settings” is displayed on the right. Configure
the trace variable. See below.
Note: These are the same settings that can be accessed in the “Trace
recording” tree view.

R911403764, Edition 08 Bosch Rexroth AG


1098 / ctrlX PLC Engineering
1158 Dialogs

Table 202: Context menu commands


“Add Diagram” Adds a new diagram below and displays it in the tree view
“Presentation (Diagrams)”
“Add New Variable” Adds a new trace variable. The “Variable Settings” subdialog opens
on the right and it is partially configured. Select a variable in the
input field of the “Variable” setting to trace its value curve. Specify its
display. In addition, the variable is assigned to the selected diagram.
“Add Existing Variable” Lists all trace variables (in the submenu on the right) where the
selected diagram is not currently displayed. Select a variable in order
to display it in the selected diagram.
Tip: If the command is disabled, all trace variables are already dis-
played in the selected diagram.

“Recording settings’ subdialog


Prerequisite: In the tree view “Trace recording” the top node is selected.
“Enable trigger” : Trigger resolution is activated. At runtime, the trace data is buf-
fered only when a trigger signal has been sent. You determine how
the trigger signal is sent in the settings “Trigger variable”, “Trigger
parameter”, “Trigger edge”, “Post-trigger (Samples)”, and “Trigger
level”.
: Continuous display of the current data sets
“Trigger variable” Signal that is used as a trigger. A complete instance path is required.
A valid trigger signal is an IEC variable, a property, a reference,
a pointer, an array element of the application, or an expression.
Permitted types are all IEC-based types except STRING, WSTRING,
and ARRAY. Enumerations are permitted when the basic type is not
STRING, WSTRING or ARRAY. The content of a pointer is not a valid
signal.
When the runtime system uses the CmpTraceMgr component, a prop-
erty that is linked to the 'monitoring' attribute can then be recorded
as a variable.
“Trigger parameter” System parameter used as trigger
The “Input Assistant” dialog lists all valid system parameters in the
“Parameters” category of the “Categories” tab.
Selects the “Trigger Variable” or “Trigger Parameter”
“Trigger edge” Defined the edge detection for triggering:
● “positive”
– For Boolean trigger variables, triggering occurs when the values
changes from FALSE to TRUE.
– For analog trigger variables, triggering occurs when the value as
defined in “Trigger level” is reached from below.
● “negative”
– For Boolean trigger variables, triggering occurs when the values
changes from TRUE to FALSE.
– For analog trigger variables, triggering occurs when the value as
defined in “Trigger level” is reached from above.
● “both”
– For Boolean trigger variables, triggering occurs when the values
changes.
– For analog trigger variables, triggering occurs when the value as
defined in “Trigger level” is reached.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1099 /
Dialogs 1158

“Post trigger (samples)” Number of records per trace variable that are buffered after triggering.
Default: 50. Value range: 0 to (232 - 1)
“Trigger level” Value causing the trigger when reached
“Task” Task recording data
“Record condition” At runtime, the application checks the recording condition. If the con-
dition is fulfilled, the trace data is buffered.
Record condition for data recording with CmpTraceMgr runtime system
component:
● As an expression that includes only permitted operators and oper-
ands.
Permitted operators (can also be nested): (Logical) AND, NOT,OR,

User interface
the relational operators <, <=, >, >=, =, <>.
Permitted operands: Variables that are valid for trace.
● As a variable.
Permitted type: BOOL, bit access, property. The condition is met for
TRUE or 1. The contents of a pointer are not permitted.
Recording condition for a data recording with IEC code.
● As an expression that returns a Boolean value.
“Comment” Comment (for example, from the recording condition).
“Resolution” Measure for the time stamp that is recorded per data set
● “ms”: Time stamp in ms
● “µs”: Time stamp in µs microseconds for a task cycle time of 1 ms
or less
“Automatic restart” : Persistently saves the trace configuration and the last contents of
the RTS buffer to the target device. After the device is restarted, the
trace is started automatically if the trigger has not occurred yet.
“Extended” Opens the “Advanced trace settings” dialog
Also refer to
● ⮫ Chapter Dialog 'Advanced Trace Settings' on page 1095

Subdialog 'Variable settings'


Prerequisite: In the tree view “Trace recording” or in the tree view
“Representation (diagrams)” a trace variable is selected.

R911403764, Edition 08 Bosch Rexroth AG


1100 / ctrlX PLC Engineering
1158 Dialogs

“Variable” Valid variable; value recorded with full instance path.


Valid:
● IEC variable
● Property
● Reference Book
● Content of the pointer
● Array element
Permitted data type
● IEC-based type except STRING, WSTRING, or ARRAY
● Enumeration when the basic type is not STRING, WSTRING or ARRAY
When the runtime system uses the CmpTraceMgr component, a prop-
erty that is linked to the "monitoring" attribute can then be recorded
as a variable.
“Parameters” Parameters, whose data is recorded.
Prerequisite: Runtime system with CmpTraceMgr component
The “Input Assistant” dialog lists all valid system parameters in the
“Parameters” category of the “Categories” tab.
Enables toggling between “variable” and “parameter”
“Color” Color of the variable in the trace diagram
“Line type” Display as line chart
● “Line”: Values are linked to form a line
● “Step”: Values are linked to form stairs
● “None”: Values are not linked
“Point type” Display as scatter chart
● “Dot”: Value is displayed as point
● “Cross”: Value is displayed as a cross
● “None”: Value is not displayed
“Enable lower limit” : Warning when less than the lower limit
“Lower limit” If the value of the trace variable falls below the limit, the variable is
displayed in the warning color.
“Color” Warning color when fallen below
“Enable upper limit” : Warning when exceeding the upper limit
“Upper limit” If the value of the trace variable exceeds the upper limit, the variable is
displayed in the warning color.
“Color” Warning color when exceeded

Subdialog 'Display mode'


Prerequisite: In the tree view “Representation (Diagrams)” an axis is selected.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1101 /
Dialogs 1158

“Display mode” Scaling


● “Auto”:
Automatically scaled time axis
● “Fixed Length”:
Time axis segment with a constant “Length”
● “Fixed”:
Time axis segment from “Minimum” to “Maximum”
“Minimum” Literal, variable (integer data type) or constant variable (integer data
type). It contains the initial value of the section. Prerequisite: “Display
mode” is “Fixed”.
Examples: 20,PLC_PRG.iLimit_Min, GVL.c_iLimit_Min

User interface
Note: An initial value is required for the variable. This is important for
offline display and scale subdivision. Example iLimit_Min: INT :=
20
“Maximum” Literal, variable (integer data type) or constant variable (integer data
type). Contains the end value of the section. Prerequisite: “Display
mode” is “Fixed”.
Examples: 80,PLC_PRG.iLimit_Max, GVL.c_iLimit_Max
Note: An initial value is required for the variable. This is important for
offline display and scale subdivision. Example iLimit_Max: INT :=
80
“Length” Constant segment length; the initial value is adjusted automatically.
“Grid” : Diagram with grid lines in the x-direction. Select the grid line color
from the dropdown list of colors.
Table 203: “Scale lines”
“Fixed spacing” : Display of graduation marks with “spacing” and “subdivision”
“Distance” Distance of the tick marks
“Divisions” Number of divisions between two division marks
“Font” Font for the time axis.
Link “Preview” Displays the preview of the diagram.

Diagram preview
Prerequisite: In the tree view “Representation (diagrams)” a diagram is
selected.

R911403764, Edition 08 Bosch Rexroth AG


1102 / ctrlX PLC Engineering
1158 Dialogs

“Background color” Background color of the diagram. opens the color selection list.
“Background color on Background color of the selected diagram.
selection”

Link “Add variable” Adds a new trace variable (in the tree view “Trace record”).
Link “Remove variable” Deletes the selected trace variable (in the tree view “Trace record”).
Link “Add diagram” Adds a new diagram (in the tree view “Display”).
Link “Remove diagram” Deletes the selected diagram (in the tree view “Display”).
Link “Reset display Resets the display settings of either the selected diagram or y-axis to
settings” the default values.
“OK” Accepts the configuration changes and saves the trace configuration.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1103 /
1158

34 Software add-ons/documentation
In ctrlX I/O Engineering and ctrlX PLC Engineering there is the option to inte-
grate third-party software add-ons into the user interface, see:
⮫ Command 'Add-on Installer'
Documentation for third-party add-ons have to be obtained from the respective
software manufacturer.

Documentation for CODESYS software products

Software add-ons/documentation
Help forCODESYS Store can be found in the ⮫ CODESYS web documentation
Software/link to manufacturer documentation Description
⮫ CODESYS Engineering Development environment:
● CODESYS Development System
● CODESYS Tools
● CODESYS Installer
⮫ CODESYS Library Documentation Collection of library documentation
⮫ CODESYS Fieldbus Field bus connections:
● CODESYS CANbus
● CODESYS EtherCAT
● CODESYS EtherNet/IP
● CODESYS IO-Link
● CODESYS Modbus
● CODESYS PROFIBUS
● CODESYS KNX
● CODESYS Sercos
● CODESYS BACnet
● CODESYS Ethernet Adapter
● CODESYS PROFINET
⮫ CODESYS SoftMotion Implementing PLC-controlled movements effi-
ciently
⮫ CODESYS Visualization Creating user interfaces based on available visuali-
zation elements
⮫ CODESYS Communication Enables easy publishing and integration of data
into applications

The CODESYS add-ons released for the ctrlX system can be obtained via the
ctrlX STORE, see ⮫ ctrlX Store on the web
For questions regarding CODESYS Add-Ons not listed there, please contact
your Bosch Rexroth representative.

R911403764, Edition 08 Bosch Rexroth AG


1104 / ctrlX PLC Engineering
1158

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1105 /
Fieldbus Devices and I/O Drivers 1158

35 Field bus support


Apart from the EtherCAT master app by Rexroth, selected Codesys add ons for
other field bus types are available in the ctrlX store and can be installed on
the ctrlX device. The ctrlX Store provides an overview of the currently available
drivers, see ⮫ web link.
General information on the use of devices in the project refer to:⮫ Chapter 17.2
Device tree and device editor on page 111

35.1 Fieldbus Devices and I/O Drivers


The technical basis for each fieldbus device, which is configured in the device

Field bus support


tree, is the PLC Engineering I/O driver.
The I/O driver is the link between the fieldbus stack, the IEC application, and
the PLC Engineering IDE. The driver configures the fieldbus stack from the
data of the device configuration. It shows the diagnosis, provides an API for
the IEC application, and is responsible for the I/O mapping (see chapter "I/O
Mapping").
This chapter provides a brief overview of the basic functionality of PLC Engi-
neering I/O driver devices, without discussing the details of specific bus sys-
tems. In addition, some recommendations for the configuration are provided.

Bus cycle task


The bus cycle task is the IEC task in whose context the I/O driver is executed.
Some I/O drivers use multiple tasks: usually one real-time critical task (with
high priority), which is used for the transfer of I/O data, and another task
with low priority for tasks such as evaluating diagnostics and executing acyclic
services of the bus system.
With real-time critical bus systems, it has to be ensured that no operations are
executed in the context of this bus task that would interrupt the bus clock due
to the execution time.
The bus task can be configured in the I/O mapping dialog of the I/O driver
device. Note that the settings of the parent device are inherited by default. If
this device is the PLC, then its PLC setting applies in the bus cycle task.
If this above setting is not set, then the task with the
NOTICE
shortest cycle time is used. In this way, a non-real-time
I/O driver can be executed unintentionally in the task
context of a real-time critical driver, thus interrupting its
communication. To diagnose these communication prob-
lems, it is recommended to check the task monitoring.
See also
● ⮫ Table 41 “Bus Cycle Options” on page 759

I/O mapping
An essential function of an PLC Engineering I/O driver is to update the I/O map-
ping. This means the mapping of the I/O data of the bus system to variables of
the IEC application (and vice versa).
The input/output data is mapped cyclically by copy and conversion operations
in both directions from the internal memory image of the bus system to IEC
variables assigned to %I and %Q addresses.
For the I/O driver, there is no internal difference whether symbolic names or
"direct" access to the %I and %Q addresses are used for this I/O mapping.
For the maintainability of the application, it is recommended to always use
descriptive variable names (example: variable "TemperatureReactor" instead of
"%IW117" access).

R911403764, Edition 08 Bosch Rexroth AG


1106 / ctrlX PLC Engineering
1158 Fieldbus Devices and I/O Drivers

The updating of the I/O mapping can be set with “Always update variables”
(globally in the “PLC Settings” or individually for each device in the I/O map-
ping dialog):
● Disabled:
Only I/O data used in the application is mapped.
This may improve performance by avoiding the copy operations, but may
cause confusion if the I/O data in the I/O mapping dialog is not updated (the
values are then grayed out). This setting is recommended for an application
whose development has been completed.
● Enabled 1:
All data is updated.
● Enabled 2:
Caution: For productive use in special cases only.
As a result, inconsistent I/O data may occur, because the bus cycle task
reads/writes this data while the application code uses it in other tasks.
See „Consistency of I/O data“.
See also
● ⮫ Chapter 33.1.9 Tab '<Device name> I/O mapping' on page 739

Consistency of I/O data


The PLC Engineering programming system allows the IEC application to use
multiple tasks executed in parallel (for visualization, field buses, or other
POUs). The application code can access I/O data from the context of these
tasks via the mapped IEC variables. By accessing the same data from different
tasks, inconsistent or corrupt data could occur (for example, due to interrupted
write access).
The I/O driver ensures data consistency by providing each task executing a task
cycle with a consistent mapping – a snapshot, so to speak – of all I/O data
used.
So a code like in the following example cannot cause problems: (Note "DIV by
ZERO")

IF(inputData <> 0) THEN // inputData is mapped to


%I
x := y / inputData; // This will never result
in DIV_BY_ZERO Exception
END_IF // inputData is not
updated by bus cycle during execution of POU
With the “Always update variables” option set to
NOTICE
“Enabled 2 – always in bus cycle task”, this mechanism
is overridden. Accordingly, the application code has to
take this into account.

Services
In addition to the basic functionality, some I/O drivers provide services that can
be called from the PLC Engineering IDE, such as the device scan function or the
setting of device addresses.

General recommendations
Settings:
● “PLC Settings”: I/O updates in stop:

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1107 /
Bus Cycle Task 1158

The bus cycle continues even when the application is stopped, for example
when the application is on a debug breakpoint. In this way, communication
with the field devices is maintained and can be continued immediately
without interruption.
● “PLC Settings”: “Always update variables” is set to “Enabled 1 – use bus
cycle task if not used in any task”:
During the development of the application, it is useful to see the values of all
I/O data.
Task configuration:
● Especially for real-time critical fieldbus systems such as Profinet, EtherCAT,
or CAN, which depend on maintaining an exact send/receive clock, it is

Field bus support


recommended to use a separate bus cycle task with high priority. For less
real-time-critical tasks (for example, visualization) a significantly lower pri-
ority should be selected than for the bus cycle task.
● In order to achieve maximum I/O throughput with as little offset as possible,
separate POUs can be executed in the bus task of the fieldbus system.
However, these then have to meet the real-time requirements: for example,
no file access or blocking socket functions may be executed, but for example
only the calculation of the output data.

Multiple I/O drivers and tasks (troubleshooting)


If consistent access to I/O data from multiple tasks and possibly across mul-
tiple I/O driver instances has to be synchronized, then undesired reciprocal
interference between the bus and application task may occur under certain
circumstances.
This is the case, for example, when the general system load is high or when the
I/O data of the real-time critical fieldbus system is used together with I/O data
of a slow and blocking local bus system in the same task.
In case of unexpected interference of the communication, with the particu-
larly real-time-critical fieldbuses (EtherCAT, Profinet, CAN), the task monitoring
should therefore first be examined for very large jitter or outliers in the
cycle time (maximum value compared to average value). The task list provides
detailed information about the use of I/O data in different tasks.
It may be possible to avoid using I/O data from different bus systems in one
and the same task or to reduce the number of I/O tasks.
See also
● ⮫ Chapter 33.1.15 Tab 'Task deployment' on page 753

35.2 Bus Cycle Task


Generally, for each IEC task, the used input data is read at the start of each
task (1) and the written output data is transferred to the I/O driver at the end
of the task (3). The implementation in the I/O driver is decisive for additional
transfer of the I/O data. It is responsible for the time frame and time point that
the actual transfer to the corresponding bus system occurs.
The bus cycle task of the PLC can be defined globally for all fieldbuses in the
PLC settings. For some fieldbuses, however, you can change this independent
of the global setting. The task with the shortest cycle time is used as the
bus cycle task (setting: “unspecified” in the PLC settings). The messages are
normally sent on the bus in this task.
Other tasks copy only the I/O data from an internal buffer that is exchanged
only with the physical hardware in the bus cycle task.

R911403764, Edition 08 Bosch Rexroth AG


1108 / ctrlX PLC Engineering
1158 Bus Cycle Task

(1) Read inputs from input buffer (2) IEC task


(3) Write outputs to output buffer (4) Bus cycle
(5) Input buffer (6) Output
buffer
(7) Copy data to/from bus
(9) Bus cycle task, priority 1, 1 ms
(10) Bus cycle task, priority 5
(11) Bus cycle task, priority 10, interrupted by task 5
Task usage
The “Task Deployment” tab provides an overview of used I/O channels, the set
bus cycle task, and the usage of channels.
If an output is written in various tasks, then the status is
WARNING
undefined, as this can be overwritten in each case.
If the same inputs are used in various tasks, then it is
possible for the input to change during the processing of
a task. This happens when the task is interrupted by a
task with a higher priority and causes the process image
to be read again. Solution: At the beginning of the IEC
task, copy the input variables to variables and then work
only with the local variables in the rest of the code.
Conclusion: Using the same inputs and outputs in several
tasks does not make any sense and can lead to unex-
pected reactions in some cases.

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1109 /
1158

36 OPC UA server / client


OPC UA apps for ctrlX devices
For the use of OPC UA server and client functionality, Rexroth offers apps for
ctrlX devices. In addition to the client app, the PLC library CXA_OpcUaClient
provides access functions for using the client functionality in the PLC program.
Explore the following web links to learn more about ctrlX OPC UA apps:

OPC UA apps in the ctrlX store


⮫ OPC UA client app

OPC UA server / client


⮫ OPC UA server app

ctrlX Automation Community


⮫ Feel free to ask open questions to the ctrlX Automation community

ctrlX product documentation


⮫ OPC UA client app
⮫ OPC UA server app
⮫ PLC libraries

R911403764, Edition 08 Bosch Rexroth AG


1110 / ctrlX PLC Engineering
1158

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1111 /
Guidelines for Creating Libraries 1158

37 Libraries
Libraries are used to provide function blocks and functions for use in thePLC
Engineering applications. Apart from the descriptions available in the help,
please refer to the documents contained in the library.
For handling libraries in the PLC Engineering project, please refer to the
chapter “Installing libraries”.
If you want to create libraries with PLC Engineering, please refer to the guide-
lines for library developers!

Also refer to
● ⮫ Chapter 27 Using libraries on page 329

Libraries
37.1 Guidelines for Creating Libraries
Libraries must be created according to specific rules to avoid compatibility
issues.
The main items include the following:
● Select a meaningful library name (required)
● Use templates to ensure consistency (optional)
● Use a familiar and uniform project structure, when possible (optional)
● Register a unique library namespace (required)
● Enter all project information (required)
● Apply the correct method for referencing other libraries correctly (required)
● Design smart external and internal interfaces (required)
● Implement a user-friendly error handling (required)
● Apply the correct method (protection) for deployment (required)
● Apply a consistent naming convention to get clean code (optional)
● When revising an existing library, consider the interface compatibility with
previous versions.
For creating a "translated library" or library documentation, the "CODESYS
Library Documentation Support x.x.x.x.package" is also required.
The package is provided as a separate package via the ctrlX WORKS installation
and is installed via the Package Manager in ctrlX PLC Engineering.
Follow these guidelines when developing libraries in PLC Engineering: "Library
Development Summary". You will find this document as a CHM file (LibDevSum-
mary.chm) in the installation directory of PLC Engineering, or in the online
help.
Also refer to
● ⮫ Chapter 27 Using libraries on page 329

R911403764, Edition 08 Bosch Rexroth AG


1112 / ctrlX PLC Engineering
1158 Guidelines for Creating Libraries

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1113 /
ctrlX WORKS 1158

38 Related documentation
38.1 Overview

First Steps
1

ctrlX CORE ctrlX WORKS


Runtime Engineering

Related documentation
4 2
CORE ctrlX
WORKS

Runtime - Apps Engineering - Apps


5 6 3 3
PLC Motion PLC I/O
ENGINEERING ENGINEERING

7 8 9 10
OPC-UA OPC-UA EtherCAT VPN
Server Client Master Client

11 12 13 14
Remote
Firewall Oscilloscope IDE
Agent

15 16 17 18
3D Telegraf PROFINET
Node-RED
Viewer device

19 20 21 22
Container IoT Python
InfluxDB Dashboard
Engine Runtime

23 24 25 26
G-Code Key Value OPC UA Modbus
Runtime Database Pub/Sub TCP

27
Service
Indicator

Fig. 13: Overview on further documentations

38.2 ctrlX AUTOMATION

No. Documentation
1 ctrlX WORKS First Steps 01VRS
Quick Start Guide
⮫ Web documentation link
Ordering information:
● DOK-XWORKS-F*STEP**V01-QURS-EN-P
● R911403760

38.3 ctrlX WORKS

R911403764, Edition 08 Bosch Rexroth AG


1114 / ctrlX PLC Engineering
1158 ctrlX CORE Apps

No. Documentation
2 ctrlX WORKS Basic System 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XWORKS-********V01-APRS-EN-P
● R911403761
3 ctrlX PLC Engineering - PLC Programming System 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XPLC**-ENG*****V01-APRS-EN-P
● R911403764
3 ctrlX PLC Engineering - PLC Libraries 01VRS
Reference
⮫ Web documentation link
Ordering information:
● DOK-XPLC**-LIBRARY*V01-RERS-EN-P
● R911403766

38.4 ctrlX CORE

No. Documentation
4 ctrlX CORE - Runtime 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-BASE****V01-APRS-EN-P
● R911403768
ctrlX CORE - Nodes of the Data Layer 01VRS
Reference
⮫ Web documentation link
Bestellinformationen:
● DOK-XCORE*-BASE*DL*V01-RERS-EN-P
● R911420072
ctrlX CORE - Diagnostics 01VRS
Reference
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-DIAG****V01-RERS-EN-P
● R911403770

38.5 ctrlX CORE Apps

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1115 /
ctrlX CORE Apps 1158

No. Documentation
5 PLC App - PLC Runtime Environment for ctrlX CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-PLC*****V01-APRS-EN-P
● R911403787
6 Motion App - Motion Runtime Environment for ctrlX CORE 01VRS
Application Manual

Related documentation
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-MOTION**V01-APRS-EN-P
● R911403791
7 OPC UA Server App - OPC UA Server for ctrlX CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-OPCSERV*V01-APRS-EN-P
● R911403778
8 OPC UA Client App - OPC UA Client for ctrlX CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-OPCCLIENV01-APRS-EN-P
● R911403781
9 EtherCAT Master App - EtherCAT Master for ctrlX CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-ETHERCATV01-APRS-EN-P
● R911403773
10 VPN Client App - Remote Support Software for ctrlX CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-VPN*****V01-APRS-EN-P
● R911403775
11 Firewall App - Security Functions for ctrlX CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-FIREWALLV01-APRS-EN-P
● R911403783

R911403764, Edition 08 Bosch Rexroth AG


1116 / ctrlX PLC Engineering
1158 ctrlX CORE Apps

No. Documentation
12 Remote Agent App - ctrlX Device Portal Connection for ctrlX Devices
01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-REMOTE**V01-APRS-EN-P
● R911403785
13 Oscilloscope App - Oscilloscope Function for ctrlX Devices 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-OSCI****V01-APRS-EN-P
● R911409806
14 IDE App - Integrated Development Environment 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-IDE*****V01-APRS-EN-P
● R911410625
15 Node RED App - Graphic Programming for ctrlX CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-NODERED*V01-APRS-EN-P
● R911403789
16 3D Viewer App - Browser-based 3D Kinematic Simulation for ctrlX
CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-3D*VIEW*V01-APRS-EN-P
● R911416124
17 Telegraf App - Server Agent for Collecting Data in the Data Layer
01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-TELEGRAFV01-APRS-EN-P
● R911416836
18 PROFINET Device App - PROFINET Device for ctrlX CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-PROFINETV01-APRS-EN-P
● R911417857

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1117 /
ctrlX CORE Apps 1158

No. Documentation
19 Container Engine App - Use of Docker® Images on ctrlX CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-DOCKER**V01-APRS-EN-P
● R911417855
20 InfluxDB App - Influx Database Connection for ctrlX CORE 01VRS
Application Manual

Related documentation
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-INFLUX**V01-APRS-EN-P
● R911418738
21 IoT Dashboard App - Data Visualization in Dynamic, Interactive Dash-
boards 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-GDB*****V01-APRS-EN-P
● R911420426
22 Python Runtime App - Python Runtime Environment for ctrlX CORE
01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-PYR*****V01-APRS-EN-P
● R911420430
23 G-Code Runtime App - G-Code Interpreter for ctrlX CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-GCO*****V01-APRS-EN-P
● R911420428
24 Key Value Database App - Managing Data in the Data Layer 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-KVD*****V01-APRS-EN-P
● R911420423
25 OPC UA Pub/Sub App - OPC UA Pub/Sub for ctrlX CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-PUBSUB**V01-APRS-EN-P
● R911418736

R911403764, Edition 08 Bosch Rexroth AG


1118 / ctrlX PLC Engineering
1158 ctrlX CORE Apps

No. Documentation
26 Modbus TCP App - Modbus TCP Communication for ctrlX CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-MOD*TCP*V01-APRS-EN-P
● R911417926
27 Service Indicator App - Service Indicator for ctrlX CORE 01VRS
Application Manual
⮫ Web documentation link
Ordering information:
● DOK-XCORE*-SIN*****V01-APRS-EN-P
● R911418740

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1119 /
1158

39 Service and support


Our worldwide service network provides an optimized and efficient support.
Our experts provide you with advice and assistance. You can contact us 24/7.

Service Germany
Our technology-oriented Competence Center in Lohr, Germany, is responsible
for all your service-related queries for electric drive and controls.
Contact the Service Hotline and Service Helpdesk under:
Phone: +49 9352 40 5060

Service and support


Fax: +49 9352 18 4941
Email: ⮫ service.svc@boschrexroth.de
Internet: ⮫ http://www.boschrexroth.com

Additional information on service, repair (e.g. delivery addresses) and training


can be found on our internet sites.

Service worldwide
Outside Germany, please contact your local service office first. For hotline
numbers, refer to the sales office addresses on the internet.

Preparing information
To be able to help you more quickly and efficiently, please have the following
information ready:
● Detailed description of malfunction and circumstances
● Type plate specifications of the affected products, in particular type codes
and serial numbers
● Your contact data (phone and fax number as well as your e-mail address)

R911403764, Edition 08 Bosch Rexroth AG


1120 / ctrlX PLC Engineering
1158

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1121 /
1158

40 Index
1, 2, 3 ... __UXINT_TO_UDINT. . . . . . . . . . . . . . . . . . . . 482
__AdrInst. . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 __UXINT_TO_UINT. . . . . . . . . . . . . . . . . . . . . . 482
__BitOffset. . . . . . . . . . . . . . . . . . . . . . . . . . . 659 __UXINT_TO_ULINT. . . . . . . . . . . . . . . . . . . . . 482
__Cast. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 __UXINT_TO_USINT. . . . . . . . . . . . . . . . . . . . 482
__CATCH. . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 __UXINT_TO_WORD. . . . . . . . . . . . . . . . . . . . 482
__COMPARE_AND_SWAP. . . . . . . . . . . . . . . . 534 __UXINT_TO_WSTRING. . . . . . . . . . . . . . . . . . 482
__Copy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 __VarInfo. . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
__CRC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 __VCADD. . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
__CURRENTTASK. . . . . . . . . . . . . . . . . . . . . . 533 vector operator. . . . . . . . . . . . . . . . . . . . . 577
__DELETE. . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 __VCDIV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
__ENDTRY'. . . . . . . . . . . . . . . . . . . . . . . . . . . 529 vector operator. . . . . . . . . . . . . . . . . . . . . 578
__FCall. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 __VCDOT. . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
__FINALLY. . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 vector operator. . . . . . . . . . . . . . . . . . . . . 579
__Init. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 __VCLOAD_LREAL. . . . . . . . . . . . . . . . . . . . . 582
__ISVALIDREF. . . . . . . . . . . . . . . . . . . . 524, 567 vector operator. . . . . . . . . . . . . . . . . . . . . 582
__Lazy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 __VCLOAD_REAL. . . . . . . . . . . . . . . . . . . . . . 581
__Localoffset. . . . . . . . . . . . . . . . . . . . . . . . . 659 vector operator. . . . . . . . . . . . . . . . . . . . . 581
__MaxOffset. . . . . . . . . . . . . . . . . . . . . . . . . . 659 __VCMAX. . . . . . . . . . . . . . . . . . . . . . . . . . . . 580
__NEW. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 vector operator. . . . . . . . . . . . . . . . . . . . . 580
__POOL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 __VCMIN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580
__POSITION. . . . . . . . . . . . . . . . . . . . . . . . . . 536 vector operator. . . . . . . . . . . . . . . . . . . . . 580
__POUNAME. . . . . . . . . . . . . . . . . . . . . . . . . . 536 __VCMUL. . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
__PropertyInfo. . . . . . . . . . . . . . . . . . . . . . . . 659 vector operator. . . . . . . . . . . . . . . . . . . . . 578
__QUERYINTERFACE. . . . . . . . . . . . . . . . . . . 527 __VCSET_LREAL. . . . . . . . . . . . . . . . . . . . . . . 581
__QUERYPOINTER. . . . . . . . . . . . . . . . . . . . . 528 vector operator. . . . . . . . . . . . . . . . . . . . . 581
__RefAdr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 __VCSET_REAL. . . . . . . . . . . . . . . . . . . . . . . . 580
__RELOC. . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 vector operator. . . . . . . . . . . . . . . . . . . . . 580
__System.ExceptionCode, data type. . . . . . . 529 __VCSQRT. . . . . . . . . . . . . . . . . . . . . . . . . . . 579
__SystemScope. . . . . . . . . . . . . . . . . . . . . . . 659 vector operator. . . . . . . . . . . . . . . . . . . . . 579
__TEST_AND_SET. . . . . . . . . . . . . . . . . . . . . . 537 __VCSTORE. . . . . . . . . . . . . . . . . . . . . . . . . . 582
__TRY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 vector operator. . . . . . . . . . . . . . . . . . . . . 582
__TypeOf. . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 __VCSUB. . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
__UXINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 vector operator. . . . . . . . . . . . . . . . . . . . . 577
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482 __VECTOR. . . . . . . . . . . . . . . . . . . . . . . . . . . 575
__UXINT_TO___XINT. . . . . . . . . . . . . . . . . . . . 482 __Wait. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
__UXINT_TO___XWORD. . . . . . . . . . . . . . . . . . 482 __XADD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535
__UXINT_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . 482 __XINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
__UXINT_TO_BOOL. . . . . . . . . . . . . . . . . . . . . 482 konvertieren. . . . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_BYTE. . . . . . . . . . . . . . . . . . . . . 482 __XINT_TO___UXINT. . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_DATE. . . . . . . . . . . . . . . . . . . . . 482 __XINT_TO___XWORD. . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_DINT. . . . . . . . . . . . . . . . . . . . . 482 __XINT_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_DT. . . . . . . . . . . . . . . . . . . . . . . 482 __XINT_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_DWORD. . . . . . . . . . . . . . . . . . . 482 __XINT_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_INT. . . . . . . . . . . . . . . . . . . . . . . 482 __XINT_TO_DATE. . . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_LDATE. . . . . . . . . . . . . . . . . . . . 482 __XINT_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_LDT. . . . . . . . . . . . . . . . . . . . . . 482 __XINT_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_LINT. . . . . . . . . . . . . . . . . . . . . . 482 __XINT_TO_DWORD. . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_LREAL. . . . . . . . . . . . . . . . . . . . 482 __XINT_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_LTIME. . . . . . . . . . . . . . . . . . . . . 482 __XINT_TO_LDATE. . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_LTOD. . . . . . . . . . . . . . . . . . . . . 482 __XINT_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_LWORD. . . . . . . . . . . . . . . . . . . 482 __XINT_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_REAL. . . . . . . . . . . . . . . . . . . . . 482 __XINT_TO_LREAL. . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_SINT. . . . . . . . . . . . . . . . . . . . . . 482 __XINT_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_STRING. . . . . . . . . . . . . . . . . . . 482 __XINT_TO_LWORD. . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_TIME. . . . . . . . . . . . . . . . . . . . . 482 __XINT_TO_REAL. . . . . . . . . . . . . . . . . . . . . . 482
__UXINT_TO_TOD. . . . . . . . . . . . . . . . . . . . . . 482 __XINT_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . 482

R911403764, Edition 08 Bosch Rexroth AG


1122 / ctrlX PLC Engineering
1158

__XINT_TO_STRING. . . . . . . . . . . . . . . . . . . . 482 Access protection


__XINT_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . 482 Development system. . . . . . . . . . . . . . . . 375
__XINT_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . 482 General information. . . . . . . . . . . . . . . . . 373
__XINT_TO_UDINT. . . . . . . . . . . . . . . . . . . . . 482 Runtime system / PLC. . . . . . . . . . . . . . . 375
__XINT_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . 482 User administration. . . . . . . . . . . . . . . . . 373
__XINT_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . 482 access right
__XINT_TO_USINT. . . . . . . . . . . . . . . . . . . . . . 482 device editor. . . . . . . . . . . . . . . . . . . . . . . 743
__XINT_TO_WORD. . . . . . . . . . . . . . . . . . . . . 482 Access right
__XINT_TO_WSTRING. . . . . . . . . . . . . . . . . . . 482 Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
__XWORD. . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 accessor
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482 access method, interface. . . . . . . . . . . . . 836
__XWORD_TO__UXINT. . . . . . . . . . . . . . . . . . 482 Accessor. . . . . . . . . . . . . . . . . . . . . . . . . . . . 839
__XWORD_TO__XINT. . . . . . . . . . . . . . . . . . . . 482 Accessor method. . . . . . . . . . . . . . . . . . . 839
__XWORD_TO_BIT. . . . . . . . . . . . . . . . . . . . . 482 acknowledge
__XWORD_TO_BOOL. . . . . . . . . . . . . . . . . . . 482 alarm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 766
__XWORD_TO_BYTE. . . . . . . . . . . . . . . . . . . . 482 ACOS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
__XWORD_TO_DATE. . . . . . . . . . . . . . . . . . . . 482 action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
__XWORD_TO_DINT. . . . . . . . . . . . . . . . . . . . 482 SFC, do not display embedded objects. . 985
__XWORD_TO_DT. . . . . . . . . . . . . . . . . . . . . . 482 SFC, duplication mode. . . . . . . . . . . . . . . 979
__XWORD_TO_DWORD. . . . . . . . . . . . . . . . . 482 SFC, remove duplication. . . . . . . . . . . . . 985
__XWORD_TO_INT. . . . . . . . . . . . . . . . . . . . . 482 SFC, set duplication. . . . . . . . . . . . . . . . . 984
__XWORD_TO_LDATE. . . . . . . . . . . . . . . . . . . 482 Action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 843
__XWORD_TO_LDT. . . . . . . . . . . . . . . . . . . . . 482 ACTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
__XWORD_TO_LINT. . . . . . . . . . . . . . . . . . . . 482 action association
__XWORD_TO_LREAL. . . . . . . . . . . . . . . . . . . 482 insert, command. . . . . . . . . . . . . . . . . . . . 982
__XWORD_TO_LTIME. . . . . . . . . . . . . . . . . . . 482 add
__XWORD_TO_LWORD. . . . . . . . . . . . . . . . . . 482 EN/ENO. . . . . . . . . . . . . . . . . . . . . . . . . . . 986
__XWORD_TO_REAL. . . . . . . . . . . . . . . . . . . . 482 file as text. . . . . . . . . . . . . . . . . . . . . . . . . 884
__XWORD_TO_SINT. . . . . . . . . . . . . . . . . . . . 482 input pin. . . . . . . . . . . . . . . . . . . . . . . . . . 994
__XWORD_TO_STRING. . . . . . . . . . . . . . . . . . 482 language in a text list. . . . . . . . . . . . . . . 1021
__XWORD_TO_TIME. . . . . . . . . . . . . . . . . . . . 482 output pin. . . . . . . . . . . . . . . . . . . . . . . . . 994
__XWORD_TO_TOD. . . . . . . . . . . . . . . . . . . . 482 ADD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
__XWORD_TO_UDINT. . . . . . . . . . . . . . . . . . . 482 add all instance paths. . . . . . . . . . . . . . . . . 1014
__XWORD_TO_UINT. . . . . . . . . . . . . . . . . . . . 482 add file as text. . . . . . . . . . . . . . . . . . . . . . . . 884
__XWORD_TO_ULINT. . . . . . . . . . . . . . . . . . . 482 add folder. . . . . . . . . . . . . . . . . . . . . . . . . . . 932
__XWORD_TO_USINT. . . . . . . . . . . . . . . . . . . 482 Add POU
__XWORD_TO_WORD. . . . . . . . . . . . . . . . . . . 482 Dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . 821
__XWORD_TO_WSTRING. . . . . . . . . . . . . . . . 482 Add user
_cnt.library. . . . . . . . . . . . . . . . . . . . . . . . . . 330 Device user management. . . . . . . . . . . . . 754
_Itfs.library. . . . . . . . . . . . . . . . . . . . . . . . . . 330 address. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
--compare, command line. . . . . . . . . . . . . . . 321 absolute. . . . . . . . . . . . . . . . . . . . . . . . . . 236
--culture, command line. . . . . . . . . . . . . . . . . 321 assign variable. . . . . . . . . . . . . . . . . . . . . 200
--profile, command line. . . . . . . . . . . . . . . . . 321 broadcast. . . . . . . . . . . . . . . . . . . . . . . . . 237
--project, command line. . . . . . . . . . . . . . . . . 322 I/O. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
--projectarchive, command line. . . . . . . . . . . 322 network. . . . . . . . . . . . . . . . . . . . . . . . . . . 235
--runscript, command line. . . . . . . . . . . . . . . 322 node. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
--skipunlicensedplugins, command line. . . . . 326 relative. . . . . . . . . . . . . . . . . . . . . . . . . . . 236
A specification. . . . . . . . . . . . . . . . . . . . . . . 552
addressing. . . . . . . . . . . . . . . . . . . . . . . . . . . 233
ABS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
relative. . . . . . . . . . . . . . . . . . . . . . . . . . . 233
access
ADR. . . . . . . . . . . . . . . . . . . . . . . . . . . . 474, 566
symbol set. . . . . . . . . . . . . . . . . . . . . . . . 229
alarm
access control
acknowledgement. . . . . . . . . . . . . . . . . . . 766
properties. . . . . . . . . . . . . . . . . . . . . . . . 1049
activation. . . . . . . . . . . . . . . . . . . . . . . . . 768
access protection
archiving. . . . . . . . . . . . . . . . . . . . . . . . . . 768
WebVisu. . . . . . . . . . . . . . . . . . . . . . . . . . 376
confirmation. . . . . . . . . . . . . . . . . . . . . . . 766
export. . . . . . . . . . . . . . . . . . . . . . . . . . . . 772
import. . . . . . . . . . . . . . . . . . . . . . . . . . . . 772

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1123 /
1158

message. . . . . . . . . . . . . . . . . . . . . . . . . . 768 Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281


notification action. . . . . . . . . . . . . . . . . . . 766 translate. . . . . . . . . . . . . . . . . . . . . . . . . . 941
text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 768 application code
alarm class. . . . . . . . . . . . . . . . . . . . . . . . . . 766 code generation. . . . . . . . . . . . . . . . . . . . 265
alarm configuration. . . . . . . . . . . . . . . . . . . . 765 messages for code generation. . . . . . . . . 266
alarm group. . . . . . . . . . . . . . . . . . . . . . . . . . 768 Applications, Device Editor. . . . . . . . . . . . . . 748
alarm storage. . . . . . . . . . . . . . . . . . . . . . . . . 772 arccosine. . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
configuration of CSV export. . . . . . . . . . . 773 archive
CSV export. . . . . . . . . . . . . . . . . . . . . . . . 773 alarm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 768
alias. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 save. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872
Identifier. . . . . . . . . . . . . . . . . . . . . . . . . . 567 send. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872
object DUT. . . . . . . . . . . . . . . . . . . . . . . . 815 Archive
Alias. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591 extract. . . . . . . . . . . . . . . . . . . . . . . . . . . 873
Data type. . . . . . . . . . . . . . . . . . . . . . . . . 591 arcsine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
alternative. . . . . . . . . . . . . . . . . . . . . . . . . . . 980 arctangent. . . . . . . . . . . . . . . . . . . . . . . . . . . 522
analyzation array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
library. . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 access. . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
analyzation library. . . . . . . . . . . . . . . . . . . . . 400 declaration. . . . . . . . . . . . . . . . . . . . . . . . 569
SFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 declare. . . . . . . . . . . . . . . . . . . . . . . . . . . 166
AND. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 initialization. . . . . . . . . . . . . . . . . . . . . . . 569
AND_THEN. . . . . . . . . . . . . . . . . . . . . . . . . . . 465 monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . 293
AND, Pragma. . . . . . . . . . . . . . . . . . . . . . . . . 604 of arrays. . . . . . . . . . . . . . . . . . . . . . . . . . 573
ANDN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 of function blocks. . . . . . . . . . . . . . . . . . . 569
ANY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 of variable length. . . . . . . . . . . . . . . . . . . 574
data type. . . . . . . . . . . . . . . . . . . . . . . . . . 561 structure. . . . . . . . . . . . . . . . . . . . . . . . . . 569
ANY_BIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 Array
ANY_DATE. . . . . . . . . . . . . . . . . . . . . . . . . . . 561 Monitoring. . . . . . . . . . . . . . . . . . . . . . . . 377
ANY_INT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 ARRAY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
ANY_NUM. . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 OF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
ANY_REAL. . . . . . . . . . . . . . . . . . . . . . . . . . . 561 ASIN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
ANY_STRING. . . . . . . . . . . . . . . . . . . . . . . . . 561 assignment. . . . . . . . . . . . . . . . . . . . . . . . . . 384
API for ctrlX PLC Engineering. . . . . . . . . . . . 327 FBD/LD/IL. . . . . . . . . . . . . . . . . . . . . . . . . 420
application output ST. . . . . . . . . . . . . . . . . . . . . . . . . 381
activate on toolbar. . . . . . . . . . . . . . . . . . 938 ST operator. . . . . . . . . . . . . . . . . . . . . . . . 381
backup application files. . . . . . . . . . . . . . 749 association
build. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 933 insert for SFC action, command. . . . 982, 983
build, options. . . . . . . . . . . . . . . . . . . . . 1053 AT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
clean. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 932 declaration. . . . . . . . . . . . . . . . . . . . . . . . 200
cold start. . . . . . . . . . . . . . . . . . . . . . . . . 948 ATAN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
delete. . . . . . . . . . . . . . . . . . . . . . . . . . . . 950 Attribute
download. . . . . . . . . . . . . . . . . . . . . 316, 942 for pragma. . . . . . . . . . . . . . . . . . . . . . . . 605
memory mapping. . . . . . . . . . . . . . . . . . . 764 automatic formatting. . . . . . . . . . . . . . . . . . . 897
rebuild. . . . . . . . . . . . . . . . . . . . . . . . . . . 933 ST code. . . . . . . . . . . . . . . . . . . . . . . . . . . 897
reset (cold). . . . . . . . . . . . . . . . . . . . . . . . 948 Avoid check function. . . . . . . . . . . . . . . . . . . 633
reset (origin). . . . . . . . . . . . . . . . . . . . . . . 949 B
reset (warm). . . . . . . . . . . . . . . . . . . . . . . 949
B. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
reset origin. . . . . . . . . . . . . . . . . . . . . . . . 949
size prefix. . . . . . . . . . . . . . . . . . . . . . . . . 552
set active. . . . . . . . . . . . . . . . . . . . . . . . . 931
backup. . . . . . . . . . . . . . . . . . . . . . . . . . 312, 749
warm start. . . . . . . . . . . . . . . . . . . . . . . . 949
create backup file. . . . . . . . . . . . . . . . . . . 749
Application. . . . . . . . . . . . . . . . . . . . . . . . . . 763
backup and restore. . . . . . . . . . . . . . . . 312, 749
compare. . . . . . . . . . . . . . . . . . . . . . . . . . 940
backup file. . . . . . . . . . . . . . . . . . . . . . . . . . . 749
compile. . . . . . . . . . . . . . . . . . . . . . . . . . . 941
create, save. . . . . . . . . . . . . . . . . . . . . . . . 749
Content. . . . . . . . . . . . . . . . . . . . . . . . . . . 940
binary
encrypt. . . . . . . . . . . . . . . . . . . . . . . . 75, 153
display mode when monitoring. . . . . . . . 961
Encryption. . . . . . . . . . . . . . . . . . . . . . . 1049
Binary number. . . . . . . . . . . . . . . . . . . . . . . . 542
Encryption, instructions. . . . . . . . . . . . . . . 85
Information. . . . . . . . . . . . . . . . . . . . . . . . 940
Online change. . . . . . . . . . . . . . . . . . . . . . 943

R911403764, Edition 08 Bosch Rexroth AG


1124 / ctrlX PLC Engineering
1158

BIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 BOOL_TO_DWORD. . . . . . . . . . . . . . . . . . . . 478


convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . 478
structure. . . . . . . . . . . . . . . . . . . . . . . . . . 585 BOOL_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . 478
bit access . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 BOOL_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . 478
in integer variable. . . . . . . . . . . . . . . . . . . 550 BOOL_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . 478
in structure variable. . . . . . . . . . . . . . . . . 550 BOOL_TO_LREA. . . . . . . . . . . . . . . . . . . . . . . 478
BIT_TO___UXINT. . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . 478
BIT_TO___XINT. . . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . 478
BIT_TO___XWORD. . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_LWORD. . . . . . . . . . . . . . . . . . . . . 478
BIT_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . 478
BIT_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . 478
BIT_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_STRING. . . . . . . . . . . . . . . . . . . . . 478
BIT_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . 478
BIT_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . 478
BIT_TO_DWORD. . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . 478
BIT_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . 478
BIT_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . 478
BIT_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_USINT. . . . . . . . . . . . . . . . . . . . . . 478
BIT_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_WORD. . . . . . . . . . . . . . . . . . . . . . 478
BIT_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . . . 482 BOOL_TO_WSTRING. . . . . . . . . . . . . . . . . . . 478
BIT_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . . . 482 boot application
BIT_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . . . 482 delete. . . . . . . . . . . . . . . . . . . . . . . . . . . . 950
BIT_TO_LWORD. . . . . . . . . . . . . . . . . . . . . . . 482 generate. . . . . . . . . . . . . . . . . . . . . . 268, 942
BIT_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . . . 482 options. . . . . . . . . . . . . . . . . . . . . . . . . . 1053
BIT_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . . 482 properties. . . . . . . . . . . . . . . . . . . . . . . . 1049
BIT_TO_STRING. . . . . . . . . . . . . . . . . . . . . . . 482 Boot application
BIT_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . . . 482 Boot application only sign with certificate, do
BIT_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . . . . 482 not encrypt. . . . . . . . . . . . . . . . . . . . . . . . 154
BIT_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . . . 482 encrypt. . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
BIT_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . . 482 Encryption. . . . . . . . . . . . . . . . . . . . . . . . 153
BIT_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . . 482 Sign. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
BIT_TO_USINT. . . . . . . . . . . . . . . . . . . . . . . . 482 box
BIT_TO_WORD. . . . . . . . . . . . . . . . . . . . . . . . 482 CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
BIT_TO_WSTRING. . . . . . . . . . . . . . . . . . . . . 482 clean, FBD/LD. . . . . . . . . . . . . . . . . . . . . 1005
BITADR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 FBD/LD/IL. . . . . . . . . . . . . . . . . . . . . . . . . 419
bitmap, properties. . . . . . . . . . . . . . . . . . . 1052 FBD/LD/IL, empty box with en/eno. . . . . 999
bookmarks insert parallel LD. . . . . . . . . . . . . . . . . . . 999
clear all. . . . . . . . . . . . . . . . . . . . . . . . . . . 888 insert, FBD/LD/IL. . . . . . . . . . . . . . . . . . . 998
clear all in active editor. . . . . . . . . . . . . . 888 repair. . . . . . . . . . . . . . . . . . . . . . . . . . . 1006
next. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887 with EN/ENO, FBD/LD/IL. . . . . . . . . . . . . 998
next in active editor. . . . . . . . . . . . . . . . . 887 box input
previous. . . . . . . . . . . . . . . . . . . . . . . . . . 888 insert, FBD/LD/IL. . . . . . . . . . . . . . . . . . 1000
previous in active editor. . . . . . . . . . . . . . 888 bracket, code. . . . . . . . . . . . . . . . . . . . . . . . . 885
set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 branch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
toggle. . . . . . . . . . . . . . . . . . . . . . . . . . . . 887 add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980
view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 901 closed. . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
BOOL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 insert right. . . . . . . . . . . . . . . . . . . . . . . . 981
constant. . . . . . . . . . . . . . . . . . . . . . . . . . 541 set end point. . . . . . . . . . . . . . . . . . . . . 1005
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 478 start/end. . . . . . . . . . . . . . . . . . . . . . . . . . 424
data type. . . . . . . . . . . . . . . . . . . . . . . . . . 556 breakpoint. . . . . . . . . . . . . . . . . . . . . . . . . . . 271
BOOL_TO___UXINT. . . . . . . . . . . . . . . . . . . . . 478 concept. . . . . . . . . . . . . . . . . . . . . . . . . . . 271
BOOL_TO___XINT. . . . . . . . . . . . . . . . . . . . . . 478 condition. . . . . . . . . . . . . . . . . . . . . . . . 1041
BOOL_TO___XWORD. . . . . . . . . . . . . . . . . . . 478 define condition. . . . . . . . . . . . . . . . . . . . 274
BOOL_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . 478 define execution point. . . . . . . . . . . . . . . 274
BOOL_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . 478 disable. . . . . . . . . . . . . . . . . . . . . . . . . . . 957
BOOL_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . 478 edit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 957
BOOL_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . 478 enable. . . . . . . . . . . . . . . . . . . . . . . . . . . . 957
BOOL_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . 478 execution point. . . . . . . . . . . . . . . . . . . . 1042

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1125 /
1158

new. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 956 C integration. . . . . . . . . . . . . . . . . . . . . . . . . 146


position. . . . . . . . . . . . . . . . . . . . . . . . . . 1043 C code file. . . . . . . . . . . . . . . . . . . . . . . . 819
set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 configuration. . . . . . . . . . . . . . . . . . . . . . 146
toggle. . . . . . . . . . . . . . . . . . . . . . . . . . . . 957 create stub in C. . . . . . . . . . . . . . . . . . . . 937
view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 902 export C sources. . . . . . . . . . . . . . . . . . . 937
broadcast address. . . . . . . . . . . . . . . . . . . . . 237 exporting a C-function. . . . . . . . . . . . . . . 937
browse. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 IDE, path. . . . . . . . . . . . . . . . . . . . . . . . . 1051
build import C code module. . . . . . . . . . . . . . . 146
application. . . . . . . . . . . . . . . . . . . . . . . . 933 library. . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
messages for code generation. . . . . . . . . 266 open in IDE. . . . . . . . . . . . . . . . . . . . . . . . 936
Build properties. . . . . . . . . . . . . . . . . . . . . . . . 1051
Exclude. . . . . . . . . . . . . . . . . . . . . . . . . . 1048 update sources. . . . . . . . . . . . . . . . . . . . . 936
Properties. . . . . . . . . . . . . . . . . . . . . . . . 1048 C sources
build information. . . . . . . . . . . . . . . . . . 932, 933 export. . . . . . . . . . . . . . . . . . . . . . . . . . . . 937
Bus cycle task update. . . . . . . . . . . . . . . . . . . . . . . . . . . 936
Device editor. . . . . . . . . . . . . . . . . . . . . . 741 C stub file. . . . . . . . . . . . . . . . . . . . . . . . . . . 933
BY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 C stub file for external library. . . . . . . . . . . . 933
byte C0001. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
addressing mode. . . . . . . . . . . . . . . . . . . 552 C0002. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669
BYTE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 C0004. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482 C0005. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
Byte order. . . . . . . . . . . . . . . . . . . . . . . . . . . 600 C0006. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670
BYTE_BIT_TO_TIME. . . . . . . . . . . . . . . . . . . . 482 C0007. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
BYTE_TO___UXINT. . . . . . . . . . . . . . . . . . . . . 482 C0008. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
BYTE_TO___XINT. . . . . . . . . . . . . . . . . . . . . . 482 C0009. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
BYTE_TO___XWORD. . . . . . . . . . . . . . . . . . . . 482 C0010. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
BYTE_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . . 482 C0011. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
BYTE_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . 482 C0013. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
BYTE_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . 482 C0015. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
BYTE_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . 482 C0018. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
BYTE_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . 482 C0020. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
BYTE_TO_DWORD. . . . . . . . . . . . . . . . . . . . . 482 C0022. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
BYTE_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . 482 C0023. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674
BYTE_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . 482 C0026. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
BYTE_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . 482 C0027. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
BYTE_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . 482 C0030. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
BYTE_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . 482 C0031. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676
BYTE_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . . 482 C0032. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676
BYTE_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . 482 C0033. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
BYTE_TO_LWORD. . . . . . . . . . . . . . . . . . . . . . 482 C0035. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
BYTE_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . 482 C0036. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677
BYTE_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . 482 C0037. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
BYTE_TO_STRING. . . . . . . . . . . . . . . . . . . . . 482 C0038. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678
BYTE_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . . 482 C0039. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
BYTE_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . 482 C0040. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
BYTE_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . 482 C0041. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680
BYTE_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . 482 C0042. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680
BYTE_TO_USINT. . . . . . . . . . . . . . . . . . . . . . . 482 C0043. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681
BYTE_TO_WORD. . . . . . . . . . . . . . . . . . . . . . 482 C0044. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681
BYTE_TO_WSTRING. . . . . . . . . . . . . . . . . . . . 482 C0045. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
C C0046. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
C0047. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682
C code file. . . . . . . . . . . . . . . . . . . . . . . . . . . 819
C0048. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
C code integration. . . . . . . . . . . . . . . . . . . . . 146
C0049. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
C code module
C0050. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
project environment. . . . . . . . . . . . . . . . 1072
C0051. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
C implemented library. . . . . . . . . . . . . . . . . . 819
C0053. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684
C0061. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684

R911403764, Edition 08 Bosch Rexroth AG


1126 / ctrlX PLC Engineering
1158

C0062. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 C0164. . . . . . . . . . . . . . . . . . . . . . . . . . .... 708


C0064. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 C0165. . . . . . . . . . . . . . . . . . . . . . . . . . .... 708
C0065. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686 C0168. . . . . . . . . . . . . . . . . . . . . . . . . . .... 709
C0066. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686 C0169. . . . . . . . . . . . . . . . . . . . . . . . . . .... 709
C0068. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687 C0173. . . . . . . . . . . . . . . . . . . . . . . . . . .... 710
C0069. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687 C0174. . . . . . . . . . . . . . . . . . . . . . . . . . .... 710
C0070. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687 C0175. . . . . . . . . . . . . . . . . . . . . . . . . . .... 711
C0072. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688 C0177. . . . . . . . . . . . . . . . . . . . . . . . . . .... 711
C0074. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688 C0178. . . . . . . . . . . . . . . . . . . . . . . . . . .... 711
C0075. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 C0179. . . . . . . . . . . . . . . . . . . . . . . . . . .... 712
C0076. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 C0180. . . . . . . . . . . . . . . . . . . . . . . . . . .... 712
C0077. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 C0182. . . . . . . . . . . . . . . . . . . . . . . . . . .... 713
C0078. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 C0183. . . . . . . . . . . . . . . . . . . . . . . . . . .... 713
C0080. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 C0185. . . . . . . . . . . . . . . . . . . . . . . . . . .... 713
C0081. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 C0186. . . . . . . . . . . . . . . . . . . . . . . . . . .... 714
C0082. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 C0188. . . . . . . . . . . . . . . . . . . . . . . . . . .... 715
C0084. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 C0189. . . . . . . . . . . . . . . . . . . . . . . . . . .... 715
C0085. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692 C0190. . . . . . . . . . . . . . . . . . . . . . . . . . .... 715
C0086. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692 C0191. . . . . . . . . . . . . . . . . . . . . . . . . . .... 716
C0087. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693 C0195. . . . . . . . . . . . . . . . . . . . . . . . . . .... 716
C0089. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693 C0196. . . . . . . . . . . . . . . . . . . . . . . . . . .... 716
C0090. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694 C0197. . . . . . . . . . . . . . . . . . . . . . . . . . .... 716
C0091. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694 C0198. . . . . . . . . . . . . . . . . . . . . . . . . . .... 717
C0094. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695 C0199. . . . . . . . . . . . . . . . . . . . . . . . . . .... 717
C0096. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695 C0201. . . . . . . . . . . . . . . . . . . . . . . . . . .... 718
C0097. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696 C0203. . . . . . . . . . . . . . . . . . . . . . . . . . .... 718
C0098. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696 C0204. . . . . . . . . . . . . . . . . . . . . . . . . . .... 718
C0099. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 696 C0205. . . . . . . . . . . . . . . . . . . . . . . . . . .... 719
C0101. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697 C0206. . . . . . . . . . . . . . . . . . . . . . . . . . .... 719
C0102. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697 C0207. . . . . . . . . . . . . . . . . . . . . . . . . . .... 719
C0104. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697 C0208. . . . . . . . . . . . . . . . . . . . . . . . . . .... 720
C0106. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 C0209. . . . . . . . . . . . . . . . . . . . . . . . . . .... 720
C0114. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 C0211. . . . . . . . . . . . . . . . . . . . . . . . . . .... 720
C0115. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 C0212. . . . . . . . . . . . . . . . . . . . . . . . . . .... 721
C0116. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 C0215. . . . . . . . . . . . . . . . . . . . . . . . . . .... 721
C0117. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699 C0216. . . . . . . . . . . . . . . . . . . . . . . . . . .... 721
C0118. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699 C0217. . . . . . . . . . . . . . . . . . . . . . . . . . .... 722
C0119. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699 C0218. . . . . . . . . . . . . . . . . . . . . . . . . . .... 722
C0120. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700 C0219. . . . . . . . . . . . . . . . . . . . . . . . . . .... 722
C0122. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700 C0221. . . . . . . . . . . . . . . . . . . . . . . . . . .... 723
C0124. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 C0222. . . . . . . . . . . . . . . . . . . . . . . . . . .... 723
C0125. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 C0224. . . . . . . . . . . . . . . . . . . . . . . . . . .... 724
C0126. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 C0225. . . . . . . . . . . . . . . . . . . . . . . . . . .... 724
C0130. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702 C0227. . . . . . . . . . . . . . . . . . . . . . . . . . .... 725
C0131. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702 C0228. . . . . . . . . . . . . . . . . . . . . . . . . . .... 725
C0132. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 C0230. . . . . . . . . . . . . . . . . . . . . . . . . . .... 725
C0136. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 C0232. . . . . . . . . . . . . . . . . . . . . . . . . . .... 726
C0138. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 C0233. . . . . . . . . . . . . . . . . . . . . . . . . . .... 726
C0139. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704 C0234. . . . . . . . . . . . . . . . . . . . . . . . . . .... 727
C0140. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704 C0235. . . . . . . . . . . . . . . . . . . . . . . . . . .... 727
C0141. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 704 C0236. . . . . . . . . . . . . . . . . . . . . . . . . . .... 728
C0142. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705 C0237. . . . . . . . . . . . . . . . . . . . . . . . . . .... 728
C0143. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705 C0238. . . . . . . . . . . . . . . . . . . . . . . . . . .... 729
C0144. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706 C0239. . . . . . . . . . . . . . . . . . . . . . . . . . .... 729
C0145. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706 C0240. . . . . . . . . . . . . . . . . . . . . . . . . . .... 729
C0149. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706 C0241. . . . . . . . . . . . . . . . . . . . . . . . . . 730, 733
C0161. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 C0242. . . . . . . . . . . . . . . . . . . . . . . . . . .... 730
C0162. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 C0243. . . . . . . . . . . . . . . . . . . . . . . . . . .... 731

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1127 /
1158

C0380. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731 connection mark. . . . . . . . . . . . . . . . . . . . 995


C0509. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732 create control point. . . . . . . . . . . . . . . . . 994
C0542. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 edit page size. . . . . . . . . . . . . . . . . . . . . . 985
C0543. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734 edit parameters. . . . . . . . . . . . . . . . . . . . 991
CA-signed certificate. . . . . . . . . . . . . . . . . . . . 85 edit worksheet. . . . . . . . . . . . . . . . . . . . . 985
CAL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
CALC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 end with selected elements. . . . . . . . . . . 988
CALCN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 force FB. . . . . . . . . . . . . . . . . . . . . . 995, 996
call group. . . . . . . . . . . . . . . . . . . . . . . . . . . . 995
function block, ST. . . . . . . . . . . . . . . . . . . 389 keyboard shortcuts. . . . . . . . . . . . . . . . . . 429
Call move down. . . . . . . . . . . . . . . . . . . . . . . . 989
Function. . . . . . . . . . . . . . . . . . . . . . . . . . 825 move up. . . . . . . . . . . . . . . . . . . . . . . . . . 989
Function block. . . . . . . . . . . . . . . . . . . . . 823 order by data flow. . . . . . . . . . . . . . . . . . 990
Program. . . . . . . . . . . . . . . . . . . . . . . . . . 822 order by topology. . . . . . . . . . . . . . . . . . . 991
call stack. . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 page-oriented. . . . . . . . . . . . . . . . . . 180, 425
view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906 parameter values. . . . . . . . . . . . . . . . . . . 992
call tree program in the editor. . . . . . . . . . . . . . . . 184
show. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889 properties. . . . . . . . . . . . . . . . . . . . . . . . 1055
view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906 reference. . . . . . . . . . . . . . . . . . . . . . . . . 987
call_after_global_init_slot. . . . . . . . . . . . . . . . 606 remove control point. . . . . . . . . . . . . . . . 994
pragma attribute. . . . . . . . . . . . . . . . . . . . 606 remove unused pins. . . . . . . . . . . . . . . . . 993
call_after_init. . . . . . . . . . . . . . . . . . . . . . . . . 606 Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986
pragma attribute. . . . . . . . . . . . . . . . . . . . 606 reset connecting line. . . . . . . . . . . . . . . . 994
call_after_online_change_slot. . . . . . . . . . . . 607 reset pins. . . . . . . . . . . . . . . . . . . . . . . . . 993
pragma attribute. . . . . . . . . . . . . . . . . . . . 607 route connections. . . . . . . . . . . . . . . . . . . 994
call_before_global_exit_slot select connected pins. . . . . . . . . . . . . . . . 993
pragma attribute. . . . . . . . . . . . . . . . . . . . 608 send to front. . . . . . . . . . . . . . . . . . . . . . . 988
call_on_type_change. . . . . . . . . . . . . . . . . . . 608 Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 987
pragma attribute. . . . . . . . . . . . . . . . . . . . 608 set element number within execution order
cam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 990
object properties. . . . . . . . . . . . . . . . . . 1057 show next collision. . . . . . . . . . . . . . . . . . 993
CANbus Starting point in the feedback network. . 182
Parameter. . . . . . . . . . . . . . . . . . . . . . . . . 760 ungroup. . . . . . . . . . . . . . . . . . . . . . . . . . 995
Capitalization unlock connection. . . . . . . . . . . . . . . . . . 992
Keyword. . . . . . . . . . . . . . . . . . . . . . . . . 1082 CFC editor
CASE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 toolbar. . . . . . . . . . . . . . . . . . . . . . . . . . . 378
CATCH. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 CFC Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . 425
Certificate. . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Breakpoint. . . . . . . . . . . . . . . . . . . . . . . . 430
Application. . . . . . . . . . . . . . . . . . . . . . . . 153 Debugging. . . . . . . . . . . . . . . . . . . . . . . . . 430
CA signed. . . . . . . . . . . . . . . . . . . . . . . . . . 75 Monitoring. . . . . . . . . . . . . . . . . . . . . . . . 430
CA-signed. . . . . . . . . . . . . . . . . . . . . . . . . . 85 Online operation. . . . . . . . . . . . . . . . . . . . 430
Delete. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Option. . . . . . . . . . . . . . . . . . . . . . . . . . . 1091
encrypted communication. . . . . . . . . . . . 153 page-oriented. . . . . . . . . . . . . . . . . . . . . . 428
Encrypted communication. . . . . . . . . . . . 258 Setting. . . . . . . . . . . . . . . . . . . . . . . . . . 1091
Encryption. . . . . . . . . . . . . . . . . . . . . . . . . 75 character string literal. . . . . . . . . . . . . . . . . . 543
Encryption, instructions. . . . . . . . . . . . . . . 85 Check function
Expiration date. . . . . . . . . . . . . . . . . . . . . 258 also in libraries. . . . . . . . . . . . . . . . . . . . . 846
General information. . . . . . . . . . . . . . . . . 374 CheckBounds. . . . . . . . . . . . . . . . . . . . . . . . 848
Project setting. . . . . . . . . . . . . . . . . . . . 1064 array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
request from PLC. . . . . . . . . . . . . . . . . . . . 85 CheckDivInt. . . . . . . . . . . . . . . . . . . . . . . . . . 851
Sign. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 CheckDivLInt'. . . . . . . . . . . . . . . . . . . . . . . . 851
Sign boot application with certificate only, do CheckDivLReal'. . . . . . . . . . . . . . . . . . . . . . . 853
not encrypt it. . . . . . . . . . . . . . . . . . . . . . 154 CheckDivReal. . . . . . . . . . . . . . . . . . . . . . . . 852
Windows Certificate Store. . . . . . . . . . . . . 75 Checking function. . . . . . . . . . . . . . . . . . . . . 846
CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 CheckLRangeSigned. . . . . . . . . . . . . . . . . . . 856
add input. . . . . . . . . . . . . . . . . . . . . . . . . 994 CheckLRangeUnsigned. . . . . . . . . . . . . . . . . 858
add output. . . . . . . . . . . . . . . . . . . . . . . . 994 CheckPointer. . . . . . . . . . . . . . . . . . . . . . . . . 859
connect structure. . . . . . . . . . . . . . . . . . . 996 CheckRangeSigned. . . . . . . . . . . . . . . . 592, 854

R911403764, Edition 08 Bosch Rexroth AG


1128 / ctrlX PLC Engineering
1158

CheckRangeUnsigned. . . . . . . . . . . . . . 592, 857 --ignoreproperties. . . . . . . . . . . . . . . . . . . 326


checks_in_libs. . . . . . . . . . . . . . . . . . . . . . . . 846 --ignorewhitespace. . . . . . . . . . . . . . . . . . 325
class --profile. . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 360 --project. . . . . . . . . . . . . . . . . . . . . . . . . . 322
clean all. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 933 --projectarchive. . . . . . . . . . . . . . . . . . . . . 322
Cleaning gaps. . . . . . . . . . . . . . . . . . . . . . . 1013 --runscript. . . . . . . . . . . . . . . . . . . . . . . . . 322
closed branch, LD. . . . . . . . . . . . . . . . . . . . . 421 --skipunlicensedplugins. . . . . . . . . . . . . . 326
CmpTraceMgr.library. . . . . . . . . . . . . . . . . . . 298 Start Python script. . . . . . . . . . . . . . . . . . 343
code comment
analyze. . . . . . . . . . . . . . . . . . . . . . . . . . . 202 CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
collapse all. . . . . . . . . . . . . . . . . . . . . . . . 886 library documentation. . . . . . . . . . . . . . . 390
encryption. . . . . . . . . . . . . . . . . . . . . . . . 267 ST. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
exclude from the static analysis. . . . . . . . 203 comment out . . . . . . . . . . . . . . . . . . . . . . . . 886
expand all. . . . . . . . . . . . . . . . . . . . . . . . . 886 commit accepted changes. . . . . . . . . . . . . . . 922
format code. . . . . . . . . . . . . . . . . . . . . . . 897 communication
generate. . . . . . . . . . . . . . . . . . . . . . . . . . 932 edit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
generate, active application. . . . . . . . . . . 935 Communication
go to matching bracket. . . . . . . . . . . . . . . 885 encrypt. . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Code Encrypted. . . . . . . . . . . . . . . . . . . . . . . . . 258
encrypt. . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Setting, classic representation. . . . . . . . 1082
code generation. . . . . . . . . . . . . . . . . . . . . . 932 Compare
application code. . . . . . . . . . . . . . . . . . . . 265 projects. . . . . . . . . . . . . . . . . . . . . . . . 71, 917
application in library project. . . . . . . . . . 935 Compare view. . . . . . . . . . . . . . . . . . . . . . . . . 71
messages. . . . . . . . . . . . . . . . . . . . . . . . . 266 open detailed. . . . . . . . . . . . . . . . . . . . . . . 71
coding guidelines. . . . . . . . . . . . . . . . . . . . . 202 Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
coil. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 COMPARE_AND_SWAP. . . . . . . . . . . . . . . . . 534
insert. . . . . . . . . . . . . . . . . . . . . . . . . . . 1000 Comparison view
set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1000 Detail. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Coil compatibility
Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1000 library. . . . . . . . . . . . . . . . . . . . . . . . . . . . 936
cold start. . . . . . . . . . . . . . . . . . . . . . . . . . . . 948 Compiled library
collapse all. . . . . . . . . . . . . . . . . . . . . . . . . . 886 save. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875
Command compiled-library. . . . . . . . . . . . . . . . . . . . . . 330
All data from ctrlX CORE... . . . . . . . . . . . 881 compiled-library-v3. . . . . . . . . . . . . . . . . . . . 330
Communication settings.... . . . . . . . . . . . 915 compiler
Compare project with ctrlX. . . . . . . . . . . 938 version. . . . . . . . . . . . . . . . . . . . . . . . . . 1070
Equalize project PC <-> ctrlX CORE. . . . . 916 Compiler
Insert templates.... . . . . . . . . . . . . . . . . . . 926 Option. . . . . . . . . . . . . . . . . . . . . . . . . . . 1062
Log out current device user. . . . . . . . . . . 913 Warning. . . . . . . . . . . . . . . . . . . . . . . . . . 1062
Logging in device user.... . . . . . . . . . . . . . 912 compiler version
Open project from ctrlX CORE.... . . . . . . 869 project environment. . . . . . . . . . . . . . . . 1070
PLC real-time data. . . . . . . . . . . . . . . . . . 881 Compiler version
PLC Realtime data input. . . . . . . . . . . . . . 882 change. . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
PLC Realtime data output. . . . . . . . . . . . . 882 Complier check functions
Project synchronisation.... . . . . . . . . . . . . 915 Insert templates in the PLC project. . . . . 101
Selectively from ctrlX CORE... . . . . . . . . . 880 composer
Selectively from file... . . . . . . . . . . . . . . . 881 CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
Show status. . . . . . . . . . . . . . . . . . . . . . . 884 Compress
Synchronization cache.... . . . . . . . . . . . . . 916 Project. . . . . . . . . . . . . . . . . . . . . . . . . . 1084
Use as Plc Realtime data (input). . . . . . . 883 condition
Use as Plc Realtime data (Output). . . . . . 883 breakpoint. . . . . . . . . . . . . . . . . . . . . . . 1041
command 'Go to instance'. . . . . . . . . . . . . . . 893 Conditional compilation. . . . . . . . . . . . . . . . 597
command icon. . . . . . . . . . . . . . . . . . . . . . . 1094 conditionalshow, pragma. . . . . . . . . . . . . . . 609
customize. . . . . . . . . . . . . . . . . . . . . . . . . . 49 conditionalshowsymbols, command-line
Command line. . . . . . . . . . . . . . . . . . . . . . . . 321 command. . . . . . . . . . . . . . . . . . . . . . . . 610, 611
--compare. . . . . . . . . . . . . . . . . . . . . . . . . 321 condtionalshow_all_locals pragma
--culture. . . . . . . . . . . . . . . . . . . . . . . . . . 321 pragma. . . . . . . . . . . . . . . . . . . . . . . . . . . 610
--ignorecomments. . . . . . . . . . . . . . . . . . . 325

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1129 /
1158

configuration convert
device. . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 device. . . . . . . . . . . . . . . . . . . . . . . . . . . 1040
Configuration library reference. . . . . . . . . . . . . . . . . . . 1039
Programming system. . . . . . . . . . . . . . . 1035 to FBD. . . . . . . . . . . . . . . . . . . . . . . . . . . 1006
Task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865 to IL. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1006
Trace. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1096 to LD. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1006
configuration variable. . . . . . . . . . . . . . . . . . 446 Convert
connect Integer. . . . . . . . . . . . . . . . . . . . . . . . . . . 482
to device. . . . . . . . . . . . . . . . . . . . . . . . . . 953 strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
connection TO_. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
CFC, connect pins. . . . . . . . . . . . . . . . . . 992 TRUNC. . . . . . . . . . . . . . . . . . . . . . . . . . . 516
CFC, route. . . . . . . . . . . . . . . . . . . . . . . . 994 TRUNC_INT. . . . . . . . . . . . . . . . . . . . . . . . 517
connection mark. . . . . . . . . . . . . . . . . . . . 995 core dump. . . . . . . . . . . . . . . . . . . . . . . . . . . 309
connection mark close. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 962
CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 create. . . . . . . . . . . . . . . . . . . . . . . . . . . . 962
const_non_replaced, pragma. . . . . . . . . . . . . 612 load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 961
const_replaced, pragma. . . . . . . . . . . . . . . . 612 load device log. . . . . . . . . . . . . . . . . . . . . 962
constant open memory view. . . . . . . . . . . . . . . . . . 908
BOOL. . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 COS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520
date. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546 CPU load. . . . . . . . . . . . . . . . . . . . . . . . . . . . 865
LTIME. . . . . . . . . . . . . . . . . . . . . . . . . . . . 545 cpuload
REAL and LREAL. . . . . . . . . . . . . . . . . . . . 542 Multicore. . . . . . . . . . . . . . . . . . . . . . . . . 211
string. . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 create localization template. . . . . . . . . . . . . 928
time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 create stub implementation in C. . . . . . . . . . 937
TIME. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 cross reference
time of day. . . . . . . . . . . . . . . . . . . . . . . . 546 browse. . . . . . . . . . . . . . . . . . . . . . . . . . . 889
Constant. . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 global. . . . . . . . . . . . . . . . . . . . . . . . . . . . 889
Input and output variable. . . . . . . . . . . . . 442 Cross reference
Numbers. . . . . . . . . . . . . . . . . . . . . . . . . . 542 IEC address. . . . . . . . . . . . . . . . . . . . . . 1082
Variable. . . . . . . . . . . . . . . . . . . . . . . . . . . 446 update automatically. . . . . . . . . . . . . . . 1082
CONSTANT. . . . . . . . . . . . . . . . . . . . . . . . . . . 540 cross-reference. . . . . . . . . . . . . . . . . . . . . . . 905
Variable. . . . . . . . . . . . . . . . . . . . . . . . . . . 446 cross-reference list. . . . . . . . . . . . . . . . . . . . 903
contact. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 classic view. . . . . . . . . . . . . . . . . . . . . . . . 905
insert. . . . . . . . . . . . . . . . . . . . . . 1002, 1003 collapse all. . . . . . . . . . . . . . . . . . . . . . . . 886
ld. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001 limit. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1034
negated . . . . . . . . . . . . . . . . . . . . . . . . . 1002 occurrence location. . . . . . . . . . . . . . . . . 204
negated, parallel. . . . . . . . . . . . . . . . . . . 1002 view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 903
paste right after. . . . . . . . . . . . . . . . . . . 1003 CSV export of alarm storage
right. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1001 command. . . . . . . . . . . . . . . . . . . . . . . . . 773
content operator. . . . . . . . . . . . . . . . . . . . . . 475 configuration. . . . . . . . . . . . . . . . . . . . . . 773
CONTINUE. . . . . . . . . . . . . . . . . . . . . . . . . . . 389 ctrlX AUTOMATION
Continuous Function Chart. . . . . . . . . . . . . . 179 Related documentation. . . . . . . . . . . . . 1113
Continuous Function Chart (CFC) - page- ctrlX CORE
oriented. . . . . . . . . . . . . . . . . . . . . . . . . 180, 425 Licensing notes. . . . . . . . . . . . . . . . . . . . . . 34
Control ctrlX CORE Licensing notes. . . . . . . . . . . . . . . 34
Certificate encrypted communication. . . . 75 ctrlX PLC Engineering
control point Assigning a new target device. . . . . . . 56, 63
CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 Commands869, 880, 881, 882, 883, 884, 912,
create. . . . . . . . . . . . . . . . . . . . . . . . . . . . 994 913, 915, 916, 926
remove. . . . . . . . . . . . . . . . . . . . . . . . . . . 994 Create a standard project. . . . . . . . . . . 56, 60
Control system Create an empty project. . . . . . . . . . . . . . . 58
Security. . . . . . . . . . . . . . . . . . . . . . . . . . 375 ctrlX CORE Creating an axis/kin interface. 55,
controller 62
symbol access. . . . . . . . . . . . . . . . . . . . . 737 Dialogs. . . . . . . . . . . 1037, 1044, 1046, 1078
wink. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 953 Objects. . . . . . . . . . . . . . . . . . . . . . . 762, 763
conversion rule, see unit conversion. . . . . . . 157 Project for the target system ctrlX CORE
Virtual Axis/kin interface. . . . . . . . . . . 55, 62

R911403764, Edition 08 Bosch Rexroth AG


1130 / ctrlX PLC Engineering
1158

Project template for ctrlX CORE devices. . 54 Standard data types. . . . . . . . . . . . . . . . . 555
User management on the control. . . . . 43, 89 user-defined. . . . . . . . . . . . . . . . . . . . . . . 586
custom data type. . . . . . . . . . . . . . . . . . . . . . 815 User-defined. . . . . . . . . . . . . . . . . . . . . . . 556
cycle consistency. . . . . . . . . . . . . . . . . . . . . . 168 WSTRING. . . . . . . . . . . . . . . . . . . . . . . . . 564
D data types
Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 352
D. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
data unit type. . . . . . . . . . . . . . . . . . . . . . . . 815
keyword. . . . . . . . . . . . . . . . . . . . . . . . . . 546
dataflow, pragma attribute. . . . . . . . . . . . . . 612
size prefix. . . . . . . . . . . . . . . . . . . . . . . . . 552
date. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
dar file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743
constant. . . . . . . . . . . . . . . . . . . . . . . . . . 546
data
data type. . . . . . . . . . . . . . . . . . . . . . . . . . 559
record and trace. . . . . . . . . . . . . . . . . . . . 298
DATE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
Data
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 511
exchange. . . . . . . . . . . . . . . . . . . . . . . . . . 229
data type. . . . . . . . . . . . . . . . . . . . . . . . . . 559
data breakpoint. . . . . . . . . . . . . . . . . . . . . . . 271
keyword. . . . . . . . . . . . . . . . . . . . . . . . . . 546
condition. . . . . . . . . . . . . . . . . . . . . . . . 1041
DATE_AND_TIME. . . . . . . . . . . . . . . . . . . . . . 559
execution point. . . . . . . . . . . . . . . . . . . . 1042
data type. . . . . . . . . . . . . . . . . . . . . . . . . . 559
Data persistence. . . . . . . . . . . . . . . . . . . . . . 211
keyword. . . . . . . . . . . . . . . . . . . . . . . . . . 546
data record (see sample). . . . . . . . . . . . . . . 298
DATE_TO___UXINT. . . . . . . . . . . . . . . . . . . . . 511
Data security. . . . . . . . . . . . . . . . . . . . . . . . . 262
DATE_TO___XINT. . . . . . . . . . . . . . . . . . . . . . 511
data source
DATE_TO___XWORD. . . . . . . . . . . . . . . . . . . . 511
add initially. . . . . . . . . . . . . . . . . . . . . . . . 243
DATE_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . 511
choose variables. . . . . . . . . . . . . . . . . . . . 806
DATE_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . 511
communication via address monitoring . . 812
DATE_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . 511
communication via symbols . . . . . . . . . . . 808
DATE_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . 511
OPC UA Client. . . . . . . . . . . . . . . . . . . . . 254
DATE_TO_DWORD. . . . . . . . . . . . . . . . . . . . . 511
symbolic access. . . . . . . . . . . . . . . . . . . . 808
DATE_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . 511
type mapping. . . . . . . . . . . . . . . . . . . . . . 807
DATE_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . 511
update rate. . . . . . . . . . . . . . . . . . . . . . . . 815
DATE_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . 511
variables. . . . . . . . . . . . . . . . . . . . . . . . . . 805
DATE_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . 511
Data source. . . . . . . . . . . . . . . . . . . . . . 241, 805
DATE_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . 511
add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 775
DATE_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . 511
Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . 805
DATE_TO_LWORD. . . . . . . . . . . . . . . . . . . . . . 511
Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
DATE_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . 511
Data source manager
DATE_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . 511
general. . . . . . . . . . . . . . . . . . . . . . . . . . . 241
DATE_TO_STRING. . . . . . . . . . . . . . . . . . . . . 511
Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . 775
DATE_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . . 511
Data source type
DATE_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . . 511
ApplicationV3. . . . . . . . . . . . . . . . . . . . . . 241
DATE_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . 511
Symbolic. . . . . . . . . . . . . . . . . . . . . . . . . . 242
DATE_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . 511
data type
DATE_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . 511
__System.ExceptionCode. . . . . . . . . . . . . 529
DATE_TO_USINT. . . . . . . . . . . . . . . . . . . . . . . 511
ANY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561
DATE_TO_WORD. . . . . . . . . . . . . . . . . . . . . . 511
BIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565
DATE_TO_WSTRING. . . . . . . . . . . . . . . . . . . . 511
date and time. . . . . . . . . . . . . . . . . . . . . . 559
DCF file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 963
integer. . . . . . . . . . . . . . . . . . . . . . . . . . . 556
debug. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
LTIME. . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
operating mode. . . . . . . . . . . . . . . . . . . . 955
message. . . . . . . . . . . . . . . . . . . . . . . . . . 639
run to cursor. . . . . . . . . . . . . . . . . . . . . . . 958
reference. . . . . . . . . . . . . . . . . . . . . . . . . 567
set next statement. . . . . . . . . . . . . . . . . . 959
structure. . . . . . . . . . . . . . . . . . . . . . . . . . 583
show next statement. . . . . . . . . . . . . . . . 959
UNION. . . . . . . . . . . . . . . . . . . . . . . . . . . . 592
step out. . . . . . . . . . . . . . . . . . . . . . . . . . 958
Data type
using step into. . . . . . . . . . . . . . . . . . . . . 958
Alias. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
using step over. . . . . . . . . . . . . . . . . . . . . 957
Default data type. . . . . . . . . . . . . . . . . . . 555
Debug
Enumeration. . . . . . . . . . . . . . . . . . . . . . . 586
CFC Editor. . . . . . . . . . . . . . . . . . . . . . . . 430
Extensions to the IEC 61131-3 standard. 556
Sequential control. . . . . . . . . . . . . . . . . . 282
Implicit enumeration. . . . . . . . . . . . . . . . 453
debug mode. . . . . . . . . . . . . . . . . . . . . . . . . 275
Overflow underflow. . . . . . . . . . . . . . . . . 455

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1131 /
1158

debugging encrypted communication. . . . . . . . . . . . 258


core dump. . . . . . . . . . . . . . . . . . . . . . . . 309 I/O mapping. . . . . . . . . . . . . . . . . . . . . . . 739
decimal Interactive login. . . . . . . . . . . . . . . . . . . 1059
display mode when monitoring. . . . . . . . 961 Log. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751
Decimal number. . . . . . . . . . . . . . . . . . . . . . 542 Options. . . . . . . . . . . . . . . . . . . . . . . . . . 1059
declaration Properties. . . . . . . . . . . . . . . . . . . . . . . . 1059
change order. . . . . . . . . . . . . . . . . . . . . . . 152 search. . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
global variable. . . . . . . . . . . . . . . . . . . . . 167 Security. . . . . . . . . . . . . . . . . . . . . . . . . . 258
go to. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
refactoring. . . . . . . . . . . . . . . . . . . . . . . . 152 update. . . . . . . . . . . . . . . . . . . . . . . . . . . 914
Declaration User management. . . . . . . . . . . . . . . 262, 754
Autodeclaration. . . . . . . . . . . . . . . . . . . . 131 device description
declaration editor. . . . . . . . . . . . . . . . . . . . . 165 download. . . . . . . . . . . . . . . . . . . . . . . . . 963
show/hide. . . . . . . . . . . . . . . . . . . . . . . . . 975 install. . . . . . . . . . . . . . . . . . . . . . . . . . . . 963
tabular/textual. . . . . . . . . . . . . . . . . . . . . 165 Device description
Declaration editor. . . . . . . . . . . . . . . . . . . . . 377 Download, option. . . . . . . . . . . . . . . . . . 1081
Edit declaration header. . . . . . . . . . . . . 1012 device editor
Option. . . . . . . . . . . . . . . . . . . . . . . . . . . 1081 access rights. . . . . . . . . . . . . . . . . . . . . . . 743
declare backup and restore. . . . . . . . . . . . . . . . . . 749
array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 files. . . . . . . . . . . . . . . . . . . . . . . . . . 319, 750
task-local global variable list. . . . . . . . . . . 168 IEC objects. . . . . . . . . . . . . . . . . . . . . . . . 738
Declare. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 PLC settings. . . . . . . . . . . . . . . . . . . . . . . 758
automatically. . . . . . . . . . . . . . . . . . . . . 1082 symbol rights. . . . . . . . . . . . . . . . . . . . . . 737
Short form mode. . . . . . . . . . . . . . . . . . . 133 task deployment. . . . . . . . . . . . . . . . . . . . 753
Variable, command. . . . . . . . . . . . . . . . . . 889 Device editor. . . . . . . . . . . . . . . . . . . . . . . . . 741
define, pragma. . . . . . . . . . . . . . . . . . . . . . . 597 Generic. . . . . . . . . . . . . . . . . . . . . . . . . . . 736
DELETE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 I/O mapping. . . . . . . . . . . . . . . . . . . . . . . 739
delete IL line. . . . . . . . . . . . . . . . . . . . . . . . 1003 Information. . . . . . . . . . . . . . . . . . . . . . . . 736
dereferencing. . . . . . . . . . . . . . . . . . . . . . . . 566 Options. . . . . . . . . . . . . . . . . . . . . . . . . . 1082
design attribute. . . . . . . . . . . . . . . . . . . . . . . 638 Parameter. . . . . . . . . . . . . . . . . . . . . . . . . 760
devdesc.xml . . . . . . . . . . . . . . . . . . . . . . . . . 963 PLC Shell. . . . . . . . . . . . . . . . . . . . . . . . . 756
Development system Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
Appearance and behavior. . . . . . . . . . . . . . 47 Users and groups. . . . . . . . . . . . . . . . . . . 754
Customize surface. . . . . . . . . . . . . . . . . . . 47 Device Editor
device Add user. . . . . . . . . . . . . . . . . . . . . . . . . . 756
configuration mode. . . . . . . . . . . . . . . . . 930 Applications. . . . . . . . . . . . . . . . . . . . . . . 748
configure. . . . . . . . . . . . . . . . . . . . . . . . . . 118 Log. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751
conversion. . . . . . . . . . . . . . . . . . . . . . . 1040 device permission management file. . . 744, 755
database. . . . . . . . . . . . . . . . . . . . . . . . . . 963 dm. . . . . . . . . . . . . . . . . . . . . . . . . . 744, 755
files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750 device reader. . . . . . . . . . . . . . . . . . . . . . . . . 972
function block instance. . . . . . . . . . . . . . 738 device repository. . . . . . . . . . . . . . . . . . . . . . 963
IEC objects. . . . . . . . . . . . . . . . . . . . . . . . 738 renew. . . . . . . . . . . . . . . . . . . . . . . . . . . . 963
install. . . . . . . . . . . . . . . . . . . . . . . . 333, 963 Device tree. . . . . . . . . . . . . . . . . . . . . . . . . . 111
map I/Os. . . . . . . . . . . . . . . . . . . . . . . . . . 120 Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 363
online config mode. . . . . . . . . . . . . . . . . . 930 device user
PLC settings. . . . . . . . . . . . . . . . . . . . . . . 758 add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 951
PLC shell. . . . . . . . . . . . . . . . . . . . . . . . . . 311 change password. . . . . . . . . . . . . . . . . . . 952
simulation mode. . . . . . . . . . . . . . . . 271, 953 logout current user. . . . . . . . . . . . . . . . . . 951
symbol access. . . . . . . . . . . . . . . . . . . . . 737 remove. . . . . . . . . . . . . . . . . . . . . . . . . . . 952
uninstall. . . . . . . . . . . . . . . . . . . . . . . . . . 963 Device user management. . . . . . . . . . . . . . . 262
user management. . . . . . . . . . . . . . . . . . . 743 device user management file. . . . . . . . . 744, 755
Device dum2, dum. . . . . . . . . . . . . . . . . . . . 744, 755
Application. . . . . . . . . . . . . . . . . . . . . . . . 748 device version. . . . . . . . . . . . . . . . . . . . . . . 1071
attach. . . . . . . . . . . . . . . . . . . . . . . . . . . . 913 Devices
Configuration. . . . . . . . . . . . . . . . . . 114, 736 View. . . . . . . . . . . . . . . . . . . . . . . . . 111, 898
Device editor. . . . . . . . . . . . . . . . . . . . . . 114 diagnosis
Device tree. . . . . . . . . . . . . . . . . . . . . . . . 111 acknowledge. . . . . . . . . . . . . . . . . . . . . . . 926
Devices view. . . . . . . . . . . . . . . . . . . . . . . 115 core dump. . . . . . . . . . . . . . . . . . . . . . . . 309

R911403764, Edition 08 Bosch Rexroth AG


1132 / ctrlX PLC Engineering
1158

PLC shell. . . . . . . . . . . . . . . . . . . . . . . . . . 311 DINT_TO_WSTRING. . . . . . . . . . . . . . . . . . . . 482


subtree. . . . . . . . . . . . . . . . . . . . . . . . . . . 926 disable breakpoint. . . . . . . . . . . . . . . . . . . . . 957
diagram disassembly file. . . . . . . . . . . . . . . . . . . . . . . 937
mouse zooming. . . . . . . . . . . . . . . . . . . . 1029 displaymode, pragma. . . . . . . . . . . . . . . . . . 613
Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1096 DIV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
in the trace editor. . . . . . . . . . . . . . . . . . 1096 Division by zero. . . . . . . . . . . . . . . 851, 852, 853
Scale Y-trace axis automatically. . . . . . . 1025 dm file
Dialog device permission management file. 744, 755
Conflict: Project synchronization at close. . . DO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1079 document. . . . . . . . . . . . . . . . . . . . . . . . . . . 917
Conflict: Project synchronization at equalize Dongle. . . . . . . . . . . . . . . . . . . . . . . . . . . 80, 966
project data. . . . . . . . . . . . . . . . . . . . . . 1079 Encryption. . . . . . . . . . . . . . . . . . . . . . . . 153
Conflict: Project synchronization at login1078 Project setting . . . . . . . . . . . . . . . . . . . . 1064
Conflict: Project synchronization at open. . . dot product. . . . . . . . . . . . . . . . . . . . . . . . . . 579
. . . . . . . . . . . . . . . . . . . . . . 1037, 1079, 1080 download
Conflict: Project synchronization at save 1079 library from server. . . . . . . . . . . . . . . . . 1093
Dialogs. . . . . . . . . . . . . . . . . . . . . 1047, 1074 trace. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1027
Insert templates. . . . . . . . . . . . . . . . . . . 1046 Download
New Project. . . . . . . . . . . . . . . . . 1045, 1073 Device description from server. . . . . . . . 1081
Open project in ctrlX CORE. . . . . . . . . . 1076 Encrypt code. . . . . . . . . . . . . . . . . . . . . . 153
Project synchronization. . . . . . . . . . . . . 1075 Multiple. . . . . . . . . . . . . . . . . . . . . . . . . . . 946
Project synchronization (ctrlX > PC). . . 1078 Source code, project setting. . . . . . . . . 1063
Project synchronization (PC > ctrlX). . . . . . . 1078 DT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
Project synchronization (Synchronization convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 511
cache...). . . . . . . . . . . . . . . . . . . . . . . . . 1076 data type. . . . . . . . . . . . . . . . . . . . . . . . . . 559
Selecting real-time data online from ctrlX keyword. . . . . . . . . . . . . . . . . . . . . . . . . . 546
CORE. . . . . . . . . . . . . . . . . . . . . . 1044, 1045 DT_TO___XWORD. . . . . . . . . . . . . . . . . . . . . . 511
dictionary DT_TO__UXINT. . . . . . . . . . . . . . . . . . . . . . . . 511
Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 356 DT_TO__XINT. . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 DT_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . . . 511
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO___UXINT. . . . . . . . . . . . . . . . . . . . . 482 DT_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO___XINT. . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO___XWORD. . . . . . . . . . . . . . . . . . . . 482 DT_TO_DWORD. . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_DWORD. . . . . . . . . . . . . . . . . . . . . 482 DT_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_LWORD. . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_STRING. . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_LWORD. . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_USINT. . . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_STRING. . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_WORD. . . . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . . 482 DT_TO_WSTRING. . . . . . . . . . . . . . . . . . . . . . 511
DINT_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . . 482 Dual number . . . . . . . . . . . . . . . . . . . . . . . . . 542
DINT_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . . 482 dum file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754
DINT_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . 482 dum2 file, dum file
DINT_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . 482 device user management file. . . . . . 744, 755
DINT_TO_USINT. . . . . . . . . . . . . . . . . . . . . . . 482
DINT_TO_WORD. . . . . . . . . . . . . . . . . . . . . . . 482

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1133 /
1158

duplication. . . . . . . . . . . . . . . . . . . . . . . . . . 979 EN/ENO


remove. . . . . . . . . . . . . . . . . . . . . . . . . . . 985 add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986
SFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 979 FBD/LD/IL. . . . . . . . . . . . . . . . . . . . . . . . . 420
SFC, set. . . . . . . . . . . . . . . . . . . . . . . . . . 984 enable
duplication mode. . . . . . . . . . . . . . . . . . . . . 979 breakpoint. . . . . . . . . . . . . . . . . . . . . . . . 957
DUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815 enable_dynamic_creation, pragma. . . . . . . . 614
add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 816 encrypted communication
DWORD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 data source OPC UA Client. . . . . . . . . . . . 254
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482 encryption
DWORD_TO___UXINT. . . . . . . . . . . . . . . . . . . 482 dialog, security screen. . . . . . . . . . . . . . . 908
DWORD_TO___XINT. . . . . . . . . . . . . . . . . . . . 482 Encryption. . . . . . . . . . . . . . . . . . . . . . . . . . . 373
DWORD_TO___XWORD. . . . . . . . . . . . . . . . . 482 Application. . . . . . . . . . . . . . . . . . . . . . . . 153
DWORD_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . 482 Certificate. . . . . . . . . . . . . . . . . . . . . . . . . . 75
DWORD_TO_BOOL. . . . . . . . . . . . . . . . . . . . 482 Communication with PLC. . . . . . . . . . . . . 258
DWORD_TO_BYTE. . . . . . . . . . . . . . . . . . . . . 482 Dongle. . . . . . . . . . . . . . . . . . . . . . . . . . . 153
DWORD_TO_DATE. . . . . . . . . . . . . . . . . . . . . 482 Download code. . . . . . . . . . . . . . . . . . . . . 153
DWORD_TO_DINT. . . . . . . . . . . . . . . . . . . . . 482 Procedure. . . . . . . . . . . . . . . . . . . . . . . . . 373
DWORD_TO_DT. . . . . . . . . . . . . . . . . . . . . . . 482 Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
DWORD_TO_INT. . . . . . . . . . . . . . . . . . . . . . . 482 Properties application. . . . . . . . . . . . . . 1049
DWORD_TO_LDATE. . . . . . . . . . . . . . . . . . . . 482 Signature. . . . . . . . . . . . . . . . . . . . . . . . . 373
DWORD_TO_LDT. . . . . . . . . . . . . . . . . . . . . . 482 with certificate, instructions. . . . . . . . . . . 85
DWORD_TO_LINT. . . . . . . . . . . . . . . . . . . . . . 482 END_ACTION. . . . . . . . . . . . . . . . . . . . . . . . . 659
DWORD_TO_LREAL. . . . . . . . . . . . . . . . . . . . 482 END_CASE. . . . . . . . . . . . . . . . . . . . . . . . . . . 386
DWORD_TO_LTIME. . . . . . . . . . . . . . . . . . . . . 482 END_FOR. . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
DWORD_TO_LTOD. . . . . . . . . . . . . . . . . . . . . 482 END_FUNCTION. . . . . . . . . . . . . . . . . . . . . . . 659
DWORD_TO_LWORD. . . . . . . . . . . . . . . . . . . 482 END_FUNCTION_BLOCK. . . . . . . . . . . . . . . . 659
DWORD_TO_REAL. . . . . . . . . . . . . . . . . . . . . 482 END_IF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
DWORD_TO_SINT. . . . . . . . . . . . . . . . . . . . . 482 END_PROGRAM. . . . . . . . . . . . . . . . . . . . . . . 659
DWORD_TO_STRING. . . . . . . . . . . . . . . . . . . 482 END_REPEAT. . . . . . . . . . . . . . . . . . . . . . . . . 387
DWORD_TO_TIME. . . . . . . . . . . . . . . . . . . . . 482 END_STRUCT. . . . . . . . . . . . . . . . . . . . . . . . . 583
DWORD_TO_TOD. . . . . . . . . . . . . . . . . . . . . . 482 END_TYPE. . . . . . . . . . . . . . . . . . . . . . . . . . . 586
DWORD_TO_UDINT. . . . . . . . . . . . . . . . . . . . 482 END_UNION. . . . . . . . . . . . . . . . . . . . . . . . . . 592
DWORD_TO_UINT. . . . . . . . . . . . . . . . . . . . . 482 END_VAR. . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
DWORD_TO_ULINT. . . . . . . . . . . . . . . . . . . . 482 END_WHILE. . . . . . . . . . . . . . . . . . . . . . . . . . 387
DWORD_TO_USINT. . . . . . . . . . . . . . . . . . . . 482 Endianess. . . . . . . . . . . . . . . . . . . . . . . . . . . 600
DWORD_TO_WORD. . . . . . . . . . . . . . . . . . . . 482 ENDTRY'. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
DWORD_TO_WSTRING. . . . . . . . . . . . . . . . . 482 enlarging/reducing a pin group. . . . . . . . . . . 637
dynamic memory allocation . . . . . . . . . . . . . 524 entry action. . . . . . . . . . . . . . . . . . . . . . . . . . 403
E SFC, add. . . . . . . . . . . . . . . . . . . . . . . . . . 979
enumeration
edit code
conversion TO_STRING. . . . . . . . . . . . . . . 647
format document. . . . . . . . . . . . . . . . . . . 897
namespace. . . . . . . . . . . . . . . . . . . . . . . . 538
editing mode
object DUT. . . . . . . . . . . . . . . . . . . . . . . . 815
graphical editor. . . . . . . . . . . . . . . . . . . . 378
Enumeration. . . . . . . . . . . . . . . . . . . . . . . . . 586
editor
Data type. . . . . . . . . . . . . . . . . . . . . . . . . 586
close all other. . . . . . . . . . . . . . . . . . . . . . 975
Default value. . . . . . . . . . . . . . . . . . . . . . . 586
next. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 972
Initialization. . . . . . . . . . . . . . . . . . . . . . . 586
previous. . . . . . . . . . . . . . . . . . . . . . . . . . 972
Pragma strict. . . . . . . . . . . . . . . . . . . . . . 588
Editor
EQ. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
close (inactive applications). . . . . . . . . . . 973
error analysis. . . . . . . . . . . . . . . . . . . . . . . . . 309
close all. . . . . . . . . . . . . . . . . . . . . . . . . . . 973
estimated-stack-usage, pragma. . . . . . . . . . . 614
element properties. . . . . . . . . . . . . . . . . . . . 900
EtherCAT master
SFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
Add instance to device tree . . . . . . . . . . 1045
ELSE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
exception
ELSIF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
stop execution. . . . . . . . . . . . . . . . . . . . . 952
empty box
Exception
insert. . . . . . . . . . . . . . . . . . . . . . . . . . . . 999
catch in IEC code. . . . . . . . . . . . . . . . . . . 529
empty box with eno . . . . . . . . . . . . . . . . . . . 999
exception error, see exception. . . . . . . . . . . 529

R911403764, Edition 08 Bosch Rexroth AG


1134 / ctrlX PLC Engineering
1158

exception handling. . . . . . . . . . . . . . . . . . . . 529 External implementation


exchange localization files Configuration. . . . . . . . . . . . . . . . . . . . . 1048
project. . . . . . . . . . . . . . . . . . . . . . . . . . . 107 external variable. . . . . . . . . . . . . . . . . . . . . . 445
execute. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422 Extract archive. . . . . . . . . . . . . . . . . . . . . . . . 873
ST code in FBD/LD/IL. . . . . . . . . . . . . . . . 422 F
execution order
FALSE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
end with selected elements. . . . . . . . . . . 988
FB_Exit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660
move down. . . . . . . . . . . . . . . . . . . . . . . . 989
method. . . . . . . . . . . . . . . . . . . . . . . . . . . 660
move up. . . . . . . . . . . . . . . . . . . . . . . . . . 989
FB_Init. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660
order by data flow. . . . . . . . . . . . . . . . . . 990
method. . . . . . . . . . . . . . . . . . . . . . . . . . . 660
selected elements to front. . . . . . . . . . . . 988
FB_Reinit. . . . . . . . . . . . . . . . . . . . . . . . . . . . 660
set number of element . . . . . . . . . . . . . . 990
method. . . . . . . . . . . . . . . . . . . . . . . . . . . 660
set start of feedback in CFC POU. . . . . . . 988
FBD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
show tags. . . . . . . . . . . . . . . . . . . . . . . . . 987
Option. . . . . . . . . . . . . . . . . . . . . . . . . . . 1091
Execution order. . . . . . . . . . . . . . . . . . . . . . . 180
FBD/LD/IL
execution point. . . . . . . . . . . . . . . . . . . . . . 1042
insert assignment, . . . . . . . . . . . . . . . . . . 998
Execution sequence
insert box. . . . . . . . . . . . . . . . . . . . . . . . . 998
by data flow. . . . . . . . . . . . . . . . . . . . . . . 180
insert empty box with en/eno. . . . . . . . . 999
CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
insert input. . . . . . . . . . . . . . . . . . . . . . . 1000
EXIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
insert jump. . . . . . . . . . . . . . . . . . . . . . . . 999
exit action. . . . . . . . . . . . . . . . . . . . . . . . . . . 403
insert jump label. . . . . . . . . . . . . . . . . . . . 999
add, SFC. . . . . . . . . . . . . . . . . . . . . . . . . . 980
insert network. . . . . . . . . . . . . . . . . . . . . 997
EXP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
insert network below. . . . . . . . . . . . . . . . 997
expand all. . . . . . . . . . . . . . . . . . . . . . . . . . . 886
insert return. . . . . . . . . . . . . . . . . . . . . . 1000
expandfully, pragma. . . . . . . . . . . . . . . . . . . 618
online operation. . . . . . . . . . . . . . . . . . . . 414
export
view as function block diagram. . . . . . . 1006
library. . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
view as instruction list. . . . . . . . . . . . . . 1006
library from Library Manager. . . . . . . . . 1011
view as ladder logic. . . . . . . . . . . . . . . . 1006
Export
FBD/LD/IL editor
Library from repository. . . . . . . . . . . . . . . 969
line branch. . . . . . . . . . . . . . . . . . . . . . . 1005
export/import
toolbar. . . . . . . . . . . . . . . . . . . . . . . . . . . 378
alarms. . . . . . . . . . . . . . . . . . . . . . . . . . . . 772
FBD/LD/IL Editor. . . . . . . . . . . . . . . . . . . . . . 410
I/O mapping. . . . . . . . . . . . . . . . . . . . . . . 931
Features
PLCopenXML. . . . . . . . . . . . . . . . . . . . . . 923
Monitoring. . . . . . . . . . . . . . . . . . . . . . . 1059
text list. . . . . . . . . . . . . . . . . . . . . . . . . . 1022
Translate. . . . . . . . . . . . . . . . . . . . . . . . . 1048
Export/import
fieldbus devices. . . . . . . . . . . . . . . . . . . . . . 1105
PLCopen XML. . . . . . . . . . . . . . . . . . . . . . . 67
file
XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818
Export/Import
link to object. . . . . . . . . . . . . . . . . . . . . . 1057
Users and groups. . . . . . . . . . . . . . . . . . 1061
to and from PLC. . . . . . . . . . . . . . . . . . . . 319
Exportieren. . . . . . . . . . . . . . . . . . . . . . . . . . 922
File
exporting C-functions. . . . . . . . . . . . . . . . . . 937
Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Expression. . . . . . . . . . . . . . . . . . . . . . . . . . . 380
save. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
ST. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
save as.... . . . . . . . . . . . . . . . . . . . . . . . . . . 85
EXPT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
files
operator. . . . . . . . . . . . . . . . . . . . . . . . . . 519
device editor. . . . . . . . . . . . . . . . . . . . . . . 750
ExST. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
FINAL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821
Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
FINALLY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
find
EXT. . . . . . . . . . . . . . . . . . . . . . . . . . . 130, 1048
in help. . . . . . . . . . . . . . . . . . . . . . . . . . . . 976
Extend memory profile. . . . . . . . . . . . . . . . . 871
flag memory. . . . . . . . . . . . . . . . . . . . . . . . . 552
Extend profile. . . . . . . . . . . . . . . . . . . . . . . . 871
flash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 764
Extended Structured Text. . . . . . . . . . . . . . . 192
external memory. . . . . . . . . . . . . . . . . . . . 764
EXTENDS. . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
floating-point number. . . . . . . . . . . . . . . . . . 557
external file. . . . . . . . . . . . . . . . . . . . . . . . . . 818
constant. . . . . . . . . . . . . . . . . . . . . . . . . . 542
External file
flow control. . . . . . . . . . . . . . . . . . . . . . . . . . 961
Properties. . . . . . . . . . . . . . . . . . . . . . . . 1051
FOR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
external implementation. . . . . . . . . . . . . . . . 130

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1135 /
1158

force get
force values. . . . . . . . . . . . . . . . . . . . . . . . 959 access method, interface. . . . . . . . . . . . . 836
handling in watch list. . . . . . . . . . . . . . . . 900 Get
in CFC. . . . . . . . . . . . . . . . . . . . . . . . 995, 996 Accessor method. . . . . . . . . . . . . . . . . . . 839
Force global namespace operator. . . . . . . . . . . . . . 537
Show all forces. . . . . . . . . . . . . . . . . . . . . 280 Global network variables list. . . . . . . . . . . . . 238
forcing global text list
add all forces to watchlist. . . . . . . . . . . . 901 add language and translate text. . . . . . . . 137
prepare value. . . . . . . . . . . . . . . . . . . . . 1041 check. . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Forcing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 compare and export differences. . . . . . . . 139
format document. . . . . . . . . . . . . . . . . . . . . . 897 create. . . . . . . . . . . . . . . . . . . . . . . . . . . 1021
format code. . . . . . . . . . . . . . . . . . . . . . . 897 create again with current IDs. . . . . . . . . . 141
full screen mode. . . . . . . . . . . . . . . . . . . . . . 899 enter text in visualization element. . . . . . 140
function export. . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
call via event. . . . . . . . . . . . . . . . . . . . . . . 861 for static application. . . . . . . . . . . . . . . . . 140
call with external implementation. . . . . . 130 import file. . . . . . . . . . . . . . . . . . . . . . . . . 138
monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . 297 object. . . . . . . . . . . . . . . . . . . . . . . . . . . . 776
Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 360 remove text list entries. . . . . . . . . . . . . . . 141
reaction to type change. . . . . . . . . . . . . . 608 update ID. . . . . . . . . . . . . . . . . . . . . . . . . 141
Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . 825 update with replacement file. . . . . . . . . . 141
Call. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825 global variable. . . . . . . . . . . . . . . . . . . . . . . . 444
FUNCTION. . . . . . . . . . . . . . . . . . . . . . . . . . . 825 declare. . . . . . . . . . . . . . . . . . . . . . . . . . . 167
function as operand. . . . . . . . . . . . . . . . . . . 554 global variable list
function block declare task-local. . . . . . . . . . . . . . . . . . . 168
add input, CFC. . . . . . . . . . . . . . . . . . . . . 438 task-local. . . . . . . . . . . . . . . . . . . . . . . . . . 778
add output, CFC. . . . . . . . . . . . . . . . . . . . 438 Global Variable List. . . . . . . . . . . . . . . . . . . . 777
assignment, info. . . . . . . . . . . . . . . . . . . . 627 global variables list
call with external implementation. . . . . . 130 namespace. . . . . . . . . . . . . . . . . . . . . . . . 538
call, ST. . . . . . . . . . . . . . . . . . . . . . . . . . . 389 global_init_slot, pragma. . . . . . . . . . . . . . . . . 618
extend. . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 GlobalImagePool. . . . . . . . . . . . . . . . . . . . . . 144
I/O channel. . . . . . . . . . . . . . . . . . . . . . . . 122 go to
I/O channel, mapping. . . . . . . . . . . . . . . . 738 definition, how to. . . . . . . . . . . . . . . . . . . 206
I/O mapping. . . . . . . . . . . . . . . . . . . 122, 626 line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885
implement interface. . . . . . . . . . . . . . . . . 223 matching bracket. . . . . . . . . . . . . . . . . . . 885
initialization on call. . . . . . . . . . . . . . . . . . 623 network. . . . . . . . . . . . . . . . . . . . . . . . . . 1007
monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . 294 go to definition
monitor with properties. . . . . . . . . . . . . . 295 command. . . . . . . . . . . . . . . . . . . . . . . . . 893
select for I/O mapping. . . . . . . . . . . . . . 1039 Go to source position. . . . . . . . . . . . . . . . . . 898
test, reflection. . . . . . . . . . . . . . . . . . . . . 645 graphical editor toolbar. . . . . . . . . . . . . . . . . 378
Function block. . . . . . . . . . . . . . . . . . . . . . . . 823 group
Call. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823 CFC, create. . . . . . . . . . . . . . . . . . . . . . . . 995
I/O mapping. . . . . . . . . . . . . . . . . . . . . . . 739 CFC, remove. . . . . . . . . . . . . . . . . . . . . . . 995
Map I/O channel. . . . . . . . . . . . . . . . . . . . 739 Group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754
Function block diagram. . . . . . . . . . . . . . . . . 173 User administration. . . . . . . . . . . . . . . . . . 76
Function module GSD file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 963
Property. . . . . . . . . . . . . . . . . . . . . . . . . . 839 GT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
FUNCTION_BLOCK. . . . . . . . . . . . . . . . . . . . 823 GVL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 777
G declare task-local. . . . . . . . . . . . . . . . . . . 168
namespace. . . . . . . . . . . . . . . . . . . . . . . . 538
Gateway
Property. . . . . . . . . . . . . . . . . . . . . . . . . . 839
Block driver. . . . . . . . . . . . . . . . . . . . . . . 1015
task-local. . . . . . . . . . . . . . . . . . . . . . . . . . 778
Configuration. . . . . . . . . . . . . . . . . . . . . 1015
Configuration file. . . . . . . . . . . . . . . . . . 1015 H
gateway.cfg. . . . . . . . . . . . . . . . . . . . . . . . . 1015 Hardware
GE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 map in device tree. . . . . . . . . . . . . . . . . . 115
Generate EtherCAT XML. . . . . . . . . . . . . . . . 924 search. . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Generate Sercos SCI XML. . . . . . . . . . . . . . . 924 hasattribute, pragma. . . . . . . . . . . . . . . . . . . 597
hasconstantvalue, pragma. . . . . . . . . . . . . . . 597

R911403764, Edition 08 Bosch Rexroth AG


1136 / ctrlX PLC Engineering
1158

hastype, pragma. . . . . . . . . . . . . . . . . . . . . . 597 IL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177


help online operation. . . . . . . . . . . . . . . . . . . . 414
language. . . . . . . . . . . . . . . . . . . . . . . . . 1084 Option. . . . . . . . . . . . . . . . . . . . . . . . . . . 1091
Helpdesk. . . . . . . . . . . . . . . . . . . . . . . . . . . 1119 image file
hexadecimal insert. . . . . . . . . . . . . . . . . . . . . . . . . . . 1011
display mode when monitoring. . . . . . . . 961 image pool. . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Hexadecimal number. . . . . . . . . . . . . . . . . . . 542 create. . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
hide windows. . . . . . . . . . . . . . . . . . . . . . . . . 51 download. . . . . . . . . . . . . . . . . . . . . . . . 1058
hide_all_locals, pragma. . . . . . . . . . . . . . . . . 622 global. . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
hide, pragma. . . . . . . . . . . . . . . . . . . . . . . . . 620 properties. . . . . . . . . . . . . . . . . . . . . . . . 1058
homepage. . . . . . . . . . . . . . . . . . . . . . . . . . . 976 Image pool. . . . . . . . . . . . . . . . . . . . . . . . . . . 779
Hotline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1119 Image selection. . . . . . . . . . . . . . . . . . . . . . . 779
I implement interfaces. . . . . . . . . . . . . . . . . 1034
IMPLEMENTS. . . . . . . . . . . . . . . . . . . . . . . . . 223
I. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
import
memory range prefix. . . . . . . . . . . . . . . . 552
I/O mapping. . . . . . . . . . . . . . . . . . . . . . . 929
I/O channel
PLCopenXML. . . . . . . . . . . . . . . . . . . . . . 923
function block. . . . . . . . . . . . . . . . . . . . . . 122
Import user
IEC objects. . . . . . . . . . . . . . . . . . . . . . . . 738
Device user administration. . . . . . . . . . . . 754
Map to function block. . . . . . . . . . . . . . . . 739
Import wizard
Map to variables. . . . . . . . . . . . . . . . . . . . 739
Programming system configuration. . . . 1035
select function block. . . . . . . . . . . . . . . 1039
Importing. . . . . . . . . . . . . . . . . . . . . . . . . . . . 922
I/O image
In-out parameter. . . . . . . . . . . . . . . . . . . . . . 439
edit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 927
index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 976
test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
index access. . . . . . . . . . . . . . . . . . . . . . . . . 567
I/O mapping. . . . . . . . . . . . . . . . . . . . 119, 1105
INDEXOF. . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
all devices. . . . . . . . . . . . . . . . . . . . . . . . . 126
information. . . . . . . . . . . . . . . . . . . . . . . . . . 977
change address. . . . . . . . . . . . . . . . . . . . . 123
Information
Device editor. . . . . . . . . . . . . . . . . . . . . . 739
Device editor. . . . . . . . . . . . . . . . . . . . . . 736
export to CSV. . . . . . . . . . . . . . . . . . . . . . 931
Information about restoring a project. . . . . 1084
force. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
INI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539
function block. . . . . . . . . . . . . . . . . . . . . . 122
init step, SFC. . . . . . . . . . . . . . . . . . . . . . . . . 977
import from CSV. . . . . . . . . . . . . . . . . . . . 929
init_namespace, pragma attribute. . . . . . . . . 624
monitoring. . . . . . . . . . . . . . . . . . . . . . . . 124
init_on_onlchange, Pragma. . . . . . . . . . . . . . 625
procedure. . . . . . . . . . . . . . . . . . . . . . . . . 120
initialization
select function block. . . . . . . . . . . . . . . 1039
array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
task deployment. . . . . . . . . . . . . . . . . . . . 284
avoid, pragma. . . . . . . . . . . . . . . . . . . . . . 634
update. . . . . . . . . . . . . . . . . . . . . . . . . . . 124
FB on call. . . . . . . . . . . . . . . . . . . . . . . . . 623
Icon. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
input variable, pragma. . . . . . . . . . . . . . . 623
Call script. . . . . . . . . . . . . . . . . . . . . . . . . 344
namespace, pragma. . . . . . . . . . . . . . . . . 624
Configure script call. . . . . . . . . . . . . . . . . 346
order, pragma. . . . . . . . . . . . . . . . . . . . . . 618
Icon button. . . . . . . . . . . . . . . . . . . . . . . . . . 346
vector. . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
Configure script call. . . . . . . . . . . . . . . . . 346
with FB_Init, FB_Reinit. . . . . . . . . . . . . . . 660
Identifier
Initialization. . . . . . . . . . . . . . . . . . . . . . . . . . 164
alias. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
Online change, Pragma. . . . . . . . . . . . . . . 625
Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 651
initialize_on_call, pragma. . . . . . . . . . . . . . . . 623
Search order. . . . . . . . . . . . . . . . . . . . . . . 656
inline monitoring. . . . . . . . . . . . . . . . . . . . . . 292
IEC action
example. . . . . . . . . . . . . . . . . . . . . . . . . . 292
SFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Inline monitoring
IEC objects
activate. . . . . . . . . . . . . . . . . . . . . . . . . . . 887
device editor. . . . . . . . . . . . . . . . . . . . . . . 738
input
IF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
statement. . . . . . . . . . . . . . . . . . . . . . . . . 384
device. . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
if, pragma. . . . . . . . . . . . . . . . . . . . . . . . . . . 597
Input and output variable. . . . . . . . . . . . . . . 439
IF/ELSE
constant. . . . . . . . . . . . . . . . . . . . . . . . . . 442
Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 359
VAR_IN_OUT. . . . . . . . . . . . . . . . . . . . . . . 439

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1137 /
1158

Input assistance. . . . . . . . . . . . . . . . . . . . . . 131 INT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556


Auto declaration. . . . . . . . . . . . . . . . . . . . 131 convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482
Input support. . . . . . . . . . . . . . . . . . . . . . 131 INT_TO___UXINT. . . . . . . . . . . . . . . . . . . . . . . 482
List components. . . . . . . . . . . . . . . . . . . . 131 INT_TO___XINT. . . . . . . . . . . . . . . . . . . . . . . . 482
Short form mode. . . . . . . . . . . . . . . . . . . 133 INT_TO___XWORD. . . . . . . . . . . . . . . . . . . . . 482
input assistant. . . . . . . . . . . . . . . . . . . . . . . . 892 INT_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . . . 482
categories. . . . . . . . . . . . . . . . . . . . . . . . . 892 INT_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . . 482
dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . 892 INT_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . . . 482
text search. . . . . . . . . . . . . . . . . . . . . . . . 892 INT_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . . . 482
Input help INT_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . . 482
Options. . . . . . . . . . . . . . . . . . . . . . . . . . 1082 INT_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . . . 482
input memory. . . . . . . . . . . . . . . . . . . . . . . . 552 INT_TO_DWORD. . . . . . . . . . . . . . . . . . . . . . . 482
input pin order. . . . . . . . . . . . . . . . . . . . . . . 638 INT_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . . . 482
input variable INT_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . . . 482
refactoring. . . . . . . . . . . . . . . . . . . . . . . . 151 INT_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . . 482
Input variable. . . . . . . . . . . . . . . . . . . . . . . . 438 INT_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . . . 482
insert. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1012 INT_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . . . 482
box parallel LD. . . . . . . . . . . . . . . . . . . . . 999 INT_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . . . 482
branch above. . . . . . . . . . . . . . . . . . . . . 1004 INT_TO_LWORD. . . . . . . . . . . . . . . . . . . . . . . 482
branch below. . . . . . . . . . . . . . . . . . . . . 1005 INT_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . . . 482
branch, ld. . . . . . . . . . . . . . . . . . . . . . . . 1004 INT_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . . 482
coil. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1000 INT_TO_STRING. . . . . . . . . . . . . . . . . . . . . . . 482
contact. . . . . . . . . . . . . . . . . . . . . 1002, 1003 INT_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . . . 482
contact parallel above. . . . . . . . . 1001, 1002 INT_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . . . . 482
contact parallel below. . . . . . . . . . . . . . 1001 INT_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . . . 482
contact right. . . . . . . . . . . . . . . . . . . . . . 1001 INT_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . . 482
contact, ld. . . . . . . . . . . . . . . . . . . . . . . . 1001 INT_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . . 482
contact, negated parallel. . . . . . . . . . . . 1002 INT_TO_USINT. . . . . . . . . . . . . . . . . . . . . . . . 482
empty box. . . . . . . . . . . . . . . . . . . . . . . . . 999 INT_TO_WORD. . . . . . . . . . . . . . . . . . . . . . . . 482
image file. . . . . . . . . . . . . . . . . . . . . . . . 1011 INT_TO_WSTRING. . . . . . . . . . . . . . . . . . . . . 482
instruction line. . . . . . . . . . . . . . . . . . . . 1003 Integer
line branch prallel. . . . . . . . . . . . . . . . . . 1005 convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482
negated contact. . . . . . . . . . . . . . . . . . . 1002 integer data type. . . . . . . . . . . . . . . . . . . . . . 556
set coil. . . . . . . . . . . . . . . . . . . . . . . . . . 1000 Intelligent coding, options. . . . . . . . . . . . . . 1082
text in a text list. . . . . . . . . . . . . . . . . . . 1022 Intended use
variable declaration in the tabular editor 1012 Areas of application. . . . . . . . . . . . . . . . . . 35
insert action association Areas of use. . . . . . . . . . . . . . . . . . . . . . . . 35
insert, command. . . . . . . . . . . . . . . . . . . . 983 Introduction. . . . . . . . . . . . . . . . . . . . . . . . 35
insert assignment, FBD/LD/IL. . . . . . . . . . . . 998 interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . 827
insert contact extend. . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
parallel above. . . . . . . . . . . . . . . . 1001, 1002 implement. . . . . . . . . . . . . . . . . . . . . . . . . 223
parallel below. . . . . . . . . . . . . . . . . . . . . 1001 property. . . . . . . . . . . . . . . . . . . . . . . . . . 836
insert input update data source programmatically. . . 253
box, FBD/LD/IL. . . . . . . . . . . . . . . . . . . . 1000 Interface
insert jump. . . . . . . . . . . . . . . . . . . . . . . . . . 999 customize. . . . . . . . . . . . . . . . . . . . . . . . . . 47
insert jump label. . . . . . . . . . . . . . . . . . . . . . 999 INTERFACE. . . . . . . . . . . . . . . . . . . . . . . . . . 827
insert network. . . . . . . . . . . . . . . . . . . . . . . . 997 interface method. . . . . . . . . . . . . . . . . . . . . . 835
insert network below. . . . . . . . . . . . . . . . . . 997 INTERNAL. . . . . . . . . . . . . . . . . . . . . . . . . . . 829
install Method. . . . . . . . . . . . . . . . . . . . . . . . . . . 829
device. . . . . . . . . . . . . . . . . . . . . . . . 333, 963 Property. . . . . . . . . . . . . . . . . . . . . . . . . . 839
Install io_function_block
Library. . . . . . . . . . . . . . . . . . . . . . . . . . . 969 pragma attribute. . . . . . . . . . . . . . . . . . . 1039
instance path. . . . . . . . . . . . . . . . . . . . . . . . 1014 io_function_block_mapping. . . . . . . . . . . . . . 626
add in global persistent variable list. . . . 1014 pragma attribute. . . . . . . . . . . . . . . 626, 1039
add in variables configuration. . . . . . . . 1014 IoConfig.par. . . . . . . . . . . . . . . . . . . . . . . . . . 119
instance variables. . . . . . . . . . . . . . . . . . . . . 445 IronPython
instance-path, pragma. . . . . . . . . . . . . . . . . . 625 Script. . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Instruction list. . . . . . . . . . . . . . . . . . . . . . . . 177 strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . 371

R911403764, Edition 08 Bosch Rexroth AG


1138 / ctrlX PLC Engineering
1158

is_connected. . . . . . . . . . . . . . . . . . . . . . . . . 627 LDATE_TO___XWORD. . . . . . . . . . . . . . . . . . . 511


pragma attribute. . . . . . . . . . . . . . . . . . . . 627 LDATE_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . 511
J LDATE_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . 511
LDATE_TO_DATE. . . . . . . . . . . . . . . . . . . . . . 511
Jitter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
LDATE_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . 511
Task configuration. . . . . . . . . . . . . . . . . . 209
LDATE_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . 511
JMP. . . . . . . . . . . . . . . . . . . . . . . . . . . . 389, 415
LDATE_TO_DWORD. . . . . . . . . . . . . . . . . . . . 511
JMPC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
LDATE_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . 511
JMPCN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
LDATE_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . 511
jump. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
LDATE_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . 511
add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 983
LDATE_TO_LREAL. . . . . . . . . . . . . . . . . . . . . 511
CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
LDATE_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . 511
insert after. . . . . . . . . . . . . . . . . . . . . . . . 983
LDATE_TO_LWORD. . . . . . . . . . . . . . . . . . . . . 511
insert, FBD/LD/IL. . . . . . . . . . . . . . . . . . . 999
LDATE_TO_REAL. . . . . . . . . . . . . . . . . . . . . . 511
jump label
LDATE_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . 511
FBD/LD/IL. . . . . . . . . . . . . . . . . . . . . . . . . 420
LDATE_TO_STRING. . . . . . . . . . . . . . . . . . . . 511
insert, FBD/LD/IL. . . . . . . . . . . . . . . . . . . 999
LDATE_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . 511
ST. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
LDATE_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . 511
K LDATE_TO_UDINT. . . . . . . . . . . . . . . . . . . . . 511
Key LDATE_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . 511
Certificate. . . . . . . . . . . . . . . . . . . . . . . . . 374 LDATE_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . 511
key combination. . . . . . . . . . . . . . . . . . . . . . . 50 LDATE_TO_USINT. . . . . . . . . . . . . . . . . . . . . . 511
keyboard shortcut. . . . . . . . . . . . . . . . . . . . 1095 LDATE_TO_WORD. . . . . . . . . . . . . . . . . . . . . 511
customize. . . . . . . . . . . . . . . . . . . . . . . . . . 50 LDATE_TO_WSTRING. . . . . . . . . . . . . . . . . . . 511
keyboard shortcuts. . . . . . . . . . . . . . . . . . . . . 50 LDN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
keyword. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659 LDT
Keyword convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 511
Capitalization. . . . . . . . . . . . . . . . . . . . . 1082 keyword. . . . . . . . . . . . . . . . . . . . . . . . . . 546
L LDT_TO___XWORD. . . . . . . . . . . . . . . . . . . . . 511
LDT_TO__UXINT. . . . . . . . . . . . . . . . . . . . . . . 511
label. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
LDT_TO__XINT. . . . . . . . . . . . . . . . . . . . . . . . 511
CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
LDT_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . . 511
Ladder diagram. . . . . . . . . . . . . . . . . . . . . . . 175
LDT_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . . 511
language
LDT_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . . 511
help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1084
LDT_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . . 511
project localization. . . . . . . . . . . . . . . . . . 107
LDT_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . . 511
user interface, options. . . . . . . . . . . . . . 1084
LDT_TO_DWORD. . . . . . . . . . . . . . . . . . . . . . 511
Language
LDT_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . . 511
User interface, command line. . . . . . . . . . 321
LDT_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . . 511
Last used project. . . . . . . . . . . . . . . . . . . . . . 874
LDT_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . . 511
latch variable. . . . . . . . . . . . . . . . . . . . . . . . . 768
LDT_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . . 511
Latency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
LDT_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . . 511
Task configuration. . . . . . . . . . . . . . . . . . 209
LDT_TO_LWORD. . . . . . . . . . . . . . . . . . . . . . . 511
LD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175, 415
LDT_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . . 511
closed branch. . . . . . . . . . . . . . . . . . . . . . 421
LDT_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . . 511
keyword. . . . . . . . . . . . . . . . . . . . . . . . . . 546
LDT_TO_STRING. . . . . . . . . . . . . . . . . . . . . . 511
online operation. . . . . . . . . . . . . . . . . . . . 414
LDT_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . . . 511
Option. . . . . . . . . . . . . . . . . . . . . . . . . . . 1091
LDT_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . . . 511
programming in. . . . . . . . . . . . . . . . . . . . 176
LDT_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . . 511
LDATE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
LDT_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . . 511
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 511
LDT_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . . 511
data type. . . . . . . . . . . . . . . . . . . . . . . . . . 559
LDT_TO_USINT. . . . . . . . . . . . . . . . . . . . . . . . 511
keyword. . . . . . . . . . . . . . . . . . . . . . . . . . 546
LDT_TO_WORD. . . . . . . . . . . . . . . . . . . . . . . 511
LDATE_AND_TIME. . . . . . . . . . . . . . . . . . . . . 559
LDT_TO_WSTRING. . . . . . . . . . . . . . . . . . . . . 511
data type. . . . . . . . . . . . . . . . . . . . . . . . . . 559
LE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
keyword. . . . . . . . . . . . . . . . . . . . . . . . . . 546
library
LDATE_TO___UXINT. . . . . . . . . . . . . . . . . . . . 511
add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1007
LDATE_TO___XINT. . . . . . . . . . . . . . . . . . . . . 511
add to project. . . . . . . . . . . . . . . . . . . . . . 331

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1139 /
1158

check compatibility. . . . . . . . . . . . . . . . . . 936 restore. . . . . . . . . . . . . . . . . . . . . . . . . . . 966


convert library reference. . . . . . . . . . . . 1039 return. . . . . . . . . . . . . . . . . . . . . . . . . . . . 966
download, option. . . . . . . . . . . . . . . . . . 1093 Start development system without license
export. . . . . . . . . . . . . . . . . . . . . . . 332, 1011 request. . . . . . . . . . . . . . . . . . . . . . . . . . . 326
outdated versions. . . . . . . . . . . . . . . . . . 1070 license Information
properties. . . . . . . . . . . . . . . . . . . . . . . . 1008 controller. . . . . . . . . . . . . . . . . . . . . . . . . 972
reload. . . . . . . . . . . . . . . . . . . . . . . . . . . 1008 License Manager. . . . . . . . . . . . . . . . . . . . . . 966
Library Licensing. . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
checks_in_libs. . . . . . . . . . . . . . . . . . . . . . 846 inctrlX I/O Engineering System. . . . . . . . . 336
create. . . . . . . . . . . . . . . . . . . . . . . . . . . 1111 LIMIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
Download. . . . . . . . . . . . . . . . . . . . . . . . . 780 line branch. . . . . . . . . . . . . . . . . . . . . . . . . 1005
embed. . . . . . . . . . . . . . . . . . . . . . . . . . . . 780 IL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
export. . . . . . . . . . . . . . . . . . . . . . . . . . . . 969 open. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
include in the project. . . . . . . . . . . . . . . . 780 start point. . . . . . . . . . . . . . . . . . . . . . . . 1005
install. . . . . . . . . . . . . . . . . . . . . . . . . . . . 969 start/end. . . . . . . . . . . . . . . . . . . . . . . . . . 424
Library manager. . . . . . . . . . . . . . . . . . . . 780 linkalways. . . . . . . . . . . . . . . . . . . . . . . . . . . 628
Library types. . . . . . . . . . . . . . . . . . . . . . . 330 pragma. . . . . . . . . . . . . . . . . . . . . . . . . . . 628
load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 780 Lint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Location. . . . . . . . . . . . . . . . . . . . . . . . . . 969 programming tool for code analysis. . . . . 202
Mapping definition. . . . . . . . . . . . . . . . . 1080 LINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
Namespace. . . . . . . . . . . . . . . . . . . . 538, 780 convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482
Options. . . . . . . . . . . . . . . . . . . . . . . . . . 1080 data type. . . . . . . . . . . . . . . . . . . . . . . . . . 556
Placeholder. . . . . . . . . . . . . . . . . . . . . . . 1010 LINT_tO___UXINT. . . . . . . . . . . . . . . . . . . . . . 482
Profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . 969 LINT_tO___XINT. . . . . . . . . . . . . . . . . . . . . . . 482
Properties. . . . . . . . . . . . . . . . . . . . . . . . . 780 LINT_tO___XWORD. . . . . . . . . . . . . . . . . . . . . 482
protected, signed. . . . . . . . . . . . . . . . . . . 330 LINT_tO_BIT. . . . . . . . . . . . . . . . . . . . . . . . . . 482
referenced libraries. . . . . . . . . . . . . . . . . 780 LINT_tO_BOOL. . . . . . . . . . . . . . . . . . . . . . . 482
save as compiled library. . . . . . . . . . . . . . 875 LINT_tO_BYTE. . . . . . . . . . . . . . . . . . . . . . . . 482
Signing. . . . . . . . . . . . . . . . . . . . . . . . . . . 875 LINT_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . . 482
Summary. . . . . . . . . . . . . . . . . . . . . . . . . 780 LINT_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . 482
uninstall. . . . . . . . . . . . . . . . . . . . . . . . . . 969 LINT_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . . 482
Use function blocks. . . . . . . . . . . . . . . . . 136 LINT_TO_DWORD. . . . . . . . . . . . . . . . . . . . . . 482
Library development LINT_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . 482
Information. . . . . . . . . . . . . . . . . . . . . . . . 330 LINT_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . . 482
Library Development Summary. . . . . . . . . . 1111 LINT_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . . 482
library documentation LINT_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . . 482
comment. . . . . . . . . . . . . . . . . . . . . . . . . . 390 LINT_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . . 482
Library manager. . . . . . . . . . . . . . . . . . . . . . 780 LINT_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . . 482
general. . . . . . . . . . . . . . . . . . . . . . . . . . . 329 LINT_TO_LWORD. . . . . . . . . . . . . . . . . . . . . . 482
Library project LINT_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . . 482
licensing. . . . . . . . . . . . . . . . . . . . . . . . 59, 65 LINT_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . 482
Library projects LINT_TO_STRING. . . . . . . . . . . . . . . . . . . . . . 482
signing. . . . . . . . . . . . . . . . . . . . . . . . . 59, 65 LINT_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . . 482
library reference LINT_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . . . 482
conversion. . . . . . . . . . . . . . . . . . . . . . . 1039 LINT_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . . 482
library repository LINT_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . 482
adding a library. . . . . . . . . . . . . . . . . . . . . 331 LINT_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . 482
Library repository LINT_TO_USINT. . . . . . . . . . . . . . . . . . . . . . . 482
general information. . . . . . . . . . . . . . . . . 329 LINT_TO_WORD. . . . . . . . . . . . . . . . . . . . . . . 482
Library Repository. . . . . . . . . . . . . . . . . . . . . 969 LINT_TO_WSTRING. . . . . . . . . . . . . . . . . . . . 482
license list
information. . . . . . . . . . . . . . . . . . . . . . . . 977 Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 355
plug-in. . . . . . . . . . . . . . . . . . . . . . . . . . . . 977 List components. . . . . . . . . . . . . . . . . . . . . . 131
License literal
activate. . . . . . . . . . . . . . . . . . . . . . . . . . . 966 character. . . . . . . . . . . . . . . . . . . . . . . . . . 543
activate offline. . . . . . . . . . . . . . . . . . . . . 336 date. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
manage. . . . . . . . . . . . . . . . . . . . . . . . . . . 966 time of day. . . . . . . . . . . . . . . . . . . . . . . . 546
request. . . . . . . . . . . . . . . . . . . . . . . . . . . 966 typed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549

R911403764, Edition 08 Bosch Rexroth AG


1140 / ctrlX PLC Engineering
1158

Literal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 LREAL_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . 495


LN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 LREAL_TO_USINT. . . . . . . . . . . . . . . . . . . . . . 495
Load LT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
Project, option. . . . . . . . . . . . . . . . . . . . 1084 LTIME. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
Loading to control constant. . . . . . . . . . . . . . . . . . . . . . . . . . 545
Multiple. . . . . . . . . . . . . . . . . . . . . . . . . . . 946 convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 506
loading to the controller. . . . . . . . . . . . . . . . 316 literal. . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
Local variable. . . . . . . . . . . . . . . . . . . . . . . . 438 LTIME_OF_DAY. . . . . . . . . . . . . . . . . . . . . . . . 559
localization data type. . . . . . . . . . . . . . . . . . . . . . . . . . 559
project. . . . . . . . . . . . . . . . . . . . . . . . . . . 107 keyword. . . . . . . . . . . . . . . . . . . . . . . . . . 546
localization template LTIME_TO___UXINT. . . . . . . . . . . . . . . . . . . . . 506
project localization. . . . . . . . . . . . . . . . . . 107 LTIME_TO___XINT. . . . . . . . . . . . . . . . . . . . . . 506
locked, operating mode. . . . . . . . . . . . . . . . . 955 LTIME_TO___XWORD. . . . . . . . . . . . . . . . . . . 506
log LTIME_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . 506
device. . . . . . . . . . . . . . . . . . . . . . . . . . . . 962 LTIME_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . 506
Log LTIME_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . 506
open. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751 LTIME_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . 506
PLC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 LTIME_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . 506
VendorException. . . . . . . . . . . . . . . . . . . . 751 LTIME_TO_DWORD. . . . . . . . . . . . . . . . . . . . . 506
LOG. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 LTIME_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . 506
Log in. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 939 LTIME_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . 506
as user. . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 LTIME_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . 506
via user account. . . . . . . . . . . . . . . . . . . . . 82 LTIME_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . 506
Log in/log off to/from the control. . . . . . . 43, 89 LTIME_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . 506
Log of the PLC LTIME_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . 506
Device editor. . . . . . . . . . . . . . . . . . . . . . 751 LTIME_TO_LWORD. . . . . . . . . . . . . . . . . . . . . 506
Logbook LTIME_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . 506
PLC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 LTIME_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . 506
Login LTIME_TO_STRING. . . . . . . . . . . . . . . . . . . . . 506
only with certificate. . . . . . . . . . . . . . . . . . 75 LTIME_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . 506
logout. . . . . . . . . . . . . . . . . . . . . . . . . . 942, 951 LTIME_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . 506
loop LTIME_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . 506
Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 358 LTIME_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . 506
LOWER_BOUND. . . . . . . . . . . . . . . . . . . . . . . 574 LTIME_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . 506
array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 LTIME_TO_USINT. . . . . . . . . . . . . . . . . . . . . . 506
lowercase. . . . . . . . . . . . . . . . . . . . . . . . . . . 885 LTIME_TO_WORD. . . . . . . . . . . . . . . . . . . . . . 506
LREAL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557 LTIME_TO_WSTRING. . . . . . . . . . . . . . . . . . . 506
constant. . . . . . . . . . . . . . . . . . . . . . . . . . 542 LTOD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 495 convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 511
literal. . . . . . . . . . . . . . . . . . . . . . . . . . . . 542 data type. . . . . . . . . . . . . . . . . . . . . . . . . . 559
LREAL_TO___XWORD. . . . . . . . . . . . . . . . . . . 495 keyword. . . . . . . . . . . . . . . . . . . . . . . . . . 546
LREAL_TO__UXINT. . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO___XWORD. . . . . . . . . . . . . . . . . . . . 511
LREAL_TO__XINT. . . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO__UXINT. . . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO__XINT. . . . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_DATE. . . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_DWORD. . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_DWORD. . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_LREAL. . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_LWORD. . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_STRING. . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_LWORD. . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_UDINT. . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . 511
LREAL_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . 495 LTOD_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . 511

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1141 /
1158

LTOD_TO_STRING. . . . . . . . . . . . . . . . . . . . . 511 memory


LTOD_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . 511 display memory snapshot. . . . . . . . . . . . . 908
LTOD_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . . 511 dynamic allocation. . . . . . . . . . . . . . . . . . 524
LTOD_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . 511 reserve for online change. . . . . . . . . . . . . 129
LTOD_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . 511 memory range. . . . . . . . . . . . . . . . . . . . . . . . 552
LTOD_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . 511 memory reserve
LTOD_TO_USINT. . . . . . . . . . . . . . . . . . . . . . . 511 configure. . . . . . . . . . . . . . . . . . . . . . . . . . 129
LTOD_TO_WORD. . . . . . . . . . . . . . . . . . . . . . 511 function block. . . . . . . . . . . . . . . . . . . . . . 911
LTOD_TO_WSTRING. . . . . . . . . . . . . . . . . . . . 511 online change. . . . . . . . . . . . . . . . . . . . . . 911
LWORD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 memory view. . . . . . . . . . . . . . . . . . . . . . . . . 908
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482 menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1094
LWORD_TO___UXINT. . . . . . . . . . . . . . . . . . . 482 customize. . . . . . . . . . . . . . . . . . . . . . . . . . 47
LWORD_TO___XINT. . . . . . . . . . . . . . . . . . . . 482 message
LWORD_TO___XWORD. . . . . . . . . . . . . . . . . . 482 go to source position. . . . . . . . . . . . . . . . 893
LWORD_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . 482 next. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880
LWORD_TO_BOOL. . . . . . . . . . . . . . . . . . . . . 482 previous. . . . . . . . . . . . . . . . . . . . . . . . . . 880
LWORD_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . 482 message pragma. . . . . . . . . . . . . . . . . . . . . . 596
LWORD_TO_DATE. . . . . . . . . . . . . . . . . . . . . . 482 Message window. . . . . . . . . . . . . . . . . . . . . . 898
LWORD_TO_DINT. . . . . . . . . . . . . . . . . . . . . . 482 Meta information. . . . . . . . . . . . . . . . . . . . 58, 64
LWORD_TO_DT. . . . . . . . . . . . . . . . . . . . . . . 482 Entering for project. . . . . . . . . . . . . . . 58, 64
LWORD_TO_DWORD. . . . . . . . . . . . . . . . . . . 482 method
LWORD_TO_INT. . . . . . . . . . . . . . . . . . . . . . . 482 call. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
LWORD_TO_LDATE. . . . . . . . . . . . . . . . . . . . . 482 call recursively. . . . . . . . . . . . . . . . . . . . . 226
LWORD_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . 482 call with external implementation. . . . . . 130
LWORD_TO_LINT. . . . . . . . . . . . . . . . . . . . . . 482 FB_Init, FB_Reinit, FB_Exit. . . . . . . . . . . . 660
LWORD_TO_LREAL. . . . . . . . . . . . . . . . . . . . 482 interface. . . . . . . . . . . . . . . . . . . . . . . . . . 835
LWORD_TO_LTIME. . . . . . . . . . . . . . . . . . . . . 482 monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . 296
LWORD_TO_LTOD. . . . . . . . . . . . . . . . . . . . . 482 Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 360
LWORD_TO_REAL. . . . . . . . . . . . . . . . . . . . . 482 reaction to type change. . . . . . . . . . . . . . 608
LWORD_TO_SINT. . . . . . . . . . . . . . . . . . . . . . 482 virtual call. . . . . . . . . . . . . . . . . . . . . . . . . 224
LWORD_TO_STRING. . . . . . . . . . . . . . . . . . . 482 Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829
LWORD_TO_TIME. . . . . . . . . . . . . . . . . . . . . . 482 Call. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831
LWORD_TO_TOD. . . . . . . . . . . . . . . . . . . . . . 482 Example recursive call. . . . . . . . . . . . . . . 615
LWORD_TO_UDINT. . . . . . . . . . . . . . . . . . . . . 482 Faculty calculation. . . . . . . . . . . . . . . . . . 615
LWORD_TO_UINT. . . . . . . . . . . . . . . . . . . . . . 482 object-oriented programming. . . . . . . . . . 829
LWORD_TO_ULINT. . . . . . . . . . . . . . . . . . . . . 482 recursive call. . . . . . . . . . . . . . . . . . . . . . . 833
LWORD_TO_USINT. . . . . . . . . . . . . . . . . . . . . 482 METHOD. . . . . . . . . . . . . . . . . . . . . . . . . . . . 829
LWORD_TO_WORD. . . . . . . . . . . . . . . . . . . . 482 Methode. . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
LWORD_TO_WSTRING. . . . . . . . . . . . . . . . . . 482 MIN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
M MOD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
Modbus
M. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
Parameter. . . . . . . . . . . . . . . . . . . . . . . . . 760
memory range prefix. . . . . . . . . . . . . . . . 552
Modifier in IL. . . . . . . . . . . . . . . . . . . . . . . . . 415
M4 interface file for external library. . . . . . . 933
module
macro. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
call tree. . . . . . . . . . . . . . . . . . . . . . . . . . . 889
add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 983
Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 360
insert after. . . . . . . . . . . . . . . . . . . . . . . . 984
Monitor
SFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
Show all forces. . . . . . . . . . . . . . . . . . . . . 280
zoom into. . . . . . . . . . . . . . . . . . . . . . . . . 984
monitoring. . . . . . . . . . . . . . . . . . . . . . . . . . . 291
zoom out of. . . . . . . . . . . . . . . . . . . . . . . . 984
area for arrays. . . . . . . . . . . . . . . . . . . . . 1043
magnification tool. . . . . . . . . . . . . . . . . . . . . 378
display mode. . . . . . . . . . . . . . . . . . . . . . 961
main action. . . . . . . . . . . . . . . . . . . . . . . . . . 403
function call. . . . . . . . . . . . . . . . . . . . . . . 629
manage localizations. . . . . . . . . . . . . . . . . . . 928
inline. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Manage software add-ons. . . . . . . . . . . . . . . 963
pragma. . . . . . . . . . . . . . . . . . . . . . . . . . . 629
mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
properties. . . . . . . . . . . . . . . . . . . . . . . . 1060
I/O mapping. . . . . . . . . . . . . . . . . . . . . . . 119
property. . . . . . . . . . . . . . . . . . . . . . . . . . 629
mapping (see I/O mapping). . . . . . . . . . . . . 120
SFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
MAX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470

R911403764, Edition 08 Bosch Rexroth AG


1142 / ctrlX PLC Engineering
1158

Monitoring Network variables list (receiver)


Activate inline monitoring. . . . . . . . . . . . . 887 add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783
Array area. . . . . . . . . . . . . . . . . . . . . . . . . 377 NEW. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
CFC Editor. . . . . . . . . . . . . . . . . . . . . . . . 430 Next message. . . . . . . . . . . . . . . . . . . . . . . . 898
Feature. . . . . . . . . . . . . . . . . . . . . . . 630, 631 no_assign_warning, pragma. . . . . . . . . . . . . . 632
Function call. . . . . . . . . . . . . . . . . . . 630, 631 no_assign, pragma. . . . . . . . . . . . . . . . . . . . . 632
Monitoring interval. . . . . . . . . . . . . . . . . 1059 no_check, Pragma. . . . . . . . . . . . . . . . . . . . . 633
Pragma. . . . . . . . . . . . . . . . . . . . . . . 630, 631 no_copy, pragma attribute. . . . . . . . . . . . . . . 634
Monitoring area. . . . . . . . . . . . . . . . . . . . . . . 377 no_fast_online_change. . . . . . . . . . . . . . . . . . 625
Dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 no_instance_in_retain, pragma. . . . . . . . . . . 635
Monitoring function. . . . . . . . . . . . . . . . . . . . 160 no_virtual_actions, pragma. . . . . . . . . . . . . . 635
implicit. . . . . . . . . . . . . . . . . . . . . . . . . . . 846 no-exit, pragma. . . . . . . . . . . . . . . . . . . . . . . 634
Monitoring list node address. . . . . . . . . . . . . . . . . . . . . . . . . 236
Add variable. . . . . . . . . . . . . . . . . . . . . . 1034 noinit, pragma. . . . . . . . . . . . . . . . . . . . . . . . 634
MOVE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 NOT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
move down. . . . . . . . . . . . . . . . . . . . . . . . . 1012 NOT, Operator in pragma. . . . . . . . . . . . . . . 603
move up. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1013 Number constants. . . . . . . . . . . . . . . . . . . . . 542
MUL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 NVL (receiver). . . . . . . . . . . . . . . . . . . . . . . . 783
multicore NVL (Sender). . . . . . . . . . . . . . . . . . . . . . . . . 783
use task-local global variable list. . . . . . . 168 O
Multicore. . . . . . . . . . . . . . . . . . . . . . . . 209, 865
object
Trace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
edit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915
Multicore operator
edit (offline). . . . . . . . . . . . . . . . . . . . . . . 929
__COMPARE_AND_SWAP. . . . . . . . . . . . . . 534
edit with. . . . . . . . . . . . . . . . . . . . . . . . . . 915
__XADD. . . . . . . . . . . . . . . . . . . . . . . . . . . 535
find. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 899
TEST_AND_SET. . . . . . . . . . . . . . . . . . . . . 537
link to file. . . . . . . . . . . . . . . . . . . . . . . . 1057
MUX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
select in device tree. . . . . . . . . . . . . . . . . 976
N select parent object in device tree. . . . . . 976
namespace Object
enumeration. . . . . . . . . . . . . . . . . . . . . . . 538 Access right. . . . . . . . . . . . . . . . . . . . . . . . 78
GVL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538 Add, command. . . . . . . . . . . . . . . . . . . . . 932
Namespace. . . . . . . . . . . . . . . . . . . . . . . . . . 651 creating in the project. . . . . . . . . . . . . . . . 61
automatic. . . . . . . . . . . . . . . . . . . . . . . . 1082 DataLayer_Realtime. . . . . . . . . . . . . . . . . 763
Library. . . . . . . . . . . . . . . . . . . . . . . . . . . 538 device (ctrlX CORE). . . . . . . . . . . . . . . . . 762
of variables. . . . . . . . . . . . . . . . . . . . . . . . 651 ethercat_master_instances_ethercatmaster. .
Naming convention. . . . . . . . . . . . . . . . . . . . 651 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763
NE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 Open detailed compare view. . . . . . . . . . . 71
Negate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986 Properties. . . . . . . . . . . . . . . . . . . . . . . . 1047
negated coil. . . . . . . . . . . . . . . . . . . . . . . . . . 423 obsolete, pragma. . . . . . . . . . . . . . . . . . . . . . 639
negated contact. . . . . . . . . . . . . . . . . . . . . . 423 occurrence location
negation, fbd/ld/il. . . . . . . . . . . . . . . . . . . . 1003 variable. . . . . . . . . . . . . . . . . . . . . . . . . . . 204
network Octal number. . . . . . . . . . . . . . . . . . . . . . . . 542
address. . . . . . . . . . . . . . . . . . . . . . . . . . . 235 OF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
addressing. . . . . . . . . . . . . . . . . . . . . . . . 233 array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569
comment out. . . . . . . . . . . . . . . . . . . . . . 998 online
FBD/LD/IL. . . . . . . . . . . . . . . . . . . . . . . . . 419 logout from application. . . . . . . . . . . . . . 942
FBD/LD/IL, insert. . . . . . . . . . . . . . . . . . . 997 pointer reference. . . . . . . . . . . . . . . . . . . 893
FBD/LD/IL, insert below. . . . . . . . . . . . . . 997 Online
jump. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1007 Login to application. . . . . . . . . . . . . . . . . 939
settings. . . . . . . . . . . . . . . . . . . . . . . . . . 1055 Multiple download. . . . . . . . . . . . . . . . . . 946
topology. . . . . . . . . . . . . . . . . . . . . . . . . . 233 online change
Network variable list (receiver). . . . . . . . . . . 783 memory reserve. . . . . . . . . . . . . . . . . . . . 129
Network variable list (sender). . . . . . . . . . . . 783 Online change. . . . . . . . . . . . . . . . . . . . . . . . 943
Network variable list (Sender) Active application. . . . . . . . . . . . . . . . . . . 943
add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783 Attribute. . . . . . . . . . . . . . . . . . . . . . . . . . 625
Network variables. . . . . . . . . . . . . . . . . . . . . 238 Compiler definition. . . . . . . . . . . . . . . . . . 625
Properties. . . . . . . . . . . . . . . . . . . . . . . . 1054 Selected application. . . . . . . . . . . . . . . . . 943

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1143 /
1158

online config mode. . . . . . . . . . . . . . . . . . . . 930 P


Online configuration mode. . . . . . . . . . . . . . 117 pack_mode, pragma. . . . . . . . . . . . . . . . . . . 639
Online operation Packages
Status devices. . . . . . . . . . . . . . . . . . . . . 114 Import wizard. . . . . . . . . . . . . . . . . . . . . 1035
Task monitoring. . . . . . . . . . . . . . . . . . . . 863 page
OPC UA CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
Information model repository. . . . . . . . . . 971 page size
OPC UA server / client edit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 985
Apps for ctrlX devices. . . . . . . . . . . . . . . 1109 page-oriented. . . . . . . . . . . . . . . . . . . . . . . . 428
open in the IDE. . . . . . . . . . . . . . . . . . . . . . . 936 CFC object. . . . . . . . . . . . . . . . . . . . . . . . 428
Operand. . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 pane
Operands next. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 974
Variable. . . . . . . . . . . . . . . . . . . . . . . . . . . 541 previous. . . . . . . . . . . . . . . . . . . . . . . . . . 974
operating mode panning tool. . . . . . . . . . . . . . . . . . . . . . . . . 378
debug. . . . . . . . . . . . . . . . . . . . . . . . . . . . 955 parallel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980
locked. . . . . . . . . . . . . . . . . . . . . . . . . . . . 955 parameter
operational. . . . . . . . . . . . . . . . . . . . . . . . 955 update, fbd/ld/il cfc. . . . . . . . . . . . . . . . 1005
operational, operating mode. . . . . . . . . . . . . 955 Parameter
Operator. . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 CANbus. . . . . . . . . . . . . . . . . . . . . . . . . . . 760
Address operators. . . . . . . . . . . . . . . . . . 457 Device editor. . . . . . . . . . . . . . . . . . . . . . 760
Arithmetic operators. . . . . . . . . . . . . . . . . 456 Modbus. . . . . . . . . . . . . . . . . . . . . . . . . . . 760
Binding strength. . . . . . . . . . . . . . . . . . . . 380 PROFIBUS DP. . . . . . . . . . . . . . . . . . . . . . 760
Bit shift operators. . . . . . . . . . . . . . . . . . . 456 PROFINET IO. . . . . . . . . . . . . . . . . . . . . . 760
Bit string operators. . . . . . . . . . . . . . . . . . 456 parameter mode. . . . . . . . . . . . . . . . . . . . . . 930
Call operators. . . . . . . . . . . . . . . . . . . . . . 457 Parameter mode. . . . . . . . . . . . . . . . . . . . . . 117
Comparison operators. . . . . . . . . . . . . . . 456 parameters
IL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 edit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 991
More operators. . . . . . . . . . . . . . . . . . . . . 458 PARAMS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
Multicore operators. . . . . . . . . . . . . . . . . 458 Password
Namespace operators. . . . . . . . . . . . . . . . 458 Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Numerical operators. . . . . . . . . . . . . . . . . 458 Project setting. . . . . . . . . . . . . . . . . . . . 1064
Order. . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 specify when logging in. . . . . . . . . . . . . . . 82
Selection operators. . . . . . . . . . . . . . . . . 456 Password manager. . . . . . . . . . . . . . . . . . . . . 76
Type conversion operators. . . . . . . . . . . . 457 paste after. . . . . . . . . . . . . . . . . . . . . . . . . . . 984
options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 966 Persistence. . . . . . . . . . . . . . . . . . . . . . . . . . 211
Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 965 Clean gaps. . . . . . . . . . . . . . . . . . . . . . . 1013
Development system. . . . . . . . . . . . . . . . . 47 Rearrange gaps. . . . . . . . . . . . . . . . . . . . 1013
Device editor. . . . . . . . . . . . . . . . . . . . . 1082 Recipe. . . . . . . . . . . . . . . . . . . . . . . . . . . 1013
Import wizard. . . . . . . . . . . . . . . . . . . . . 1035 persistence editor. . . . . . . . . . . . . . . . . . . . . 778
OR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 PERSISTENT. . . . . . . . . . . . . . . . . . . . . . . . . 447
OR_ELSE. . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 variable. . . . . . . . . . . . . . . . . . . . . . . . . . . 214
OR, Pragma. . . . . . . . . . . . . . . . . . . . . . . . . . 604 Variable. . . . . . . . . . . . . . . . . . . . . . . . . . . 447
order persistent variable
pin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638 declare. . . . . . . . . . . . . . . . . . . . . . . . . . . 218
ORN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 Persistent variable. . . . . . . . . . . . . . . . . . . . . 211
output Save in recipe. . . . . . . . . . . . . . . . . . . . . . 219
assign ST. . . . . . . . . . . . . . . . . . . . . . . . . 381 persistent variable list. . . . . . . . . . . . . . . . . . 778
CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 pin
device. . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 993
reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986 select. . . . . . . . . . . . . . . . . . . . . . . . . . . . 993
output memory. . . . . . . . . . . . . . . . . . . . . . . 552 pin_presentation_order_inputs, pragma attribute
output pin order. . . . . . . . . . . . . . . . . . . . . . 638 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
Output variable. . . . . . . . . . . . . . . . . . . . . . . 439 pin_presentation_order_outputs, pragma
Overflow data type. . . . . . . . . . . . . . . . . . . . 455 attribute. . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
Overload. . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 pingroup, pragma. . . . . . . . . . . . . . . . . . . . . 637
pins
remove. . . . . . . . . . . . . . . . . . . . . . . . . . . 993

R911403764, Edition 08 Bosch Rexroth AG


1144 / ctrlX PLC Engineering
1158

Placeholder. . . . . . . . . . . . . . . . . . . . . . . . . 1010 power function. . . . . . . . . . . . . . . . . . . . . . . 519


Library. . . . . . . . . . . . . . . . . . . . . . . . . . 1010 operator. . . . . . . . . . . . . . . . . . . . . . . . . . 519
PLC pragma
read parameter file to configuration. . . . . 931 dataflow. . . . . . . . . . . . . . . . . . . . . . . . . . 612
Security. . . . . . . . . . . . . . . . . . . . . . . . . . 375 effect on symbol. . . . . . . . . . . . . . . . . . . . 648
PLC Engineering enable_dynamic_creation. . . . . . . . . . . . . 614
Creating a project for the ctrlX CORE target message. . . . . . . . . . . . . . . . . . . . . . . . . . 596
system. . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 no_copy. . . . . . . . . . . . . . . . . . . . . . . . . . . 634
Creating projects. . . . . . . . . . . . . . . . . . . . 53 ProcessValue. . . . . . . . . . . . . . . . . . 645, 996
PLC log. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 region. . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
PLC parameter file. . . . . . . . . . . . . . . . . . . . . 119 Pragma. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
PLC settings Attributes. . . . . . . . . . . . . . . . . . . . . . . . . 605
device editor. . . . . . . . . . . . . . . . . . . . . . . 758 conditional. . . . . . . . . . . . . . . . . . . . . . . . 597
PLC shell. . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 define. . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
PLC Shell hasattribute. . . . . . . . . . . . . . . . . . . . . . . 597
Device editor. . . . . . . . . . . . . . . . . . . . . . 756 hasconstantvalue. . . . . . . . . . . . . . . . . . . 597
PLC templates hastype. . . . . . . . . . . . . . . . . . . . . . . . . . . 597
Compiler check functions. . . . . . . . . . . . . 101 if. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
Integrate customized templates in PLC undefine. . . . . . . . . . . . . . . . . . . . . . . . . . 597
Engineering. . . . . . . . . . . . . . . . . . . . . . . . 102 use. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Template for CheckFunctions. . . . . . . . . . 101 prepare value. . . . . . . . . . . . . . . . . . . . . . . . 1041
Template for Motion interface. . . . . . . . . 102 Previous message. . . . . . . . . . . . . . . . . . . . . 898
plcload print
DeviceTrace. . . . . . . . . . . . . . . . . . . . . . . 211 page setup. . . . . . . . . . . . . . . . . . . . . . . 1063
PLCopenXML Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 350
export/import. . . . . . . . . . . . . . . . . . . . . . 923 PRIVATE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829
import. . . . . . . . . . . . . . . . . . . . . . . . . . . . 923 Method. . . . . . . . . . . . . . . . . . . . . . . . . . . 829
option. . . . . . . . . . . . . . . . . . . . . . . . . . . 1085 Property. . . . . . . . . . . . . . . . . . . . . . . . . . 839
po file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Private Key. . . . . . . . . . . . . . . . . . . . . . . . . . . 374
pointer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566 Processing order
index access. . . . . . . . . . . . . . . . . . . . . . . 567 in ST. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
THIS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 processing order in SFC. . . . . . . . . . . . . . . . 392
Pointer Processor load. . . . . . . . . . . . . . . . . . . . . . . 211
Monitoring function CheckPointer. . . . . . 859 Trace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
SUPER. . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 ProcessValue. . . . . . . . . . . . . . . . . . . . . . . . . 645
POINTER TO. . . . . . . . . . . . . . . . . . . . . . . . . 566 Products
pointers activate. . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Go To Reference. . . . . . . . . . . . . . . . . . . . 893 PROFIBUS DP
POOL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 Parameter. . . . . . . . . . . . . . . . . . . . . . . . . 760
position PROFINET IO
breakpoint. . . . . . . . . . . . . . . . . . . . . . . 1043 Parameter. . . . . . . . . . . . . . . . . . . . . . . . . 760
POSITION. . . . . . . . . . . . . . . . . . . . . . . . . . . 536 Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822
pot file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Property. . . . . . . . . . . . . . . . . . . . . . . . . . 839
POU. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 820 PROGRAM. . . . . . . . . . . . . . . . . . . . . . . . . . . 822
add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 821 project
Change type. . . . . . . . . . . . . . . . . . . . . . 1012 add folder. . . . . . . . . . . . . . . . . . . . . . . . . 932
cross references. . . . . . . . . . . . . . . . . . . . 889 commit accepted changes. . . . . . . . . . . . 922
global cross references. . . . . . . . . . . . . . . 889 document. . . . . . . . . . . . . . . . . . . . . . . . . 917
implicit check. . . . . . . . . . . . . . . . . . . . . . 846 include with source code management. . . 88
monitor function call. . . . . . . . . . . . . . . . 297 install in the library repository. . . . . . . . . 875
POUs view. . . . . . . . . . . . . . . . . . . . . . . . 900 localization. . . . . . . . . . . . . . . . . . . . . . . . 928
POU for implicit checks. . . . . . . . . . . . . . . . . 160 manage localizations. . . . . . . . . . . . . . . . 928
POU locations. . . . . . . . . . . . . . . . . . . . . . . . 764 toggle localization. . . . . . . . . . . . . . . . . . . 927
POU view Project
reference an object. . . . . . . . . . . . . . . . . . 539 Access data. . . . . . . . . . . . . . . . . . . . . . . . . 82
syntax check. . . . . . . . . . . . . . . . . . . . . . . 935 Access protection. . . . . . . . . . . . . . . . . . . . 75
POUNAME. . . . . . . . . . . . . . . . . . . . . . . . . . . 536 Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
POUs view. . . . . . . . . . . . . . . . . . . . . . . . . . . 900 close. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 870

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1145 /
1158

compare. . . . . . . . . . . . . . . . . . . . . . . 71, 917 Project settings. . . . . . . . . . . . . . . . . . . . . . . 761


create new. . . . . . . . . . . . . . . . . . . . . . . . 868 Select. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Create property with key. . . . . . . . . . . 58, 64 Users and groups. . . . . . . . . . . . . . . . . . 1061
Dongle. . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Project synchronization
Encryption. . . . . . . . . . . . . . . . . . . . . . 75, 80 Activate. . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Encryption, instructions. . . . . . . . . . . . . . . 85 Introduction. . . . . . . . . . . . . . . . . . . . . . . . 97
Export/import. . . . . . . . . . . . . . . . . . . . . . . 67 Online behavior. . . . . . . . . . . . . . . . . . . . . 98
file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Functions for property access. . . . . . . 59, 65 Status display. . . . . . . . . . . . . . . . . . . . . . . 97
last used. . . . . . . . . . . . . . . . . . . . . . . . . . 874 Synchronization conflict. . . . . . . . . . . . . . . 98
open. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869 properties
Open compare view. . . . . . . . . . . . . . . . . . 72 access control. . . . . . . . . . . . . . . . . . . . . 1049
open with command line. . . . . . . . . . . . . 322 bitmap. . . . . . . . . . . . . . . . . . . . . . . . . . 1052
open, option. . . . . . . . . . . . . . . . . . . . . . 1084 boot application. . . . . . . . . . . . . . . . . . . 1049
Password. . . . . . . . . . . . . . . . . . . . . . . . . . 79 build, C-integration. . . . . . . . . . . . . . . . . 1051
Password protection. . . . . . . . . . . . . . . . . . 75 cam. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1057
Project settings. . . . . . . . . . . . . . . . . . . . . . 60 common. . . . . . . . . . . . . . . . . . . . . . . . . 1048
Properties. . . . . . . . . . . . . . . . . . . . . . . . . . 53 image pool. . . . . . . . . . . . . . . . . . . . . . . 1058
Protection. . . . . . . . . . . . . . . . . . . . . . . . . . 75 link to file. . . . . . . . . . . . . . . . . . . . . . . . 1057
Query information. . . . . . . . . . . . . . . . 58, 64 monitoring. . . . . . . . . . . . . . . . . . . . . . . 1060
released. . . . . . . . . . . . . . . . . . . . . . . . . . . 79 network settings. . . . . . . . . . . . . . . . . . . 1055
restore. . . . . . . . . . . . . . . . . . . . . . . . . . 1084 SFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1056
Rights management. . . . . . . . . . . . . . . . . . 78 task configuration. . . . . . . . . . . . . . . . . . . 861
save. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 text list. . . . . . . . . . . . . . . . . . . . . . . . . . 1059
save as compiled library. . . . . . . . . . . . . . 875 Properties
save as, command. . . . . . . . . . . . . . . . . . 871 Build. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1048
save as.... . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Device. . . . . . . . . . . . . . . . . . . . . . . . . . . 1059
Save to repository. . . . . . . . . . . . . . . . . . . . 87 Encryption. . . . . . . . . . . . . . . . . . . . . . . 1049
Security. . . . . . . . . . . . . . . . . . . . . . . . . . . 75 External file. . . . . . . . . . . . . . . . . . . . . . . 1051
Template. . . . . . . . . . . . . . . . . . . . . . . . . . 868 Network variables. . . . . . . . . . . . . . . . . . 1054
transfer. . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 of an object. . . . . . . . . . . . . . . . . . . . . . . 1047
User administration. . . . . . . . . . . . . . . . . . 80 property
Write protection. . . . . . . . . . . . . . . . . . 75, 79 CFC execution order. . . . . . . . . . . . . . . . 1055
Project archive monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . 294
extract with command line. . . . . . . . . . . . 322 SFC, do not display embedded objects. . 985
Project comparison Property
Configuration. . . . . . . . . . . . . . . . . . . . . . 918 Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . 839
Detail. . . . . . . . . . . . . . . . . . . . . . . . . . . . 920 object-oriented programming. . . . . . . . . . 839
Differences. . . . . . . . . . . . . . . . . . . . . . . . 918 PROPERTY. . . . . . . . . . . . . . . . . . . . . . . . . . . 839
Project compression. . . . . . . . . . . . . . . . . . 1084 Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . 839
project documentation print. . . . . . . . . . . . . 917 PROTECTED. . . . . . . . . . . . . . . . . . . . . . . . . 829
project environment Method. . . . . . . . . . . . . . . . . . . . . . . . . . . 829
symbol library in visualization. . . . . . . . 1072 Property. . . . . . . . . . . . . . . . . . . . . . . . . . 839
visualization profile. . . . . . . . . . . . . . . . . 1071 Protection
visualization style. . . . . . . . . . . . . . . . . . 1071 Data security. . . . . . . . . . . . . . . . . . . . . . . 262
project localization. . . . . . . . . . . . . . . . . . . . 107 Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
create template. . . . . . . . . . . . . . . . . . . . . 928 Proxy
localization template. . . . . . . . . . . . . . . . 107 Access data. . . . . . . . . . . . . . . . . . . . . . . 1085
manage. . . . . . . . . . . . . . . . . . . . . . . . . . . 928 Server, option. . . . . . . . . . . . . . . . . . . . . 1085
toggle. . . . . . . . . . . . . . . . . . . . . . . . . . . . 927 Server, setting. . . . . . . . . . . . . . . . . . . . 1085
Project setting PUBLIC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829
Command. . . . . . . . . . . . . . . . . . . . . . . . . 915 Method. . . . . . . . . . . . . . . . . . . . . . . . . . . 829
User administration. . . . . . . . . . . . . . . . . . 80 Property. . . . . . . . . . . . . . . . . . . . . . . . . . 839
project settings Public Key. . . . . . . . . . . . . . . . . . . . . . . . . . . 374
SFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1065 Python
visualization. . . . . . . . . . . . . . . . . . . . . . 1069 .NET API . . . . . . . . . . . . . . . . . . . . . . . . . . 349
basic syntax. . . . . . . . . . . . . . . . . . . . . . . 350
Boolean types. . . . . . . . . . . . . . . . . . . . . . 352

R911403764, Edition 08 Bosch Rexroth AG


1146 / ctrlX PLC Engineering
1158

class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360 REAL_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . 495


cPython. . . . . . . . . . . . . . . . . . . . . . . . . . . 371 REAL_TO_STRING. . . . . . . . . . . . . . . . . . . . . 495
Create program module. . . . . . . . . . . . . . 366 REAL_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . 495
data types. . . . . . . . . . . . . . . . . . . . . . . . . 352 REAL_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . 495
dictionary. . . . . . . . . . . . . . . . . . . . . . . . . 356 REAL_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . 495
Edit program block. . . . . . . . . . . . . . . . . . 366 REAL_TO_WORD. . . . . . . . . . . . . . . . . . . . . . 495
floating-point types. . . . . . . . . . . . . . . . . . 352 REAL_TO_WSTRING. . . . . . . . . . . . . . . . . . . . 495
function. . . . . . . . . . . . . . . . . . . . . . . . . . 360 Rearranging the list. . . . . . . . . . . . . . . . . . . 1013
IF/ELSE. . . . . . . . . . . . . . . . . . . . . . . . . . . 359 recipe. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787
in PLC Engineering. . . . . . . . . . . . . . . . . . 349 load from device. . . . . . . . . . . . . . . . . . . 1020
integer types. . . . . . . . . . . . . . . . . . . . . . . 352 remanent variable. . . . . . . . . . . . . . . . . . . 217
Interaction with user. . . . . . . . . . . . . . . . 367 Recipe. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
IronPython. . . . . . . . . . . . . . . . . . . . 348, 371 create. . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
list. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 insert. . . . . . . . . . . . . . . . . . . . . . . . . . . 1017
loop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 Insert variable. . . . . . . . . . . . . . . . . . . . . 1017
method. . . . . . . . . . . . . . . . . . . . . . . . . . . 360 load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1018
module. . . . . . . . . . . . . . . . . . . . . . . . . . . 360 load and write. . . . . . . . . . . . . . . . . . . . . 1019
print. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350 Load from file. . . . . . . . . . . . . . . . . . . . . . 288
Project device tree. . . . . . . . . . . . . . . . . . 363 read. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1019
Python2. . . . . . . . . . . . . . . . . . . . . . . . . . 371 read and save. . . . . . . . . . . . . . . . . . . . . 1020
Python3. . . . . . . . . . . . . . . . . . . . . . . . . . 371 remove. . . . . . . . . . . . . . . . . . . . . . . . . . 1018
Read variables. . . . . . . . . . . . . . . . . . . . . 364 Remove variables. . . . . . . . . . . . . . . . . . 1020
standard library. . . . . . . . . . . . . . . . . . . . 360 save. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1018
strings. . . . . . . . . . . . . . . . . . . . . . . . 354, 371 Save values. . . . . . . . . . . . . . . . . . . . . . . 1013
tuple. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 write. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1019
variables. . . . . . . . . . . . . . . . . . . . . . . . . . 352 recipe definition. . . . . . . . . . . . . . . . . . . . . . 787
Q Recipe file
Load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
Q. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
Recipe management. . . . . . . . . . . . . . . . . . . 287
memory range prefix. . . . . . . . . . . . . . . . 552
Memory consumption. . . . . . . . . . . . . . . . 289
qualified_only, pragma. . . . . . . . . . . . . . . . . . 645
Recipe Manager. . . . . . . . . . . . . . . . . . . . . . . 784
qualifiers for SFC actions. . . . . . . . . . . . . . . 394
Recording, see data recording. . . . . . . . . . 1098
QUERYINTERFACE. . . . . . . . . . . . . . . . . . . . . 527
REF=. . . . . . . . . . . . . . . . . . . . . . . . . . . 384, 567
QUERYPOINTER. . . . . . . . . . . . . . . . . . . . . . . 528
refactoring. . . . . . . . . . . . . . . . . . . . . . . . . . . 150
R add variable. . . . . . . . . . . . . . . . . . . . . . . 895
R=. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 add/remove variable. . . . . . . . . . . . . . . . . 151
Reset assignment. . . . . . . . . . . . . . . . . . . 383 declaration order of variables. . . . . . . . . . 152
Ranking order, ST. . . . . . . . . . . . . . . . . . . . . 380 remove variable. . . . . . . . . . . . . . . . . . . . 896
READ_ONLY. . . . . . . . . . . . . . . . . . . . . . . . . . 659 rename. . . . . . . . . . . . . . . . . . . . . . . . . . . 894
READ_WRITE. . . . . . . . . . . . . . . . . . . . . . . . . 659 rename variable. . . . . . . . . . . . . . . . . . . . 150
REAL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557 reorder variables. . . . . . . . . . . . . . . . . . . . 897
constant. . . . . . . . . . . . . . . . . . . . . . . . . . 542 update referenced pins. . . . . . . . . . . . . . . 895
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 495 Refactoring
literal. . . . . . . . . . . . . . . . . . . . . . . . . . . . 542 Option. . . . . . . . . . . . . . . . . . . . . . . . . . . 1086
REAL_TO___UXINT. . . . . . . . . . . . . . . . . . . . . 495 reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
REAL_TO___XINT. . . . . . . . . . . . . . . . . . . . . . 495 __ISVALIDREF. . . . . . . . . . . . . . . . . . . . . . 568
REAL_TO___XWORD. . . . . . . . . . . . . . . . . . . . 495 data type. . . . . . . . . . . . . . . . . . . . . . . . . . 567
REAL_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . . 495 test operator. . . . . . . . . . . . . . . . . . . . . . . 568
REAL_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . 495 valid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
REAL_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . 495 REFERENCE TO. . . . . . . . . . . . . . . . . . . . . . . 567
REAL_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . 495 reflection. . . . . . . . . . . . . . . . . . . . . . . . 627, 645
REAL_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . 495 pragma attribute. . . . . . . . . . . . . . . . . . . . 645
REAL_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . 495 remanent
REAL_TO_DWORD. . . . . . . . . . . . . . . . . . . . . 495 recipe. . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
REAL_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . 495 Remanent. . . . . . . . . . . . . . . . . . . . . . . . . . . 447
REAL_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . 495 Variable. . . . . . . . . . . . . . . . . . . . . . . . . . . 447
REAL_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . 495 Remote Alarms
REAL_TO_LWORD. . . . . . . . . . . . . . . . . . . . . 495 Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . 774

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1147 /
1158

remote data ROR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468


visualize. . . . . . . . . . . . . . . . . . . . . . . . . . 253 routing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
remove run
IL line. . . . . . . . . . . . . . . . . . . . . . . . . . . 1003 stepping. . . . . . . . . . . . . . . . . . . . . . . . . . 275
Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986 to cursor. . . . . . . . . . . . . . . . . . . . . . . . . . 958
Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986 using step out. . . . . . . . . . . . . . . . . . . . . . 958
unused parameters, FBD/LD. . . . . . . . . 1005 Runtime system
remove force list. . . . . . . . . . . . . . . . . . . . . . 960 Security. . . . . . . . . . . . . . . . . . . . . . . . . . 375
remove unused FB call parameters. . . . . . . 1005 runtime system files
rename generate . . . . . . . . . . . . . . . . . . . . . . . . . . 933
refactoring. . . . . . . . . . . . . . . . . . . . . . . . 894 S
repair
S=. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1006
Set assignment. . . . . . . . . . . . . . . . . . . . . 382
REPEAT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Safety instructions. . . . . . . . . . . . . . . . . . . . . 37
replace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
sample
Replace
show in the trace editor. . . . . . . . . . . . . . 298
Command. . . . . . . . . . . . . . . . . . . . . . . . . 877
samples
Repository. . . . . . . . . . . . . . . . . . . . . . . . 87, 969
save in trace file. . . . . . . . . . . . . . . . . . . . 299
Information model OPC UA. . . . . . . . . . . 971
Save
Library. . . . . . . . . . . . . . . . . . . . . . . . . . . 969
Project. . . . . . . . . . . . . . . . . . . . . . . . . 78, 85
OPC UA information models. . . . . . . . . . . 971
Project archive. . . . . . . . . . . . . . . . . . . . . . 87
reserve memory
Project, option. . . . . . . . . . . . . . . . . . . . 1084
online change. . . . . . . . . . . . . . . . . . . . . . 911
save the project. . . . . . . . . . . . . . . . . . . . . . . 870
reset
scalar product. . . . . . . . . . . . . . . . . . . . . . . . 579
application (reset cold). . . . . . . . . . . . . . 948
SCE in LD. . . . . . . . . . . . . . . . . . . . . . . . . . . 421
application (reset origin). . . . . . . . . . . . . 949
Script
application (reset warm). . . . . . . . . . . . . 949
call via menu command. . . . . . . . . . . . . . 342
cold. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 948
call via user-defined toolbar. . . . . . . . . . . 344
device to origin. . . . . . . . . . . . . . . . . . . . . 950
Command line. . . . . . . . . . . . . . . . . . . . . 343
origin. . . . . . . . . . . . . . . . . . . . . . . . . . . . 949
Enable tracing. . . . . . . . . . . . . . . . . . . . . . 965
origin device. . . . . . . . . . . . . . . . . . . . . . . 950
execute. . . . . . . . . . . . . . . . . . . . . . . . . . . 965
warm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 949
IronPython. . . . . . . . . . . . . . . . . . . . . . . . 348
Reset
run. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 964
Application. . . . . . . . . . . . . . . . . . . . . . . . 281
Script file
Assignment ST. . . . . . . . . . . . . . . . . . . . . 383
execute with command line. . . . . . . . . . . 322
output. . . . . . . . . . . . . . . . . . . . . . . . . . . . 986
ScriptEngine
remove. . . . . . . . . . . . . . . . . . . . . . . . . . . 986
Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 349
reset coil. . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
scripting
Reset coil. . . . . . . . . . . . . . . . . . . . . . . . . . . 1000
Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 349
reset origin. . . . . . . . . . . . . . . . . . . . . . . . . . 949
Python .NET API. . . . . . . . . . . . . . . . . . . . 349
application. . . . . . . . . . . . . . . . . . . . . . . . 949
Scripting
restore. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Enable script tracing. . . . . . . . . . . . . . . . . 965
Restore values from recipe. . . . . . . . . . . . . 1014
Run script file. . . . . . . . . . . . . . . . . . . . . . 964
RET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
search. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
RETAIN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449
object. . . . . . . . . . . . . . . . . . . . . . . . . . . . 899
remanent variable. . . . . . . . . . . . . . . . . . . 217
Search. . . . . . . . . . . . . . . . . . . . . . 878, 879, 880
Variable. . . . . . . . . . . . . . . . . . . . . . . . . . . 449
Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . 116
RETC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Find next. . . . . . . . . . . . . . . . . . . . . . . . . . 879
RETCN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Search order
return
Identifier. . . . . . . . . . . . . . . . . . . . . . . . . . 656
CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Variable name. . . . . . . . . . . . . . . . . . . . . . 656
FBD/LD/IL. . . . . . . . . . . . . . . . . . . . . . . . . 421
security
insert, FBD/LD/IL. . . . . . . . . . . . . . . . . . 1000
add device user. . . . . . . . . . . . . . . . . . . . 951
RETURN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
certificates. . . . . . . . . . . . . . . . . . . . . . . . 908
Rights management. . . . . . . . . . . . . . . . . . . . . 76
password device user. . . . . . . . . . . . . . . . 952
Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
remove device user. . . . . . . . . . . . . . . . . . 952
rising edge detection. . . . . . . . . . . . . . . . . . 1004
WebVisu. . . . . . . . . . . . . . . . . . . . . . . . . . 376
ROL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467

R911403764, Edition 08 Bosch Rexroth AG


1148 / ctrlX PLC Engineering
1158

Security programming. . . . . . . . . . . . . . . . . . . . . . 193


Certificate. . . . . . . . . . . . . . . . . . . . . . . . . 374 project settings. . . . . . . . . . . . . . . . . . . . 1065
Certificates. . . . . . . . . . . . . . . . . . . . . . . . . 75 properties. . . . . . . . . . . . . . . . . . . . . . . . 1056
Data security. . . . . . . . . . . . . . . . . . . . . . . 262 step. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
Development system. . . . . . . . . . . . . . . . 375 step time. . . . . . . . . . . . . . . . . . . . . . . . . . 394
Device. . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 transition. . . . . . . . . . . . . . . . . . . . . . . . . 400
Encryption, signing, certificates. . . . . . . . . 75 SFC editor. . . . . . . . . . . . . . . . . . . . . . . . . . . 391
General information. . . . . . . . . . . . . . . . . 373 toolbar. . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Project encryption. . . . . . . . . . . . . . . . . . . 75 SFC Editor
Project setting. . . . . . . . . . . . . . . . . . . . 1064 Arrangement. . . . . . . . . . . . . . . . . . . . . . 1090
Runtime system / PLC. . . . . . . . . . . . . . . 375 Character set. . . . . . . . . . . . . . . . . . . . . 1090
Security function Online, step time. . . . . . . . . . . . . . . . . . 1090
Certificate. . . . . . . . . . . . . . . . . . . . . . . . . 374 Options. . . . . . . . . . . . . . . . . . . . . . . . . . 1089
security functions Properties, visibility. . . . . . . . . . . . . . . . 1090
WebVisu. . . . . . . . . . . . . . . . . . . . . . . . . . 376 Setting. . . . . . . . . . . . . . . . . . . . . . . . . . 1089
Security functions Step actions, options. . . . . . . . . . . . . . . 1090
Development system. . . . . . . . . . . . . . . . 375 SFC flag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
General information. . . . . . . . . . . . . . . . . 373 Shading. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656
Runtime system / PLC. . . . . . . . . . . . . . . 375 Shading rules. . . . . . . . . . . . . . . . . . . . . . . . 656
security screen. . . . . . . . . . . . . . . . . . . . . . . 908 SHL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
SEL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 Short form mode. . . . . . . . . . . . . . . . . . . . . . 133
select matching bracket. . . . . . . . . . . . . . . . 886 short-circuit evaluation. . . . . . . . . . . . . . . . . 421
selector show source position:. . . . . . . . . . . . . . . . . . 905
CFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 show windows. . . . . . . . . . . . . . . . . . . . . . . . . 51
Sequential control. . . . . . . . . . . . . . . . . . . . . 282 show/hide implementation view. . . . . . . . . . 975
Service hotline. . . . . . . . . . . . . . . . . . . . . . 1119 SHR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
set Sign
access method, interface. . . . . . . . . . . . . 836 Boot application. . . . . . . . . . . . . . . . . . . . 153
Set Certificate. . . . . . . . . . . . . . . . . . . . . . . . . . 75
Accessor method. . . . . . . . . . . . . . . . . . . 839 with certificate, instructions. . . . . . . . . . . 85
Assignment ST. . . . . . . . . . . . . . . . . . . . . 382 Signal flow chart, see CFC. . . . . . . . . . . . . . 179
output. . . . . . . . . . . . . . . . . . . . . . . . . . . . 987 Signal flow diagram
remove. . . . . . . . . . . . . . . . . . . . . . . . . . . 986 page-oriented. . . . . . . . . . . . . . . . . . 180, 425
set coil. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 Signature
insert. . . . . . . . . . . . . . . . . . . . . . . . . . . 1000 Encryption. . . . . . . . . . . . . . . . . . . . . . . . 373
set output connection, FBD/LD. . . . . . . . . . 1004 simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . 271
set/reset, FBD/LD/IL. . . . . . . . . . . . . . . . . . 1004 command. . . . . . . . . . . . . . . . . . . . . . . . . 953
SFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 for testing. . . . . . . . . . . . . . . . . . . . . . . . . 271
action. . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 SIN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520
action qualifiers. . . . . . . . . . . . . . . . . . . . 394 single cycle. . . . . . . . . . . . . . . . . . . . . . . . . . 956
analyzation library. . . . . . . . . . . . . . . . . . 400 SINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
analyzation, library. . . . . . . . . . . . . . . . . . 198 convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482
branch. . . . . . . . . . . . . . . . . . . . . . . . . . . 405 SINT_TO___UXINT. . . . . . . . . . . . . . . . . . . . . . 482
build. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1057 SINT_TO___XINT. . . . . . . . . . . . . . . . . . . . . . . 482
code generation. . . . . . . . . . . . . . 1057, 1065 SINT_TO___XWORD. . . . . . . . . . . . . . . . . . . . 482
copy implementation. . . . . . . . . . . . . . . . 979 SINT_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . . 482
copy reference. . . . . . . . . . . . . . . . . . . . . 979 SINT_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . 482
do not display embedded objects. . . . . . 985 SINT_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . . 482
duplication mode. . . . . . . . . . . . . . . . . . . 979 SINT_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . . 482
element properties. . . . . . . . . . . . . . . . . . 408 SINT_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . 482
implicit variables. . . . . . . . . . . . . . . . . . . . 394 SINT_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . . 482
init step. . . . . . . . . . . . . . . . . . . . . . . . . . . 977 SINT_TO_DWORD. . . . . . . . . . . . . . . . . . . . . 482
jogging mode. . . . . . . . . . . . . . . . . . . . . . 396 SINT_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . 482
jump. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 SINT_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . . 482
library. . . . . . . . . . . . . . . . . . . . . . . . . . . 1065 SINT_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . . 482
macro. . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 SINT_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . 482
online mode. . . . . . . . . . . . . . . . . . . . . . . 391 SINT_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . . 482
processing order. . . . . . . . . . . . . . . . . . . . 392 SINT_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . . 482

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1149 /
1158

SINT_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . . 482 Static variable. . . . . . . . . . . . . . . . . . . . . . . . 444


SINT_TO_LWORD. . . . . . . . . . . . . . . . . . . . . . 482 status
SINT_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . . 482 SFC actions. . . . . . . . . . . . . . . . . . . . . . . 394
SINT_TO_STRING. . . . . . . . . . . . . . . . . . . . . . 482 SFC steps. . . . . . . . . . . . . . . . . . . . . . . . . 394
SINT_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . . 482 Status
SINT_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . . 482 Device editor. . . . . . . . . . . . . . . . . . . . . . 736
SINT_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . . 482 step. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
SINT_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . 482 add exit action, SFC. . . . . . . . . . . . . . . . . 980
SINT_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . 482 insert. . . . . . . . . . . . . . . . . . . . . . . . . . . . 978
SINT_TO_USINT. . . . . . . . . . . . . . . . . . . . . . . 482 insert after. . . . . . . . . . . . . . . . . . . . . . . . 978
SINT_TO_WORD. . . . . . . . . . . . . . . . . . . . . . . 482 SFC, add entry action. . . . . . . . . . . . . . . . 979
SINT_TO_WSTRING. . . . . . . . . . . . . . . . . . . . 482 SFC, duplication mode. . . . . . . . . . . . . . . 979
SIZEOF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 step action
Smart coding. . . . . . . . . . . . . . . . . . . . . . . . . 131 SFC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Smart Tag. . . . . . . . . . . . . . . . . . . . . . . . . . . 134 step into. . . . . . . . . . . . . . . . . . . . . . . . . . . . 958
Software add-ons run. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 958
install. . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 step over. . . . . . . . . . . . . . . . . . . . . . . . . . . . 957
source code run. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 957
download from controller. . . . . . . . . . . . . 876 step status. . . . . . . . . . . . . . . . . . . . . . . . . . . 394
download to controller. . . . . . . . . . . . . . . 877 step-transition
management. . . . . . . . . . . . . . . . . . . . . . . . 88 add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 978
write, to connected device. . . . . . . . . . . . 946 insert after. . . . . . . . . . . . . . . . . . . . . . . . 979
Source code STN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Download, project setting. . . . . . . . . . . 1063 storage
Space alarm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772
in the text editor. . . . . . . . . . . . . . . . . . . 1088 strict
SQRT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 Pragma for enumeration. . . . . . . . . . . . . . 588
ST. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 string
assignment. . . . . . . . . . . . . . . . . . . . . . . . 381 Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Expression. . . . . . . . . . . . . . . . . . . . . . . . 380 STRING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558
Extended. . . . . . . . . . . . . . . . . . . . . . . . . . 192 convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 499
format code. . . . . . . . . . . . . . . . . . . . . . . 897 Data type. . . . . . . . . . . . . . . . . . . . . . . . . 558
R=. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 index access. . . . . . . . . . . . . . . . . . . . . . . 567
Reset assignment. . . . . . . . . . . . . . . . . . . 383 string constants. . . . . . . . . . . . . . . . . . . . . . . 543
S=. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 STRING_TO___UXINT. . . . . . . . . . . . . . . . . . . 499
Set assignment. . . . . . . . . . . . . . . . . . . . . 382 STRING_TO___UXWORD. . . . . . . . . . . . . . . . . 499
ST code in FBD, LD. . . . . . . . . . . . . . . . . . . . 422 STRING_TO___XINT. . . . . . . . . . . . . . . . . . . . 499
ST editor STRING_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . 499
format code. . . . . . . . . . . . . . . . . . . . . . . 897 STRING_TO_BOOL. . . . . . . . . . . . . . . . . . . . . 499
Option. . . . . . . . . . . . . . . . . . . . . . . . . . . 1087 STRING_TO_BYTE. . . . . . . . . . . . . . . . . . . . . 499
ST Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 STRING_TO_DATE. . . . . . . . . . . . . . . . . . . . . 499
Auto formatting. . . . . . . . . . . . . . . . . . . . . 379 STRING_TO_DINT. . . . . . . . . . . . . . . . . . . . . . 499
Online mode. . . . . . . . . . . . . . . . . . . . . . . 380 STRING_TO_DT. . . . . . . . . . . . . . . . . . . . . . . 499
Search. . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 STRING_TO_DWORD. . . . . . . . . . . . . . . . . . . 499
Syntax error. . . . . . . . . . . . . . . . . . . . . . . 379 STRING_TO_INT. . . . . . . . . . . . . . . . . . . . . . . 499
Stack testing of recursive methods. . . . . . . . 614 STRING_TO_LDATE. . . . . . . . . . . . . . . . . . . . 499
standard commands. . . . . . . . . . . . . . . . . . . 877 STRING_TO_LDT. . . . . . . . . . . . . . . . . . . . . . 499
standard library STRING_TO_LINT. . . . . . . . . . . . . . . . . . . . . . 499
Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 360 STRING_TO_LREAL. . . . . . . . . . . . . . . . . . . . 499
start page. . . . . . . . . . . . . . . . . . . . . . . . . . . 899 STRING_TO_LTIME. . . . . . . . . . . . . . . . . . . . . 499
statement. . . . . . . . . . . . . . . . . . . . . . . . . . . 384 STRING_TO_LTOD. . . . . . . . . . . . . . . . . . . . . 499
IF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 STRING_TO_LWORD. . . . . . . . . . . . . . . . . . . 499
set next. . . . . . . . . . . . . . . . . . . . . . . . . . . 959 STRING_TO_REAL. . . . . . . . . . . . . . . . . . . . . 499
show next. . . . . . . . . . . . . . . . . . . . . . . . . 959 STRING_TO_SINT. . . . . . . . . . . . . . . . . . . . . . 499
static STRING_TO_TIME. . . . . . . . . . . . . . . . . . . . . . 499
code analysis. . . . . . . . . . . . . . . . . . . . . . 202 STRING_TO_TOD. . . . . . . . . . . . . . . . . . . . . . 499
Static Analysis Light. . . . . . . . . . . . . . . . . . . 202 STRING_TO_UDINT. . . . . . . . . . . . . . . . . . . . 499
project settings. . . . . . . . . . . . . . . . . . . . 1066 STRING_TO_UINT. . . . . . . . . . . . . . . . . . . . . . 499

R911403764, Edition 08 Bosch Rexroth AG


1150 / ctrlX PLC Engineering
1158

STRING_TO_ULINT. . . . . . . . . . . . . . . . . . . . . 499 T
STRING_TO_USINT. . . . . . . . . . . . . . . . . . . . . 499 T
STRING_TO_WORD. . . . . . . . . . . . . . . . . . . . 499 constant. . . . . . . . . . . . . . . . . . . . . . . . . . 544
STRING_TO_WSTRING. . . . . . . . . . . . . . . . . . 499 literal. . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
Strings Tab
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 498 Communication. . . . . . . . . . . . . . . . . . . . 735
STRUCT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 DataLayerNode I/O image. . . . . . . . . . . . . 737
structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . 761
access. . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 tab group
BIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585 new horizontal. . . . . . . . . . . . . . . . . . . . . 973
data type. . . . . . . . . . . . . . . . . . . . . . . . . . 583 new vertical. . . . . . . . . . . . . . . . . . . . . . . 973
extend. . . . . . . . . . . . . . . . . . . . . . . . . . . . 584 table of contents. . . . . . . . . . . . . . . . . . . . . . 977
EXTENDS. . . . . . . . . . . . . . . . . . . . . . . . . 584 TAN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
object DUT. . . . . . . . . . . . . . . . . . . . . . . . 815 task
symbolic bit access. . . . . . . . . . . . . . . . . 585 check. . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
SUB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 cycle consistency. . . . . . . . . . . . . . . . . . . 168
subrange types. . . . . . . . . . . . . . . . . . . . . . . 592 cycle times. . . . . . . . . . . . . . . . . . . . . . . . 308
subsequent, pragma. . . . . . . . . . . . . . . . . . . 646 monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Subversion statistics. . . . . . . . . . . . . . . . . . . . . . . . . . 308
source management. . . . . . . . . . . . . . . . . . 88 task-local variables. . . . . . . . . . . . . . . . . . 168
SUPER. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 Task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865
Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1119 Configuration. . . . . . . . . . . . . . . . . . . . . . 865
suppress warning, pragma. . . . . . . . . . . . . . 647 Jitter, latency. . . . . . . . . . . . . . . . . . . . . . 209
SVN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Monitoring. . . . . . . . . . . . . . . . . . . . . . . . 863
symbol Processing sequence. . . . . . . . . . . . . . . . 208
access rights. . . . . . . . . . . . . . . . . . . . . . . 229 Task cycle time. . . . . . . . . . . . . . . . . . . . . 865
access to controller. . . . . . . . . . . . . . . . . 737 Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865
symbol configuration. . . . . . . . . . . . . . . . . . . 229 Watchdog. . . . . . . . . . . . . . . . . . . . . . . . . 865
symbol set. . . . . . . . . . . . . . . . . . . . . . . . 229 task configuration
Symbol configuration. . . . . . . . . . . . . . . . . . 788 basic settings. . . . . . . . . . . . . . . . . . . . . . 861
Access rights. . . . . . . . . . . . . . . . . . . . . . 789 create. . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789 properties. . . . . . . . . . . . . . . . . . . . . . . . . 861
Comments and attributes. . . . . . . . . . . . . 793 Task configuration. . . . . . . . . . . . . . . . . . . . . 208
Data layout. . . . . . . . . . . . . . . . . . . . . . . . 789 Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . 789 Jitter. Latency. . . . . . . . . . . . . . . . . . . . . . 209
OPC UA. . . . . . . . . . . . . . . . . . . . . . . . . . . 789 Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . 860
Task synchronization. . . . . . . . . . . . . . . . . 794 task deployment
Symbol file. . . . . . . . . . . . . . . . . . . . . . . . . . 788 check. . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
symbol library device editor. . . . . . . . . . . . . . . . . . . . . . . 753
project environment of visualization. . . . 1072 Task groups. . . . . . . . . . . . . . . . . . . . . . 209, 865
update. . . . . . . . . . . . . . . . . . . . . . . . . . 1072 Task monitoring, online. . . . . . . . . . . . . . . . . 863
symbol rights task-local
device editor. . . . . . . . . . . . . . . . . . . . . . . 737 declare GVL. . . . . . . . . . . . . . . . . . . . . . . 168
symbol access. . . . . . . . . . . . . . . . . . . . . 229 GVL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778
symbol set temporary variable. . . . . . . . . . . . . . . . . . . . 444
symbol configuration. . . . . . . . . . . . . . . . 229 TEST_AND_SET. . . . . . . . . . . . . . . . . . . . . . . 537
symbol, pragma. . . . . . . . . . . . . . . . . . . . . . . 646 text
synchronize translate and manage. . . . . . . . . . . . . . . . 137
cycle-consistent variables. . . . . . . . . . . . . 168 text editor
syntax check. . . . . . . . . . . . . . . . . . . . . . . . . 935 show whitespace. . . . . . . . . . . . . . . . . . . 884
system event. . . . . . . . . . . . . . . . . . . . . . . . . 861 Text editor. . . . . . . . . . . . . . . . . . . . . . . . . . . 887
function call. . . . . . . . . . . . . . . . . . . . . . . 861 Option. . . . . . . . . . . . . . . . . . . . . . . . . . . 1087
SYSTEM.VAR_INFO. . . . . . . . . . . . . . . . . . . . . 530 text list
data structure. . . . . . . . . . . . . . . . . . . . . . 530 add language. . . . . . . . . . . . . . . . . . . . . 1021
add language and translate text. . . . . . . . 137
availability. . . . . . . . . . . . . . . . . . . . . . . . 1059
check ID. . . . . . . . . . . . . . . . . . . . . . . . . 1024
compare and export differences. . . . . . . . 139

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1151 /
1158

display text dynamically. . . . . . . . . . . . . . 144 TIME_TO_STRING. . . . . . . . . . . . . . . . . . . . . . 506


download. . . . . . . . . . . . . . . . . . . . . . . . 1059 TIME_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . . 506
DUT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1025 TIME_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . . 506
export. . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 TIME_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . 506
export as unicode text. . . . . . . . . . . . . . 1022 TIME_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . 506
export everything as text. . . . . . . . . . . . 1021 TIME_TO_USINT. . . . . . . . . . . . . . . . . . . . . . . 506
export/import. . . . . . . . . . . . . . . . . . . . . 1022 TIME_TO_WORD. . . . . . . . . . . . . . . . . . . . . . 506
for dynamic application. . . . . . . . . . . . . . 143 TIME_TO_WSTRING. . . . . . . . . . . . . . . . . . . . 506
for input assistance. . . . . . . . . . . . . . . . . 138 TIME(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554
import file. . . . . . . . . . . . . . . . . . . . . . . . . 138 TO___UXINT. . . . . . . . . . . . . . . . . . . . . . . . . . 476
insert text. . . . . . . . . . . . . . . . . . . . . . . . 1022 TO___XINT. . . . . . . . . . . . . . . . . . . . . . . . . . . 476
object. . . . . . . . . . . . . . . . . . . . . . . . . . . . 788 TO___XWORD. . . . . . . . . . . . . . . . . . . . . . . . . 476
properties. . . . . . . . . . . . . . . . . . . . . . . . 1059 TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
remove language. . . . . . . . . . . . . . . . . . . 1023 TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
remove unused entries. . . . . . . . . . . . . . 1024 TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
rename language. . . . . . . . . . . . . . . . . . 1024 TO_DATE. . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
update ID. . . . . . . . . . . . . . . . . . . . . . . . 1024 TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
text list support TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
add. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1025 TO_DWORD. . . . . . . . . . . . . . . . . . . . . . . . . . 476
DUT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1025 TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
remove. . . . . . . . . . . . . . . . . . . . . . . . . . 1025 TO_LDATE. . . . . . . . . . . . . . . . . . . . . . . . . . . 476
THEN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
THIS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 TO_LREAL. . . . . . . . . . . . . . . . . . . . . . . . . . . 476
constant. . . . . . . . . . . . . . . . . . . . . . . . . . 544 TO_LTIME. . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
duration. . . . . . . . . . . . . . . . . . . . . . . . . . 544 TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
literal. . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 TO_LWORD. . . . . . . . . . . . . . . . . . . . . . . . . . 476
TIME. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559 TO_REAL. . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
constant. . . . . . . . . . . . . . . . . . . . . . . . . . 544 TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 506 to_string. . . . . . . . . . . . . . . . . . . . . . . . . . . . 647
keyword. . . . . . . . . . . . . . . . . . . . . . . . . . 559 pragma attribute. . . . . . . . . . . . . . . . . . . . 647
literal. . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 TO_STRING. . . . . . . . . . . . . . . . . . . . . . . . . . 476
TIME function. . . . . . . . . . . . . . . . . . . . . . . . 554 TO_TIME. . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
time of day. . . . . . . . . . . . . . . . . . . . . . . . . . 559 TO_TOD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
constant. . . . . . . . . . . . . . . . . . . . . . . . . . 546 TO_UDINT. . . . . . . . . . . . . . . . . . . . . . . . . . . 476
data type. . . . . . . . . . . . . . . . . . . . . . . . . . 559 TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
TIME_OF_DAY. . . . . . . . . . . . . . . . . . . . . . . . . 559 TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
data type. . . . . . . . . . . . . . . . . . . . . . . . . . 559 TO_USINT. . . . . . . . . . . . . . . . . . . . . . . . . . . 476
keyword. . . . . . . . . . . . . . . . . . . . . . . . . . 546 TO_WORD. . . . . . . . . . . . . . . . . . . . . . . . . . . 476
TIME_TO___UXINT. . . . . . . . . . . . . . . . . . . . . 506 TO_WSTRING. . . . . . . . . . . . . . . . . . . . . . . . . 476
TIME_TO___XINT. . . . . . . . . . . . . . . . . . . . . . . 506 TOD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559
TIME_TO___XWORD. . . . . . . . . . . . . . . . . . . . 506 convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 511
TIME_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . 506 data type. . . . . . . . . . . . . . . . . . . . . . . . . . 559
TIME_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . . 506 keyword. . . . . . . . . . . . . . . . . . . . . . . . . . 546
TIME_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . . 506 TOD_TO___XWORD. . . . . . . . . . . . . . . . . . . . 511
TIME_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . 506 TOD_TO__UXINT. . . . . . . . . . . . . . . . . . . . . . . 511
TIME_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . . 506 TOD_TO__XINT. . . . . . . . . . . . . . . . . . . . . . . . 511
TIME_TO_DWORD. . . . . . . . . . . . . . . . . . . . . 506 TOD_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . 511
TIME_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . 506 TOD_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . . 511
TIME_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . . 506 TOD_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . . 511
TIME_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . . 506 TOD_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . 511
TIME_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . 506 TOD_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . . 511
TIME_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . . 506 TOD_TO_DWORD. . . . . . . . . . . . . . . . . . . . . . 511
TIME_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . . 506 TOD_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . . 511
TIME_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . 506 TOD_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . . 511
TIME_TO_LWORD. . . . . . . . . . . . . . . . . . . . . . 506 TOD_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . . 511
TIME_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . . 506 TOD_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . . 511
TIME_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . 506 TOD_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . . 511

R911403764, Edition 08 Bosch Rexroth AG


1152 / ctrlX PLC Engineering
1158

TOD_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . . 511 transition. . . . . . . . . . . . . . . . . . . . . . . . . . . . 400


TOD_TO_LWORD. . . . . . . . . . . . . . . . . . . . . . 511 insert. . . . . . . . . . . . . . . . . . . . . . . . . . . . 978
TOD_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . . 511 insert after. . . . . . . . . . . . . . . . . . . . . . . . 978
TOD_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . 511 SFC, do not display embedded objects. . 985
TOD_TO_STRING. . . . . . . . . . . . . . . . . . . . . . 511 Transition. . . . . . . . . . . . . . . . . . . . . . . . . . . . 845
TOD_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . . 511 Translate
TOD_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . . 511 Exclude. . . . . . . . . . . . . . . . . . . . . . . . . . 1048
TOD_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . . 511 Properties. . . . . . . . . . . . . . . . . . . . . . . . 1048
TOD_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . 511 Trend configuration
TOD_TO_USINT. . . . . . . . . . . . . . . . . . . . . . . 511 Add parameters. . . . . . . . . . . . . . . . . . . . 308
TOD_TO_WORD. . . . . . . . . . . . . . . . . . . . . . . 511 Add variable. . . . . . . . . . . . . . . . . . . . . . . 307
TOD_TO_WSTRING. . . . . . . . . . . . . . . . . . . . 511 Assign task. . . . . . . . . . . . . . . . . . . . . . . . 307
toggle localization. . . . . . . . . . . . . . . . . . . . . 927 Configure additional buffering. . . . . . . . . 308
toggle subview. . . . . . . . . . . . . . . . . . . . . . . . 975 Configure buffering of the data on the RTS. .
toolbar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1094 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
customize. . . . . . . . . . . . . . . . . . . . . . . . . . 48 Remove variable. . . . . . . . . . . . . . . . . . . . 307
toolbox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900 Start under condition. . . . . . . . . . . . . . . . 307
trace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 trend recording
add variable. . . . . . . . . . . . . . . . . . . . . . 1025 getting started. . . . . . . . . . . . . . . . . . . . . 306
advanced settings. . . . . . . . . . . . . . . . . . 1095 storage configuration. . . . . . . . . . . . . . . 1043
assign task. . . . . . . . . . . . . . . . . . . . . . . . 301 Trend recording. . . . . . . . . . . . . . . . . . . . . . . 305
CmpTraceMgr.library. . . . . . . . . . . . . . . . 298 configure. . . . . . . . . . . . . . . . . . . . . . . . . . 306
compress graph. . . . . . . . . . . . . . . . . . . 1026 set additional buffer. . . . . . . . . . . . . . . . 1044
configure display. . . . . . . . . . . . . . . . . . . 303 trigger
configure variable. . . . . . . . . . . . . . . . . . . 302 activate in trace configuration. . . . . . . . . 302
control data recording. . . . . . . . . . . . . . . 304 reset trace configuration. . . . . . . . . . . . 1031
convert to multi-channel. . . . . . . . . . . . . 1030 TRUE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
convert to single-channel. . . . . . . . . . . . 1030 TRUNC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
create configuration. . . . . . . . . . . . . . . . . 301 TRUNC_INT. . . . . . . . . . . . . . . . . . . . . . . . . . 517
data of IEC variable. . . . . . . . . . . . . . . . . 301 TRY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
delete variable. . . . . . . . . . . . . . . . . . . . . 302 tuple
download configuration to controller. . . 1027 Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 355
file formats. . . . . . . . . . . . . . . . . . . . . . . . 299 type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 815
getting started. . . . . . . . . . . . . . . . . . . . . 300 object DUT. . . . . . . . . . . . . . . . . . . . . . . . 815
load file . . . . . . . . . . . . . . . . . . . . . . . . . 1029 TYPE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586
manage as file. . . . . . . . . . . . . . . . . . . . . . 305 typed literals. . . . . . . . . . . . . . . . . . . . . . . . . 549
navigate in data in diagrams. . . . . . . . . . . 304 U
read y-value. . . . . . . . . . . . . . . . . . . . . . . 1026
UDINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
reset diagram to default view. . . . . . . . . 1031
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482
runtime buffer . . . . . . . . . . . . . . . . . . . . 1095
UDINT_TO___UXINT. . . . . . . . . . . . . . . . . . . . 482
save samples to file. . . . . . . . . . . . . . . . . 299
UDINT_TO___XINT. . . . . . . . . . . . . . . . . . . . . 482
save to file. . . . . . . . . . . . . . . . . . . . . . . 1032
UDINT_TO___XWORD. . . . . . . . . . . . . . . . . . . 482
show statistics. . . . . . . . . . . . . . . . . . . . . 305
UDINT_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . 482
start. . . . . . . . . . . . . . . . . . . . . . . . . . . . 1032
UDINT_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . 482
stop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1032
UDINT_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . 482
stretch graph. . . . . . . . . . . . . . . . . . . . . 1033
UDINT_TO_DATE. . . . . . . . . . . . . . . . . . . . . . 482
trace cursor. . . . . . . . . . . . . . . . . . . . . . 1026
UDINT_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . 482
trigger. . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
UDINT_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . 482
Trace
UDINT_TO_DWORD. . . . . . . . . . . . . . . . . . . . 482
Configuration. . . . . . . . . . . . . . . . . . . . . 1096
UDINT_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . 482
Configure data recording. . . . . . . . . . . . 1098
UDINT_TO_LDATE. . . . . . . . . . . . . . . . . . . . . 482
Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . 800
UDINT_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . 482
Multicore. . . . . . . . . . . . . . . . . . . . . . . . . 211
UDINT_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . 482
navigate in the diagram. . . . . . . . . . . . . . 801
UDINT_TO_LREAL. . . . . . . . . . . . . . . . . . . . . 482
Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . 799
UDINT_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . 482
Open statistics. . . . . . . . . . . . . . . . . . . . 1033
UDINT_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . 482
trace configuration
UDINT_TO_LWORD. . . . . . . . . . . . . . . . . . . . . 482
export symbolic. . . . . . . . . . . . . . . . . . . 1027

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1153 /
1158

UDINT_TO_REAL. . . . . . . . . . . . . . . . . . . . . . 482 ULINT_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . 482


UDINT_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . 482 ULINT_TO_LWORD. . . . . . . . . . . . . . . . . . . . . 482
UDINT_TO_STRING. . . . . . . . . . . . . . . . . . . . 482 ULINT_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . 482
UDINT_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . 482 ULINT_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . 482
UDINT_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . 482 ULINT_TO_STRING. . . . . . . . . . . . . . . . . . . . . 482
UDINT_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . 482 ULINT_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . 482
UDINT_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . 482 ULINT_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . 482
UDINT_TO_USINT. . . . . . . . . . . . . . . . . . . . . . 482 ULINT_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . 482
UDINT_TO_WORD. . . . . . . . . . . . . . . . . . . . . 482 ULINT_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . 482
UDINT_TO_WSTRING. . . . . . . . . . . . . . . . . . . 482 ULINT_TO_USINT. . . . . . . . . . . . . . . . . . . . . . 482
UINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 ULINT_TO_WORD. . . . . . . . . . . . . . . . . . . . . . 482
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482 ULINT_TO_WSTRING. . . . . . . . . . . . . . . . . . . 482
UINT_TO___UXINT. . . . . . . . . . . . . . . . . . . . . . 482 uncomment . . . . . . . . . . . . . . . . . . . . . . . . . 887
UINT_TO___XINT. . . . . . . . . . . . . . . . . . . . . . . 482 undefine, pragma. . . . . . . . . . . . . . . . . . . . . 597
UINT_TO___XWORD. . . . . . . . . . . . . . . . . . . . 482 Underflow data type. . . . . . . . . . . . . . . . . . . 455
UINT_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . . 482 unforce. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 960
UINT_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . . 482 unforce values. . . . . . . . . . . . . . . . . . . . . . . . 960
UINT_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . . 482 unicode
UINT_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . . 482 text list. . . . . . . . . . . . . . . . . . . . . . . . . . 1022
UINT_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . . 482 uninstall
UINT_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . . 482 device. . . . . . . . . . . . . . . . . . . . . . . . . . . . 963
UINT_TO_DWORD. . . . . . . . . . . . . . . . . . . . . 482 Uninstall
UINT_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . . 482 Library. . . . . . . . . . . . . . . . . . . . . . . . . . . 969
UINT_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . . 482 Unintended use. . . . . . . . . . . . . . . . . . . . . . . . 36
UINT_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . . 482 Consequences, disclaimer. . . . . . . . . . . . . 35
UINT_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . . 482 union
UINT_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . . 482 object DUT. . . . . . . . . . . . . . . . . . . . . . . . 815
UINT_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . . 482 UNION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592
UINT_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . . 482 unit conversion. . . . . . . . . . . . . . . . . . . . . . . 157
UINT_TO_LWORD. . . . . . . . . . . . . . . . . . . . . . 482 apply. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
UINT_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . . 482 apply reverse. . . . . . . . . . . . . . . . . . . . . . 159
UINT_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . . 482 define. . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
UINT_TO_STRING. . . . . . . . . . . . . . . . . . . . . . 482 define as switchable. . . . . . . . . . . . . . . . . 158
UINT_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . . 482 example. . . . . . . . . . . . . . . . . . . . . . . . . . 159
UINT_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . . 482 object. . . . . . . . . . . . . . . . . . . . . . . . . . . . 803
UINT_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . . 482 unlock connection. . . . . . . . . . . . . . . . . . . . . 992
UINT_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . . 482 UNTIL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
UINT_TO_USINT. . . . . . . . . . . . . . . . . . . . . . . 482 update
UINT_TO_WORD. . . . . . . . . . . . . . . . . . . . . . . 482 IDs in text list. . . . . . . . . . . . . . . . . . . . . 1024
UINT_TO_WSTRING. . . . . . . . . . . . . . . . . . . . 482 parameters, fbd/ld/il cfc. . . . . . . . . . . . . 1005
ULINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 structured variables . . . . . . . . . . . . . . . . 1021
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482 update referenced pins
ULINT_TO___UXINT. . . . . . . . . . . . . . . . . . . . . 482 refactoring. . . . . . . . . . . . . . . . . . . . . . . . 895
ULINT_TO___XINT. . . . . . . . . . . . . . . . . . . . . . 482 update structured variables. . . . . . . . . . . . 1021
ULINT_TO___XWORD. . . . . . . . . . . . . . . . . . . 482 UPPER_BOUND. . . . . . . . . . . . . . . . . . . . . . . 574
ULINT_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . 482 array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
ULINT_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . 482 uppercase. . . . . . . . . . . . . . . . . . . . . . . . . . . 885
ULINT_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . 482 User
ULINT_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . 482 log in as this user. . . . . . . . . . . . . . . . . . . . 83
ULINT_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . 482 User administration. . . . . . . . . . . . . . . . . . . . . 76
ULINT_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . 482 General information. . . . . . . . . . . . . . . . . 373
ULINT_TO_DWORD. . . . . . . . . . . . . . . . . . . . 482 Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
ULINT_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . 482 User group. . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
ULINT_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . 482 user interface
ULINT_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . 482 language. . . . . . . . . . . . . . . . . . . . . . . . . 1084
ULINT_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . 482 User interface
ULINT_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . 482 customize. . . . . . . . . . . . . . . . . . . . . . . . . . 47
ULINT_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . 482

R911403764, Edition 08 Bosch Rexroth AG


1154 / ctrlX PLC Engineering
1158

User management variable


Control, device. . . . . . . . . . . . . . . . . . . . . 262 access . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
Device, force. . . . . . . . . . . . . . . . . . . . . . . 258 add by refactoring. . . . . . . . . . . . . . . . . . 895
user-defined attributes. . . . . . . . . . . . . . . . . 605 allocate memory. . . . . . . . . . . . . . . . . . . . 646
user-defined data type. . . . . . . . . . . . . . . . . 815 assign address. . . . . . . . . . . . . . . . . . . . . 200
Users and groups bit access. . . . . . . . . . . . . . . . . . . . . . . . . 550
Device editor. . . . . . . . . . . . . . . . . . . . . . 754 declare, tabular. . . . . . . . . . . . . . . . . . . . . 165
Export/Import. . . . . . . . . . . . . . . . . . . . . 1061 declare, textual. . . . . . . . . . . . . . . . . . . . . 165
Project settings. . . . . . . . . . . . . . . . . . . . 1061 display format, pragma. . . . . . . . . . . . . . . 613
USINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 external. . . . . . . . . . . . . . . . . . . . . . . . . . . 445
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482 global. . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
USINT_TO___UXINT. . . . . . . . . . . . . . . . . . . . 482 hide, pragma. . . . . . . . . . . . . . . . . . . . . . . 620
USINT_TO___XINT. . . . . . . . . . . . . . . . . . . . . . 482 insert, tabular. . . . . . . . . . . . . . . . . . . . . 1012
USINT_TO___XWORD. . . . . . . . . . . . . . . . . . . 482 monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . 291
USINT_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . 482 occurrence location. . . . . . . . . . . . . . . . . 204
USINT_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . 482 operator for information. . . . . . . . . . . . . . 530
USINT_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . . 482 persistent. . . . . . . . . . . . . . . . . . . . . . . . . 214
USINT_TO_DATE. . . . . . . . . . . . . . . . . . . . . . . 482 Python. . . . . . . . . . . . . . . . . . . . . . . . . . . 352
USINT_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . 482 remove by refactoring. . . . . . . . . . . . . . . . 896
USINT_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . . 482 rename. . . . . . . . . . . . . . . . . . . . . . . . . . . 150
USINT_TO_DWORD. . . . . . . . . . . . . . . . . . . . 482 RETAIN. . . . . . . . . . . . . . . . . . . . . . . . . . . 217
USINT_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . 482 temporary. . . . . . . . . . . . . . . . . . . . . . . . . 444
USINT_TO_LDATE. . . . . . . . . . . . . . . . . . . . . . 482 value in online mode. . . . . . . . . . . . . . . . . 291
USINT_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . . 482 Variable
USINT_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . 482 constant. . . . . . . . . . . . . . . . . . . . . . . . . . 446
USINT_TO_LREAL. . . . . . . . . . . . . . . . . . . . . . 482 declare. . . . . . . . . . . . . . . . . . . . . . . 160, 165
USINT_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . 482 declare, command. . . . . . . . . . . . . . . . . . 889
USINT_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . . 482 initialize. . . . . . . . . . . . . . . . . . . . . . . . . . 164
USINT_TO_LWORD. . . . . . . . . . . . . . . . . . . . . 482 Input. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
USINT_TO_REAL. . . . . . . . . . . . . . . . . . . . . . . 482 local. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
USINT_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . 482 Output. . . . . . . . . . . . . . . . . . . . . . . . . . . 439
USINT_TO_STRING. . . . . . . . . . . . . . . . . . . . . 482 PERSISTENT. . . . . . . . . . . . . . . . . . . . . . . 447
USINT_TO_TIME. . . . . . . . . . . . . . . . . . . . . . . 482 remanent. . . . . . . . . . . . . . . . . . . . . . . . . 449
USINT_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . 482 RETAIN. . . . . . . . . . . . . . . . . . . . . . . . . . . 449
USINT_TO_UDINT. . . . . . . . . . . . . . . . . . . . . . 482 Rules for names. . . . . . . . . . . . . . . . . . . . 651
USINT_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . 482 Short form mode. . . . . . . . . . . . . . . . . . . 133
USINT_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . 482 Static. . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
USINT_TO_WORD. . . . . . . . . . . . . . . . . . . . . 482 variable declaration
USINT_TO_WSTRING. . . . . . . . . . . . . . . . . . . 482 move down. . . . . . . . . . . . . . . . . . . . . . . 1012
V move up. . . . . . . . . . . . . . . . . . . . . . . . . 1013
Variable declaration. . . . . . . . . . . . . . . . . . . . 160
VAR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
variable list. . . . . . . . . . . . . . . . . . . . . . . . . . 778
VAR_ACCESS. . . . . . . . . . . . . . . . . . . . . . . . . 659
global, persistent. . . . . . . . . . . . . . . . . . . 778
VAR_CONFIG. . . . . . . . . . . . . . . . . . . . . . . . . 446
Variable use. . . . . . . . . . . . . . . . . . . . . . . . . . 864
VAR_EXTERNAL. . . . . . . . . . . . . . . . . . . . . . . 445
Variables
VAR_GLOBAL. . . . . . . . . . . . . . . . . . . . . . . . . 444
Scope. . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
VAR_IN_OUT. . . . . . . . . . . . . . . . . . . . . . . . . . 439
variables configuration. . . . . . . . . . . . . . . . . 198
CONSTANT. . . . . . . . . . . . . . . . . . . . . . . . 442
VARINFO. . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
Input and output variable. . . . . . . . . . . . . 439
operator. . . . . . . . . . . . . . . . . . . . . . . . . . 530
VAR_INFO. . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
vector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575
data structure, SYSTEM. . . . . . . . . . . . . . 530
declaration. . . . . . . . . . . . . . . . . . . . . . . . 575
VAR_INPUT. . . . . . . . . . . . . . . . . . . . . . . . . . . 438
initialization. . . . . . . . . . . . . . . . . . . . . . . 575
VAR_INST. . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
VendorException. . . . . . . . . . . . . . . . . . . . . . 751
VAR_OUTPUT. . . . . . . . . . . . . . . . . . . . . . . . . 439
Log. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751
VAR_STAT. . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
version
VAR_TEMP. . . . . . . . . . . . . . . . . . . . . . . . . . . 444
development System. . . . . . . . . . . . . . . . 977
information. . . . . . . . . . . . . . . . . . . . . . . . 977
operating system. . . . . . . . . . . . . . . . . . . 977

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1155 /
1158

view word
bookmarks. . . . . . . . . . . . . . . . . . . . . . . . 901 addressing mode. . . . . . . . . . . . . . . . . . . 552
breakpoints. . . . . . . . . . . . . . . . . . . . . . . . 902 WORD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556
call stack. . . . . . . . . . . . . . . . . . . . . . . . . . 906 convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 482
call tree. . . . . . . . . . . . . . . . . . . . . . . . . . . 906 WORD_TO___XWORD. . . . . . . . . . . . . . . . . . . 482
cross-reference list. . . . . . . . . . . . . . . . . . 903 WORD_TO__UXINT. . . . . . . . . . . . . . . . . . . . . 482
memory view. . . . . . . . . . . . . . . . . . . . . . 908 WORD_TO__XINT. . . . . . . . . . . . . . . . . . . . . . 482
POUs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 900 WORD_TO_BIT. . . . . . . . . . . . . . . . . . . . . . . . 482
standard menu bar. . . . . . . . . . . . . . . . . . 899 WORD_TO_BOOL. . . . . . . . . . . . . . . . . . . . . . 482
View WORD_TO_BYTE. . . . . . . . . . . . . . . . . . . . . . 482
Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . 898 WORD_TO_DATE. . . . . . . . . . . . . . . . . . . . . . 482
view indentation guides. . . . . . . . . . . . . . . . 885 WORD_TO_DINT. . . . . . . . . . . . . . . . . . . . . . . 482
visualization WORD_TO_DT. . . . . . . . . . . . . . . . . . . . . . . . 482
folder containing image pool. . . . . . . . . 1069 WORD_TO_DWORD. . . . . . . . . . . . . . . . . . . . 482
folder containing text list. . . . . . . . . . . . 1069 WORD_TO_INT. . . . . . . . . . . . . . . . . . . . . . . . 482
project settings. . . . . . . . . . . . . . . . . . . . 1069 WORD_TO_LDATE. . . . . . . . . . . . . . . . . . . . . 482
visualization element WORD_TO_LDT. . . . . . . . . . . . . . . . . . . . . . . 482
configuration with interface property. . 1069 WORD_TO_LINT. . . . . . . . . . . . . . . . . . . . . . . 482
enter static text. . . . . . . . . . . . . . . . . . . . 140 WORD_TO_LREAL. . . . . . . . . . . . . . . . . . . . . 482
visualization profile WORD_TO_LTIME. . . . . . . . . . . . . . . . . . . . . . 482
project setting. . . . . . . . . . . . . . . . . . . . 1069 WORD_TO_LTOD. . . . . . . . . . . . . . . . . . . . . . 482
version. . . . . . . . . . . . . . . . . . . . . . . . . . 1071 WORD_TO_LWORD. . . . . . . . . . . . . . . . . . . . 482
visualization style WORD_TO_REAL. . . . . . . . . . . . . . . . . . . . . . 482
version. . . . . . . . . . . . . . . . . . . . . . . . . . 1071 WORD_TO_SINT. . . . . . . . . . . . . . . . . . . . . . . 482
W WORD_TO_STRING. . . . . . . . . . . . . . . . . . . . 482
WORD_TO_TIME. . . . . . . . . . . . . . . . . . . . . . 482
W. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
WORD_TO_TOD. . . . . . . . . . . . . . . . . . . . . . . 482
size prefix. . . . . . . . . . . . . . . . . . . . . . . . . 552
WORD_TO_UDINT. . . . . . . . . . . . . . . . . . . . . 482
warm start. . . . . . . . . . . . . . . . . . . . . . . . . . . 949
WORD_TO_UINT. . . . . . . . . . . . . . . . . . . . . . . 482
warning disable, pragma. . . . . . . . . . . . . . . . 647
WORD_TO_ULINT. . . . . . . . . . . . . . . . . . . . . . 482
warning restore, pragma. . . . . . . . . . . . . . . . 647
WORD_TO_USINT. . . . . . . . . . . . . . . . . . . . . 482
watch
WORD_TO_WSTRING. . . . . . . . . . . . . . . . . . . 482
add all forces to watchlist. . . . . . . . . . . . 901
Working with ctrlX PLC Engineering
open view. . . . . . . . . . . . . . . . . . . . . . . . . 900
Connection to ctrlX real-time data. . . . . . . 93
watch list
worksheet. . . . . . . . . . . . . . . . . . . . . . . . . . . 985
watch all forces. . . . . . . . . . . . . . . . . . . . 900
Write. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Watch list. . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Write protection. . . . . . . . . . . . . . . . . . . . . . . 79
watchlist. . . . . . . . . . . . . . . . . . . . . . . . . . . . 900
Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
WebVisu
writing values
security. . . . . . . . . . . . . . . . . . . . . . . . . . . 376
command. . . . . . . . . . . . . . . . . . . . . . . . . 960
WHILE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
prepare value. . . . . . . . . . . . . . . . . . . . . 1041
whitespace. . . . . . . . . . . . . . . . . . . . . . . . . . 884
WSTRING. . . . . . . . . . . . . . . . . . . . . . . . . . . . 564
show in text editor. . . . . . . . . . . . . . . . . . 884
convert. . . . . . . . . . . . . . . . . . . . . . . . . . . 499
window
index access. . . . . . . . . . . . . . . . . . . . . . . 567
auto hide. . . . . . . . . . . . . . . . . . . . . . . . . . 974
WSTRING_TO___UXINT. . . . . . . . . . . . . . . . . . 499
dock. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 974
WSTRING_TO___UXWORD. . . . . . . . . . . . . . . 499
float. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 973
WSTRING_TO___XINT. . . . . . . . . . . . . . . . . . . 499
reset layout. . . . . . . . . . . . . . . . . . . . . . . . 973
WSTRING_TO_BIT. . . . . . . . . . . . . . . . . . . . . 499
window <n>. . . . . . . . . . . . . . . . . . . . . . . . . . 975
WSTRING_TO_BOOL. . . . . . . . . . . . . . . . . . . 499
windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . 974
WSTRING_TO_BYTE. . . . . . . . . . . . . . . . . . . . 499
hide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
WSTRING_TO_DATE. . . . . . . . . . . . . . . . . . . . 499
layout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
WSTRING_TO_DINT. . . . . . . . . . . . . . . . . . . . 499
move. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
WSTRING_TO_DT. . . . . . . . . . . . . . . . . . . . . . 499
resize. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
WSTRING_TO_DWORD. . . . . . . . . . . . . . . . . 499
show. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
WSTRING_TO_INT. . . . . . . . . . . . . . . . . . . . . 499
toggle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
WSTRING_TO_LDT. . . . . . . . . . . . . . . . . . . . . 499
Windows Certificate Store. . . . . . . . . . . . . . . 75
WSTRING_TO_LINT. . . . . . . . . . . . . . . . . . . . 499
wink. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 953
WSTRING_TO_LREAL. . . . . . . . . . . . . . . . . . . 499

R911403764, Edition 08 Bosch Rexroth AG


1156 / ctrlX PLC Engineering
1158

WSTRING_TO_LTIME. . . . . . . . . . . . . . . . . . . 499
WSTRING_TO_LTOD. . . . . . . . . . . . . . . . . . . . 499
WSTRING_TO_LWORD. . . . . . . . . . . . . . . . . . 499
WSTRING_TO_REAL. . . . . . . . . . . . . . . . . . . . 499
WSTRING_TO_STRING. . . . . . . . . . . . . . . . . . 499
WSTRING_TO_TIME. . . . . . . . . . . . . . . . . . . . 499
WSTRING_TO_TOD. . . . . . . . . . . . . . . . . . . . 499
WSTRING_TO_UDINT. . . . . . . . . . . . . . . . . . . 499
WSTRING_TO_UINT. . . . . . . . . . . . . . . . . . . . 499
WSTRING_TO_ULINT. . . . . . . . . . . . . . . . . . . 499
WSTRING_TO_USINT. . . . . . . . . . . . . . . . . . . 499
WSTRING_TO_WORD. . . . . . . . . . . . . . . . . . . 499
X
X. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
size prefix. . . . . . . . . . . . . . . . . . . . . . . . . 552
XADD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535
XOR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
XORN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
XSIZEOF. . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
Z
zoom
factor. . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
graphical editor. . . . . . . . . . . . . . . . . . . . 378
zoom in/out
graphical editor. . . . . . . . . . . . . . . . . . . . 378

Bosch Rexroth AG R911403764, Edition 08


ctrlX PLC Engineering 1157 /
1158

R911403764, Edition 08 Bosch Rexroth AG


Bosch Rexroth AG
Bgm.-Dr.-Nebel-Str. 2
97816 Lohr a.Main
Germany
Tel. +49 9352 18 0
Fax +49 9352 18 8400
www.boschrexroth.com/electrics

R911403764
R911403764

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy