Command Add Existing Item (Project)

Symbol: Command Add Existing Item (Project) 1:

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

Requirement: The PLC node is selected in the TwinCAT project tree.

Command Add Existing Item (Project) 2:

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"
  • 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.

 

*.tpzip PLC project archive

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...

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

 

Possible scenarios when opening a PLC project

The following scenarios are possible when you open a project:

  1. Another project is still open.
  2. The project was saved with an older version of TwinCAT 3.
  3. The project was not saved with TwinCAT 3.
  4. The project was not terminated properly and "Save automatically" was enabled.
  5. The project is read-only.
  6. It is a library that is installed in a library repository and retrieved from it.

1. Another project is still open.

You are asked if the other project should be saved and closed.

2. The project was saved with an older version of TwinCAT 3.

If the file format differs because the open project was saved with an older version of TwinCAT 3, there are two options:

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.

Command Add Existing Item (Project) 3:

Note the compiler version

If a project is opened that was created with an older version of the programming system and for which the latest compiler version is set in the project settings, while the project environment setting for the compiler version is set to Do not update in the new programming system, the compiler version that was used last in the old project continues to be used (i.e. not the "Current" version in the new environment).

3. The project was not saved with TwinCAT 3.

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.

Command Add Existing Item (Project) 4:

TwinCAT 3 converter

Adaptation of a TwinCAT PLC control project to the TwinCAT 3 syntax can only be successful during 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.

Command Add Existing Item (Project) 5:

TwinCAT 2.x PLC Control project options

The project directory path set in the TwinCAT 2.x PLC control project options and the project information are adopted in the Project Information dialog.

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:

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:

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.

5. The project is read-only.

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.

6. It is a library that is installed in a library repository and retrieved from 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: