Managing Projects

The commands which refer to entire project are found under the menu items "File" and "Project". Some of the commands under "Project" deal with objects and are therefore described in the chapter Objects.

Entries under the menu point File:

'File' 'New'

With this command you create an empty project with the name "Untitled". This name must be changed when saving

'File' 'New from pattern'

With this command you open any project that shuold be used as "pattern". A dialoge appears for selecting a project file, that can be openend with the name " Untitled".

'File' 'Open'

With this command you open an already existing project. If a project has already been opened and changed, then TwinCAT PLC Control asks whether this project should be saved or not.
The dialog box for opening a file appears, and a project file with the extension "*.pro" or a library file with the extension "*.lib" must be chosen. This file must already exist. It is not possible to create a project with the command "Open".
To upload a project file from the PLC, press PLC at Open project from PLC. You will obtain, as next, the dialog Communication parameters (see menu ‘Online‘ ‘Communication parameters‘) for setting the transmission parameters when no connection exists yet to the PLC. Once an on-line connection has been created, the system checks whether the same named project files already exist in the directory on your computer hard disc. When this is the case you receive the dialogue Load the project from the controller where you can decide whether the local files should be replaced by those being used by the controller. (This sequence is the reverse of the sequence of 'Online' 'Load source code', with which the project source file is stored in the controller. Do not confuse with 'Create Boot project'!)

Managing Projects 1:

Note that after uploading a project, it is still without a name. You must save it under a new name.

If no project was loaded on the controller yet, you will receive a corresponding error message.

Managing Projects 2:
Standard dialog for opening a file in TwinCAT PLC Control

The option Open project from Source code manager is used to open a project that is managed in an ENI project database. The requirement is that you have access to an ENI server that serves the database. Click the ENI... button to get the 'Project Objects' dialog for establishing the connection to the server.

Enter the appropriate access data here (TCP/IP address, port, user name, password, read only access) and the directory of the database (project name) from which the objects are to be retrieved from the database and confirm with Next. Then the dialog closes and the corresponding one for the category 'Shared objects' opens. Enter your access data here as well. Finish closes this dialog and automatically retrieves and opens the objects of the set directories. Now you can make the desired settings in the project options, which should apply to the further editing of the project. If you want to continue managing the project in the database, parameterize accordingly in the dialogs of the Project database category.

In the File menu, below the 'Exit' menu item, the last opened projects are listed. When you select one of them, this project will be opened.

If passwords or user groups have been defined for the project, a dialog for entering the password appears.

'File' 'Close'

With this command you close the currently-open project. If the project has been changed, then TwinCAT PLC Control asks if these changes are to be saved or not. If the project to be saved carries the name "Untitled", then a name must be given to it (see "File" "Save as").

'File' 'Save' Shortcut: <Ctrl>+<S>

With this command you save any changes in the project. If the project to be saved is called "Untitled", then you must give it a name (see "File" "Save as").

'File' 'Save as'

With this command the current project can be saved in another file or as a library. This does not change the original project file. After the command has been chosen the Save dialog box appears. Choose either an existing File name or enter a new file name and choose the desired file type.

Managing Projects 3:

Dialog box for Save as


You can also save the current project as a library in order to use it in other projects. Choose the file type Internal library (*.lib) if you have programmed your POUs in TwinCAT PLC Control.
Choose the file type External library (*.lib) if you want to integrate the POUs which have been implemented in other languages (e.g. C). This means that another file is also saved which receives the file name of the library, but with the extension "*.h". This file is constructed as a C header file with the declarations of all POUs, data types, and global variables. Then click OK.
The current project is saved in the indicated file. If the new file name already exists, then you are asked if you want to overwrite this file.
When 'saving as a library', the entire project is compiled. If an error occurs thereby, then you are told that a correct project is necessary in order to create a library. The project is then not saved as a library.

'File' 'Save/Mail Archive'

This command is used to set up and create a project archive file. All files which are referenced by and used with a TwinCAT PLC project can be packed in a compressed zip file. The zip file can be stored or can be directly sent in an email. This is useful if you want to give forward a set of all project relevant files. When the command is executed, the dialog box 'Save Archive' opens:

Managing Projects 4:

Here you can define which file categories should be added to the archive zip file: Select or deselect a category by activating/deactivating the corresponding checkbox. Do this by a single mouseclick in the checkbox or by a doubleclick on the category name. If a category is marked with an arrow, all files of this category will be added to the zip file, if it is marked without an arrow, none of the files will be added. To select single files of a category press the corresponding button Details.

Managing Projects 5:

The dialog 'Details' will open with a list of available files. In this dialog select/deselect the desired files: Use the button Select All or Select None to affect the complete list. A single file can be selected/deselected by a mouseclick in the checkbox, also by a doubleclick on the list entry or by pressing the spacebar when the list entry is marked. Close the Details dialog with Save to store the new settings.

In the main dialog Save Archive the checkbox of categories, for which not all files are selected, will appear with a grey background color.

The following file categories are available, the right column of the table shows which files can be added to the zip file:

Category

Associated Files

Project File

<projectname>.pro ( the TwinCAT PLC Control project file)

Referenced Libraries

*.lib, *.obj, *.hex (libraries and if available the corresponding object and hex-files)

Compile Information

*.ci (compile information), *.ri (download/reference information) <temp>.* (temporary compile and download files) also for simulation

Log

*.log (project log file)

INI File

TwinCAT PLC Ctrl.ini

Registry Entries

 

Symbol Files

*.sdb, *.sym (symbol information created from the project)

Bitmap Files

*.bmp (bitmaps for project POUs and visualizations)

To add any other files to the zip, press the button Other Files. The dialog 'Other files' will open where you can set up a list of desired files.

Managing Projects 6:

Press the button Add to open the standard dialog for opening a file, where you can browse for a file. Choose one and confirm with Open. The file will be added to the list in the 'Other files' dialog. Repeat this for each file you want to add. To delete entries from the list, press the button Remove. When the list of selected files is ok, close the dialog with OK.
To add a Readme file to the archive zip, press the button Comment. A text editor will open, where you can enter any text. If you close the dialog with OK, during creation of the zip file a readme.txt file will be added.

Additionally to the entered comments it will contain information about the build date.

Generate zip archive:

If all desired selections have been made, in the main dialog press

'File' 'Print' Shortcut: <Ctrl>+<P>

With this command the content of the active window is printed. After the command has been chosen, then the Print dialog box appears. Choose the desired option or configure the printer and then click OK. The active window is printed. Color output is available from all editors.

Managing Projects 7:

Dialog box for printing

You can determine the number of the copies and print the version to a file. With the button Properties you open the dialog box to set up the printer. You can determine the layout of your printout with the command "File" "Document settings". During printing the dialog box shows you the number of pages already printed. When you close this dialog box, then the printing stops after the next page. In order to document your entire project, use the command "Project" "Document". If you want to create a document frame for your project, then open a global variables list and use the command "Extras" "Make Docuframe file".

If the focus is in the message window, then all contents are printed out, represented line by line, as in the window displayed.

Possible Contents:

'File' 'Printer setup'

With this command you can determine the layout of the printed pages. The following dialog box is now opened:

Managing Projects 8:


Page Layout Dialog Box

In the field File you can enter the name of the file with the extension ".dfr" in which the page layout should be saved. The default destination for the settings is the file DEFAULT.DFR.
If you would like to change an existing layout, then browse through the directory tree to find the desired file with the button Browse.
You can also choose whether to begin a new page for each object and for each subobject.
Use the Printer Setup button to open the printer configuration. If you click on the Edit button, then the frame for setting up the page layout appears. Here you can determine the page numbers, date, filename and POU name, and also place graphics on the page and the text area in which the documentation should be printed.

Managing Projects 9:

Window for pasting the placeholders on the page layout


With the menu item "Insert" "Placeholder" and subsequent selection among the five placeholders (Page, POU name, File name, Date, and Content), insert into the layout a so-called placeholder by dragging a rectangle on the layout while pressing the left mouse button. In the printout they are replaced as follows:

Command

Placeholder

Description

Page

{Page}

Here the current page number appears in the printout.

POU name

{POUName}

Here the current name of the POU appears.

File name

{FileName}

Here the name of the project appears.

Date

{Date}

Here the current date appears.

Contents

{Content}

Here the contents of the POU appears.

