TC3 User Interface EN
TC3 User Interface EN
TC3 User Interface EN
TE1000
TwinCAT 3 | User Interface
Table of contents
1 Foreword .................................................................................................................................................. 13
1.1 Notes on the documentation............................................................................................................ 13
1.2 Safety instructions ........................................................................................................................... 14
1 Foreword
The responsible staff must ensure that the application or use of the products described satisfy all the
requirements for safety, including all the relevant laws, regulations, guidelines and standards.
Disclaimer
The documentation has been prepared with care. The products described are, however, constantly under
development.
We reserve the right to revise and change the documentation at any time and without prior announcement.
No claims for the modification of products that have already been supplied may be made on the basis of the
data, diagrams and descriptions in this documentation.
Trademarks
Beckhoff®, TwinCAT®, EtherCAT®, EtherCAT G®, EtherCAT G10®, EtherCAT P®, Safety over EtherCAT®,
TwinSAFE®, XFC®, XTS® and XPlanar® are registered trademarks of and licensed by Beckhoff Automation
GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own
purposes could violate the rights of the owners.
Patent Pending
The EtherCAT Technology is covered, including but not limited to the following patent applications and
patents:
EP1590927, EP1789857, EP1456722, EP2137893, DE102015105702
with corresponding applications or registrations in various other countries.
EtherCAT® is a registered trademark and patented technology, licensed by Beckhoff Automation GmbH,
Germany
Copyright
Exclusion of liability
All the components are supplied in particular hardware and software configurations appropriate for the
application. Modifications to hardware or software configurations other than those described in the
documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.
Personnel qualification
This description is only intended for trained specialists in control, automation and drive engineering who are
familiar with the applicable national standards.
Description of symbols
In this documentation the following symbols are used with an accompanying safety instruction or note. The
safety instructions must be read carefully and followed without fail!
DANGER
Serious risk of injury!
Failure to follow the safety instructions associated with this symbol directly endangers the life and health of
persons.
WARNING
Risk of injury!
Failure to follow the safety instructions associated with this symbol endangers the life and health of per-
sons.
CAUTION
Personal injuries!
Failure to follow the safety instructions associated with this symbol can lead to injuries to persons.
NOTE
Damage to the environment or devices
Failure to follow the instructions associated with this symbol can lead to damage to the environment or
equipment.
Tip or pointer
This symbol indicates information that contributes to better understanding.
Menu bar
Toolbar
Editor Window
Solution Explorer
Properties Window
Message Window
Toolbox
Standard components
Menu bar Shows the menus according to the settings in the Customize dialog.
Toolbar Shows the commands as buttons identified with symbols according to the
settings in the Customize dialog.
Toolbox Shows the “tools” that are available for the currently active editor
(e.g., graphical programming elements)
Solution Explorer Shows the TwinCAT 3 project with the associated project elements in a
structured form.
Properties Window Shows the properties of the element that is currently selected in the
Solution Explorer.
Editor Window This is used for defining and editing objects. For language editors (e.g., ST
editor, CFC editor), the editor window usually shows the language editor in
the lower part (implementation part) and the declaration editor in the upper
part. For other editors, the editor window may also contain dialogs (e.g.,
task editor, device editor).
The following components provide information about the current processes in the project in offline or online
mode:
Message Window Shows current errors, warnings, and messages relating to syntax check,
compile process etc.
Monitoring window and online Used for monitoring a POU or a user-defined list of expressions/variables.
views of editors
Information and status bar Shows the status of the TwinCAT 3 runtime. If an editor window is currently
active, the current cursor position and the set editing mode are displayed.
In online mode you see the current program status.
Certain standard settings are installed with TwinCAT, which determine the appearance, structure and
behavior of the standard components and thus the user interface. The section “Configuring user interface
[} 33]” describes how you can edit the standard settings in order to individually adapt the user interface.
Section “Reference user interface [} 50]” provides detailed information on the commands.
In addition to the current operation mode of the TwinCAT 3 runtime (Run mode or Config mode) the quality
of the connection to the selected TwinCAT 3 runtime is displayed. The evaluation of the connection quality is
always referenced to the currently set connection timeout.
The set timeout is divided into micro-timeouts and repetitions. This results in the following:
For the division between micro-timeout and repetitions, there is a case distinction:
After each micro-timeout, a fresh attempt is made to communicate with the target system. This information is
used among other things to evaluate the quality of the connection with the target system.
File
The File menu contains commands for actions relating to the project file (Open, Close, Save, Print, Page
settings, …)
Symbol Command
Command Project... (Create new TwinCAT project) [} 56]
Edit
The Edit menu contains commands for working in text editors (language editors, declaration editor…)
Symbol Command
Copy Standard Commands [} 62]
Cut
Delete
Paste
Redo
Undo
Command Go To [} 68]
View
The View menu contains commands for activating the individual default views in user interface windows.
Symbol Command
Command Open object [} 78]
Project
The Project menu contains commands for handling the project objects and the project properties and for the
copying and exporting projects or objects.
Symbol Command
Command Add New Item (project) [} 85]
Build
The Build menu contains commands for creating the project through compilation (without code generation),
i.e. running precompile with syntax check and commands for clearing the previous compile information,
which is relevant for an Online Change and offline code generation.
Symbol Command
Command Build PLC project [} 115]
Debug
The Debug menu contains commands for controlling the program execution on the controller (start, stop)
and for debugging tasks (breakpoints, step-by-step processing, writing and forcing values).
Symbol Command
Command New Breakpoint [} 116]
TwinCAT
The TwinCAT menu contains commands for controlling the TwinCAT 3 runtime environment.
Symbol Command
Command Activate configuration [} 123]
PLC
The PLC menu contains commands for opening tools that provide the development environment for working
with a PLC project.
Symbol Command
Command Breakpoints [} 128]
Tools
The Tools menu contains commands for opening tools that create a particular environment for working with
the project (installation of libraries and devices, customizing the user interface, options for editors, loading
and saving etc.).
Symbol Command
Command Options [} 147]
Window
The Window menu contains commands for positioning the views in the user interface (configuration,
opening, closing etc.).
Symbol Command
Command Float [} 175]
Symbol Command
Command Save <TwinCAT project name> as Archive... [} 232]
Command Backup <TwinCAT project name> automatically to the target system [} 233]
Command Compare <TwinCAT project name> with the target system… [} 233]
Views
A "view" is a window within the main window of the user interface that is independent of a PLC object. Views
are characterized by the following properties:
• They can be opened via the View menu.
• They usually contain a non-configurable toolbar with buttons for sorting, viewing and searching within
the view.
• They can be docked to the frame of the main window or positioned anywhere on the screen.
• They can be hidden and represented only by a tab in the main window.
Window
A "window" is dependent on a PLC object. Windows are characterized by the following properties:
• They can be opened via the Window menu or by double-clicking on the object.
• They are all arranged in a particular area of the user interface as MDI windows in the form of tabs. The
arrangement of the windows depends on the user-specific settings.
• They cannot be hidden.
• They are not open by default.
Examples:
• Editor window for PLC objects
Cursor position
Current cursor position, starting from the left or top of the editor window:
Double-clicking on one of the fields opens the Go To Line dialog. Here you can specify a line in which the
cursor should be placed.
Edit mode
You can recognize the status of the TwinCAT system by the color of the TwinCAT system service icon in the
information area of the task bar. The following states are possible:
Open the system menu by right-clicking on the TwinCAT system service icon in the system tray.
2.7.2 Realtime
Time base Timebase for calculating the percentage. Currently, a fixed timebase of 1
millisecond is set.
CPU Usage/Limit The slider can be used to allocate processor time to the TwinCAT real-time system.
Currently, a timebase of 1 millisecond is set. In the example shown, TwinCAT is
allocated a maximum of 80 % of the computing time. With a timebase of 1 ms, this
means that TwinCAT has a maximum of 800 µs available per millisecond. It also
means that at least 200 μs remain for Windows. When the TwinCAT real-time
system switches to its idle task, the processor is returned to Windows. The slider
bar shows the current utilization of the real-time system. The display is averaged
over 256 cycles (ms).
System latency This shows the current and maximum latency time in the real-time system. The time
by which the central system tick is delayed is measured. The maximum time is
stored until the slider is operated or the dialog is exited. The latency time is, of
course, also measured when the dialog is not open.
If the set maximum time is exceeded, a message is displayed once in the window,
and a logbook entry is created. By calling up the dialog, the message can be reset
so that a message is displayed again when the next timeout occurs.
2.7.3 Router
Info
Memory
The displayed RAM is required in the TwinCAT system for AMS messages and for memory management in
the TwinCAT real-time environment. The entire memory is requested by Windows when the TwinCAT
system starts up. The memory size can be configured in the TwinCAT system node.
Over all RAM that was available when the TwinCAT system was started.
Available RAM that is currently available for TwinCAT.
Registered
All devices taking part in the TwinCAT messaging system (AMS) have to register with the router. TwinCAT
servers have fixed port numbers (e.g. TwinCAT PLC LZS1: 851, …). TwinCAT clients are assigned a port
number by the message router.
Mail debugging In conjunction with the TwinCAT ADS Monitor, the whole TwinCAT message traffic
can be logged. Note that the message traffic is slowed down by the additional
messages. The TwinCAT ADS Monitor is not part of the standard scope of supply of
TwinCAT.
Cleanup
The cleanup function of the router can be used to release router ports originating from programs that are no
longer functional. This function is particularly useful in the development phase of PLC projects.
Local computer
AMS NetID The AMS Net ID is the address of the local computer in the TwinCAT network. The
AMS Net ID consists of 6 bytes and is represented in a dot notation. The “Net IDs”
must be assigned by the project planner and must not be repeated in the TwinCAT
network. By default, the installation generates an AMS NetID from the IP address of
the system (if available) + “1.1”. If no IP address can be determined during the
installation, the AMS NetID “1.1.1.1.1.1” is created.
Editing routes
The TwinCAT Static Routes dialog shows all the route information of the local TwinCAT system.
2.7.4 System
If the TwinCAT system is not configured for automatic startup, you can start it manually via the system menu.
Start/Restart The TwinCAT system is started. All TwinCAT servers that were entered are loaded and
initialized. The TwinCAT I/O subsystem is parameterized by the TwinCAT I/O Manager,
according to the configuration. All runtime systems of the PLC subsystem that were
entered are initialized. If a boot project is entered for a runtime system, it is loaded and
the PLC program is started. The remanent (retain) data is also loaded according to the
configuration.
Config The TwinCAT system is stopped. All TwinCAT servers that were entered are shut down
and unloaded. Once the TwinCAT system has stopped, only the TwinCAT Message
Router remains in the memory. The TwinCAT system can now be started again via
System > Start.
2.7.5 Tools
Tool Description
Event Viewer Opens the Windows Event Viewer, in which system errors are entered
TwinCAT Project Opens an application program for comparing or merging TwinCAT projects
Compare See: Documentation Source Control > Introduction
TwinCAT Switch Runtime Opens an application program for switching the TwinCAT runtime
environment between TwinCAT 2 and TwinCAT 3
For further information on the online views of the individual editors see the description of the respective
editor.
See also:
• PLC documentation: SFC editor in online mode
• PLC documentation: CFC editor in online mode
• PLC documentation: FBD/LD/IL editor in online mode
• PLC documentation: ST editor in online mode
See also:
• Command Options [} 147]
• Command Customize [} 172]
See also:
• Command Options [} 147]
• Customizing the user interface [} 34]
When TwinCAT 3 is integrated into Visual Studio, the font and tabulator size are preset by default.
Default settings:
Default settings:
Adding a menu
1. Select the Customize command in the Tools menu.
Adding a command
1. Select the Customize command in the Tools menu.
ð The Customize dialog opens. The Toolbars tab is visible.
2. Select the Commands tab.
ð The Menu bar field is activated by default.
3. In the corresponding listbox, select the menu you want to edit.
ð The Commands area shows the available submenus and commands.
4. Click Add Command….
ð The Add Command dialog opens. The dialog lists all commands grouped into categories.
5. Select the command you want to add and click OK.
ð The new command is added to the menu tree.
6. Change the position in the menu sequence using the Move Up or Move Down buttons.
7. Click Close.
ð The dialog closes, and the new command is available in the menu.
See also:
• Command Customize [} 172]
Use the Delete command in the Customize > Toolbars tab to remove a toolbar you have compiled.
Use the Delete command in the Customize > Commands tab to remove a command from the toolbar.
See also:
• Command Customize [} 172]
See also:
• Command Customize [} 172]
A toolbar can be docked below the menu bar, or it can be positioned as an independent window anywhere
on the screen.
To move a bar, click with the mouse pointer on the dots at the left end of the bar, hold down the mouse
button and move the bar to the desired position.
If required, you can position the window outside the TwinCAT programming interface.
See also:
Hide views
If you hide a view, it is only available as a tab within the user interface. When you click the tab, the view will
appear automatically.
1. Click in the view you want to hide.
2. Activate the Auto Hide command in the Window menu or click the button in the upper right corner
of the view.
ð The view is hidden and indicated only by a small tab at the side of the main window.
3. Click the tab.
ð The view is displayed.
Showing views
1. Click on the tab of the hidden view.
2. Select the Dock command in the Window menu or click the button in the upper right corner of the
view.
ð The view is permanently displayed.
See also:
• Command Auto Hide [} 176]
• Command Hide [} 175]
• Command Dock [} 175]
An Internet connection is required for this and the address https://infosys.beckhoff.com must be reachable.
With the installation of the TwinCAT 3 Information System, the help system is set to use the local help.
The use of the local help or the online help respectively can be set in the TwinCAT Help menu (Visual Studio
2013 and later).
You can call the local help system via the Windows Start menu or in the TwinCAT 3 Engineering (XAE) via
the context help (F1 Help) or the Help menu.
• Calling up the TwinCAT 3 documentation via the Windows Start menu [} 42]
• Calling up the TwinCAT 3 documentation via the Help menu [} 41]
• Calling up the TwinCAT 3 documentation via the context help [} 42]
ð The TwinCAT 3 Information System is opened with the Help Viewer of the Visual Studio help system. In
the tree view of the open Help Viewer, select Help Viewer -
Home > Welcome to the Beckhoff Information System > TwinCAT 3.
With the context help, the position of the mouse pointer (for graphical elements) or a selected text
expression within the editor is evaluated by the help system in order to display the appropriate linked help
text.
Various displays
From Visual Studio 2013 it is possible to use the context help with the Beckhoff Information System.
Depending on the setting of the help system [} 40], the result is displayed locally in the Help Viewer
or in the system's web browser.
The following guide shows you how to use the local TwinCAT 3 Help. The online help is used analogously.
Only the articles are displayed in the web browser.
ü A TwinCAT 3 project is opened.
ü The Start in Help Viewer command is enabled in the menu Help > Define help settings (from Help
Viewer 2.0).
1. Open an editor for the supported text-based TwinCAT 3 programming languages, e.g. ST or C++.
2. Select the desired expression and press the [F1] key.
ð The Help Viewer opens, and the corresponding article from the TwinCAT 3 Information System linked to
the selected expression is displayed.
See also:
• Installation of the TwinCAT 3 documentation
When the TwinCAT 3 Information System is installed, an entry is created in the Windows start menu, which
can be used to update the TwinCAT 3 Information System directly.
ü An internet connection is available.
ü You have administrator rights.
1. Open the Beckhoff folder in the Windows Start menu.
3. In the dialog that opens, confirm that changes may be made to the system.
ð The help system checks whether an update for the TwinCAT 3 Information System is available. A
help system icon is displayed in the Windows menu bar.
When you move the mouse pointer over the help system icon, the update progress is displayed.
3. In the help system dialog that opens, click Check for updates online.
ð The help system checks whether an update for the TwinCAT 3 Information System is available.
Available updates for installed documentation components are displayed.
See also:
• Customizing the user interface [} 34]
5.1 File
The type of archive file you should use depends on which projects you want to store in the archive folder.
5.1.1.1 Solution
• Creating a *.tnzip TwinCAT solution archive: Command Save <solution name> as Archive... [} 50]
• Open *.tnzip TwinCAT solution archive: Command Open Solution from Archive [} 51]
Content of *.tnzip The *.tnzip archive folder contains all TwinCAT project types included in the
solution.
These can be TwinCAT, TwinCAT HMI, Scope or Connectivity projects.
Command for opening A tnzip archive can be reopened with the following command:
Command Open Solution from Archive [} 51].
Note on PLC projects If the solution contains one or more PLC projects, the files and folders stored in
the archive folder for those PLC projects will depend on the PLC project settings
of the respective project.
Settings tab [} 112]
Executing the command opens the Open dialog. Select the archive file from the file system and confirm the
dialog. The Select Folder for new Solution dialog opens. Select a folder for storing the extracted solution
files.
Content of *.tnzip The *.tnzip archive folder contains all TwinCAT project types included in the
solution.
These can be TwinCAT, TwinCAT HMI, Scope or Connectivity projects.
Command for creating A tnzip archive can be created with the following command:
Command Save <solution name> as Archive... [} 50]
Note on PLC projects If the solution contains one or more PLC projects, the files and folders stored in
the archive folder for those PLC projects will depend on the PLC project settings
of the respective project.
Settings tab [} 112]
Symbol:
Hotkey: [Ctrl] + [Shift] + [O]
Function: The command opens the default dialog for opening a file. Here you can browse the file system for
a TwinCAT project file and open it in the development system.
Content of *.tszip The *.tszip archive folder contains the TwinCAT project to be archived.
Command for creating A tszip archive can be created with the following command:
Command Save <TwinCAT project name> as Archive... [} 232]
Note on PLC projects If the TwinCAT project contains one or more PLC projects, the files and folders
stored in the archive folder for those PLC projects will depend on the PLC
project settings of the respective project.
Settings tab [} 112]
See also:
• PLC documentation: Your first TwinCAT 3 PLC project
• PLC documentation: Creating a standard project
Requirement: The TwinCAT PLC project (<PLC project name>) is selected in the Solution Explorer.
The files and folders in the archive folder depend on the PLC project settings.
Content of *.tpzip The *.tpzip archive folder contains the PLC project to be archived.
Command for opening A tpzip archive can be reopened with the following command:
Command Add Existing Item (Project) [} 52]
Note on PLC projects The files and folders stored in the archive folder for the PLC project depend on
the PLC project settings of this PLC project.
Settings tab [} 112]
Symbol:
Function: The command opens the standard browser dialog, which can be used to search for a PLC project
file and open it in the programming system. If a suitable converter is installed, you can open projects in a
different format.
Call: Project menu or PLC object context menu in the Solution Explorer
File type By default, you can set the filter to one of the following file types:
• PLC 3.x Project file (*.PLCproject): TwinCAT 3 PLC projects with the extension ".PLCproject"
• PLC 3.x Project archive (*.tpzip): TwinCAT 3 PLC project archives with the extension ".tpzip"
◦ See also: Command Save <PLC project name> as archive... [} 52]
• PLC 3.x Library import (*.library): TwinCAT 3 PLC libraries with the extension ".library"
• PLC 2.x Project file (*.pro): TwinCAT 2 PLC projects with the extension ".pro"
• PLC 2.x Import library (*.lib): TwinCAT 2 PLC libraries with the extension ".lib"
• PLC 3.x Project import (*.PLCproject): PLC projects with the extension ".project"
Open The selected project file is opened or converted and then opened.
Content of *.tpzip The *.tpzip archive folder contains the PLC project to be archived.
Command for creating A tpzip archive can be created with the following command:
Command Save <PLC project name> as archive... [} 52]
Note on PLC projects The files and folders stored in the archive folder for the PLC project depend on
the PLC project settings of this PLC project.
Settings tab [} 112]
You are asked if the other project should be saved and closed.
If the file format differs because the open project was saved with an older version of TwinCAT 3, there are
two options:
• If the project cannot be saved in the format of the currently used programming system, you must
update it to continue working on the project. The expression that appears at this point: The changes
you made... refers to internal tasks of various components while the project is loaded.
• If the project can still be saved in the previous format, you can decide whether to update or retain the
format. If you decide to retain the format, data loss may occur. If you decide to update the format, the
project can no longer be opened with the old version of the programming system.
In addition to the file format, the versions of the explicitly inserted libraries, the visualization profile and the
compiler version of the opening project may differ from those installed with the current programming system.
If newer versions are installed on the current programming system, the Project Environment dialog opens
automatically, where you can update the versions. If no update is made at this point, this can be done later at
any time via the Options > Project Environment dialog.
Case 1)
If you set the file filter when selecting the project to be opened and an appropriate converter is available, the
converter is used automatically and the project is brought into the current format. The conversion is
converter-specific. Usually, you are prompted to define the handling of referenced libraries or device
references.
TwinCAT 3 converter
Adaptation of a TwinCAT PLC control project to the TwinCAT 3 syntax can only be successful dur-
ing import if the converter is able to compile the project without errors.
If you have set the All Files option when selecting the project to be opened, no converter is enabled and the
Convert Project dialog opens. In the dialog, you need to explicitly trigger the conversion of the project by
selecting one of the options.
• Convert to the current format: Select the converter you want to use from the selection list
(application for conversion). After the conversion, the project can no longer be opened in the old
version.
• Create a new project and add a specific device: (Not yet implemented)
Case 2)
If libraries are integrated in the project for which "conversion mapping" has not yet been stored in the library
options, the Converting a library reference dialog appears, in which you can define how this reference
should be converted:
• Convert and install the library: If you select this option, the referenced library is converted to the new
format and remains referenced in the project. It is automatically installed in the library repository under
the Other category and continues to be used. If the library does not have the project information (title,
version) required for an installation, you will be prompted to enter it in the Enter Project Information
dialog.
• Use the following library, which is already installed: If you select the options, the referenced library
is replaced by another one that is already installed on the local system. Use the Select button to open
the Select... dialog. Here you can select the desired version of one of the installed libraries. This
corresponds to the configuration of the version handling in the Library Properties dialog. An asterisk
("*") means that, as a rule, the latest version of the library available on the system is used in the
project. The list of available libraries is structured in the same way as in the Library Repository dialog.
You can sort the list by company and category.
• Ignore the library. The reference will not appear in the converted project: If you enable this option,
the library reference is removed. The library is then no longer included in the converted project.
• Use this mapping in future if this library is present: If you enable this option, the settings made
here in the dialog will also be applied to future project conversions, as soon as the respective library is
referenced.
In the converted project, the library references are defined in the Global Library Manager in the Solution
Explorer. After the conversion of the library references, the project conversion continues with the Open
Project dialog, as described above.
For general information on library management, see section “Using libraries” in the PLC documentation.
Case 3)
When you open a TwinCAT 2.x PLC Control project that references a device (target system) for which no
"conversion mapping" has yet been defined in the TwinCAT 2.x PLC Control converter options, the Device
Conversion dialog opens, in which you can specify whether and how the old device references are to be
replaced by more recent ones. The device originally used is displayed. Choose one of the following options:
• Use the following already installed device: Click the Select button to open the Select target
system dialog, in which you can select one of the devices currently installed on the system. This
device is then inserted in the Solution Explorer of the converted project, instead of the old one. Select
the option Select a target system... to select one of the devices listed. The list of available devices is
structured in the same way as in the Device Repository dialog. You can sort the list by manufacturer
or by category.
• Ignore the device. No application-specific objects will be available: If you enable this option, no
entry for the device is created in the Solution Explorer of the new project, i.e. the device is ignored
during the conversion, and no application-specific objects, such as the task configuration, are applied.
• Save this assignment for future reference: If you select this option, all settings of the dialog, i.e. the
displayed "conversion mapping" for the device, are saved in the TwinCAT 2.x PLC Control Converter
options and applied to future conversions.
4. The project was not terminated properly and "Save automatically" was enabled.
If the Auto Save function was enabled in the Load and Save options and TwinCAT 3 PLC was not
terminated regularly after the last modification of the project without saving, the Auto Save Backup dialog
opens for handling the backup copy.
If the project to be opened is read-only, you are asked whether you want to open the project in write-
protected mode or whether you want to unlock it.
An error message is displayed if you try and open a library project that is installed in a library repository. You
cannot open a library project using this path. After closing the dialog with OK, the project name appears in
the title bar of the user interface. An asterisk ("*") after the name indicates that the project has been modified
since it was last saved.
See also:
• PLC documentation: Open a TwinCAT 3 PLC project
• PLC documentation: Open a TwinCAT 2 PLC project
Symbol:
Hotkey: [Ctrl] + [Shift] + [N]
Function: The command opens the New Project dialog for creating a new TwinCAT project file.
Depending on the selected template, you will obtain a project that automatically has a certain number of
objects.
Categories
Templates
See also:
• PLC documentation: Your first TwinCAT 3 PLC project
• PLC documentation: Creating a standard project
Symbol:
Hotkey: [Ctrl] + [Shift] + [O]
Function: The command opens the default dialog for opening a file. Here you can browse the file system for
a TwinCAT project file and open it in the development system.
Content of *.tszip The *.tszip archive folder contains the TwinCAT project to be archived.
Command for creating A tszip archive can be created with the following command:
Command Save <TwinCAT project name> as Archive... [} 232]
Note on PLC projects If the TwinCAT project contains one or more PLC projects, the files and folders
stored in the archive folder for those PLC projects will depend on the PLC
project settings of the respective project.
Settings tab [} 112]
See also:
• PLC documentation: Your first TwinCAT 3 PLC project
• PLC documentation: Creating a standard project
Executing the command opens an overview of all devices on the network. Select the target system from this
overview. The Select Folder for new Solution dialog opens.
Use this command only to add a measurement project to a solution, for example. Do not use this
command to add multiple TwinCAT projects to a solution. This function is currently not supported by
TwinCAT.
Use this command only to add a measurement project to a solution, for example. Do not use this
command to add multiple TwinCAT projects to a solution. This function is currently not supported by
TwinCAT.
See also:
• PLC documentation: Creating and configuring a project
Symbol:
Symbol:
Hotkey: [Ctrl] + [S]
Function: The command saves the solution, the TwinCAT project, the TwinCAT PLC project or a selected
PLC object (Main, GVL, ...) under the current name.
Requirement: The solution, the TwinCAT project object, the PLC project object (<PLC project name>
Project) or the PLC object to be saved is selected in the Solution Explorer.
Save object
The command saves the object under the current name. If the object has been changed since the last save,
the "disk" icon for the object is red, and the name in the title bar of the editor for the open object is marked
with an asterisk ("*").
See also:
• Command Save <TwinCAT project name> as [} 60]
Note that during this saving operation only the *.tsproj file, for example, is created in a different location. The
referenced projects and the objects contained in them are not stored at this new location (for example, a
PLC project that is integrated in the TwinCAT 3 project and its objects).
See also:
• Command Save [} 60]
• PLC documentation: Library creation
Requirement: The PLC project object (<PLC project name>) is selected in the Solution Explorer.
Symbol:
Function: The command starts the email program that is set in the system and opens a new email with the
archive file of the selected project as an attachment.
Symbol:
Function: The command closes the currently open project. TwinCAT remains open.
Call: File menu or implicitly when opening a new/different project while a project is still open.
If the project contains unsaved changes, a query appears asking if the project should be saved.
If you have not yet explicitly saved the project, a query is displayed to confirm whether you want to delete the
project files.
See also:
• PLC documentation: Creating and configuring a PLC project
Requirement: The editor to be closed is active, or the object is selected in the PLC project tree.
Symbol:
Hotkey: [Alt] + [F4]
Function: The command stops the programming system. If a project that has been modified since the last
time it was saved is currently open, a dialog appears asking whether you want to save the project.
Symbol:
Function: The command opens the Page settings dialog for configuring the layout for the print version of
the project content.
See also:
• Command Print [} 62]
Symbol:
Function: The command opens the standard Windows dialog for printing documents.
5.2 Edit
, hotkeys: [Ctrl] + [Z]
• Redo:
, hotkeys: [Ctrl] + [Y]
• Cut
, hotkeys: [Ctrl] + [X]
• Copy:
, hotkeys: [Ctrl] + [C]
• Paste:
, hotkeys: [Ctrl] + [V]
• Delete:
, hotkeys: [Del]
• Select All: Hotkey: [Ctrl] + [A]
Call: Edit menu, PLC project tree context menu, Editor window context menu
Not all editors support the Paste command, or its application may be limited. In graphical editors, the
command is only supported if the paste operation creates a correct construct.
In the PLC project tree, the command refers to the currently selected object. Multiple selections are possible.
Function: The command removes the selected PLC object from the solution. The object is retained in the
project directory.
Symbol:
Hotkey: [F2]
Function: The command opens the Input Assistant dialog, which provides support for selecting a
programming element, depending on the current cursor position.
Requirement: A POU is open in the editor, and the cursor is in a program line.
The dialog offers all programming elements, which you can add in the editor at the current cursor position.
The elements are sorted by categories. For the Variables category you can set an additional filter for the
variable type, such as local variables, global variables, constants etc.
Detail of the Input Assistant dialog in the declaration part of the editor:
Structured view
: The dialog shows the elements in a tree structure. You can hide or show
the column Type, Address and Origin by right-clicking on the column title in a
submenu.
You can use the tab to search for specific objects. When you type one or more characters into the search
box, the results window lists the names of all objects whose name contains this search string. Double-click
the desired object to insert it in the editor at the current cursor position.
See also:
• PLC documentation: Using the input wizard
Requirement: A POU is open in the editor, and the cursor is in a program line.
The auto-declaration function opens the Auto Declare dialog even if the cursor is in the implementation part
of a POU in a line that contains the name of an undeclared variable. To do this, you must have activated the
option Declare unknown variables automatically (AutoDeclare) in the TwinCAT options
(Tools > Options > TwinCAT > PLC Environment > Smart coding).
Scope Validity range of the variables that have not yet been declared.
Example: VAR (default setting for local variable)
Name Variable name not yet declared
Example: bVar
Data type
: Lists the standard data types.
:
• Input Assistant: Opens the Input Assistant dialog
• Array assistant: Opens the Array dialog
Example: BOOL
Object Object in which the new variable is declared. By default, this is the object you are
editing.
See also:
• PLC documentation: Declaring variables
Array dialog
Ranks and base type Definition of the field sizes (dimension) by entering the lower and upper bounds and
specification the base type of the array. You can enter the base type directly or by using the
Input Assistant or Array dialog, if you click the button.
Result Display of the defined array.
TwinCAT only reinitializes variables if you have changed the initialization values of the variables.
Listing of the variables with name (expression), initialization value and data type.
Changed initialization values are shown in bold.
Input field below the list Enter an initialization value for the selected variable(s).
Apply value to selected lines Change the initialization value of the selected line(s) according to the value
of the input field.
Reset selected lines to default Setting the default initialization values.
values
OK TwinCAT adopts the initialization values in the Auto Declare dialog.
See also:
• PLC documentation: Using the input wizard
Symbol:
Function: The command adds the variable on which the cursor is currently positioned to a Watch List for
online monitoring.
Requirement: The PLC project is in online mode and the cursor is placed on a variable in an editor.
The command inserts the variable into the currently open Watch List. If no Watch List is currently open, the
command inserts the variable into Watch List 1 and opens its view.
See also:
• PLC documentation: Using Watch Lists
• PLC documentation: Monitoring Values
Symbol:
Function: The command opens the Call Tree view, which displays the calls of the function block and its
callers.
Requirement: A function block is open in the editor, and the cursor is placed in a variable.
5.2.8 Command Go To
Function: Command moves the cursor to a defined line of code.
Symbol:
Hotkey: [F12]
PLC editor
Requirement: A POU is open in the editor, and the cursor is on a variable or function.
Requirement: The process image (project instance) is expanded and the cursor is positioned at an allocated
variable in the process image.
Symbol:
Function: The command opens the instance of a function block in a new window.
Requirement: The PLC project is in online mode. A POU is open in the editor, and the cursor is positioned
on the instance of a function block.
The command is not available for temporary instances or instances from compiled libraries.
Function: The command displays all locations where a variable is used in the Cross Reference List view.
Requirement: A POU is open in the editor and the cursor is in a variable, or the Cross Reference List view
is open and a variable is specified in the Name field.
See also:
• PLC documentation: Find locations where the cross reference list is used
Symbol:
Function: The command causes control characters to be displayed for spaces and tabs.
Function: The command comments out a selected code section. The code section is excluded from the
compilation and has no influence on the program execution.
This command can be used to create comments for the documentation of a program or program section, or
to temporarily exclude a code section from compilation. The command Command Uncomment Selection
[} 70] can be used to cancel a comment, so that a commented-out code section is reintegrated into the
program execution.
Function: The command cancels a comment and reintegrates a commented-out code section back into the
program execution.
Requirement: A function block is open in the editor and code is selected which was previously commented
out using the command Command Comment Selection [} 70].
Symbol:
Hotkey: [Ctrl] + [F]
Function: The command scans the project or parts of it for a specific string.
The command opens the Find and Replace dialog (Find in Files button is active), in which you enter the
search string and the search options.
Replace in Files Switches to the Find and Replace dialog (button Replace in Files is active)
Find what Search string.
Look in
: Selection list with the objects that are searched:
Entire solution: All editable places in all objects of the project are scanned.
Current project:
All open documents: All editors that are currently open in a window are scanned.
Current document: Only the editor in which the cursor is currently located is
searched.
See also:
• Command Quick Replace [} 72]
• PLC documentation: Find and Replace in the entire project
Symbol:
Hotkey: [Ctrl] + [H]
Function: The command scans the project or parts of it for a specific string and replaces it.
The command opens the Find and Replace dialog (Replace in Files button is active), in which you enter
the string to be replaced and the new string, along with the search options.
In addition to the options in the "Find" dialog, the following settings are possible:
See also:
• Command Quick Find [} 70]
• PLC documentation: Find and Replace in the entire project
If overwrite mode is active, characters following the cursor are overwritten when new characters are entered.
If insert mode is active, characters are inserted, and existing characters following the cursor are retained.
Requirement: The PLC project is in online mode. An object is selected in the PLC project tree.
This means that you can also edit the object in online mode. The change is then transferred to the controller
with the command Online Change or Download.
See also:
• Command Online Change [} 138]
• Command Download [} 137]
Requirement: An object is selected in the PLC project tree, or the cursor is positioned before or on a
variable identifier in the declaration part of a programming object.
Rename dialog
Refactoring dialog
The dialog shows all the usage locations within the project. The respective objects and locations are
highlighted in color.
Left dialog part Navigation tree of the project with the respective object.
Right part of the dialog Displays the position within an object where the current name occurs.
In both windows, you can specify an action for each location. The commands described below are available
in the context menu.
Reject this change Discarding the individual change in the right part of the dialog.
Accept this object Accept all changes in the affected object
Reject this object Discard all changes in the affected object
Accept the entire project Accept all changes in the project
Reject the entire project Discard all changes in the project
TwinCAT shows accepted changes with a yellow background, discarded changes with a gray background.
See also:
• PLC documentation: Refactoring
Symbol:
Function: This command allows you to declare a new variable in a POU and automatically update it at the
point of use of the POU.
The command opens the default dialog for declaring the variable. After closing the declaration dialog with
OK the two-part Refactoring dialog appears.
Refactoring dialog
Before you decide which changes you want to apply at which points, select the desired option from the drop-
down list at the top right:
Commands for accepting or rejecting the change(s) are available in the context menu of the change point(s),
both in the left and right part of the dialog. See also the description of the Command Rename
'<variable>' [} 74].
Examples:
1. The function F_Sample is assigned a new input variable “nInput3” with initialization value “1” via
refactoring. The change has the following effect:
Before:
F_Sample(nVarA + nVarB, 3, TRUE);
F_Sample(nInput1:= nVarA + nVarB, nInput2 :=3 , nInputx := TRUE);
After:
F_Sample(nVarA + nVarB, 3, TRUE, nInput3 := 1);
F_Sample(nInput1:= nVarA + nVarB, nInput2 :=3 , nInputx := TRUE, nInput3 := 1);
2. The function F_Sample is assigned a new input variable “nInput3” with placeholder text “_REFACTOR_”
via refactoring:
Before:
F_Sample(nInput1 := nVarA + nVarB, nInput2 := 3, nInputx := TRUE);
F_Sample(nVarA + nVarB, 3, TRUE);
After:
F_Sample(nInput1 := nVarA + nVarB, nInput2 := 3, nInputx := TRUE, nInput3 := _REFACTOR_);
F_Sample(nVarA + nVarB, 3, TRUE, nInput3 := _REFACTOR_);
See also:
• PLC documentation: Refactoring
• PLC documentation: Auto Declare dialog [} 65]
Symbol:
Function: The command removes an input or output variable from the POU and all POU usage points.
Requirements: The cursor is on the identifier of the variable to be removed in the declaration part of the
POU.
The command first opens a dialog showing the information about the desired removal. After confirmation, the
Refactoring dialog appears. A description of the dialog can be found in section “Command Add
'<variable>' [} 75]”.
If you accept the changes in Refactoring dialog, the corresponding input or output parameters are deleted
at the usage points of the affected POU.
In CFC, only the connection of the removed input or output to the function block is removed. The in-
put or output itself is retained in the chart.
Sample in ST:
You use Refactoring to remove the input variable “nInput4” in a POU. An automatic adjustment is made at
the respective usage points:
See also:
Symbol:
Function: In the declaration editor, this command enables you to change the sequence of the variables in
the currently focused scope VAR_INPUT, VAR_OUTPUT or VAR_IN_OUT.
Call: Context menu of the currently focused scope in the declaration editor
Requirement: The focus is in the declaration of one of the above scopes, and more than one variable is
declared in it.
The command opens the Rearrange dialog with a list of all declarations of the currently focused scope. You
can use the mouse to drag a selected declaration up or down to another position.
See also:
• PLC documentation: Rearranging variables in the declaration
5.3 View
Symbol:
Call: View menu, context menu PLC object, double-click the PLC object
In online mode, the dialog Select Online State opens, in which you can choose the view in which view the
object should be opened. The dialog does not open when the object selection is unambiguous. In this case,
the object is opened directly in online mode.
Function: The dialog determines how an object (function block, etc.) that was not yet open in offline mode is
to be opened in online mode. You can select whether to open an instance or the basic implementation of the
object itself (optionally in online or offline mode).
Requirement: The PLC project contains several instances of the selected object.
Symbol:
See also:
• PLC documentation: Using the Declaration Editor
Symbol:
See also:
• PLC documentation: Using the Declaration Editor
Symbol:
When you enable the command, the main window of the TwinCAT user interface is displayed in full screen
mode. You can return to the preset size by disabling the command again.
In the menu that opens, select the toolbars you want to show or hide. The command works as an option, i. e.
when a toolbar is displayed, it appears in the menu with a check mark in front of it.
See also:
• TC3 User Interface documentation: Customizing Toolbars [} 35]
Symbol:
The Solution Explorer view shows the TwinCAT 3 project with the corresponding project elements in a
structured form. In this view, you can open objects for editing and configuring.
Symbol:
Properties view
The Properties view shows the properties for the object currently selected in the Solution Explorer. By
default, the element properties are sorted by category in a table. Clicking on the plus or minus sign in front of
the category to show or hide the associated parameters. A mouse click on the value field of a parameter
activates the input mode, in which you can edit the value or property. You can filter or sort the Properties
view.
You can also call the Properties window from the context menu of an object in the PLC project tree. A
description of the command as well as various object properties can be found in section Command
Properties (object) [} 90].
Symbol:
Toolbox view
The Toolbox view shows the existing tools for the currently active editor. This view is available by default
with a graphic editor or a visualization. It contains the graphical programming elements, which you can drag-
and-drop into the editor window.
Symbol:
The Error List view displays errors, warnings and messages related to syntax checking, compile process
(compile errors, code size), import processes or Library Manager. The messages are displayed in tabular
form.
Filter Drop-down list for selecting the set of code files to be used:
Open Documents
Current Project
Current Document
Message categories Click the message category symbol to show or hide messages. Next to each
symbol, TwinCAT displays the number of messages that have occurred.
• : Error
• : Warning
• : Information
Clear Clears the message display
Clears the filter settings of the error list
Severity level Message text with the causing object and the position within the object.
(message category) Double-click a message entry in the table to go to the source text position.
Code
Description
Project
File
Line
Symbol:
Output view
Message category The messages are categorized by component or functionality and are
available in a selection dialog. You can filter the message display by
selecting a category.
The source text position of the message is displayed.
Requirement: A message is highlighted.
Find the message in the code
The previous message is selected.
Delete all
Line break is enabled or disabled
Go to next position
The previous message is selected.
Go to previous position
5.4 Project
Symbol:
Function: The command opens the Add New Item dialog, through which you can create a new PLC project
file. (The command is only available if a PLC node is selected.)
Call: Project menu or PLC object context menu in the Solution Explorer
Plc Templates Select one of the listed templates. The template determines the basic configuration of a
PLC project file. The following templates are available by default:
• Standard PLC Project: Creates a new TwinCAT PLC project (*.project). The project is
supported by a wizard and contains a Library Manager, a POU "MAIN" program and a
referenced task.
• Empty PLC Project: Creates an "empty" TwinCAT PLC project for library projects
(*.library). The project contains no objects or devices.
Name Define the name of the new project here. The default name depends on the selected
template (usually "Unnamed<n>") and contains a sequential number to ensure that the
project name is unique in the file system. You can change the default name according to
the file path conventions of the local operating system. A file extension (e.g. .project) can
be added. By default, the selected template automatically adds the appropriate
extension.
Location Specify the location for the new project file. The default path depends on the selected
template. You can either use the Browse... button to open the default browser and
specify a path, or you can use the corresponding drop-down list to select a previously
entered path.
Add Clicking Add creates a new project based on your settings. If the cursor is placed on an
error symbol, a tooltip provides information on how to proceed. If another PLC project is
already open, a dialog opens asking you if you want to save and close the project before
the new project is opened. The name of the new project is then displayed in the title bar
of the TwinCAT XAE frame window. An asterisk ("*") after the name indicates that the
project has been modified since it was last saved.
See also:
• PLC documentation: Your first TwinCAT 3 PLC project
• PLC documentation: Creating and configuring a PLC project
Symbol:
Function: The command opens the standard browser dialog, which can be used to search for a PLC project
file and open it in the programming system. If a suitable converter is installed, you can open projects in a
different format.
Call: Project menu or PLC object context menu in the Solution Explorer
File type By default, you can set the filter to one of the following file types:
• PLC 3.x Project file (*.PLCproject): TwinCAT 3 PLC projects with the extension ".PLCproject"
• PLC 3.x Project archive (*.tpzip): TwinCAT 3 PLC project archives with the extension ".tpzip"
◦ See also: Command Save <PLC project name> as archive... [} 52]
• PLC 3.x Library import (*.library): TwinCAT 3 PLC libraries with the extension ".library"
• PLC 2.x Project file (*.pro): TwinCAT 2 PLC projects with the extension ".pro"
• PLC 2.x Import library (*.lib): TwinCAT 2 PLC libraries with the extension ".lib"
• PLC 3.x Project import (*.PLCproject): PLC projects with the extension ".project"
Open The selected project file is opened or converted and then opened.
Content of *.tpzip The *.tpzip archive folder contains the PLC project to be archived.
Command for creating A tpzip archive can be created with the following command:
Command Save <PLC project name> as archive... [} 52]
Note on PLC projects The files and folders stored in the archive folder for the PLC project depend on
the PLC project settings of this PLC project.
Settings tab [} 112]
You are asked if the other project should be saved and closed.
If the file format differs because the open project was saved with an older version of TwinCAT 3, there are
two options:
• If the project cannot be saved in the format of the currently used programming system, you must
update it to continue working on the project. The expression that appears at this point: The changes
you made... refers to internal tasks of various components while the project is loaded.
• If the project can still be saved in the previous format, you can decide whether to update or retain the
format. If you decide to retain the format, data loss may occur. If you decide to update the format, the
project can no longer be opened with the old version of the programming system.
In addition to the file format, the versions of the explicitly inserted libraries, the visualization profile and the
compiler version of the opening project may differ from those installed with the current programming system.
If newer versions are installed on the current programming system, the Project Environment dialog opens
automatically, where you can update the versions. If no update is made at this point, this can be done later at
any time via the Options > Project Environment dialog.
Case 1)
If you set the file filter when selecting the project to be opened and an appropriate converter is available, the
converter is used automatically and the project is brought into the current format. The conversion is
converter-specific. Usually, you are prompted to define the handling of referenced libraries or device
references.
TwinCAT 3 converter
Adaptation of a TwinCAT PLC control project to the TwinCAT 3 syntax can only be successful dur-
ing import if the converter is able to compile the project without errors.
If you have set the All Files option when selecting the project to be opened, no converter is enabled and the
Convert Project dialog opens. In the dialog, you need to explicitly trigger the conversion of the project by
selecting one of the options.
• Convert to the current format: Select the converter you want to use from the selection list
(application for conversion). After the conversion, the project can no longer be opened in the old
version.
• Create a new project and add a specific device: (Not yet implemented)
Case 2)
If libraries are integrated in the project for which "conversion mapping" has not yet been stored in the library
options, the Converting a library reference dialog appears, in which you can define how this reference
should be converted:
• Convert and install the library: If you select this option, the referenced library is converted to the new
format and remains referenced in the project. It is automatically installed in the library repository under
the Other category and continues to be used. If the library does not have the project information (title,
version) required for an installation, you will be prompted to enter it in the Enter Project Information
dialog.
• Use the following library, which is already installed: If you select the options, the referenced library
is replaced by another one that is already installed on the local system. Use the Select button to open
the Select... dialog. Here you can select the desired version of one of the installed libraries. This
corresponds to the configuration of the version handling in the Library Properties dialog. An asterisk
("*") means that, as a rule, the latest version of the library available on the system is used in the
project. The list of available libraries is structured in the same way as in the Library Repository dialog.
You can sort the list by company and category.
• Ignore the library. The reference will not appear in the converted project: If you enable this option,
the library reference is removed. The library is then no longer included in the converted project.
• Use this mapping in future if this library is present: If you enable this option, the settings made
here in the dialog will also be applied to future project conversions, as soon as the respective library is
referenced.
In the converted project, the library references are defined in the Global Library Manager in the Solution
Explorer. After the conversion of the library references, the project conversion continues with the Open
Project dialog, as described above.
For general information on library management, see section “Using libraries” in the PLC documentation.
Case 3)
When you open a TwinCAT 2.x PLC Control project that references a device (target system) for which no
"conversion mapping" has yet been defined in the TwinCAT 2.x PLC Control converter options, the Device
Conversion dialog opens, in which you can specify whether and how the old device references are to be
replaced by more recent ones. The device originally used is displayed. Choose one of the following options:
• Use the following already installed device: Click the Select button to open the Select target
system dialog, in which you can select one of the devices currently installed on the system. This
device is then inserted in the Solution Explorer of the converted project, instead of the old one. Select
the option Select a target system... to select one of the devices listed. The list of available devices is
structured in the same way as in the Device Repository dialog. You can sort the list by manufacturer
or by category.
• Ignore the device. No application-specific objects will be available: If you enable this option, no
entry for the device is created in the Solution Explorer of the new project, i.e. the device is ignored
during the conversion, and no application-specific objects, such as the task configuration, are applied.
• Save this assignment for future reference: If you select this option, all settings of the dialog, i.e. the
displayed "conversion mapping" for the device, are saved in the TwinCAT 2.x PLC Control Converter
options and applied to future conversions.
4. The project was not terminated properly and "Save automatically" was enabled.
If the Auto Save function was enabled in the Load and Save options and TwinCAT 3 PLC was not
terminated regularly after the last modification of the project without saving, the Auto Save Backup dialog
opens for handling the backup copy.
If the project to be opened is read-only, you are asked whether you want to open the project in write-
protected mode or whether you want to unlock it.
An error message is displayed if you try and open a library project that is installed in a library repository. You
cannot open a library project using this path. After closing the dialog with OK, the project name appears in
the title bar of the user interface. An asterisk ("*") after the name indicates that the project has been modified
since it was last saved.
See also:
• PLC documentation: Open a TwinCAT 3 PLC project
• PLC documentation: Open a TwinCAT 2 PLC project
Depending on the object currently selected, the following property areas are displayed:
• Advanced [} 90] (compile settings)
• Image [} 91]
• Licenses [} 91]
• General [} 91] (object name, object path)
• SFC Settings [} 94] (flags for Sequential Function Chart)
The special visualization properties are documented under Visualization object, and the special li-
brary and placeholder properties are documented under Command Properties.
Advanced
Always bind True: The object is selected in the compiler and therefore always included in the
compile information. It is therefore always compiled and loaded onto the PLC.
This option becomes relevant if the object is located below an application or
referenced via libraries that are also located below an application. The compile
information is also used as a basis for the selectable variables of the symbol
configuration.
Compiler definitions The compiler definitions entered here are currently not evaluated.
If you want to use compiler definitions, enter them in the PLC project properties.
See:
• Command properties (PLC Project) > Category Compile [} 97]
• PLC documentation: Reference Programming > Pragmas > Conditional
pragmas
Exclude from compilation True: The object is not included in the next compilation run.
External implementation (late binding in the runtime system)
True: No code is generated for this object when the project is compiled. The
object is not linked until the project is loaded to the target system, provided it
exists there (in the PLC runtime system or in another real-time module).
Image
In this area you can assign an image to the object, which is displayed in the graphical view of the library
manager and in the toolbox of the FBD/LD/IL editor. Transparency of the image can be achieved by
selecting a color, which is then displayed transparently. If you select the option Transparency Color, you
can use the rectangular button to the right of it to open the standard dialog for selecting a color.
Licenses
General
In this section you will find general information about the selected object.
Engineering incompatibility of file version 1.2.0.0 (or higher) with TC3.1 < build 4024
Please note that objects saved with file version 1.2.0.0 (or higher) cannot be loaded with Engineer-
ing versions lower than TC3.1.4024!
Since an object is automatically saved with file version 1.2.0.0 when using the optional Base64 for-
mat, objects with Base64 format cannot be loaded with Engineering versions lower than
TC3.1.4024.
If a PLC project contains objects with the file version 1.1.0.1 and objects with the file version
1.2.0.0, the 1.1.0.1 objects are loaded with an Engineering version lower than TC3.1.4024. Objects
with file version 1.2.0.0 are not loaded.
The file version of a file saved with file version 1.2.0.0 can be reset to 1.1.0.1 using XAE version
TC3.1.4024 or higher.
Options
In this section you will find some options that can be configured for PLC objects.
SFC settings
This area displays the current settings for compiling and handling implicit variables for the SFC object
currently selected.
Use default SFC settings TRUE (default): With this option, the default values
defined in the PLC project properties can be applied
to the currently selected object and displayed in the
Properties view of the object.
FALSE: This option allows you to configure SFC
settings that are valid specifically for this SFC object.
Compile ("Build") and variables ("Flags") The meaning of these items corresponds to the
standard settings for SFC objects, which are
configured in the PLC project properties.
Symbol:
Function: This command opens an editor window in which the properties of the project and additional
project-related information can be displayed and defined.
Call: Context menu of the PLC project object (<PLC project name> Project) or Project menu
TwinCAT stores the PLC project properties directly in the PLC project.
See also:
• PLC documentation: Configuring a project
Project information
For a library project, a company, title and version must be entered in order to be able to install the library.
Company Name of the company, which created this project (application or library). In
addition to the library category, it is used for sorting in the library repository
Title Project title
Version Project version, e.g. "0.0.0.1"
Released
: Protection against modification enabled.
Result: When you now edit the project, a prompt will appear asking you if you
really want to change the project. If you answer this query once with Yes, the
prompt will no longer appear when the project is edited again.
Library Categories: Categories of the library project by which you can sort in the Library Repository
dialog. If no category is specified, the library is assigned the category "Other". To
assign it to another category, the category must be defined.
Library categories are defined in one or several external description files in XML
format. To assign the library, you can either call such a file or another library file
that has already picked up information about the categories from a description file.
Requirement: The project is a library project.
The Library Categories dialog opens, in which you can add library categories.
Default namespace: The default setting for the namespace of a library is the library title. Alternatively,
a different namespace can be defined explicitly, either generally for the library at
this point in the project information during library generation, or in the Properties
dialog of the library reference for local use of the library in a project.
The namespace of the library must be used as prefix of the identifier, in order to
enable unambiguous access to a module that exists more than once in the
project, or if the use of this prefix is enforced by the library property
LanguageModelAttribute "qualified-access-only" ("Unambiguous access to library
modules or variables").
If you do not define a standard namespace here, the name of the library file is
automatically used as the namespace.
Placeholder At this point, a default name for the placeholder can be specified, which
represents or references this library. If a placeholder is not specified explicitly at
this point, the default setting for the placeholder name of a library corresponds to
the library title.
Author Project author
Description Brief description of the project (e.g. content, functionalities, general information
such as "for internal use only", etc.)
Library features
Creating a global version Creates a global variable list in the PLC project, which contains the version
structure information.
Automatically generate Add button: POU objects of type "Function" are automatically created in the
library information POU project tree, which can be used to access project properties in the application
program. In this case, special functions are generated for the properties
Company, Title and Version (F_GetCompany, F_GetTitle, F_GetVersion). If
these functions have been added to the project by clicking Add, they can be
removed from the project by clicking Remove.
Documentation format Option reStructuredText: During library creation, comments that correspond to a
specific format are restructured and displayed in the Documentation tab of the
Library Manager in this customized view. This opens up additional options for
library documentation.
General
Minimize ID changes in The GUIDs of the PLC objects (e.g. POUs) are linked to those of the PLC project
TwinCAT files (using XOR). This avoids changes to the GUIDs of the PLC objects when they are
used several times in different projects.
List of categories List of categories assigned to the library project. They can come from several
sources. When you have entered all the desired categories, confirm the dialog
with OK.
Add The commands From Description File... and From Other Library... appear.
Remove TwinCAT removes the selected category.
From description file... The Select Description File dialog appears, in which you can select a
description file with the extension *.libcat.xml. The file contains command
categories. When you exit the dialog with Open, TwinCAT applies these
categories.
From another library.... The Select Library dialog appears, in which you can select a library (*.library)
whose command categories are to be adopted. When you exit the dialog with
Open, TwinCAT applies these categories.
OK TwinCAT provides the categories as project information and displays them in the
Library Categories field.
Cancel Closes the dialog. The process is aborted.
See also:
• PLC documentation: Configuring a project
• PLC documentation: Using libraries
Settings
Compiler definitions Here you can enter compiler definitions/"defines" (see {define} statements) and
conditions for compiling the application (conditional compilation).
A description of the available conditional pragmas can be found in section
Conditional pragmas. The expression expr used in such pragmas can also be
entered here. Several entries are possible in the form of a comma-separated list.
System compiler Available from TC3.1 Build 4024
definitions The compiler definitions that have been set at System Manager level in the PLC
project settings under Compiler definitions [} 111] are automatically adopted
here.
Download application Available from TC3.1 Build 4024
info Situation: You are loading a PLC project onto the controller that differs from the
project already located there. In this case, a message window appears containing
a Details button. Use this button to open the Application information window,
which allows you to check the differences between the current PLC project and
the PLC project on the controller. This involves comparing the number of function
blocks, the data and the storage locations.
The Application information window contains a brief description of the
differences, for example:
• Declaration of MAIN changed
• Variable fbMyNewInstance inserted in MAIN
• Number of methods/actions of FB_Sample changed
(Default): If this setting is enabled, the information on the contents of the PLC
project is loaded onto the PLC. This enables an extended check of the differences
between the current PLC project and the PLC project on the controller. The
difference in the extended check option is that the Application information
window contains an additional Online comparison tab, which shows a tree
comparison view. This will tell you which POUs have been changed, deleted or
added. The additional tab appears when you execute the blue underlined
command in the lower area of the Application information window ("Application
not current. Generate code now to display the online comparison?“).
(Default): When the PLC project is created, no tpy file associated with the
project is created.
: When the PLC project is created, a tpy file associated with the project is
created and stored in the project folder.
Please note that the value and configuration availability of this option depends on
whether or not the TPY file is configured as a target file (see Settings tab [} 112]).
• If the TPY file is enabled as a target file, the following happens:
◦ TwinCAT remembers the current status of the "Generate tpy file" option (=
"original value", see below.).
◦ If this is not already the case, the option "Generate tpy file" is automatically
activated next time the project is created.
◦ In addition, the "Generate tpy file" option is grayed out so that it cannot be
disabled by the user as long as the TPY file is configured as a target file.
• If the TPY file is subsequently disabled as a target file, the following happens:
◦ Next time the project is created, the "Generate tpy file" option is assigned its
"original value" (see above.).
◦ In addition, the option is no longer grayed out, making it available again for
configuration by the user.
Solution options
Compiler Version Defines the compiler version that TwinCAT uses during compilation and during
loading for compilation.
Please note that this setting is not a substitute for the Remote Manager.
If the PLC project is an application project, the Remote Manager should always
be used for handling different Engineering versions.
In this case, the compiler version should always be set to "latest".
The compiler version setting is only relevant if the PLC project to be version-
managed is a library project.
It is advisable to save the oldest version of the library that will ultimately be used
in practice. To this end, the compiler version must be set to the corresponding
fixed version (e.g. "3.1.4018.0").
Maximum number of Refers to the maximum number of warnings that TwinCAT issues in the Error
warnings List view.
The selection of displayed compiler warnings is defined in the category Compiler
warnings in the Project Settings dialog.
Replace constants
: TwinCAT loads the value directly for each constant of scalar type, i.e. not for
STRING, ARRAY or structures. In online mode, TwinCAT identifies the constants
in the declaration editor or monitoring window with a symbol preceding the value.
In this case, access via an ADR operator, forcing or writing, for example, is not
possible.
See also:
• Category Compiler Warnings [} 106]
This category is therefore not yet supported in the current TwinCAT version (reserved for future use).
The user must currently query an OEM license for his own library in the code of the library. See Query of an
OEM license in the PLC application.
The category SFC is used to configure the settings for SFC objects. Each new SFC object automatically has
the configured settings in its properties.
Flags tab
Implicitly generated variables (flags) for controlling and monitoring the processing in an SFC diagram.
Use
: The corresponding variable is used.
Declare
: The corresponding variable is created automatically. Otherwise, if the usage
is intended (Use is set), the user has to declare the variable.
An automatically declared flag variable appears in the declaration part of the SFC editor, but only in
online mode.
Build tab
Code generation
Calculate active
transitions only : TwinCAT generates code only for transitions that are currently active.
See also:
• SFC Flags
The category Visualization is used to configure the project-wide settings for objects of type Visualization.
General tab
Visualization Directories
Text list files Directory containing text lists available in the project for configuring texts for
different languages. TwinCAT uses this directory when exporting or importing text
lists, for example.
Click to bring up the Find Folder dialog, which allows you to select a
directory in the file system.
Image files Directory containing image files available in the project. Multiple folders are
separated by semicolons. TwinCAT uses this directory when exporting or
importing image files, for example.
Click to bring up the Find Folder dialog, which allows you to select a
directory in the file system.
Extended settings
Enables property
handling in all element : You can also configure a visualization element in those of its properties, in
properties
which you select an IEC variable, with a property. TwinCAT then generates
additional code for properties handling when compiling a visualization.
Requirement: Your IEC code contains at least one object of type Interface
The Visualization Profile category allows you to set the visualization profile.
Visualization profile
Specific Profile Profile, which TwinCAT uses in the project and which determines the visualization
elements that are available in the project.
The selection list contains all previously installed profiles.
The category Static analysis defines the checks that are taken into account in the static code analysis.
• If you have enabled the additional TE1200 Engineering license, the full range of Static Analysis
functions is available (saving and loading settings, more than 100 coding rules, naming conventions,
metrics, forbidden symbols).
• For more information about Static Analysis Full see:
TE1200 Static Analysis.
The following events are available, after which the commands listed in the list can be called:
Activate Configuration The required command is called up after the configuration has been enabled.
Plc Download The required command is called up after the PLC application has been
downloaded to the target system.
Plc Online Change The required command is called after a successful online change.
Plc After Compile The required command is called after a compilation of the PLC application.
Copy Copies files from parameter 1 (source path) to a location specified in parameter 2
(target path).
Execute Executes the application or script listed under parameter 1.
Source and target paths can contain virtual environment variables, which TwinCAT resolves accordingly.
Registry values are stored in the registry under the following key: \HKLM\Software\Beckhoff\TwinCAT3.
Example:
In the following example, the file SampleFile.xml file is copied from the Config project subfolder of the
solution to the folder C:\plc\config on the target system.
You can specify the maximum number of listed warnings in the Compile category.
See also:
• Command Build PLC project [} 115]
• Category Compile [} 97]
In the category UML you can change the UML compiler version. This setting is only relevant when using the
UML Statechart.
For more information on the configuration options, please refer to section "UML Compiler Version" of the
TF1910 TC3 UML documentation.
Write options
Engineering incompatibility of file version 1.2.0.0 (or higher) with TC3.1 < build 4024
Please note that objects saved with file version 1.2.0.0 (or higher) cannot be loaded with Engineer-
ing versions lower than TC3.1.4024!
Since an object is automatically saved with file version 1.2.0.0 when using the optional Base64 for-
mat, objects with Base64 format cannot be loaded with Engineering versions lower than
TC3.1.4024.
If a PLC project contains objects with the file version 1.1.0.1 and objects with the file version
1.2.0.0, the 1.1.0.1 objects are loaded with an Engineering version lower than TC3.1.4024. Objects
with file version 1.2.0.0 are not loaded.
The file version of a file saved with file version 1.2.0.0 can be reset to 1.1.0.1 using XAE version
TC3.1.4024 or higher.
(Default): The product or plugin version is written into the file (the version is
not visible in XAE; it shows up if the file is analyzed at file level).
• If you change the setting from disabled to enabled, a query window appears in
which you can select whether to add the product version to all existing files.
• Use case for the enabled option: This setting can be used to include the file
version in the file for debugging or tracking purposes, for example.
• Please note the following: If the file is saved with a different product version,
this leads to a change of this file, which shows up as a file difference when
using source code management systems.
Multiuser options
Solution options
: In such a case, the UML compiler version is automatically set to the latest
version if the option Autoupdate Uml Profile is enabled. In the case of such an
automatic update of the UML compiler version, a corresponding warning will be
displayed in the message window (e.g., "UML set from '4.0.2.0' to '4.0.2.1'").
See also:
• PLC documentation: Configuring a project
See also:
Target Archive
In the Target Archive group box you can specify which information is transferred to the target system
together with other data when you create a boot project.
Login Information COMPILEINFO file containing the compiler information of the PLC project.
Project Sources Source code files of the PLC project in readable source code form.
Compiled Libraries Libraries that are used in compiled form in the PLC project.
Source Libraries Libraries that are used in legible source code form in the PLC project.
File/E-Mail Archive
In the File/E-Mail Archive group box, you can specify what information is stored when archiving a PLC
project [} 52], a TwinCAT project [} 232] or a Solution [} 50]. If you activate the corresponding checkbox, the
files described in the following table are stored in the project archive.
Login Information COMPILEINFO file containing the compiler information of the PLC project.
Project Sources Source code files of the PLC project in readable source code form.
Compiled Libraries Libraries that are used in compiled form in the PLC project.
Source Libraries Libraries that are used in legible source code form in the PLC project.
Core dump Core dump file, which is located in the PLC project directory, and the compile info
files, which are located in the "_CompileInfo" folder in the project directory.
Note: The compile info files are also saved in the archive if the "Core Dump
[} 135]" setting is activated, as these files are needed in order to be able to use
the core dump.
Target Files
In the Target Files group box you can set which information is transferred to the \Boot\Plc folder when you
create a boot project on the target system.
Target Behavior
Clear Invalid Persistent The backup of the stored persistent data is ignored. This ensures that any invalid
Data data is not accepted but instead discarded.
See: Backup of persistent data [} 113]
Persistent data is regularly stored in a .bootdata file in the TwinCAT\Boot folder during a TwinCAT system
stop/shutdown. At the next system startup (TwinCAT Run mode) this file is read, and the persistent variables
in the runtime system are initialized with the values from the file. The system renames the .bootdata file
to .bootdata-old.
This backup file (.bootdata-old) of the persistent data is read at system startup if the file (.bootdata)
containing the persistent data does not exist. This is an exception, but it can occur, for example, if an IPC
without UPS experiences a power failure and TwinCAT could not shut down properly.
• If it is foreseeable that the contents of the backup file will not be usable at a new system start, you can
enable the option Clear Invalid Persistent Data to ignore the backup file. This can be the case, for
example, if batch information or tool data has be stored in a production facility and has to be up-to-
date.
• If the structure of the persistent data (its data types or symbol paths in the program code) is changed
due to online changes, it makes no sense to subsequently load an obsolete persistent data file. In this
case, you should enable the Clear Invalid Persistent Data option in advance.
In both cases, you should also ensure that a current persistent data file is available. Function blocks such as
FB_WritePersistentData (PLC Lib Tc2_Utilities) and UPS protection against sudden power failures are
available for this purpose.
When using persistent data, the corresponding flags (BootDataLoaded and OldBootData) from the global
structure PlcAppSystemInfo should always be evaluated (see documentation on System > Global Data
Types).
If neither the regular file nor the backup file can be loaded or if they don't exist, the variables marked as
PERSISTENT are reinitialized in the same way as other "normal" variables, either with their explicitly
specified initial values or with the standard initializations.
See also:
• PLC documentation: Remanent Variables - RETAIN, PERSISTENT
5.5 Build
Symbol:
Function: This command starts the compilation process or the code generation for all projects contained in
the solution.
All projects contained in a solution are compiled one after the other. This also concerns the projects (PLC, C
++, etc.) integrated below a TwinCAT project. The steps performed for a PLC project are described in
section Command Build PLC project [} 115].
When rebuilding the solution, it will first be cleaned (see also: Command Clean Solution [} 114] and
subsequently built (see also: Command Build Solution [} 114]).
See also:
• Command Rebuild a PLC project [} 116]
All projects contained in the solution are cleaned in succession. This also concerns the projects (PLC, C++,
etc.) integrated below a TwinCAT project. The steps executed for a PLC project are described in the section
Command Clean PLC project [} 116].
Call: Context menu of the PLC project object (<PLC project name> Project) in the Solution Explorer
As opposed to the Command Build PLC project [} 115], in which only the objects used are checked, when
this command is executed the syntax of all objects in the PLC project is checked.
The command does not lead to code generation. No file with information on the compilation run is
created in the project directory.
Symbol:
Function: This command starts the compilation process or the code generation for the currently active
TwinCAT project.
Call: Build menu if a TwinCAT project is currently selected, or context menu of the TwinCAT project
All of the projects (PLC, C++, etc.) contained in the TwinCAT project are compiled one after the other. The
steps performed for a PLC project are described in section Command Build PLC project [} 115].
See also:
• Command Rebuild a TwinCAT project [} 115]
Call: Build menu if a TwinCAT project is currently selected, or context menu of the TwinCAT project
When rebuilding the project, the TwinCAT project will first be cleaned (see also: Command Clean TwinCAT
project [} 115] and subsequently built (see also: Command Build TwinCAT project [} 115]).
Call: Build menu if a TwinCAT project is currently selected, or context menu of the TwinCAT project
All of the projects (PLC, C++, etc.) contained in the TwinCAT project are cleaned one after the other. The
steps executed for a PLC project are described in the section Command Clean PLC project [} 116].
See also:
• Command Rebuild a TwinCAT project [} 115]
Symbol:
Function: This command starts the compilation process or the code generation for the currently active PLC
project.
Call: Build menu if a PLC project is currently selected, or context menu of the PLC project object (<PLC
project name> Project) in the Solution Explorer
During the compilation, TwinCAT carries out a syntactic test of all objects used in the PLC project. The
compilation procedure is always carried out automatically when you wish to log the project in with a changed
program. After the check has been completed, TwinCAT displays any error messages or warnings in the
Error List [} 83] view.
Apart from that, the compilation information of the PLC project is created when building the project and
saved in a local file (*.compileinfo) in the Solution.
If the program was not changed since the last error-free compilation process, it is not recompiled. If the
syntactic test is to be performed anyway, use the Command Rebuild a PLC project [} 116].
Call: Build menu if a PLC project is currently selected, or context menu of the PLC project object (<PLC
project name> Project) in the Solution Explorer
When rebuilding the project, the project will first be cleaned (see also: Command Clean PLC project [} 116]
and subsequently built (see also: Command Build PLC project [} 115]).
Call: Build menu if a PLC project is currently selected, or context menu of the PLC project object (<PLC
project name> Project) in the Solution Explorer
The compilation information was created during the last building of the project or the last online change or
download of the PLC project and was saved in a local file (*.compileinfo) in the project folder. Unless
configured otherwise (see also: PLC project settings, Settings tab [} 112]), the compilation information is
transmitted to the target system during an online change or download. When the PLC project is cleaned,
only the local compilation information is removed. The compilation information on the target system is
retained.
See also:
• Command Rebuild a PLC project [} 116]
5.6 Debug
Symbol:
The command Toggle Breakpoint can be used to set a new breakpoint directly at the current cur-
sor position in online mode.
See also:
• Command Toggle Breakpoint [} 120]
• PLC menu: Command Breakpoints [} 128]
• PLC documentation: Use of breakpoints
Condition tab
The dialog defines the conditions under which the program execution should stop at the breakpoint.
Tasks
Hit Count
Hit Count Break always: The program always stops at this breakpoint.
Alternative: The program stops at the breakpoint when the breakpoint is hit
as often as defined below (enter the desired number of hits or select from
the number list):
• Break if the Hit Count matches
• Break if the Hit Count is a multiple of
• Break if the Hit Count is greater or equal
Condition
Break, if TRUE Definition of conditional breakpoints. The condition can only be entered in
online mode.
The use of conditional breakpoints slows the code execution, even if the condition is not TRUE.
Location tab
POU Function block of the active PLC project in which the breakpoint is to be
positioned.
Position Position of the breakpoint in the POU. Specification in the form of line and
column numbers (text editor) or as network or item numbers.
Instance path: For function blocks, you must specify whether the breakpoint should be set
in the implementation or in an instance
TwinCAT sets the breakpoint in the instance. With this option, you
select the instance path.
activated: , deactivated:
Execute the following code Code that is executed when the execution point is reached.
Loop constructs (For, While) and IF or CASE expressions are not possible.
Print a message in the device This option is not available.
log
See also:
• PLC documentation: Use of breakpoints
Symbol:
See also:
• Command New Breakpoint > Breakpoint Properties dialog [} 117]
• PLC documentation: Use of breakpoints
Symbol:
Requirement: The PLC project is in online mode. The cursor is on a disabled breakpoint.
See also:
• PLC documentation: Use of breakpoints
Symbol:
Requirement: The PLC project is in online mode. The cursor is on an enabled breakpoint.
See also:
• PLC documentation: Use of breakpoints
See also:
• PLC documentation: Use of breakpoints
Symbol:
Hotkey: [F10]
Requirement: The PLC project is in online mode. The program is at a program step.
In a Step Into statement, the command corresponds to the single step. However, if the processing reaches
a function block call, the step over results in complete processing of the called function block within the
current step. A complete action is executed in a sequence chart.
Use the Step Into command to execute a called function block step-by-step.
See also:
• Command Step into [} 121]
• PLC documentation: Stepping
Symbol:
Hotkey: [F11]
Requirement: The PLC project is in online mode. The program is at a program step.
In single step mode, the program stops before the next statement. If necessary, the execution switches to an
another POU. If the current position is a function call or function block call, the execution stops before the
first statement of the called function block.
In all other situations, the command has the same effect as the command Step Over.
See also:
• Command Step over [} 121]
• PLC documentation: Stepwise processing of the program (stepping)
Symbol:
Hotkey: [Shift] + [F11]
Function: The command executes the program up to the program start, or the calling program.
The command executes the program up to the program start, or the calling program.
If a program does not contain any calls, the command causes the program to run until it is started. If the
current position is within a called POU, this command results in execution up to return to the calling function
block. In the case of nested calls, you can therefore use this command to go back step-by-step in the
hierarchy of calls.
See also:
• PLC documentation: Stepwise processing of the program (stepping)
Symbol:
Function: This command jumps to the program statement that will be executed in the next step.
Requirement: The PLC project is in online mode. The program is at a program step.
This is useful when you have placed the cursor elsewhere or at a different POU during step-by-step
processing of a program. The window of the corresponding function block reappears in the foreground, and
the cursor is placed before the next statement to be executed.
See also:
• PLC documentation: Stepwise processing of the program (stepping)
Requirement: The PLC project is in online mode. The program is at a program step.
Place the cursor at the desired statement and select the command. In this case the statements between the
current statement and the selected statement are not executed.
See also:
• PLC documentation: Stepwise processing of the program (stepping)
Symbol:
Requirement: The PLC project is in online mode. The program is at a program step.
Place the cursor at the desired stop position and select the command. The statements that lie between the
current and the defined position are then executed in one step.
See also:
• PLC documentation: Stepwise processing of the program (stepping)
5.7 TwinCAT
Symbol:
Function: The command enables a new configuration. The previous old configuration will be overwritten.
Within the confirmation window that appears after this command is executed, you can set whether the
Autostart boot project setting should be activated for all PLC projects in the TwinCAT project.
See also:
• Command Activate boot project [} 235]
• Command Autostart boot project [} 236]
Symbol:
Symbol:
Symbol:
Symbol:
Function: The command starts a device scan. The system searches for available I/O devices, connected
"boxes" and, if applicable, bus modules and IP-Link extension modules.
Requirement: The "I/O" object is selected in the TwinCAT project structure in the Solution Explorer.
Symbol:
Function: The command sets found I/O devices to free-run mode. This means, for example, that Bus
Terminals can set (write) I/O channels to a certain status, without a PLC project or another triggering task
being active.
If the target system was previously in Run mode, the command Reload Devices must be executed
once before the I/O drivers for the device can be set to free-run state.
Symbol:
Function: The command connects to the selected target system and displays the parameter values and
settings that are active on the target system in the corresponding views.
Select <Local> to load the control code directly into the local runtime of your programming device. If you
want to select another target device, select Choose Target System from the drop-down list.
Symbol:
Function: The command displays the subelements of an element with their properties and values in the
overview view of a device. The command can be enabled or disabled. The command does not refer to the
representation of the elements in the TwinCAT project tree.
Symbol:
In the Software Protection dialog you can define the security and user settings for a TwinCAT project.
Further information about the security and user settings can be found in the Software Protection
documentation.
Symbol:
Function: This command makes it possible to make disabled objects invisible and visible again in the entire
project tree. In this way, the display can be limited to active objects, thereby increasing clarity within the
project tree.
5.8 PLC
5.8.1 Window
Symbol:
Function: The command opens the view Watch List <n>. You can fill a Watch List with variables from your
project in order to be able to monitor, force or write the values for these variables in online mode within a
single view. n can be 1, 2, 3, 4, which means that you can configure up to four Watch Lists.
See also:
• PLC documentation: Using Watch Lists
Symbol:
Function: The command opens the Watch all forces view, which is a special form of a Watch List.
The view contains all variables of the PLC project currently prepared for forcing and all forced variables of
the PLC project in a list. In the list you can perform the actions that are also possible in other Watch Lists. In
addition, the Unforce selection menu contains the following commands:
• Unforce and keep all selected values: For all selected entries in the list, the variables are set to the
forced value and forcing is canceled.
• Unforce and restore all selected values: For all selected entries in the list, the variables are reset to
the value they had before forcing, and forcing is canceled.
See also:
• PLC documentation: Forcing and Writing Variables Values
• PLC documentation: Using Watch Lists
Symbol:
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).
Toolbar
Print Cross Reference List: The standard dialog for setting up a print job appears.
Symbol The locations for the symbols (variables, POUs, DUTs) are grouped by
declaration. The declaration occurrence comprises 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 “nVar” in the project and a local declared
variable “nVar” in a POU, then two root node entries will be listed after a text
search for cross-references with the occurrences of the variable “nVar” below
each.
POU POU name, DUT name; also task name in case of a function block call in the task
configuration, for example.
Variable Pure variable name, for example “nVar”.
Access Type of access to the variable at the occurrence location:
Declaration / Read / Write / Call.
Special case for pointers: An assignment of type pSample := ADR(nVar1) is
displayed as Write | Address when searching for “nVar1”. Reason: Any write
access to pSample is not displayed when searching for “nVar1”. Write access is
also possible by means of pointer variables.
Type Data type of the variable.
Address IEC address, if assigned to the variable. 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)” or “Line 9 (Decl)).
Object POU name plus complete path of the occurrence location in brackets. Example:
"MAIN [TwinCAT_SampleProject: PLC: SamplePLCProject]"
Comment Comments if available in the declaration of the variable
The search returns all locations in the project as well as in inserted, uncompiled libraries.
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 current Limits the display of results to the selected symbol declaration if multiple
declaration 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:
• Command 'Limit results to current declaration'
• Command Collapse All Folds
• Command Expand All Folds
• PLC documentation: Using the Cross Reference List to find Occurrences
Symbol:
Breakpoints view
The view provides an overview of all defined breakpoints of an application. All breakpoint commands are
available within the view.
Toolbar
See also:
• Command New Breakpoint > Breakpoint Properties dialog [} 117]
• Command Toggle Breakpoint [} 120]
• PLC documentation: Use of breakpoints
Symbol:
Callstack view
This view is useful if you want to run programs step-by-step. It shows the currently reached position with the
complete call path.
Application Name of the active PLC project that controls the currently reached program block.
Task Name of the task that controls the currently reached program block.
POU Name of the program block in which the program execution is located.
The first line in the list describes the current execution position. It is marked with a
yellow arrow. If this position is in a function block called by another function block,
the position of the call is described in the second line. If the caller is called by
another function block, this call position is described in the third line and so on.
Location Position within the program block where the program execution is located
• Row and column number for text editors
• Network or element number for graphical editors
Instance path Instance in which the program is executed.
The Call Stack is also available in offline mode and in normal online mode if you are not using any
debugging functions. In this case, it contains the last position displayed during a step-by-step execution, but
in "gray" font.
In contrast to the Call Stack view, the Call Tree view provides call information on a function block
at any time.
See also:
• PLC documentation: Use of breakpoints
Symbol:
Requirement: As a rule, the control system supports the functionality. At least one application is loaded and
in online mode.
Memory View
Application Select the PLC project for which the memory view is to be displayed. You must be
logged on to the controller with this project. It does not have to be the "active PLC
project".
Area • Absolute: Memory is addressed directly and completely. The address is in the
input field next to it.
• Area <i>: Memory areas of the controller, starting with Area 0. Memory areas
reserved exclusively for code are not displayed.
Address Absolute start address of the core dump
Requirement: Absolute is selected in the range.
Offset Address offset to the selected memory area in bytes, for example 0x0200,
16#0200 or as decimal number 512
Requirement: A memory area is selected in area, e.g. Area 0. TwinCAT offers all
currently used memory areas for selection. Memory areas reserved exclusively for
code are not displayed.
Find out the address for a variable: Input Assistant for selecting an IEC variable
appears. If you have selected a variable, TwinCAT presets the start address with
the variable address.
Load/update memory view
Note TwinCAT does not check whether the changes are permissible. You
can crash the application by making inadvertent changes
Load changes to PLC: TwinCAT transfers the new data to the controller.
Requirement: You have overwritten one or more bytes in the memory view.
Save the contents of the memory to a file: The dialog "Memory content as binary
file" appears. Select a location.
Columns Number of columns in the hexadecimal representation of the memory dump. Two
bytes are displayed per column. With Auto, the number of columns adjusts to the
window size. To the right of it, the data is displayed as text.
Symbol:
The Call Tree is available at any time before the application is compiled. It is a static representation of the
callers and calls of the function block, which you can specify explicitly. This means that the tree always
contains two root nodes, under which the respective call sequence is displayed as consecutive indented
entries. Recursive calls are quickly recognizable in this tree view.
POU Name The name of the program block can be entered manually, by dragging it from
TwinCAT searches for the function block specified in "Function block name" and
< Find function block displays its callers and calls.
The Input Assistant dialog appears for selecting a function block call or instance
Take function block call. The Call Tree is automatically updated after the selection.
from Input Assistant
TwinCAT jumps to the point where the function block is used in the source code
Display source code of your program.
position of the selected
function block
The selection in the Call Tree jumps to the next or previous function block in the
Show source code call structure. At the same time, the corresponding source code position is
position of the next opened in the respective editor.
function block
Double-clicking on an entry in the Call Tree also opens the corresponding source
Show source code code position.
position of the previous
function block
Location For the root nodes in the Call Tree: Line number of the declaration ("Decl") of the
function block.
For the callers or calls under the root node: Depending on the implementation
language, line number, column number, network number of your position.
Collapse All The expanded entries in the Call Tree are collapsed except for the two root
nodes.
Display source code TwinCAT jumps to the point where the function block is used in the source code
position of your program.
Set as new root node The entry selected in the Call Tree appears in "function block name". The tree is
automatically adapted for the new root nodes.
In contrast to the static Call Tree, which always provides call information for a function block, the
Call Stack view is intended for immediate information during the step-by-step processing of a pro-
gram. The Call Stack always shows the complete call path of the currently reached position.
This view is used to configure the memory reserves for the online change for function blocks.
Function blocks:
Settings:
Memory reserve (in bytes) Input field for the memory reserve for the selected
function block.
Specification in bytes
Requirement: The PLC project is not yet on the
controller or you have allowed the memory reserve to
be changed by clicking the Allow button in the Allow
editing area.
Apply to selection The memory reserve (in bytes) is assigned to the
function block, and the Memory reserve table column
is updated.
If multiple function blocks are selected, the entered
value is assigned to each function block.
To update the columns Size, Number of instances,
Additional memory for all instances, and Remaining
memory reserve size, first choose Create > Create,
then click the Browse application button.
Enable editing:
Information:
See also:
• PLC documentation: Program PLC project > Configure memory reserve for online change
The core dump file that is created is stored directly in the PLC project directory: <PLC project name>.<PLC
project GUID>.core
See also:
• PLC documentation: PLC project at runtime > Error analysis with core dump
• Command Load core dump [} 136]
Loading into the project causes an online view of the PLC project to appear, with the state the PLC project
had at the time when the core dump was created. You can view the variable values contained in it. The call
tree is also available.
The Core Dump view can only be closed again using the Command Close core dump [} 137] com-
mand. The Logout command is not effective in this view.
See also:
• PLC documentation: PLC project at runtime > Error analysis with core dump
• Command Generate core dump [} 135]
• Command Close core dump [} 137]
Requirement: The PLC project is in offline mode and you have loaded a core dump file into the project.
See also:
• PLC documentation: PLC project at runtime > Error analysis with core dump
With this command, TwinCAT performs a syntax check and generates the program code. This code is
loaded onto the controller. TwinCAT also generates the compile log <projectname>.<devicename>.
<application ID>.compileinfo in the project directory.
During the download, all variables except persistent variables are reinitialized.
The description of the Login command explains the possible situations when logging in and loading.
If you try to load a PLC project while the same version of this project is already on the controller, the
following message appears: "The program is unchanged. Application was not loaded". TwinCAT does not
load the project onto the PLC.
When loading, a log of the actions that have taken place (creating the code, carrying out initializations, etc.)
is displayed in the Output view. In addition, information about memory areas, the size of the code, global
data and allocated memory is displayed. For the sake of clarity, in contrast to online change, the changed
function blocks are no longer listed.
See also:
• Command Login [} 139]
An online change is not possible after the Clean All and Clean commands. The cleanup process deletes the
compile information (compile log) that is automatically saved each time code is generated, and which forms
the basis for an online change.
WARNING
Damage to property and persons due to unexpected behavior of the machine or system
An online change modifies the running application program and does not cause a restart. Depending on the
machine being controlled, the machine or workpieces may be damaged or the health and life of people may
be endangered.
• Make sure that the new program code results in the desired behavior of the controlled system.
Project-specific initializations
When an online change is performed, the project-specific initializations (homing etc.) are not exe-
cuted because the machine retains its status. For this reason, the new program code may not have
the desired effect.
Pointer variables
Pointers retain their value from the last cycle. If a pointer points to a variable that was resized by the online
change and moved in the memory as a result, the pointer variable no longer returns the correct position of
the variable. Make sure that pointers are reassigned in each cycle.
During an online change with possibly unintended consequences, TwinCAT lists the changed interfaces,
affected variables and all function blocks for which new code has been generated in the Details dialog box. If
storage locations change, a dialog is displayed to indicate possible problems with pointers.
See also:
• PLC documentation: Programming a PLC project
Symbol:
Function: This command connects the programming system (the selected PLC project) with the target
system (controller) and thus establishes online operation. An instance of the PLC project is created on the
target system and loaded.
Call: PLC menu or TwinCAT PLC toolbar options or context menu of the PLC project object (<PLC project
name>Project) in the Solution Explorer
Requirement: The PLC project is error-free and the target system is in Run mode.
If a PLC project has not been compiled since its last change, TwinCAT compiles the project before logging
in. This operation corresponds to the command Compile in logged-out state.
If errors occur during the compilation, a message dialog appears. The errors are displayed in the Error List
view. You can then decide whether you want to log in without loading the program onto the controller.
See also:
• Command Build PLC project [} 115]
Error on login
If an error occurs while logging on to the controller, TwinCAT interrupts the loading process with an error
message. The error dialog allows you to display the error details. If an exception error has occurred and the
text *SOURCEPOSITION* is contained in the log message, you can use the command Display in Editor to
display the relevant function in the editor. The cursor jumps to the line causing the error.
If TwinCAT loads the project onto the controller when logging in, the following information is displayed in the
message window:
• Generated code size
• Size of global data
• Resulting memory requirement on the controller
In online mode, you cannot change the settings of devices or modules. To change device parame-
ters, you must log the PLC project out. Depending on the bus system, there may, however, be
some special parameters that you can change in online mode.
TwinCAT stores the view configuration separately for online and offline mode. In addition, views that
cannot be used in an operation mode are closed. For this reason, the view may change automati-
cally when you log in.
Symbol:
When you call the command from the PLC menu, it affects the currently active PLC project.
Symbol:
When you call the command from the PLC menu, it affects the currently active PLC project.
Symbol:
Function: The command terminates the connection between the development system and the target system
(controller or simulated device), thus switching to offline mode.
Symbol:
Function: The command resets all variables of the active PLC project to their initialization values, except the
PERSISTENT variables and the RETAIN variables.
All variables of the active PLC project are reset, with the exception of the PERSISTENT variables and the
RETAIN variables. The situation is the same as when an application program that has just been loaded onto
the controller ("cold start") is started.
Breakpoints of the PLC program that were enabled before the active PLC project was reset are still enabled
after execution of the command. Breakpoints that were previously disabled are still disabled after the
command is executed.
If you select the command while the program is stopping at a breakpoint, you will be asked whether the
current cycle is to be terminated. Alternatively, TwinCAT carries out the reset immediately. However, not all
runtime systems are able to perform a reset without terminating the current cycle.
After the reset, you must start the PLC program with the Start command.
See also:
• PLC documentation: Remanent Variables - PERSISTENT, RETAIN
• PLC documentation: Resetting the PLC project
• Command Reset origin [} 141]
• Command Start [} 140]
Symbol:
Function: The command resets all variables of the active PLC project, including the remanent variables
(RETAIN, PERSISTENT variables), to their initialization values and deletes the application program from the
controller.
A reset deactivates the currently set breakpoints in the program. If you select the command while the
program is stopping at a breakpoint, you will be asked whether the current cycle is to be terminated.
Alternatively, TwinCAT carries out the reset immediately. However, not all runtime systems are able to
perform a reset without terminating the current cycle.
See also:
• Command Reset cold [} 140]
Symbol:
Function: The command executes the active PLC program for one cycle.
Requirement: The PLC project is in online mode and the program is at a program step.
Symbol:
See also:
• PLC documentation: Flow Control
Symbol:
Function: The command permanently sets the value of a variable on the controller to a predefined value.
CAUTION
Material damage and personal injury due to unexpected behavior of the controlled system
Changing the values of variables in a PLC program running on the controller can lead to unexpected be-
havior of the controlled system. Depending on the controlled system, damage to equipment and workpieces
can occur or people's health and lives may be endangered.
• Evaluate possible risks before forcing variable values and take appropriate safety precautions.
With this command, TwinCAT permanently sets one or more variables of the active application on the
controller to defined values. This setting is carried out at the beginning and end of each processing cycle.
Order of execution: 1. Read inputs, 2. Force values, 3. Execute code, 4. Force values, 5. Write outputs.
The command Force values for all applications, which affects all PLC projects in the TwinCAT
project, is not included in a menu by default.
See also:
Preparing a new value for the next write or force Value that TwinCAT writes to the variable during the
operation next force operation
Remove preparation with a value TwinCAT deletes the prepared value.
Release the force, without modifying the value. TwinCAT retains the forced value and terminates
forcing. TwinCAT marks the variable with <Unforce>.
Release the force and restore the variable to the TwinCAT resets the forced value and terminates
value it had before forcing it. forcing. The variable is marked with <Unforce and
restore>.
See also:
• Command Force values [} 142]
Symbol:
Function: The command resets the forcing of all variables. The variables get their current value from the
controller.
CAUTION
Material damage and personal injury due to unexpected behavior of the controlled system
Changing the values of variables in a PLC program running on the controller can lead to unexpected be-
havior of the controlled system. Depending on the controlled system, damage to equipment and workpieces
can occur or people's health and lives may be endangered.
• Evaluate possible risks before resetting forced variable values and take appropriate safety precautions.
The command Unforce values for all applications, which affects all PLC projects in the TwinCAT
project, is not included in a menu by default.
See also:
• Command Force values [} 142]
• PLC documentation: Forcing and Writing Variables Values
Symbol:
Function: The command once sets the value of a variable on the controller to a predefined value.
CAUTION
Material damage and personal injury due to unexpected behavior of the controlled system
Changing the values of variables in a PLC program running on the controller can lead to unexpected be-
havior of the controlled system. Depending on the controlled system, damage to equipment and workpieces
can occur or people's health and lives may be endangered.
• Evaluate possible risks before writing variable values and take appropriate safety precautions.
With this command, you set one or more variables of the active PLC project on the controller to defined
values once. Writing takes place once at the beginning of the next cycle.
The command Write values for all applications, which affects all PLC projects in the TwinCAT
project, is not included in a menu by default.
See also:
• Command Force values [} 142]
• PLC documentation: Forcing and Writing Variables Values
The display formats "Binary" and "Hexadecimal" are unsigned, "Decimal" is signed.
See also:
• PLC documentation: Monitoring Values
The dialog is used to select the textual information to be included in the localization template.
Names Texts such as dialog title, object names in the PLC project tree
Identifier Variable identifier, example: "nCounter"
Strings For example, "count" in the following declaration: sVar : STRING := 'count'
Comments Comment texts in the programming blocks
Position information Select which positions of the text categories in the project selected above should
be included in the translation file. The position information is always in the first
line(s) of a section for a translation.
Example:
#: D:\Proj1.project\Project_Settings:1
msgid „Projekteinstellungen“
msgstr „„
• "All": All found positions of the text are listed.
• "First occurrence": The translation file includes the position in the project where
the text to be translated occurs for the first time.
• "None"
Create The button opens the dialog for saving a file. The translation template is created
in a text file of type POT Translation Template (*.pot). Each further create process
generates a complete new template file.
Symbol:
Function: The command switches between the currently set project localization and the <Original version>.
Call:
• Menu Project > Localization
• Button in the Manage Localizations dialog
• Button in the toolbar
Requirement: A project is open. A standard localization for the project is defined in the Manage
Localizations dialog.
See also:
• Command Manage Localization [} 145]
5.9 Tools
General tab
Enable AutoConnect
: When you drag and paste a CFC element onto the editor's workspace,
TwinCAT automatically connects unlinked pins that "touch" each other. Make sure
that you do not create any unwanted connections when you move elements!
Prepare values in
implementation part : In online mode, you can also prepare variable values for writing and forcing
in the implementation part of the CFC function block. In addition, TwinCAT
displays the values that have just been prepared in the inline monitoring box of
the variables in angle brackets.
View tab
Print tab
Layout options
See also:
• PLC documentation: Programming in CFC
• PLC documentation: Programming languages and their editors
: Textual view
: Tabular view
The following option defines the view that appears by default when you open a
programming object:
• Always textual
• Always tabular
• Remember recent setting (per object)
• Remember recent setting (globally)
See also:
• PLC documentation: Using the declaration editor
General tab
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. If
TwinCAT also displays the network title, the comment appears in the line
below.
Show box icon The function block symbol is displayed in the block element in the FBD and
LD editor. The standard operators also have symbols.
Show operand comment TwinCAT displays the comment that you have assigned to a variable in the
implementation part. The operand comment only refers to the local usage
point of the variable, in contrast to the "symbol comment".
Show symbol comment TwinCAT displays the comment that you have assigned to a variable or
symbol in the declaration above the variable name. In addition to or instead
of the symbol comment, you can also assign a local "operand comment".
Show symbol address If an address is assigned to a symbol (variable), this address is displayed
above the variable name.
Show network separators A dividing line is displayed between the individual networks.
Behavior
Placeholder for new operands The operand field of the pins of the new function blocks is left blank
(instead of "???").
Empty operands for function Inserts empty operands instead of ???.
block pins
Font
FBD tab
View
Behavior
LD tab
View
Behavior
IL tab
View
Behavior
Print tab
Layout options
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: Programming languages and their editors
A mapping defines how a library reference looks like after conversion of the project to the current format.
There are three options:
• You retain the reference. This means that TwinCAT also 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 previously referenced library.
• You delete the reference. This means that the converted project no longer integrates the library.
During the next conversion of an old project, TwinCAT applies all listed mappings to its library references.
This means that you have to repeat the mapping definition if the same library is included again in a project
to be converted. You can enter a new mapping in the last line.
Source Library Path of the library that is included in the project before the conversion.
Double-clicking an entry makes the field editable and the Input Assistant
button appears.
Target Library Name and location of the library to be included in the project after
conversion.
Double-clicking on an entry opens the "Set target system library" dialog.
See also:
• PLC documentation: Using libraries
OnlineView
Open last online views • TRUE (default setting): On login the editor
windows of the previous online session open. The
current offline view remains open.
• FALSE: On login the offline view remains open.
The editor windows of the previous online session
are discarded and not reopened.
Additionally export declarations By default, TwinCAT splits the declaration parts into individual variables in
as plain text accordance with the PLCopenXML schema, resulting in loss of formatting
and some commentary information.
: Formatting and comments are retained. TwinCAT also writes the plain
text of the exported declaration part to the PLCopenXML file, thus
extending the PLCopenXML schema.
Export folder structure
: TwinCAT also exports the folders if they contain one of the selected
objects. This is a TwinCAT-specific extension to the PLCopenXML schema.
See also:
• Command Export PLCopenXML [} 245]
• Command Import PLCopenXML [} 245]
• PLC documentation: Exporting and importing a PLC project
Layout tab
Elements
Defines the sizes of the SFC elements Step, Action, Qualifier and Property. Specify the values in grid units.
1 grid unit = font size currently set in the text editor options (Text area / Font). The settings always take
effect immediately in all currently open SFC editor windows.
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
Font
The sample text shows the currently set font. Click on it to change the font.
Step actions
View tab
Property visibility
Lists the item properties of the Common and Specific categories and defines display options.
Property Defines the item properties that are shown next to the item in the SFC diagram.
Value
: Display of the property value.
With name
: Display of the property value with name.
Online
See also:
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: Programming languages and their editors
Auto declare If you change the name of a variable or add an input or output variable by
calling the autodeclaration (Auto Declare dialog), the option Apply
changes using refactoring, which appears during editing, is automatically
enabled. After confirming the dialog, the Refactoring dialog opens and you
can change the variable project-wide.
See also:
• Command Auto Declare [} 65]
• Command Rename '<variable>' [} 74]
• Command Add '<variable>' [} 75]
• Command Remove '<variable>' [} 77]
: The List components function only offers the input and output
variables of an FB instance for selection.
List components after typing a
dot (.) : Enables the List components function. This means: If you enter a dot
at a point where TwinCAT expects an identifier, a selection list with input
options appears.
List components immediately Requirement: Option List components after typing a dot (.) is enabled.
when typing
: After entering any character string, a selection list of the available
identifiers and operators appears
Insert with namespace
: TwinCAT automatically inserts the namespace before the identifier.
Convert keywords to uppercase
automatically (AutoFormat) : TwinCAT automatically writes all keywords in capital letters.
Automatically list selection in
cross-reference view : The Cross Reference List automatically displays the references of the
variables/POUs/DUTs that are currently selected or in which the cursor is
positioned.
See also:
• PLC documentation: Programming languages and their editors
• PLC documentation: Using the input assistant
• PLC documentation: Find locations where the cross reference list is used
Editing tab
Number of undos Maximum number of steps for which the command Edit > Undo is
available.
Folding Defines the structuring of the code by indentations.
When you select an indentation, you can expand or collapse the
indentation section using a plus or minus sign to the left of the first line of
each section.
• Indent: TwinCAT combines all lines that are indented relative to the
previous line in one indentation unit.
• Explicit: You explicitly use comments to identify the code section to be
grouped in an indentation unit: The section must be preceded by a
comment containing 3 opening curly brackets "{{{" and followed by a
comment containing 3 closing curly brackets "}}}". 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 for the wrap margin.
• Hard: The line break occurs after the number of characters specified at
the wrap margin.
Tab width Number of characters
Keep tabs
: The space that you have inserted with the [ Tab ] key will not
subsequently be converted by TwinCAT into individual spaces.
Indent width If you have enabled the option Smart automatic indentation or Smart with
code completion, TwinCAT inserts the corresponding number of blanks at
the beginning of the line.
Auto Indent • Do not indent automatically
• Block: A new line automatically adopts the indentation of the previous
line.
• Intelligent: Lines that follow a line containing a keyword (for example,
VAR) automatically indent by the specified indent width.
• Smart with code completion: Indentation as with the Smart option, in
addition TwinCAT inserts the final keyword (e.g. END_VAR).
Matching brackets If the cursor is positioned before or after a bracket within a code line,
TwinCAT marks the corresponding closing or opening bracket with a frame
in the set color.
Line markers TwinCAT marks the end of each editor line with a small horizontal line in
the specified color after the last character of the line (including spaces).
Wrap guide: If a soft or hard line break is enabled, the defined wrap guide is displayed
by a vertical line in the selected color.
Caret color Color of the cursor character
Selection color Color of the selected text area
Inactive Color of a selection if the corresponding window is not active (focus is on
another window).
Folded line foreground Color of the header line of a closed indented section in the code
Folded line background Header line of a closed indented section in the code is highlighted in color.
Font A click on the field opens the standard dialog for configuring the font.
Margin tab
Settings for the left margin of the text editor window, which is separated by a vertical line from the input
area:
Line numbering Display of the line numbers in the declaration and implementation part,
each starting with 1
Foreground color Line number color
Background color Margin color
Show bracket scope Bracketing comprises the lines between the keywords that open and close
a construct, such as IF and END_IF.
If the option is enabled and the cursor is positioned before, after or in one
of the keywords of a construct, the bracketing area is indicated by a square
bracket in the margin. You can select the color of the brackets from the
selection list for this option.
Focused border color Color of the dividing line between the margin and the input area
Unfocused border color Color of the dividing line between the margin and input area of the currently
inactive part of the window
Mouse actions One of the following actions can be assigned to each of the specified
mouse actions or mouse button shortcuts. TwinCAT executes the actions
when you execute the mouse action on the plus or minus sign before the
header line of a bracketed area:
• Select fold: TwinCAT selects all the lines of the bracketed area.
• Toggle fold: TwinCAT opens or closes the bracketed area, or, in case of
nested bracketing, the first level of the bracketed area.
• Toggle fold fully: TwinCAT opens or closes all levels of a nested
bracketed area.
Monitoring tab
See also:
• PLC documentation: Programming languages and their editors
Show prompt when deleting Objects can be deleted either only from the diagram or from the diagram
objects from diagram and from the project.
See also:
• UML documentation: UML
General tab
These settings are only used for integrated visualization, i.e. not for the TwinCAT PLC HMI (Tar-
getVisu) and TwinCAT PLC HMI Web display variants.
Presentation options
Fixed
The visualization retains its original size.
Isotropic
The visualization retains its proportions.
Anisotropic
The visualization adapts to the size of the window in the development
system
Antialiased Drawing
The visualization is characterized by antialiasing methods, both during
editing and as integrated visualization at runtime.
Tip: If a horizontal or vertical line is drawn out of focus on a specific visualization
platform, this can currently be corrected by a 0.5 px shift in the direction of the
line thickness; see item property Absolute motion, option Use REAL values.
Requirement: The platform supports the use of REAL coordinates
Editing options
Grid tab
Grid
Visible
Grid lines are visible in the visualization editor at
distance size
Active
Grid lines are active in the visualization editor at
distance size. The items are aligned with the grid, all
position values are on a grid line. An item that is
already in a visualization when the grid is enabled is
not automatically aligned. To do this, you must first
drag it to another position.
The grid lines can be active and invisible
Size Distance of the grid lines in pixels
Text file for textual "List components". File name and location of a file of type .csv. It
contains a table with texts in the format of a text list.
The entries in the file are provided if the List
components function is used as input assistant.
You create this file as an export file of the global text
list using the Command Import/Export Text Lists.
See also:
• PLC documentation: Creating a visualization
Style selection
Last used: <Style, Version, Manufacturer> Style that is automatically set as selected when you
add a new visualization application.
Depending on the device, it is possible that a display
variant is displayed in a different way, despite this
setting
Preset: <Style, Version, Manufacturer>
<Style, Version, Manufacturer>
Separate LineIDs • TRUE: The line IDs of a POU are stored in a separate file (LineIDs.dbg), so that
changes in the line IDs do not lead to changes in the POU, which would then be
misinterpreted in the source control system as content changes. Line IDs are
required for breakpoint handling, for example, and ensure that the code lines
can be assigned to machine code instructions. (Default setting: FALSE)
Sort by name • TRUE (default setting): The subelements of POUs (actions, methods,
properties) are sorted by name and not by internal ID (see sample [} 171]).
Sample
The sample illustrates the different storage sequence of the METH_A, METH_B and METH_C methods,
depending on whether the Sort by name option is enabled or disabled. If the option is disabled (FALSE), the
METH_B method is not in second place according to its name, but in first place according to its internal ID.
See also:
• PLC documentation: Exporting and importing a PLC project
You can restore the TwinCAT standard settings at any time via the Reset button.
See also:
• TC3 User Interface documentation > Customize menus [} 34]
• TC3 User Interface documentation > Customize toolbars [} 35]
• TC3 User Interface documentation > Customize keyboard shortcuts [} 36]
When you close the dialog with Close, the changes become visible in the menu bar of the TwinCAT user
interface.
New… TwinCAT adds a toolbar above the selected toolbar. A dialog opens, in
(Add toolbar) which a name can be entered.
Modify Selection TwinCAT positions the selected toolbar at the top, bottom, left or right
(position toolbar) frame of the main window
Keyboard.... Opens the Options dialog, in which you can define keyboard shortcuts.
Toolbars
See also:
• TC3 User Interface documentation > Customize toolbars [} 35]
When you close the dialog with Close, the changes become visible in the menu bar of the TwinCAT user
interface.
Display of the currently defined toolbars, menus, submenus and the commands contained therein.
Menu bar List of menus and submenus
Toolbar List of toolbars
Context menu List of context menus
Controls
Add Command Opens the Add Command dialog. The Add Command dialog is used
to select one or more commands. Left part: List of categories. Right
part: Listing of commands of the selected category.
Adds a command above the selected command.
Add New Menu Adds a new menu above the selected menu.
Modify Selection Opens a menu in which the name of a newly added menu can be
determined.
Delete Removes the selected menu or command.
Move Up Moves the selected command or menu up in the order of commands or
menus.
Move Down Moves the selected command or menu down in the order of commands
or menus.
Reset All Resets the entire menu to the default settings.
Keyboard Opens the Options dialog, in which you can define keyboard
shortcuts.
5.10 Window
Call: Window menu, context menu or button in the header of the view or the tab (window)
The view can then also be placed outside the user interface. Use the Dock command to reattach a detached
view to the user interface frame.
See also:
• Command Dock [} 175]
• TC3 User Interface documentation: Arranging views and windows [} 37]
Call: Window menu, context menu or button in the header of the view or the tab (window)
See also:
• Command Float [} 175]
• TC3 User Interface documentation: Arranging views and windows [} 37]
Symbol:
Call: Window menu, context menu or button in the header of the view
Hide means that the view is closed. The command thus corresponds to closing a view via the button in
the header of the view. Use the commands on the View menu to unhide or open a hidden view or open.
See also:
• View [} 78]
• TC3 User Interface documentation: Show/hide views [} 38]
Call: Window menu, context menu or button in the header of the view
Hiding means that TwinCAT displays all views only as a tab within the user interface and that it only
becomes visible when you click on the tabs. If you then click the button in the header bar of the view or
select the Dock command, the view will be reattached to the user interface.
See also:
• Command Dock [} 175]
• View [} 78]
• TC3 User Interface documentation: Show/hide views [} 38]
Symbol:
Call: Window menu, context menu or button in the header of the view
Putting in the background means that TwinCAT only displays the view as a tab within the user interface,
which only becomes visible when you click on the tab. If you then click the button in the header bar
again or select the Dock command, the view will be reattached to the user interface.
See also:
• Command Dock [} 175]
• TC3 User Interface documentation: Show/hide views [} 38]
Symbol:
Function: The command attaches the currently active tab to the left margin of the main window.
Call: Window menu, context menu or button in the header bar of the tab (window)
See also:
Symbol:
Function: The command moves the active window to a new, separate tab group below the existing one.
Call: Window menu, context menu of the header bar of the tab (window)
Requirement: Several editor windows are arranged next to each other as tabs.
If you open another object in the editor, this is automatically placed in the tab group where the focus is.
See also:
• TC3 User Interface documentation: Arranging views and windows [} 37]
• Command New Vertical Tab Group [} 177]
Symbol:
Function: The command moves the active window to a new, separate tab group to the right of the existing
one.
Call: Window menu, context menu of the header bar of the tab (window)
Requirement: Several editor windows are arranged next to each other as tabs.
If you open another object in the editor, this is automatically placed in the tab group where the focus is.
See also:
• TC3 User Interface documentation: Arranging views and windows [} 37]
• Command New Horizontal Tab Group [} 177]
Symbol:
See also:
• TC3 User Interface documentation: Show/hide views [} 38]
For each open editor window the Window menu contains a command <n><Object name>, through which
you can activate the window, i.e. put the focus on it. In offline mode, TwinCAT adds the extension (offline)
after the command. For function blocks, the extension (impl) or <instance path> is added to distinguish
between implementation and instance.
See also:
• Command Window [} 178]
5.11 SFC
Symbol:
Function: The command converts the currently selected step to an init step.
Executing the command changes the frame of the step element to a double line. The step, which previously
was the init step, automatically becomes a 'normal' step and is represented with single frame.
The property Init step can also be enabled or disabled in the Properties view of a step element, although in
this case TwinCAT does not automatically adjust the settings of the other steps.
The command can be useful if you want to change the chart. When you create a new SFC object, it
automatically includes an init step, followed by a transition (TRUE) and a jump back to the init step.
Note the option to reset the chart to the init step by using the SFC flags SFCInit and SFCReset in
online mode.
See also:
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
• PLC documentation: SFC element properties
Symbol:
Function: The command adds a step and a transition before the currently selected position.
If you have selected a step, TwinCAT inserts a new step transition combination. If you have selected a
transition, a new transition step combination is inserted.
The new step is called step<n> by default. n is a sequential number, starting with 0 for the first step, which is
added in addition to the init step. Accordingly, the new transition is called Trans<n> by default. You can edit
the default names directly by clicking on the name.
See also:
• Command Insert step-transition after [} 179]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
• PLC documentation: SFC elements step and transition
Symbol:
Function: The command adds a step and a transition after the currently selected position.
If you have selected a step, TwinCAT inserts a new transition step combination. If you have selected a
transition, a new step transition combination is inserted.
The new step is called Step<n> by default. n is a sequential number, starting with 0 for the first step, which is
added in addition to the init step. Accordingly, the new transition is called Trans<n> by default. You can edit
the default names directly by clicking on the name.
See also:
• Command Insert step transition [} 178]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
• PLC documentation: SFC Elements 'Step' and 'Transition'
Symbol:
Function: The command converts the selected alternative branch to a parallel branch.
Note that after converting a branch, you must check and adjust the sequence of steps and transitions before
and after the branch.
See also:
• Command Alternative [} 180]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
Symbol:
Function: The command converts the selected parallel branch to an alternative branch.
Note that after converting a branch, you must check and adjust the sequence of steps and transitions before
and after the branch.
See also:
• Command Parallel [} 179]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
Symbol:
Function: The command adds a branch to the left of the currently selected position.
The behavior of the command corresponds to the command Insert branch right.
See also:
• Command Insert branch right [} 180]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
• PLC documentation: SFC element Branch
Symbol:
Function: The command adds a branch to the right of the currently selected position.
Note that you can use the commands Alternative or Parallel to convert a branch to the respective
other type.
The following diagram shows a newly inserted parallel branch, generated with Command Insert branch right,
while step11 was selected. TwinCAT automatically inserts a step (Step2 in the example).
Processing in online mode: If t2 returns TRUE, TwinCAT executes Step2 immediately after step11, before t3
is evaluated.
The following diagram shows a newly inserted alternative branch, generated with Command Insert branch
right, while transition t4 was selected. TwinCAT automatically inserts a step (Step32 in the example), a
preceding and a subsequent transition (t41, t42).
Processing in online mode: If Step3 is active, TwinCAT evaluates the following transitions (t4, t41) from left
to right. The first junction of the branch in which the first transition returns TRUE is executed. In contrast to
parallel branching, only one junction is executed.
See also:
• Command Alternative [} 180]
• Command Parallel [} 179]
• Command Insert Branch [} 180]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
• PLC documentation: SFC element Branch
Symbol:
TwinCAT adds the action element to the right of the currently selected step element.
If you have already assigned one or more actions to the step, they are displayed in a "action list", one below
the other. The new action is then placed as follows:
• As the first action of the step, i.e. at the top of the action list, if you have selected the step element.
• Directly before, i.e. above the action, if you have selected one of the existing actions in the action list of
the step.
The left part of the action element contains the qualifier, by default N, in the right part you enter the action
name. To do this, click in the box to get an editing frame. You must have created this action as a POU in the
project.
You can also edit the qualifier. A list of the valid qualifiers is described in section "Qualifiers for actions in
SFC".
See also:
• Command Insert action association after [} 182]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
• PLC documentation: Qualifier for actions in SFC
Symbol:
The command corresponds to the description of Insert action association. The difference is that TwinCAT
places the new action not at the first, but at the last position of the action list. If you have selected an action
in the action list, TwinCAT does not place the new action above it, but below it.
See also:
• Command Insert action association [} 181]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
• PLC documentation: Qualifier for actions in SFC
Symbol:
Function: The command inserts a jump element before the currently selected element.
TwinCAT automatically inserts the jump with jump target step. You must then replace this jump target with a
real jump target. You can select the target with the Input Assistant.
See also:
• Command Insert jump after [} 183]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
• PLC documentation: SFC element Jump
Symbol:
Function: The command inserts a jump element after the currently selected element.
TwinCAT automatically inserts the jump with jump target step. You must then replace this jump target with a
real jump target. You can select the target with the Input Assistant.
See also:
• Command Insert jump [} 182]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
• PLC documentation: SFC element Jump
Symbol:
Function: The command inserts a macro element before the currently selected element.
The new macro is called Macro<x> by default. x is a sequential number, starting with 0 for the first macro.
You can edit the default name directly by clicking on the name.
To edit the macro, open it with the command Show macro in the macro editor.
See also:
• Command Show macro [} 184]
• Command Insert macro after [} 183]
• PLC documentation: Sequential Function Chart (SFC)
• SFC Editor
Symbol:
Function: The command inserts a macro element after the currently selected element.
See also:
• Command Insert macro [} 183]
• Command Show macro [} 184]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
Symbol:
Function: The command opens a macro in the macro editor for editing.
The command causes TwinCAT to close the main view of the SFC editor and open the macro editor instead.
This is also an SFC editor, in which you can now edit the part of the SFC diagram that is displayed as a
macro box in the main view.
See also:
• Command Exit macro [} 184]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
Symbol:
Function: The command closes the macro editor and returns to the main view of the SFC editor.
See also:
• Command Show macro [} 184]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
Symbol:
Function: The command inserts the elements from the clipboard after the currently selected position.
Symbol:
Function: The command leads to the Add entry action dialog, in which you define a new step action of type
"entry action". Depending on the SFC options, a prompt for selecting the duplication mode for the new step
action may appear beforehand.
The entry action is automatically opened in the ST editor. The step element is assigned an "E" in the lower
left corner.
Copy reference. A new step will call the same actions If the step is copied in the SFC, the link to the step
action(s) is also copied. The steps copied from one
another will therefore call all the same actions.
Copy implementation. New action objects are created This means "embedding" of the step actions for the
for the new step copied steps. By default, the newly created action
objects appear below the SFC function block in the
PLC project tree in the Solution Explorer. Initially,
these objects contain a copy of the original
implementation code for the respective action.
Set as default. This setting can be changed in the The settings in the dialog are accepted as the default
SFC editor options. setting. You can change the default setting in the
TwinCAT options in the category SFC editor. To do
this, in the group field Step actions in the drop-down
list Standard insert method select the entry Always
ask, Copy reference or Duplicate implementation.
See also:
• Command Options > Dialog Options - SFC editor [} 157]
• PLC documentation: Command Add exit action [} 186]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
• PLC documentation: Programming in Sequential Function Chart (SFC)
• PLC documentation: SFC element Action
Symbol:
Function: The command leads to the Add exit action dialog, in which you define a new step action of type
entry action. Depending on the SFC options, a prompt for selecting the duplication mode for the new step
action may appear beforehand. Please refer to the help page for the command Add entry action.
See also:
• Command Add entry action [} 185]
• Command Options > Dialog Options - SFC editor [} 157]
• PLC documentation: Sequential Function Chart (SFC)
• PLC documentation: Programming in Sequential Function Chart (SFC)
• PLC documentation: SFC Editor
• PLC documentation: SFC element Action
For details of the duplication mode, see the help page for the SFC element properties and the instructions for
adding step actions.
See also:
• PLC documentation: SFC Element Properties
• PLC documentation: Programming in Sequential Function Chart (SFC)
For details of the duplication mode, see the help page for the SFC element properties and the instructions for
adding step actions.
See also:
• PLC documentation: SFC Element Properties
• PLC documentation: Programming in Sequential Function Chart (SFC)
Symbol:
Function: The command adds a step before the currently selected position.
The new step is called Step<n> by default. n is a sequential number, starting with 0 for the first step, which is
added in addition to the init step. The name can be edited by clicking on it.
Inserting a step without a transition or a transition without a step results in a compile error.
See also:
• Command Insert step-transition after [} 179]
• Command Init step [} 178]
• PLC documentation: SFC elements step and transition
Symbol:
Function: The command inserts a step after the currently selected position.
The new step is called Step<n> by default. n is a sequential number, starting with 0 for the first step, which is
added in addition to the init step. The name can be edited by clicking on it.
Inserting a step without a transition or a transition without a step results in a compile error.
See also:
• Command Init step [} 178]
• Command Insert step-transition after [} 179]
• PLC documentation: SFC element Jump
Symbol:
Function: The command adds a transition before the currently selected position.
The new transition is called Trans<n> by default. n is a sequential number, starting with 0 for the first
transition. The name can be edited by clicking on it.
Inserting a step without a transition or a transition without a step results in a compile error.
See also:
• Command Insert step-transition after [} 179]
• PLC documentation: SFC elements step and transition
Symbol:
Function: The command inserts a transition after the currently selected position.
The new transition is called Trans<n> by default. n is a sequential number, starting with 0 for the first
transition. The name can be edited by clicking on it.
Inserting a step without a transition or a transition without a step results in a compile error.
See also:
• Command Insert step after [} 187]
• PLC documentation: SFC elements step and transition
5.12 CFC
Use the following dimensions Here, you set the size of the worksheet. Your change
is only be accepted if the size is sufficient for the
existing program.
Adapt the dimensions automatically Automatically adapts the size of the worksheet to the
size of your program.
Move the worksheet origin relatively Moves the worksheet on the x or y axis. Entering
negative numbers is allowed.
See also:
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
Function: The command negates the selected function block input or output.
See also:
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
Function: The command adds a Boolean input EN (Enable) and a Boolean output ENO (Enable Out) to the
selected function block.
The added input “EN” enables the function block. The function block is only executed if it has the value
TRUE. The value of this signal is output at output ENO.
See also:
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
Function: The command removes a reset (R) or set (S) from the input of the "output" element“.
See also:
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
Function: The command adds a reset to the input of a Boolean element Output.
If an Output element has a reset input, the Boolean output value is set to FALSE when the value of the input
is TRUE. The value FALSE at the output is retained, even if the input value changes again.
See also:
• Command S-SET [} 190]
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
Function: The command adds a set (S) to the input of a Boolean element "Output".
If an Output element has a set input, the Boolean output value is set to TRUE when the value of the input is
TRUE. The value TRUE at the output is retained, even if the input value changes again.
See also:
• Command R-Reset [} 190]
Symbol:
Example:
Declaration:
refInt : REFERENCE TO INT;
nVar1 : INT;
CFC:
Further information can be found in the description of the REFERENCE TO data type.
See also:
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
• PLC documentation: Reference
Symbol:
Function: The command places the selected elements at the beginning of the execution order.
The command only changes the chronological order in the program sequence. The position of the elements
is not changed. If you apply the command to more than one element at a time, the sequence is retained
within the selected elements.
See also:
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
Function: The command places the selected elements at the end of the execution order.
The command only changes the chronological order in the program sequence. The position of the elements
is not changed. If you apply the command to more than one element at a time, the sequence is retained
within the selected elements.
See also:
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
Function: The command moves the selected elements forward by one in the execution order.
The command only changes the chronological order in the program sequence. The position of the elements
is not changed. If you apply the command to more than one element at a time, the sequence is retained
within the selected elements.
See also:
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
Function: The command moves the selected elements back by one in the execution order.
The command only changes the chronological order in the program sequence. The position of the elements
is not changed. If you apply the command to more than one element at a time, the sequence is retained
within the selected elements.
See also:
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
The command only changes the chronological order in the program sequence. The position of the elements
is not changed. The command assigns a new number to all elements in the program, even if not all elements
are selected when the command is executed.
See also:
• Command Order By Topology [} 193]
• Command Set Execution Order [} 193]
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
The command only changes the chronological order in the program sequence. The position of the elements
is not changed. The command affects all elements in the program, even if not all elements are selected
when the command is executed.
See also:
• Command Order by Data Flow [} 192]
• Command Set Execution Order [} 193]
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
The command only changes the chronological order in the program sequence. The position of the elements
is not changed. If the command is applied to more than one element at a time, the sequence is retained
within the selected elements.
See also:
• Command Order by Data Flow [} 192]
• Command Order By Topology [} 193]
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
Requirements: A CFC editor is active. Exactly one output and several inputs are selected.
To select the pins, keep [CTRL] pressed while clicking the pins. Then execute the command.
See also:
• Command Select Connected Pins [} 200]
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
The command restores all inputs and outputs of the function block, as defined in its implementation.
See also:
• Command Remove Unused Pins [} 194]
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
Function: The command removes all unused pins of the selected element.
See also:
• Command Reset Pins [} 194]
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
Function: The command adds a further input to the selected function block.
See also:
• Command Add Output Pin [} 195]
• PLC documentation: Continuous Function Chart (CFC)
Symbol:
Function: The command adds a further output to the selected function block.
See also:
• Command Add Input Pin [} 194]
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
Function: The command undoes all manual changes to the connections in the program and restores the
original state.
TwinCAT cannot automatically route connections that are fixed with control points. You have to remove the
control points before the command is executed. To do this, use the command Remove Control Point. In
addition, you have to disconnect manually changed connections, which are marked with the icon . To do
this, use the command Unlock Connection.
See also:
• Command Remove Control Point [} 196]
• Command Unlock Connection [} 196]
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Requirements: A CFC editor is active, and there is at least one connection with collision.
This function is very useful if you work with large networks and only a subset is visible. A collision is also
indicated by the symbol with a red frame in the upper right corner of the editor.
See also:
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
If you move the mouse pointer over a selected connecting line, the existing control points are displayed with
yellow circle symbols. Move the cursor to the control point to be deleted and execute the command from the
context menu.
See also:
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
• PLC documentation: CFC element Control point
• Command Create Control Point [} 196]
Symbol:
The control point is created at the point of the connection where the cursor is placed when the command is
called. The command corresponds to the Control point element in the Toolbox window.
See also:
• Command Remove Control Point [} 196]
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
• PLC documentation: CFC element Control point
Symbol:
Changing the connections for automatic routing results in a locked connection. To perform automatic routing
again, you must first release a locked connection.
You can also release this connection by clicking on the icon of a locked connection.
See also:
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
Grouped elements are moved together. The position of the elements is not influenced by the grouping.
See also:
• Command Ungroup [} 197]
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Symbol:
See also:
• Command Create group [} 197]
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
Width Width of the page (minimum 24, maximum 1024). Elements outside the working
area are highlighted in red.
Height Page height (minimum 24, maximum 1024). Elements outside the working area
are highlighted in red.
Border width Margin width (minimum 6, maximum 25% or page width).
Set as default for new
CFC objects : The current settings are set as default for new CFC objects.
See also:
• PLC documentation: Continuous Function Chart (CFC)
Call: Menu CFC > Edit parameters, context menu > Edit parameters, click on function block field
Parameter.
Requirements: A CFC editor is active. A function block is instantiated, which has VAR_INPUT CONSTANT
variables in its declaration.
A function block with VAR_INPUT CONSTANT variables is indicated by TwinCAT by the word "Parameter"
in the lower left corner of the function block.
After exiting the field and exiting the dialog with OK, the value changes are applied to the project.
FUNCTION_BLOCK FB_Sample
VAR_INPUT CONSTANT
{attribute 'parameterCategory':='General'}
{attribute 'parameterUnit':= 'm/s'}
{attribute 'parameterMinValue':= '0'}
{attribute 'parameterMaxValue':= '100'}
nIn1 : INT;
nIn2 : DWORD:=24354333;
sIn3 : STRING:='abc';
END_VAR
This functionality and the declaration of variables with the keyword VAR_INPUT CONSTANT only
apply to the CFC editor. In the FBD editor, TwinCAT always shows all input parameters at the func-
tion block, irrespective of whether they are declared as VAR_INPUT or VAR_INPUT CONSTANT.
Also, TwinCAT does not distinguish between text editors.
See also:
• Command Save prepared parameters in the project [} 199]
• PLC documentation: Changing constant input parameters of function block instances
Requirements: A CFC editor is active. Parameter values of function block instances were changed in online
mode. The application is in offline mode.
If the values of constants on the controller differ from the values in the application, this is indicated by a red
star to the right of the parameter field. Use the command Apply prepared parameter values to apply the
control values to your application.
See also:
• Command Edit Parameters [} 198]
• PLC documentation: Changing constant input parameters of function block instances
Symbol:
Function: This command toggles the display of the connection between two elements between a connecting
line and connection marks.
If you have selected a connecting line, the command removes the line and adds a connection mark source to
the output of one of the elements and a connection mark target to the input of the other. Both are assigned
the same name "C-<n>" by default; n is a sequential number.
If you select a connection mark pair, the command converts these marks to a connecting line.
See also:
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
• PLC documentation: CFC element Connection mark source/target
Symbol:
Function: The command selects all pins that are connected to the currently selected line or to the currently
selected connection mark in the page-oriented CFC.
Requirements: A CFC editor or a page-oriented CFC editor is active. A line or a connection mark is
selected.
See also:
• Command Connect Selected Pins [} 193]
• PLC documentation: Continuous Function Chart (CFC)
• PLC documentation: CFC Editor
5.13 FBD/LD/IL
Symbol:
Function: The command inserts a contact to the right of the selected element.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: LD element contact
Symbol:
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: FBD/LD/IL element network
Symbol:
Function: The command inserts another network in the FBD/LD/IL editor below the selected network.
Requirements: The FBD, LD or IL editor is active. A network is selected, but no box is selected.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: FBD/LD/IL element network
Requirements: The FBD, LD or IL editor is active. A network is selected, but no box is selected.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
Symbol:
Requirements: The FBD, LD or IL editor is active. A network is selected, but no box is selected.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: FBD/LD/IL element assignment
Symbol:
Function: The command inserts a box that is available in the project at the end of the selected network.
Requirements: The FBD, LD or IL editor is active. A network is selected, but no box is selected.
When you select the command, the Input Assistant opens. There you can select the desired box.
See also:
Symbol:
Function: The command inserts a box with a Boolean input "Enable" and a Boolean output "Enable Out" at
the end of the selected network.
Requirements: The FBD, LD or IL editor is active. A network is selected, but no box is selected.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: FBD/LD/IL element function block with EN/ENO
Symbol:
Function: The command inserts an empty box at the end of the currently selected network.
Requirements: The FBD, LD or IL editor is active. A network is selected, but no box is selected.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: FBD/LD/IL element function block
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.
Requirements: An FBD editor, LD editor or IL editor is active. A network must be selected. No other box
may be selected.
If "Enable" has the value FALSE when the box is called, the operations defined in the box are not executed.
Otherwise, i.e. if "Enable" is TRUE, these operations are executed. The ENO output acts as a repeater of the
EN input.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: FBD/LD/IL element function block with EN/ENO
Symbol:
Function: The command inserts a jump element before the currently selected element.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: FBD/LD/IL element jump
Symbol:
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: FBD/LD/IL element label
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: FBD/LD/IL element return
Symbol:
Function: The command adds an additional input to an expandable box (ADD, OR, ADD, MUL, SEL) above
the selected input.
If a box is selected, the command Append name input is available in the context menu. The input is
inserted at the bottom of the box.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
Symbol:
Function: The command inserts an empty box in parallel to the selected box.
See also:
• PLC documentation: FBD/LD/IL Editor
Symbol:
Requirements: The LD editor is active. A network, a coil or a connector is selected, but no box is selected.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: LD element coil
Symbol:
Requirements: The LD editor is active. A network, a coil or a line is selected, but no box is selected.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: LD element coil
Symbol:
Requirements: The LD editor is active. A network, a coil or a line is selected, but no box is selected.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: LD element coil
Symbol:
Function: The command inserts a contact to the left of the selected element.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: LD element contact
Symbol:
Function: The command inserts a contact with lines in parallel below the selected element.
You can program closed parallel branches in an LD network as a Short Circuit Evaluation (SCE) or
an OR construct. SCE branches are represented by double vertical lines, OR branches with single
lines. See the help page for "Closed line branches“.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: LD element contact
Symbol:
Function: The command inserts a contact with lines in parallel above the selected element.
You can program closed parallel branches in an LD network as a Short Circuit Evaluation (SCE) or
an OR construct. SCE branches are represented by double vertical lines, OR branches with single
lines. See the help page for "Closed line branches“.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: LD element contact
Symbol:
Function: The command inserts a negated contact to the left of the selected element.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: LD element contact
Symbol:
Function: The command inserts a negated contact with lines in parallel below the selected element.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: LD element contact
See also:
• PLC documentation: FBD/LD/IL
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: LD element contact
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: LD element contact
Symbol:
Function: The command inserts an instruction line below the selected line.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
Symbol:
See also:
Symbol:
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
Symbol FBD:
Symbol LD:
Function: The command inserts an edge detection before the selected box input or box output. A distinction
can be made between the following functionalities by executing the command once, twice or three times:
• The edge detection inserted when the command is executed once serves to detect a rising edge. The
arrow of the symbol points to the right.
• If the command is executed again, the edge detection is reversed, so that falling edges are detected.
The arrow of the symbol points to the left.
• If the command is executed one more time, the edge detection and the symbol are removed.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
Symbol:
Function: For an element with a Boolean output, the command toggles between reset, set and no label.
Requirements: The FBD or LD editor is active. An element with Boolean output is selected.
See also:
Symbol:
Function: The command assigns the selected box output as interconnecting box output.
Requirements: The FBD or LD editor is active. One of several box outputs is selected.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
Symbol:
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: FBD/LD/IL element line branch
Symbol:
Function: The command creates a branch above the selected open branch.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: FBD/LD/IL element line branch
Symbol:
Function: The command creates a branch below the selected open branch.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: FBD/LD/IL element line branch
Symbol:
Function: The command sets the start point of a branch on the selected line.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: Closed line branch
Symbol:
Function: The command sets the end point of a branch on the selected line.
Requirements: The LD editor is active. A line is selected. A start point for the branch was set.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
• PLC documentation: Closed line branch
Requirements: The FBD, LD or CFC editor is active. A box is selected. An extended change to the
declaration was carried out.
The command checks whether a box and its declaration match in the declaration editor. The change is only
applied to the box if the declaration was extended. Deletions and overwrites are not updated.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
Symbol:
Function: The command deletes inputs and outputs of the selected function block, to which no variable and
no value was assigned. However, the default inputs and outputs of the function block are always retained.
Requirements: The FBD or LD editor is active. A function block is selected. The function block has
interfaces that are not assigned a value.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
Symbol:
Function: The command repairs internal inconsistencies on the selected function block.
Requirements: The FBD or LD editor is active. The faulty function block is selected. The editor has detected
internal inconsistencies in the programming block, which may be resolved automatically. TwinCAT reports
the inconsistencies in the Error list view.
This situation is conceivable when you edit a project created with an older version of the programming
system that has not yet treated the inconsistency as an error.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
Function: The command converts the active Instruction List or the active Ladder Diagram to the function
block diagram.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
Function: The command converts the current function block code or the active Instruction List to a Ladder
Diagram.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
NOTE
Loss of data
An error-free conversion requires syntactically correct code. Otherwise, parts of the implementation may be
lost.
Function: The command converts the active function block code or the active Ladder Diagram to an
Instruction List.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
5.13.43 Command Go To
Symbol:
The command opens a dialog with an input field. Enter the number of the desired network in the input field.
See also:
• PLC documentation: FBD/LD/IL
• PLC documentation: FBD/LD/IL editor
5.14 Textlist
Symbol:
Function: This command adds an additional language column in the text list.
Enter an abbreviation for the new language in the Choose language dialog, for example "en-US". TwinCAT
inserts the abbreviation as a column heading.
See also:
• PLC documentation: Managing text in a text list
Symbol:
Function: The command removes the selected language column from the text list.
Requirement: A text list or a global text list is open and active. A field in the column of the language that you
want to remove is selected.
See also:
• PLC documentation: Managing text in a text list
Symbol:
Function: The command inserts a new line above the select line in the text list. An input field opens under
Standard, in which you enter the source text.
Requirement: A text list (no GlobalTextList) is open and active. A field is selected in the table.
See also:
• PLC documentation: Managing text in a text list
Symbol:
Function: The command exports an active text list, imports a file or synchronizes a text list with a file. The
file is in CSV format. The Import/Export dialog offers options for this purpose.
Import/Export dialog
opens the Choose textlist file dialog, in which you can select a file and a
directory.
Import/Export Type:
See also:
• PLC documentation: Managing text in a text list
Symbol:
Function: The command checks whether a text list record in the project will be used as static text. If not,
TwinCAT removes it from the text list.
Requirement: The global text list is open and active. A field is selected in the table.
See also:
• PLC documentation: Managing text in a text list
Symbol:
Function: The command checks whether the ID of a text list record in the project is correct and reports the
result.
Requirement: The global text list is open and active. A field is selected in the table.
If TwinCAT detects that the global text list and the static texts of the visualizations do not match, this may be
because the global text list is or was read-only. A requirement is that you have set up user management in
the project.
See also:
• PLC documentation: Managing text in a text list
Symbol:
Function: The command updates all inconsistent IDs in a static text list.
Requirement: The global text list is open and active. A field is selected in the table. The object is read-only.
If TwinCAT detects that the global text list and the static texts of the visualizations do not match, this may be
because the global text list is or was read-only. A requirement is that you have set up user management in
the project.
See also:
• PLC documentation: Managing text in a text list
Symbol:
Requirement:
• A text list or a global text list is open and active.
• The visualization does not encode the text characters in Unicode.
For each text list TwinCAT creates a file as plain text in .txt format. The name of text list becomes the name
of the file. The file is saved in the directory of the TwinCAT project.
A controller can read and use this format. You can copy the file to a controller, for example, and configure it
via a setting in the Visualization Manager, such that the text lists are not transferred again when the PLC
project is loaded.
See also:
• PLC documentation: Managing text in a text list
Symbol:
Requirement:
• A text list or a global text list is open and active.
• The visualization encodes the text characters in Unicode.
◦ The option Use Unicode strings is enabled in the Visualization Manager.
For each text list TwinCAT creates a file as plain text in .txt format. The name of text list becomes the name
of the file. The file is saved in the directory of the TwinCAT project.
A controller can read and use this format. You can copy the file to a controller, for example, and configure it
via a setting in the Visualization Manager, such that the text lists are not transferred again when the PLC
project is loaded.
See also:
• PLC documentation: Managing text in a text list
Symbol:
Function: The command adds text list support to the selected DUT object of type Enumeration.
Text list support enables localization of the enumeration component identifiers and a representation of the
symbolic component value in a text output in the visualization.
See also:
• PLC documentation: Object DUT
• Command Remove text list support [} 217]
Symbol:
Function: The command removes text list support from the selected enumeration object.
Text list support enables localization of the enumeration component identifiers and a representation of the
symbolic component value in a text output in the visualization.
5.15 Recipes
Symbol:
Function: The command opens a dialog for inserting a new recipe (a new column) in the recipe definition.
When you run the command, a dialog opens where you can set the name of the new recipe. The dialog also
offers an option for copying existing recipes into the new recipe.
See also:
• PLC documentation: Changing values with recipes
Symbol:
Function: This command deletes a recipe from the currently open recipe definition.
See also:
• PLC documentation: Changing values with recipes
Symbol:
When you run the command, the standard dialog for selecting a file opens. The filter is automatically set to
the file extension *.txtrecipe. After loading, the values of the selected recipe in the recipe definition are
overwritten, and the display is updated.
If you want to overwrite only individual recipe variables with new values, remove the values for the other
variables before loading the recipe into the recipe file. Entries without value specification are not read, which
means that these variables are unaffected by the update on the controller and in the project. The following is
an example of the entries in a recipe file. When it is loaded, only MAIN.nVar is written with a new value (6):
MAIN.nVar1:=
MAIN.nVar2:=6
MAIN.nVar3:=
MAIN.sVar4:=
MAIN.wsVar5:=
See also:
• PLC documentation: Changing values with recipes
Symbol:
When the command is executed, TwinCAT saves the values of the selected recipe in a file with the
extension *.txtrecipe, whose name must be defined. The standard dialog for saving a file opens. The format
results from the settings of the Recipe Manager in the Storage tab.
See also:
• PLC documentation: Changing values with recipes
Symbol:
Function: The command reads the variable values of a recipe from the controller.
Requirement: The PLC project is in online mode, and a recipe value is selected in the recipe definition.
When the command is executed, TwinCAT overwrites the values of the selected recipe with the values read
from the controller. In the process, the values are implicitly stored (in a file on the controller) and
simultaneously displayed in the table of the recipe definition.
See also:
• PLC documentation: Changing values with recipes
Symbol:
Function: The command writes the values of a recipe to the variables in the controller.
Requirement: The PLC project is in online mode, and a recipe value is selected in the recipe definition.
When the command is executed, TwinCAT overwrites the values in the controller with the values of the
selected recipe.
See also:
• PLC documentation: Changing values with recipes
Symbol:
Function: This command loads a recipe from a file and writes the values to the variables in the controller.
Requirement: The PLC project is in online mode, and a recipe value is selected in the recipe definition.
After running the command, you are asked whether the values from the file should also be written to the
recipe in the project, or only to the PLC. An update of the values in the recipe may necessitate an Online
Change with the next login.
When you execute the command, TwinCAT overwrites the values of the selected recipe in the recipe
definition. In addition, the values of variables in the controller are overwritten with these recipe values.
If you want to overwrite only individual recipe variables with new values, remove the values for the other
variables before loading the recipe into the recipe file. Entries without value specification are not read, which
means that these variables are unaffected by the update on the controller and in the project. The following is
an example of the entries in a recipe file. When it is loaded, only MAIN.nVar1 is written with a new value (6).
MAIN.nVar1:=
MAIN.nVar2:=6
MAIN.nVar3:=
MAIN.sVar4:=
MAIN.wstVar5:=
See also:
• PLC documentation: Changing values with recipes
Symbol:
Function: The command reads the variables values of a recipe from the controller and saves them in a file.
Requirement: The PLC project is in online mode, and a recipe value is selected in the recipe definition.
After executing the command you are asked whether to read the variables values into the recipe in the
project, or only save them. An update of the values in the recipe may necessitate an Online Change with the
next login.
The values are saved with the default name for the recipe files, in accordance with the settings of the Recipe
Manager (Storage tab).
See also:
• PLC documentation: Changing values with recipes
Symbol:
Function: The command adds a variable to the currently open recipe definition before the selected position.
Requirement: The recipe definition is open in the editor, and simple view is selected.
TwinCAT adds the default text "NewVariable" in the Variable column. You must replace this name with the
corresponding valid variable name. To this end, open the Input Assistant via the button, or enter the
variable name directly in the table field.
See also:
• PLC documentation: Changing values with recipes
Symbol
Function: The command removes the selected variable(s) from a recipe definition.
See also:
• PLC documentation: Changing values with recipes
Symbol:
In the dialog you can update the recipe definitions if the declaration of a structured variable or a function
block has changed. If, for example, the dimension of an array has been changed, you can automatically
remove or add the entries in the recipe definition.
See also:
• PLC documentation: Changing values with recipes
Symbol:
Function: The command initiates the synchronization of the recipes of the currently open recipe definition in
the project with the recipes that are present on the device in the form of recipe files.
Requirement: The PLC project is in online mode, and you have opened a recipe definition in the editor. In
detail, the synchronization has the following effect:
• The current values for the recipe variables present in the project are overwritten with the values from
the recipes on the controller. This may trigger an Online Change at the next login.
• If recipe variables are defined in the recipe files on the controller, which are missing in the recipe
definition in the project, these variables are ignored on loading. For each recipe file, a message with
the affected variables appears.
• If recipe variables are missing in the recipe files on the controller, which are included in the recipe
definition in the project, for each recipe file a message appears showing the affected variables.
• If additional recipes were created on the controller for these variables, these are added to the recipe
definition in the project.
5.16 Library
Command Further information the PLC documentation
Library creation
Command Save as library... Command Save as library [} 245]
Command Save as library and install... Command Save as library and install [} 247]
Library installation
Command Library Repository Library Repository
Library management
Dialog Library Manager Library Manager
Other commands and dialogs
Command Add library Command Save as library and install [} 247]
Command Try reload library Command Try reload library
Command Delete library Command Delete library
Command Details Command Details
Command Dependencies Command Dependencies
Command Properties Command Properties
Command Placeholder Placeholder
Command Set to Effective Version Command Set to Effective Version
Command Set to Always Newest Version Command Set to Always Newest Version
See also:
• PLC documentation: Using libraries > Other commands and dialogs
5.17 Visualization
The visualization commands are provided by the Visual Editor plug-in for the visualization commands menu
category, which can be found in the dialog Tools > Customize. They enable you to edit a visualization
object in the visualization editor.
Most commands are included in the Visualization menu as standard, and are therefore also available in the
context menu of the visualization editor. If necessary, open the dialog Tools > Customize, in order to view
or modify the menu configuration for the category Visualization.
Symbol:
Function: This command opens the Interface Editor for defining frame parameters in the visualization, which
are intended to be referenced in the Frame element of another visualization. It is displayed in a tab view in
the upper section of the Visualization Editor.
Symbol:
Function: This command opens the keyboard configuration editor for the current visualization. It is displayed
in a tab view in the upper section of the Visualization Editor.
Symbol:
Function: This command opens the element list editor for the current visualization. It is displayed in a tab
view in the upper section of the Visualization Editor.
Symbol:
Function: This command aligns all selected visualization elements at the left edge of its leftmost element.
Symbol:
Function: This command aligns all selected visualization elements at the top edge of its topmost element.
Symbol:
Function: This command aligns all selected visualization elements at the right edge of its rightmost element.
Symbol:
Function: This command aligns all selected visualization elements at the bottom edge of its bottommost
element.
Symbol:
Function: This command causes all selected visualization elements to be aligned with their common vertical
center.
Function: This command causes all selected visualization elements to be aligned with their common
horizontal center.
Symbol:
Symbol:
Symbol:
Symbol:
Symbol:
Symbol:
Symbol:
Symbol:
Symbol:
The command becomes active if more than one element is selected, except if a line or polygon element is
selected.
1. Select all the elements that should have the same width.
ð The first element is highlighted in blue, the other elements are shown in gray.
2. Run the command Make same width.
ð All elements are assigned the width of the element marked in blue.
Symbol:
The command becomes active if more than one element is selected, except if a line or polygon element is
selected.
1. Select all the elements that should have the same height.
ð The first element is highlighted in blue, the other elements are shown in gray.
2. Run the command Make same height.
ð All elements are assigned the height of the element marked in blue.
Symbol:
The command becomes active if more than one element is selected, except if a line or polygon element is
selected.
1. Select all the elements that should have the same size.
ð The first element is highlighted in blue, the other elements are shown in gray.
2. Run the command Make same size.
ð All elements are assigned the size of the element marked in blue.
Symbol:
The command becomes active if more than one element is selected, except if a line or polygon element is
selected.
1. Select all the elements whose position and size should be aligned to the grid.
ð The first element is highlighted in blue, the other elements are shown in gray.
2. Run the command Size to Grid.
ð All elements are aligned to the grid, according to their size and position.
Symbol:
Function: This command positions the selected element one level higher, i.e. further in the foreground of the
visualization. Elements at lower levels are concealed by those at higher levels.
Symbol:
Function: This command positions the selected element in the foreground of the visualization, i.e. at the
highest level. Elements at lower levels are concealed by those at higher levels.
Symbol:
Function: This command positions the selected element one level lower, i.e. further in the background of the
visualization. Elements at lower levels are concealed by those at higher levels.
Symbol:
Function: This command positions the selected element in the background of the visualization, i.e. at the
lowest level. Elements at lower levels are concealed by those at higher levels.
Symbol:
Function: This command groups the currently selected visualization elements and displays the group as a
single object.
Requirement: Several visualization elements are selected. For multiple selections hold down the [<Shift>]
key while you click the items that you want. Alternatively, you can click in the editor window outside an
element and draw a rectangle around the desired elements while pressing the mouse button.
The following diagram shows the grouping (from left to right) or ungrouping (from right to left) of two
rectangle elements:
Symbol:
Function: This command breaks up a group of visualization elements. The individual elements are shown
individually selected again.
See also:
• Group [} 228]
Symbol:
Function: This command opens the dialog Frame Configuration, in which a color or an image for the
visualization background can be selected.
Dialog Background
Symbol: /
Function: This command selects all the elements of the visualization that is currently open in the editor.
See also:
• Deselect All [} 230]
Symbol:
See also:
• Command Select All [} 229]
Symbol:
Function: The command opens the dialog Multiply visu element, which you can use to configure the
multiplying procedure.
TwinCAT adds more elements, which resemble the template element. In this dialog you can configure the
number and arrangement of the indices, as well as their replacement.
TwinCAT inserts the new elements as a table. The number of lines is set in horizontal, the number of
columns in vertical. The product of the two determines the actual total number of elements to be inserted.
Horizontal Number of elements per line
Preset: Corresponds to the number of components in $FIRSTDIM$
Vertical Number of elements per column
Preset: Corresponds to the number of components in $SECONDDIM$
TwinCAT arranges the elements in the visualization as a table. If you specify an offset, a spacing is inserted
between the elements.
• 0 : The element frames overlap by one pixel
• 1 : The elements are in contact
• <n> : Between the elements there is a visible spacing of n-1 pixels
Horizontal Line spacing of elements in pixels
Vertical Column spacing of elements in pixels
First dimension:
Second dimension:
Symbol:
Function: This command is available in the menu bar for an integrated visualization (diagnostic
visualization). It enables or disables keyboard operation in the online mode of a visualization.
If keyboard operation is enabled, elements can be entered and selected via certain shortcuts. In this case,
other keyboard commands are not executed as long as the visualization editor is active and online.
5.18 Miscellaneous
Call: Context menu when the function block is selected in the PLC project tree.
Requirement: The function block implements an interface that you have changed. For example, you have
added another method to the interface.
Applications
When this command is executed, the automatically created methods or properties are assigned a pragma
attribute, which provokes compilation errors or warnings. This provides supports in the sense that
automatically created elements do not remain empty unintentionally. Whether an error or warning attribute is
used depends on the application.
Case 1:
Situation: The function block for which the command Implement interfaces is executed is not derived from
another function block.
Consequence: When the command is executed, the interface elements are created in the function block
without implementation ("stubs") and assigned a warning attribute (in the first line of the method/property
declaration). The warnings generated during compilation alert you to the fact that these elements have been
generated automatically and that you need to add the required implementation code.
{warning 'add method/property implementation'}
Procedure: Add the desired implementation code to the corresponding interface element (method or
property). Then remove the warning attribute from the method or property declaration.
Case 2:
Situation: The function block for which the command Implement interfaces is executed is derived from
another function block. The element (method or property) created when the command is executed in the
derived function block is not provided by inheritance from the base function block (that is, the element does
not exist under the base function block or a higher parent class).
Case 3:
Situation: The function block for which the command Implement interfaces is executed is derived from
another function block. The element (method or property) created when the command is executed in the
derived function block is already provided by inheritance from the base function block (that is, the element
exists under the base function block or a higher parent class).
Consequence: When the command is executed, the interface element is created in the derived function
block without implementation ("stub") and assigned an error attribute (in the first line of the method/property
declaration). The error generated during compilation alerts you to the fact that this interface element was
generated automatically and that this method or property overwrites the corresponding element of the basic
function block.
{error 'add method/property implementation or delete method/property to use base implementation'}
Procedure: If you want to overwrite or enhance the method or property of the basic function block, add the
required implementation code to the element below the derived function block. Then remove the error
attribute from the method or property declaration. However, if you do not want to overwrite the method or
property of the basic function block, delete the method or property below the derived function block. In this
case the method or property implementation of the basic function block is used.
Symbol:
Function: The command opens the standard dialog for saving a file as an archive. The project can be stored
under the desired path as a *.tszip archive.
Content of *.tszip The *.tszip archive folder contains the TwinCAT project to be archived.
Command for opening A tszip archive can be reopened with the following command:
Command Project/Solution (Open Project/Solution) [} 51]
Note on PLC projects If the TwinCAT project contains one or more PLC projects, the files and folders
stored in the archive folder for those PLC projects will depend on the PLC
project settings of the respective project.
Settings tab [} 112]
Symbol:
Function: The command starts the email program that is set in the system and opens a new email with the
archive file of the selected project as an attachment.
Requirement: The TwinCAT project is selected in the Solution Explorer and a target system is selected to
which a TwinCAT project has already been downloaded.
See also:
• Command Update project with target system… [} 233]
See also:
• Command Compare <TwinCAT project name> with the target system... [} 233]
Requirement: The TwinCAT project has been newly created without changes and selected in the Solution
Explorer.
See also:
• Open a TwinCAT 2 PLC project
Symbol:
Function: This command enables the TwinCAT project to be deleted from the Solution.
Symbol:
Function: This command enables the TwinCAT project to be renamed in the Solution Explorer.
Symbol:
Function: This command starts the compilation process or the code generation for the currently active
TwinCAT project.
Call: Build menu if a TwinCAT project is currently selected, or context menu of the TwinCAT project
All of the projects (PLC, C++, etc.) contained in the TwinCAT project are compiled one after the other. The
steps performed for a PLC project are described in section Command Build PLC project [} 242].
See also:
• Command Rebuild a TwinCAT project [} 234]
Call: Build menu if a TwinCAT project is currently selected, or context menu of the TwinCAT project
When rebuilding the project, the TwinCAT project will first be cleaned (see also: Command Clean TwinCAT
project [} 235] and subsequently built (see also: Command Build TwinCAT project [} 234]).
Call: Build menu if a TwinCAT project is currently selected, or context menu of the TwinCAT project
All of the projects (PLC, C++, etc.) contained in the TwinCAT project are cleaned one after the other. The
steps executed for a PLC project are described in the section Command Clean PLC project [} 243].
See also:
• Command Rebuild a TwinCAT project [} 234]
Symbol:
Function: This command generates or updates the boot project of the target system.
If the PLC project has multiple instances (see Command Add New Item (instance) [} 238]), the dialog to
change the ADS port appears in succession as many times as the number of project instances. Use the first
dialog to set the ADS port of the first project instance, the second dialog to set the ADS port of the second
project instance, and so on.
Background information:
The _Libraries folder contains the libraries that are referenced directly or indirectly in the PLC project. Direct
referencing means a library that is integrated at the highest level within a library manager. Indirect
referencing means a library that is referenced within a different library.
The purpose of the folder is, for example, to archive the libraries used in a project within the scope of a
project archive (you can configure whether this should be the case in the project settings, see Settings tab
[} 112]). This allows you to distribute the project archive to a colleague, for example, and if the project uses
libraries that do not exist in the colleague's local library repository, the missing libraries can be installed by
using the command Install project libraries [} 236] or Install project libraries (unknown versions) [} 237].
Recently used libraries are added to the _Libraries folder at the following times:
• when creating a file/email archive [} 50], if the file/e-mail archive is configured to contain libraries (see
Settings tab [} 112]).
• when activating the configuration [} 123] or activating the boot project [} 235], if the target archive is
configured to contain libraries (see Settings tab [} 112]).
• when executing the command Update project library folder [} 238].
Libraries that are no longer in use are removed from the _Libraries folder at the following times:
• when executing the command Update project library folder [} 238].
See also:
• Command Install Project Library (unknown versions) [} 237]
• Command Update project library folder [} 238]
• PLC documentation: Using libraries
Background information:
The _Libraries folder contains the libraries that are referenced directly or indirectly in the PLC project. Direct
referencing means a library that is integrated at the highest level within a library manager. Indirect
referencing means a library that is referenced within a different library.
The purpose of the folder is, for example, to archive the libraries used in a project within the scope of a
project archive (you can configure whether this should be the case in the project settings, see Settings tab
[} 112]). This allows you to distribute the project archive to a colleague, for example, and if the project uses
libraries that do not exist in the colleague's local library repository, the missing libraries can be installed by
using the command Install project libraries [} 236] or Install project libraries (unknown versions) [} 237].
Recently used libraries are added to the _Libraries folder at the following times:
• when creating a file/email archive [} 50], if the file/e-mail archive is configured to contain libraries (see
Settings tab [} 112]).
• when activating the configuration [} 123] or activating the boot project [} 235], if the target archive is
configured to contain libraries (see Settings tab [} 112]).
• when executing the command Update project library folder [} 238].
Libraries that are no longer in use are removed from the _Libraries folder at the following times:
• when executing the command Update project library folder [} 238].
See also:
• Command Install Project Library [} 236]
• Command Update project library folder [} 238]
• PLC documentation: Using libraries
Background information:
The _Libraries folder contains the libraries that are referenced directly or indirectly in the PLC project. Direct
referencing means a library that is integrated at the highest level within a library manager. Indirect
referencing means a library that is referenced within a different library.
The purpose of the folder is, for example, to archive the libraries used in a project within the scope of a
project archive (you can configure whether this should be the case in the project settings, see Settings tab
[} 112]). This allows you to distribute the project archive to a colleague, for example, and if the project uses
libraries that do not exist in the colleague's local library repository, the missing libraries can be installed by
using the command Install project libraries [} 236] or Install project libraries (unknown versions) [} 237].
Recently used libraries are added to the _Libraries folder at the following times:
• when creating a file/email archive [} 50], if the file/e-mail archive is configured to contain libraries (see
Settings tab [} 112]).
• when activating the configuration [} 123] or activating the boot project [} 235], if the target archive is
configured to contain libraries (see Settings tab [} 112]).
• when executing the command Update project library folder [} 238].
Libraries that are no longer in use are removed from the _Libraries folder at the following times:
• when executing the command Update project library folder [} 238].
See also:
• Command Install Project Library [} 236]
• Command Install Project Library (unknown versions) [} 237]
• PLC documentation: Using libraries
This mechanism can be used to instance a PLC project, which results in one project instance per PLC
runtime system. A separate ADS port number can be assigned for each project instance (see Command
Change ADS port [} 236]). Furthermore, each project instance has its own links within a process image.
Each project instance has its own online mode, i.e. each project instance can be logged in and started
individually, for example.
Requirement: The TwinCAT PLC project (<PLC project name>) is selected in the Solution Explorer.
The files and folders in the archive folder depend on the PLC project settings.
Content of *.tpzip The *.tpzip archive folder contains the PLC project to be archived.
Command for opening A tpzip archive can be reopened with the following command:
Command Add Existing Item (Project) [} 86]
Note on PLC projects The files and folders stored in the archive folder for the PLC project depend on
the PLC project settings of this PLC project.
Settings tab [} 112]
Symbol:
Function: The command starts the email program that is set in the system and opens a new email with the
archive file of the selected project as an attachment.
Requirement: The PLC project is selected in the Solution Explorer and the sources of a PLC project are
located on the connected target system.
Symbol:
Function: This command connects the programming system (the selected PLC project) with the target
system (controller) and thus establishes online operation. An instance of the PLC project is created on the
target system and loaded.
Call: PLC menu or TwinCAT PLC toolbar options or context menu of the PLC project object (<PLC project
name>Project) in the Solution Explorer
Requirement: The PLC project is error-free and the target system is in Run mode.
If a PLC project has not been compiled since its last change, TwinCAT compiles the project before logging
in. This operation corresponds to the command Compile in logged-out state.
If errors occur during the compilation, a message dialog appears. The errors are displayed in the Error List
view. You can then decide whether you want to log in without loading the program onto the controller.
See also:
• Command Build PLC project [} 242]
Error on login
If an error occurs while logging on to the controller, TwinCAT interrupts the loading process with an error
message. The error dialog allows you to display the error details. If an exception error has occurred and the
text *SOURCEPOSITION* is contained in the log message, you can use the command Display in Editor to
display the relevant function in the editor. The cursor jumps to the line causing the error.
If TwinCAT loads the project onto the controller when logging in, the following information is displayed in the
message window:
• Generated code size
• Size of global data
• Resulting memory requirement on the controller
• A list of the affected function blocks (for online change)
In online mode, you cannot change the settings of devices or modules. To change device parame-
ters, you must log the PLC project out. Depending on the bus system, there may, however, be
some special parameters that you can change in online mode.
TwinCAT stores the view configuration separately for online and offline mode. In addition, views that
cannot be used in an operation mode are closed. For this reason, the view may change automati-
cally when you log in.
Symbol:
Function: This command starts the compilation process or the code generation for the currently active PLC
project.
Call: Build menu if a PLC project is currently selected, or context menu of the PLC project object (<PLC
project name> Project) in the Solution Explorer
During the compilation, TwinCAT carries out a syntactic test of all objects used in the PLC project. The
compilation procedure is always carried out automatically when you wish to log the project in with a changed
program. After the check has been completed, TwinCAT displays any error messages or warnings in the
Error List [} 83] view.
Apart from that, the compilation information of the PLC project is created when building the project and
saved in a local file (*.compileinfo) in the Solution.
If the program was not changed since the last error-free compilation process, it is not recompiled. If the
syntactic test is to be performed anyway, use the Command Rebuild a PLC project [} 242].
Call: Build menu if a PLC project is currently selected, or context menu of the PLC project object (<PLC
project name> Project) in the Solution Explorer
When rebuilding the project, the project will first be cleaned (see also: Command Clean PLC project [} 243]
and subsequently built (see also: Command Build PLC project [} 242]).
Call: Context menu of the PLC project object (<PLC project name> Project) in the Solution Explorer
As opposed to the Command Build PLC project [} 242], in which only the objects used are checked, when
this command is executed the syntax of all objects in the PLC project is checked.
The command does not lead to code generation. No file with information on the compilation run is
created in the project directory.
Call: Build menu if a PLC project is currently selected, or context menu of the PLC project object (<PLC
project name> Project) in the Solution Explorer
The compilation information was created during the last building of the project or the last online change or
download of the PLC project and was saved in a local file (*.compileinfo) in the project folder. Unless
configured otherwise (see also: PLC project settings, Settings tab [} 112]), the compilation information is
transmitted to the target system during an online change or download. When the PLC project is cleaned,
only the local compilation information is removed. The compilation information on the target system is
retained.
See also:
• Command Rebuild a PLC project [} 242]
5.21.6 Add
Call: Context menu of the PLC project object (<PLC Project name> Project) or context menu of an already
existing object or folder within the PLC project in the Solution Explorer
Requirement: If TwinCAT is to insert the object in the PLC project tree, select an existing object or a folder
below which the new indented object is to be created.
See also:
• PLC documentation: Add objects
Symbol:
Function: This command opens the standard browser dialog, via which you can search for a file and add it
to the selected PLC project.
Call: Context menu PLC project object (<PLC Project name> Project) or context menu of an existing PLC
folder in the Solution Explorer
Requirement: The PLC project object or the folder within a PLC project is selected in the TwinCAT project
tree.
Symbol:
Call: Context menu of the PLC project object (<PLC Project name> Project) or context menu of an already
existing object or folder within the PLC project in the Solution Explorer > Add
Requirement: The PLC project object or the folder within a PLC project is selected in the TwinCAT project
tree.
The command inserts the folder below the currently selected object in the project tree.
See also:
• PLC documentation: Adding objects
Call: Context menu PLC project object (<PLC Project name> Project) or context menu of an existing PLC
folder in the Solution Explorer
Requirement: The PLC project object or the folder within a PLC project is selected in the TwinCAT project
tree.
Call: Context menu of the PLC project object (<PLC Project name> Project) or context menu of an already
existing folder within the PLC project in the Solution Explorer
Requirement: The PLC project object (<PLC project name>project) or the PLC objects are selected.
See also:
• Command Import from ZIP [} 245]
• PLC documentation: Exporting and importing a PLC project
Call: Context menu of the PLC project object (<PLC Project name> Project) or context menu of an already
existing folder within the PLC project in the Solution Explorer
Requirement: The PLC project object or the folder within a PLC project is selected in the TwinCAT project
tree.
See also:
• Command Export to ZIP [} 244]
• PLC documentation: Exporting and importing a PLC project
Symbol:
Function: The command opens a dialog for exporting objects of a project into an XML file in PLCopen
format.
Call: Context menu of the PLC project object (<PLC Project name> Project) or context menu of an already
existing folder within the PLC project in the Solution Explorer
Requirement: The PLC project object (<PLC project name>project) or the PLC objects are selected.
See also:
• Command Import PLCopenXML [} 245]
• PLC documentation: Exporting and importing a PLC project
Symbol:
Function: The command opens a dialog for importing objects from an XML file in PLCopen format.
Call: Context menu of the PLC project object (<PLC Project name> Project) or context menu of an already
existing folder within the PLC project in the Solution Explorer
Requirement: The PLC project object or the folder within a PLC project is selected in the TwinCAT project
tree.
See also:
• Command Export PLCopenXML [} 245]
• PLC documentation: Exporting and importing a PLC project
Call: Context menu of the PLC project object (<PLC project name>project) in the Solution Explorer
A PLC project can be saved as a PLC library, in order to make source code available for other applications
as a library and therefore via a defined interface. The command for saving a library is available in the context
menu of the PLC project.
The command opens the standard dialog for saving a file in the file system. The existing project name is
offered automatically; it can be modified by the user, if required. When a project is saved as a library, there is
a choice between two library file formats:
• *.library (source library)
◦ You can open a source library (for viewing and/or editing) by using the command Add Existing
Item, which is available on the PLC node within the project tree.
◦ You can "step" into a source library using the usual debug functionality.
• *.compiled-library (compiled library)
◦ This file extension can be used to save a library project in a compiled format. An encrypted image
of the precompile context of the library is stored, which means the implementations of the library
function blocks are no longer accessible or visible.
◦ A compiled library cannot be opened or debugged.
◦ Otherwise, *.compiled-library files behave like *.library files. You can therefore install and
reference them in the same way.
◦ The source code of a library can be protected by using the compiled library format. In addition, the
library files are smaller and the loading times are shorter.
Call: Context menu of the PLC project object (<PLC project name>project) in the Solution Explorer
This command saves the PLC project as a PLC library and installs it in the Library Repository. The command
for saving and installing a library is available in the context menu of the PLC project.
The installation of the library, which is performed in addition to the saving, is an extension of the Command
Save as library [} 245], since the library is installed on the local system at the same time. The library is then
immediately available for addition to a project via the Library Manager.
Symbol:
Function: This command opens an editor window in which the properties of the project and additional
project-related information can be displayed and defined.
Call: Context menu of the PLC project object (<PLC project name> Project) or Project menu
TwinCAT stores the PLC project properties directly in the PLC project.
See also:
• PLC documentation: Configuring a project
Project information
For a library project, a company, title and version must be entered in order to be able to install the library.
Company Name of the company, which created this project (application or library). In
addition to the library category, it is used for sorting in the library repository
Title Project title
Version Project version, e.g. "0.0.0.1"
Released
: Protection against modification enabled.
Result: When you now edit the project, a prompt will appear asking you if you
really want to change the project. If you answer this query once with Yes, the
prompt will no longer appear when the project is edited again.
Library Categories: Categories of the library project by which you can sort in the Library Repository
dialog. If no category is specified, the library is assigned the category "Other". To
assign it to another category, the category must be defined.
Library categories are defined in one or several external description files in XML
format. To assign the library, you can either call such a file or another library file
that has already picked up information about the categories from a description file.
Requirement: The project is a library project.
The Library Categories dialog opens, in which you can add library categories.
Default namespace: The default setting for the namespace of a library is the library title. Alternatively,
a different namespace can be defined explicitly, either generally for the library at
this point in the project information during library generation, or in the Properties
dialog of the library reference for local use of the library in a project.
The namespace of the library must be used as prefix of the identifier, in order to
enable unambiguous access to a module that exists more than once in the
project, or if the use of this prefix is enforced by the library property
LanguageModelAttribute "qualified-access-only" ("Unambiguous access to library
modules or variables").
If you do not define a standard namespace here, the name of the library file is
automatically used as the namespace.
Placeholder At this point, a default name for the placeholder can be specified, which
represents or references this library. If a placeholder is not specified explicitly at
this point, the default setting for the placeholder name of a library corresponds to
the library title.
Author Project author
Description Brief description of the project (e.g. content, functionalities, general information
such as "for internal use only", etc.)
Library features
Creating a global version Creates a global variable list in the PLC project, which contains the version
structure information.
Automatically generate Add button: POU objects of type "Function" are automatically created in the
library information POU project tree, which can be used to access project properties in the application
program. In this case, special functions are generated for the properties
Company, Title and Version (F_GetCompany, F_GetTitle, F_GetVersion). If
these functions have been added to the project by clicking Add, they can be
removed from the project by clicking Remove.
Documentation format Option reStructuredText: During library creation, comments that correspond to a
specific format are restructured and displayed in the Documentation tab of the
Library Manager in this customized view. This opens up additional options for
library documentation.
General
Minimize ID changes in The GUIDs of the PLC objects (e.g. POUs) are linked to those of the PLC project
TwinCAT files (using XOR). This avoids changes to the GUIDs of the PLC objects when they are
used several times in different projects.
List of categories List of categories assigned to the library project. They can come from several
sources. When you have entered all the desired categories, confirm the dialog
with OK.
Add The commands From Description File... and From Other Library... appear.
Remove TwinCAT removes the selected category.
From description file... The Select Description File dialog appears, in which you can select a
description file with the extension *.libcat.xml. The file contains command
categories. When you exit the dialog with Open, TwinCAT applies these
categories.
From another library.... The Select Library dialog appears, in which you can select a library (*.library)
whose command categories are to be adopted. When you exit the dialog with
Open, TwinCAT applies these categories.
OK TwinCAT provides the categories as project information and displays them in the
Library Categories field.
Cancel Closes the dialog. The process is aborted.
See also:
• PLC documentation: Configuring a project
• PLC documentation: Using libraries
Settings
Compiler definitions Here you can enter compiler definitions/"defines" (see {define} statements) and
conditions for compiling the application (conditional compilation).
A description of the available conditional pragmas can be found in section
Conditional pragmas. The expression expr used in such pragmas can also be
entered here. Several entries are possible in the form of a comma-separated list.
System compiler Available from TC3.1 Build 4024
definitions The compiler definitions that have been set at System Manager level in the PLC
project settings under Compiler definitions [} 111] are automatically adopted
here.
Download application Available from TC3.1 Build 4024
info Situation: You are loading a PLC project onto the controller that differs from the
project already located there. In this case, a message window appears containing
a Details button. Use this button to open the Application information window,
which allows you to check the differences between the current PLC project and
the PLC project on the controller. This involves comparing the number of function
blocks, the data and the storage locations.
The Application information window contains a brief description of the
differences, for example:
• Declaration of MAIN changed
• Variable fbMyNewInstance inserted in MAIN
• Number of methods/actions of FB_Sample changed
(Default): If this setting is enabled, the information on the contents of the PLC
project is loaded onto the PLC. This enables an extended check of the differences
between the current PLC project and the PLC project on the controller. The
difference in the extended check option is that the Application information
window contains an additional Online comparison tab, which shows a tree
comparison view. This will tell you which POUs have been changed, deleted or
added. The additional tab appears when you execute the blue underlined
command in the lower area of the Application information window ("Application
not current. Generate code now to display the online comparison?“).
(Default): When the PLC project is created, no tpy file associated with the
project is created.
: When the PLC project is created, a tpy file associated with the project is
created and stored in the project folder.
Please note that the value and configuration availability of this option depends on
whether or not the TPY file is configured as a target file (see Settings tab [} 112]).
• If the TPY file is enabled as a target file, the following happens:
◦ TwinCAT remembers the current status of the "Generate tpy file" option (=
"original value", see below.).
◦ If this is not already the case, the option "Generate tpy file" is automatically
activated next time the project is created.
◦ In addition, the "Generate tpy file" option is grayed out so that it cannot be
disabled by the user as long as the TPY file is configured as a target file.
• If the TPY file is subsequently disabled as a target file, the following happens:
◦ Next time the project is created, the "Generate tpy file" option is assigned its
"original value" (see above.).
◦ In addition, the option is no longer grayed out, making it available again for
configuration by the user.
Solution options
Compiler Version Defines the compiler version that TwinCAT uses during compilation and during
loading for compilation.
Please note that this setting is not a substitute for the Remote Manager.
If the PLC project is an application project, the Remote Manager should always
be used for handling different Engineering versions.
In this case, the compiler version should always be set to "latest".
The compiler version setting is only relevant if the PLC project to be version-
managed is a library project.
It is advisable to save the oldest version of the library that will ultimately be used
in practice. To this end, the compiler version must be set to the corresponding
fixed version (e.g. "3.1.4018.0").
Maximum number of Refers to the maximum number of warnings that TwinCAT issues in the Error
warnings List view.
The selection of displayed compiler warnings is defined in the category Compiler
warnings in the Project Settings dialog.
Replace constants
: TwinCAT loads the value directly for each constant of scalar type, i.e. not for
STRING, ARRAY or structures. In online mode, TwinCAT identifies the constants
in the declaration editor or monitoring window with a symbol preceding the value.
In this case, access via an ADR operator, forcing or writing, for example, is not
possible.
See also:
• Category Compiler Warnings [} 260]
This category is therefore not yet supported in the current TwinCAT version (reserved for future use).
The user must currently query an OEM license for his own library in the code of the library. See Query of an
OEM license in the PLC application.
The category SFC is used to configure the settings for SFC objects. Each new SFC object automatically has
the configured settings in its properties.
Flags tab
Implicitly generated variables (flags) for controlling and monitoring the processing in an SFC diagram.
Use
: The corresponding variable is used.
Declare
: The corresponding variable is created automatically. Otherwise, if the usage
is intended (Use is set), the user has to declare the variable.
An automatically declared flag variable appears in the declaration part of the SFC editor, but only in
online mode.
Build tab
Code generation
Calculate active
transitions only : TwinCAT generates code only for transitions that are currently active.
See also:
• SFC Flags
The category Visualization is used to configure the project-wide settings for objects of type Visualization.
General tab
Visualization Directories
Text list files Directory containing text lists available in the project for configuring texts for
different languages. TwinCAT uses this directory when exporting or importing text
lists, for example.
Click to bring up the Find Folder dialog, which allows you to select a
directory in the file system.
Image files Directory containing image files available in the project. Multiple folders are
separated by semicolons. TwinCAT uses this directory when exporting or
importing image files, for example.
Click to bring up the Find Folder dialog, which allows you to select a
directory in the file system.
Extended settings
Enables property
handling in all element : You can also configure a visualization element in those of its properties, in
properties
which you select an IEC variable, with a property. TwinCAT then generates
additional code for properties handling when compiling a visualization.
Requirement: Your IEC code contains at least one object of type Interface
The Visualization Profile category allows you to set the visualization profile.
Visualization profile
Specific Profile Profile, which TwinCAT uses in the project and which determines the visualization
elements that are available in the project.
The selection list contains all previously installed profiles.
The category Static analysis defines the checks that are taken into account in the static code analysis.
• If you have enabled the additional TE1200 Engineering license, the full range of Static Analysis
functions is available (saving and loading settings, more than 100 coding rules, naming conventions,
metrics, forbidden symbols).
• For more information about Static Analysis Full see:
TE1200 Static Analysis.
The following events are available, after which the commands listed in the list can be called:
Activate Configuration The required command is called up after the configuration has been enabled.
Plc Download The required command is called up after the PLC application has been
downloaded to the target system.
Plc Online Change The required command is called after a successful online change.
Plc After Compile The required command is called after a compilation of the PLC application.
Copy Copies files from parameter 1 (source path) to a location specified in parameter 2
(target path).
Execute Executes the application or script listed under parameter 1.
Source and target paths can contain virtual environment variables, which TwinCAT resolves accordingly.
Registry values are stored in the registry under the following key: \HKLM\Software\Beckhoff\TwinCAT3.
Example:
In the following example, the file SampleFile.xml file is copied from the Config project subfolder of the
solution to the folder C:\plc\config on the target system.
You can specify the maximum number of listed warnings in the Compile category.
See also:
• Command Build PLC project [} 242]
• Category Compile [} 251]
In the category UML you can change the UML compiler version. This setting is only relevant when using the
UML Statechart.
For more information on the configuration options, please refer to section "UML Compiler Version" of the
TF1910 TC3 UML documentation.
Write options
Engineering incompatibility of file version 1.2.0.0 (or higher) with TC3.1 < build 4024
Please note that objects saved with file version 1.2.0.0 (or higher) cannot be loaded with Engineer-
ing versions lower than TC3.1.4024!
Since an object is automatically saved with file version 1.2.0.0 when using the optional Base64 for-
mat, objects with Base64 format cannot be loaded with Engineering versions lower than
TC3.1.4024.
If a PLC project contains objects with the file version 1.1.0.1 and objects with the file version
1.2.0.0, the 1.1.0.1 objects are loaded with an Engineering version lower than TC3.1.4024. Objects
with file version 1.2.0.0 are not loaded.
The file version of a file saved with file version 1.2.0.0 can be reset to 1.1.0.1 using XAE version
TC3.1.4024 or higher.
(Default): The product or plugin version is written into the file (the version is
not visible in XAE; it shows up if the file is analyzed at file level).
• If you change the setting from disabled to enabled, a query window appears in
which you can select whether to add the product version to all existing files.
• Use case for the enabled option: This setting can be used to include the file
version in the file for debugging or tracking purposes, for example.
• Please note the following: If the file is saved with a different product version,
this leads to a change of this file, which shows up as a file difference when
using source code management systems.
Multiuser options
Solution options
: In such a case, the UML compiler version is automatically set to the latest
version if the option Autoupdate Uml Profile is enabled. In the case of such an
automatic update of the UML compiler version, a corresponding warning will be
displayed in the message window (e.g., "UML set from '4.0.2.0' to '4.0.2.1'").