Command Add Existing Item (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
Requirement: The PLC node is selected in the TwinCAT project tree.
File type | By default, you can set the filter to one of the following file types:
|
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: |
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. |
Possible scenarios when opening a PLC project
The following scenarios are possible when you open a project:
- Another project is still open.
- The project was saved with an older version of TwinCAT 3.
- The project was not saved with TwinCAT 3.
- The project was not terminated properly and "Save automatically" was enabled.
- The project is read-only.
- 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:
- 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.
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.
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.
- 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)
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:
- 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.
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:
- PLC documentation: Open a TwinCAT 3 PLC project
- PLC documentation: Open a TwinCAT 2 PLC project