In addition, with "Insert" "Bitmap" you can insert a bitmap graphic (e.g. a company logo) in the page. After selecting the graphic, a rectangle should also be drawn here on the layout using the mouse. If the template was changed, then TwinCAT PLC Control asks when the window is closed if these changes should be saved or not.

'File' 'Exit' Shortcut: <Alt>+<F4>

With this command you exit from TwinCAT PLC Control. If a project is opened, then it is closed as described in "File" "Save".

Possible Actions with Projects:

'Project' 'Build' <Ctrl>+<F8>

The project is compiled using 'Project' 'Build'. The compilation process is basically incremental, that is only changed POUs are recompiled. A non-incremental compilation can also be obtained if the command 'Project' 'Clear all' is first executed.
For target systems that support Online Change, all POUs that will be loaded into the controller on the next download are marked with a blue arrow in the Object Organizer after compilation.
The compilation process that is carried out with 'Project' 'Build' occurs automatically if the controller is logged-in via 'Online' 'Log-in'.
During compilation a message window is opened which shows the progress of the compilation process and any errors and warnings which may occur during compilation. Errors and warnings are marked with numbers. Using F1 you get more information about the currently selected error. A list of all error messages is to be found in the appendix.

Managing Projects 10:

If the option Save before compilation is selected in the options dialog of the Load & Save category, the project is stored before compilation.

Managing Projects 11:

The cross-references are created during compilation and are stored in the build information. In order to apply the commands Browse Call Tree, Show Cross Reference and the commands Unused variables, Concurrent access and Multiple write access on output of the 'Project' 'Check' menu, the project must be rebuilt after a change.

'Project' 'Rebuild all'

With 'Project' 'Rebuild all' unlike incremental compilation ('Project' 'Build') the project is completely recompiled. However, the download information will not be discarded, as is the case with the 'Clean all' command.

'Project' 'Clean All'

This command deletes the information of the last download and the last compilation process.
After selecting the command, a dialog box appears indicating that login is no longer possible without a new download. Here the command can be canceled or confirmed.

Managing Projects 12:

After 'Clean all' a login on the PLC project is only possible if the *.ri file with the project information from the last download was first explicitly saved outside the project directory (see 'Load Download-Information') and can now be reloaded prior to logging-in.

Project' 'Load Download- Information'

With this command the Download-Information belonging to the project can get reloaded, if it was saved to a directory different from that where the project is. After choosing the command the standard dialogue 'File Open' opens.

The Download-Information is saved automatically at each download to a file, which is named <project name><target identifier>.ri and which is put to the project directory. This file is loaded, when the project is opened and at login it is used to check whether the PLC project is fitting to the currently opened TwinCAT PLC Control project (Id-check). Furthermore it is used to check, in which POUs the code has been changed. In systems which support the online change functionality, then only these POUs will be loaded to the PLC during online change procedure. But: If the *.ri-file in the project directory gets deleted by the command 'Project' 'Clean all', you only can reload the Download-Information, if you had stored the *.ri-file in another directory too.

‘Project’ 'Translate into another language‘

This menu item is used for translating the current project file into another language. This is carried out by reading in a translation file that was generated from the project and externally enhanced in the desired national language with the help of a text editor.
Two menu sub-items are present:

Create translation file

This command in the 'Project' '' menu leads to the 'Create translation file' dialog:

Managing Projects 13:

In the Translation file field, enter a path that shows where the file is to be stored. The default file extension is *.tlt; this is a text file. Also possible is the using of the extension *.txt. This is recommendable if the file should be used with EXCEL or WORD.
If there already exists a translation file which you want to process, give the path of this file or use the Search button to reach the standard Windows file selection dialog.

The following information from the project can optionally be passed to the translation file that is being modified or created, so that they will be available for translation: Names (names, e.g. the title 'POUs' in Object Organizer), Identifiers, Strings, Comments. In addition, Position information for these project elements can be transferred.

If the corresponding options are checked, the information from the current project will be exported as language symbols into a newly created translation file or added to an already existing one. If the respective option is not selected, information belonging to the pertinent category, regardless of which project it came from, will be deleted from the translation file.

Position information: It describes with the specifications file path, POU and line the position of the language symbol, made available for translation. Three options are available for selection:

If a translation file created earlier is to be edited which already contains more position information than that currently selected, it will be correspondingly truncated or deleted, regardless of which project it was generated from.

Managing Projects 14:

A maximum of 64 position specifications will be generated per element (language symbol), even if the user has selected “All” under “Position Information” in the ‚Create Translation File' dialog.

Overwrite existing: Existing position information in the translation file, that is currently being processed, will be overwritten, regardless of which project generated it.

Target languages: This list contains identifiers for all languages which are contained in the translation file, as well as those to be added upon completion of the 'Create translation file' dialog.
The Exclude button opens the 'Exclude libraries' dialog.

Managing Projects 15:

Here, libraries included to the project can be selected, whose identifier information is not to be transferred to the translation file. To accomplish this, the corresponding entry in the table Included libraries on the left is selected with the mouse and placed in the Excluded libraries table to the right using the Add button. Likewise, entries already placed there can be removed using the Remove button. OK confirms the setting and closes the dialog.

The Add button opens the dialog 'Add Target Language':

Managing Projects 16:

A language identifier must be entered into the editor field; it may not have a space at either the beginning or the end.

OK closes the 'Add Target Language' dialog and the new target language appears in the target language list.
The Remove button removes a selected entry from the list.
You may also confirm the “Create translation file” dialog via OK, in order to generate a translation file.

If a translation file of the same name already exists you will get the following confirmation message to be answered Yes or No:
" The specified translation file already exists. It will now be altered and a backup copy of the existing file will be created. Do you want to continue?"

No returns you without action to the 'Create translation file' dialog.

If Yes is selected, a copy of the existing translation file with the filename “Backup_of_<translation file>.xlt” will be created in the same directory and the corresponding translation file will be modified in accordance with the options that have been entered.

The following takes place when a translation file is generated:

Editing of the translation file

The translation file must be opened and saved as a text file. The signs ## mark keywords. The ##TODO-placeholders in the file can be replaced by the valid translation. For each language symbol a paragraph is generated which starts with a ##NAME_ITEM and ends with a ##END_NAME_ITEM. (For comments correspondingly ##COMMENT_ITEM etc.).

See in the following an example of a translation file paragraph which handles the name of one of the POUs of the project. ST_Visu. The target languages shall be English(USA) and French. In this example the position information of the project element which should be translated has been added:

before translation:

##NAME_ITEM

[D:\projects\Bspdt_22.pro::ST_Visualisierung::0]

ST_Visualisierung

##English :: ##TODO

##French :: ##TODO

##END_NAME_ITEM

after translation:

##NAME_ITEM

[D:\projects\Bspdt_22.pro::ST_Visualisierung::0]

ST_Visualisierung

##English :: ST_Visualization

##French :: ST_Visu

##END_NAME_ITEM

Please check that the translated Identifier and Names remain valid concerning the standard and that strings and comments are in correct brackets.

Managing Projects 17:

The following parts of a translation file should not be modified without detailed knowledge: Language block, Flag block, Position information, Original texts.

Translate Project (into another Language)

This command in the 'Project' 'Translate into Another Language' menu opens the 'Translate Project into Another Language' dialog.

Managing Projects 18:

The current project can be translated into another language if an appropriate translation file is used.

Managing Projects 19:

If you want to save the version of the project in the language in which it was originally created, save a copy of the project prior to translation under a different name. The translation process cannot be undone.

In the field Translation file ,provide the path to the translation file to be used. By pressing Search you may access the standard Windows file selection dialog.

The field Target language contains a list of the language identifiers entered in the translation file, from which you can select the desired target language.

OK starts the translation of the current project into the chosen target language with the help of the specified translation file. During translation, a progress dialog is displayed, as well as error messages, if any. After translation, the dialog box and all open editor windows of the project are closed.

Cancel closes the dialog box without modification to the current project. If the translation file contains erroneous entries, an error message is displayed after OK is pressed, giving the file path and the erroneous line, e.g.: “[C:\Programs\projects\visu.tlt (78)]; Translation text expected.

'Project' 'Document'

This command lets you print the documentation of your entire project. The elements of a complete documentation are:

For the last two items the project must have been built without errors.

Managing Projects 20:

Dialog box for project documentation

Only those areas in the dialog box are printed which are highlighted in blue.

If you want to select the entire project, then select the name of your project in the first line. If, on the other hand, you only want to select a single object, then click on the corresponding object or move the dotted rectangle onto the desired object with the arrow key. Objects which have a plus sign in front of their symbols are organization objects which contain other objects. With a click on a plus sign organization object is expanded, and with a click on the resulting minus sign it can be closed up again. When you select an organization object, then all relevant objects are also selected. By pressing the <Shift> key you can select a group of objects, and by pressing the <Ctrl> key you can select several individual objects.

Once you have made your selection, then click on OK. The Print dialog box appears. You can determine the layout of the pages to be printed with "File" "Printer setup".

'Project' 'Export'

With TwinCAT PLC Control projects can be exported or imported. That allows you to exchange programs between different IEC programming systems.
There is a standardized exchange format for POUs in IL, ST, and SFC (the Common Elements format of IEC 61131-3).
For the POUs in LD and FBD and the other objects TwinCAT PLC Control has its own filing format since there is no text format for this in IEC 61131-3.

The selected objects are written to an ASCII file.

POUs, data types, and the ressources can be exported. In addition, entries in the library manager, that is the linking information to the libraries, can be exported (not the libraries themselves!).

Managing Projects 21:

The re-import of an exported FBD or LD function block fails if a comment in the graphical editor contains a single quotation mark ('), because this is interpreted as string beginning.

When you have made your selection in the dialog box (the selection is made as described at 'Project' 'Document' ), you can still decide whether you want to export the selection to a file or have a separate export file generated for each object. To do this, turn off or on the One file for each object option accordingly, and then click OK. The dialog for saving files appears. Specify a file name with extension ".exp" or a directory for the individual object export files, which are then created there under "Object name.exp".

'Project' 'Import'

In the dialog that appears for opening files, select the desired export file.
The data will be imported into the current project. If an object with the same name already exists in the project, then a dialog box appears asking "Do you want to replace it?"If you answer with Yes, the object in the project will be replaced by the object from the import file, if you answer with No, the name of the new object will be supplemented by an underscore and a number ("_0", "_1", ..). With Yes, all or No, all this is done for all objects.

If the information to link to a library is imported, the library is loaded and added to the end of the list in the Library Manager. If the library has already been loaded in the project, it will not be loaded again. However, if a different save time for the library is specified in the export file that is imported, the library name is marked with an "*" in the Library Manager (e.g. standard.lib*30.3.99 11:30:14), analogous to loading a project. If the library cannot be found, the information dialog : "Cannot find library {<path>\}<name> <date> <time>" appears, analogous to loading a project.
In the message window the import is logged.

'Project' 'Merge'

This command allows you to copy objects (function blocks, data types and resources) and links to libraries from other projects into your project. If the command was given, then first opens the standard dialog for opening files. If you have selected a file there, then opens a dialog in which you can select the desired objects. The selection is made as described at 'Project' 'Document'. If an object with the same name already exists in the project, then the name of the new object receives an underscore and a number ("_1", "_2" ...) as the last character.

'Project' 'Compare'

This command is used to compare two projects, or the current version of the opened project with the one that was saved last.

Overview:

In the following, the designation 'current project' is used for the project that is currently being processed, and 'comparison project' for the one that is called for comparison. After selecting the command, the project is displayed in the comparison mode. In the following, 'unit' refers to the smallest comparison unit, which can consist of a line (declaration editor, ST, IL), a network (FBD, LD) or an element/function block (CFC, SFC).

In comparison mode, the current and comparison projects are compared in a divided window, and the blocks found to be different are color-coded. In the case of editor function blocks, there is also direct comparison for the contents. Before the comparison run, filters regarding the consideration of blanks and comments can be activated. Furthermore, it can be selected whether changes within existing units are displayed as such in the comparison mode or whether all different units are marked as 'newly inserted' or 'no longer present'. The version of the comparison project can be transferred to the current project for different units or for a whole block of equally marked ones.

Managing Projects 22:

In compare mode (see status bar: COMPARE) the project cannot get edited !

Execute comparison:

After executing the command 'Project' 'Compare' the dialog 'Project Comparison' opens:

Managing Projects 23:

Insert the path of the reference project at Project to compare. Press button if you want to use the standard dialog for opening a project. If you insert the name of the actual project, the current version of the project will be compared with the version which was saved last.

If the project is under source control in an ENI data base, then the local version can be compared with the actual version found in the data base. For this activate option Compare with ENI-Project.

The following options concerning the comparison can be activated/deactivated:

Example:

Line 0005 has been modified in actual project (left side).

Managing Projects 24:

When the dialog Project Comparison is closed by pressing OK, the comparison will be executed according to the settings.

Representation of the comparison result:

1. Project overview in compare mode:

After the project compare has been executed, a bipartited window opens which shows the project in compare mode. In the title bar you find the project paths: "Project comparison <path of actual project> - <path of reference project>". The actual project is represented In the left half of the window, the reference project in the right one. Each structure tree shows the projects' name at the uppermost position, apart from that it corresponds to the object organizer structure.

Managing Projects 25:

POUs which are different, are marked in the structure tree by a shadow, a specific color and eventually by an additional text :

2. POU contents in compare mode:

By a double click on a line in the structure overview, which is marked red because of a modification, the POU is opened.

If it is a text or graphic editor POU, it will be opened in a bipartited window. The content of the reference project (right side) is set opposite to that of the actual project (left side). The smallest unit which will be regarded during comparison, is a line (declaration editor, ST, IL), a network (FBD, LD) or an element (CFC, SFC). The same coloring will be used as described above for the project overview.
Example:

Managing Projects 26:

If it is not a editor POU, but the task configuration, the target settings etc., then the POU version of the actual and the reference project can be opened in separate windows by a double click on the respective line in the project structure. For those project POUs no further details of differences will be displayed.

Working in the compare mode (Menu 'Extras', Context menu):

If the cursor is placed on a line in the bipartited window, which indicates a difference, the menu 'Extras' resp. The context menu offers a selection of the following commands, depending on whether working in the project overview or in a POU.

'Next difference'(<F7>): The cursor jumps to the next unit, where a difference is indicated. (line in project overview, line/network/element in POU)

'Previous difference'(<Shift><F7>): The cursor jumps to the previous unit, where a difference is indicated . (line in project overview, line/network/element in POU)

'Accept change'(<Space bar>): For all coherent (e.g. subsequent lines) units, which have the same sort of difference marking, the version of the reference project will be accepted for the actual project. The corresponding units will be shown (with the corresponding coloring) in the left side of the window. If it is an unit, which is marked red (just modification), then the acceptance will be recognizable by yellow coloring of the text in the actual project.

'Accept changed item'(<Strg><Space bar>): Only the single unit (line, network, element) where the cursor is currently placed, will be accepted for the actual version. The corresponding units will be shown (with the corresponding coloring) in the left side of the window. If it is an unit, which is marked red (just modification), then the acceptance will be recognizable by yellow coloring of the text in the actual project.

'Accept properties'(only in project overview): The object properties for the POU, where the cursor is currently placed, will be accepted for the actual project as they are set in the reference version.

'Accept access rights' (only in project overview): The object access rights for the POU, where the cursor is currently placed, will be accepted for the actual project as they are set in the reference version .

'Project' 'Project Info'

Under this menu item the information about your project can be saved. When the command has been given, then the following dialog box opens:

Managing Projects 27:

Dialog box for entering project information

The following project information is displayed:

This information can not be changed. In addition, you can can add the following information:

This information is optional. When you press the button Statistics you receive statistical information about the project. It contains information such as the number of the POUs, data types, and the local and global variables as they were traced at the last compilation.

Managing Projects 28:

Example of project statistics


If you choose the option Ask for project info in the category Load & Save in the options dialog box, then while saving a new project, or while saving a project under a new name, the project info is called automatically.


'Project' 'Global Search'

With this command you can search for the location of a text in POUs, data types, or in the objects of the global variables, in the PLC configuration, the task configuration and in the declaration part of the libraries.
When the command is entered, a dialog box opens in which you can choose the desired object. The selection is made as in the "Project" "Document" description.
When you have confirmed the selection with OK, then the search dialog box appears.

This appears immediately when the command 'Global Search' is invoked via the symbol in the menu bar; the search is then automatically carried out in all searchable parts of the project. The most recently entered search strings can be selected through the combo box of the Search for field. If a text string is found in an object, the object is loaded into the corresponding editor or in the library manager and the location where the string was found is displayed. The display of the text that is found, as well as the search and find next functions behave similarly to the command 'Edit' 'Search'.

If you select the In message window button, all locations where the series of symbols searched for appears in the selected object will be listed line by line in tabular form in the message window. Afterward, the number of locations found will be displayed.
If the report window was not opened, it will be displayed. For each location that is found, the following will be displayed:

Managing Projects 29:

If you double-click the mouse on a line in the message window or press <Enter>, the editor opens with the object loaded. The line concerned in the object is marked. You can jump rapidly between display lines using the function keys <F4> and <Shift>+<F4>.


'Project' 'Global Replace'

With this command you can search for the location of a text in POUs, data types, or the objects of the global variables and replace this text by another. This is executed in the same way as with "Project" "Global Search" or "Edit" "Replace". The libraries, however, are not offered for selection and no display in the message window is possible.

‘Project‘ ‘Check‘

A submenu listing the following commands will open:

Results are displayed in the message window.
Each of these functions tests the state of the most recent compilation. The project must therefore have been compiled error-free at least once, before the test can be carried out; if not, the menu items are “greyed out".
Results are displayed in the message window.

Unused Variables:
This function searches for variables that have been declared but not used in the program. They are outputted by POU name and line, e.g.: PLC_PRG (4) – var1. Variables in libraries are not examined.
Results are displayed in the message window.

Overlapping memory areas:
This function tests whether in allocation of variables via the “AT” declaration overlaps have arisen at specific memory areas. For example, an overlap occurs when allocating the variables “var1 AT %QB21: INT” and “var2 AT %QD5: DWORD” because they both use byte 21.
The output then appears as follows:

%QB21 is referenced by the following variables: 
PLC_PRG (3): var1 AT %QB21 
PLC_PRG (7): var2 AT %QD5 

Results are displayed in the message window.

Access conflict:
This function in the 'Project' 'Check' menu searches for memory areas which are referenced in more than one task. No distinction is made here between read and write access. The output is for example:

%MB28 is referenced in the following tasks : 
Task1 – PLC_PRG (6): %MB28 [read-only access] 
Task2 – POU1.ACTION (1) %MB28 [write access] 

Results are displayed in the message window.

Multiple writes to output:
This function of the 'Project' 'Check' menu searches for memory areas to which a single project gains write access at more than one place. The output then appears as follows:

%QB24 is written to at the following locations: 
PLC_PRG (3): %QB24 
PLC_PRG.POU1 (8): %QB24

Results are displayed in the message window.

User groups

In TwinCAT PLC Control up to eight user groups with different access rights to the POUs, data types, and ressources can be set up. Access rights for single objects or all of them can be established. Only a member of a certain user group can open a project. A member of such a user group must identify himself by means of a password.
The user groups are numbered from 0 to 7, whereby the Group 0 has the administrator rights, i.e. only members of group 0 may determine passwords and access rights for all groups and/or objects.
When a new project is launched, then all passwords are initially empty. Until a password has been set for the 0 group, one enters the project automatically as a member of the 0 group.
If a password for the user group 0 is existing while the project is loaded, then a password will be demanded for all groups when the project is opened. For this the following dialog box appears:

Managing Projects 30:


Dialog box for password entry

In the combobox User group on the left side of the dialog box, enter the group to which you belong and enter on the right side the relevant password. Press OK. If the password does not agree with the saved password, then the message appears:
"The password is not correct."
Only when you have entered the correct password can the project be opened.

Managing Projects 31:

If passwords are not assigned for all user groups, it is possible to open a project via a user group for which none has been assigned!

With the command 'Passwords for user group' you can assign passwords, with the command 'Object' 'Access rights' the rights for individual or all objects.

'Project' 'Passwords for user groups'

This command opens the password assignment dialog for user groups. This command can be executed only by members of group 0. When the command is executed, the following dialog opens:

Managing Projects 32:

Dialog for password assignment

In the left User Group combo box you can select the group. Enter the desired password in the Password field for this group. An asterisk (*) appears in the field for each typed letter. You must repeat the same word in the Confirm Password field. Close the dialog with OK after each password entry. If the message comes:" The password and its confirmation do not match."you have mistyped one of the two entries. Therefore, it is best to repeat both entries until the dialog closes without a message. If necessary, only assign a password for the next group afterwards by calling the command again.
With the command 'Object' 'Access rights' you can assign the rights for individual or all objects