A CoDeSys V2.3 project can be converted into a CODESYS V3 project only if the CODESYS V2.3 Converter package is installed in CODESYS V3. The package is available in the CODESYS Store.
Requirement: CODESYS is started (or a project is already open). You should be aware of the restrictions described below the following instructions.
-
Click “File Open Project”.
-
In the “Open Project” dialog, click any CoDeSys V2.3 project or project archive in the file system. For searching, you can set the file filter on the bottom right corner of the dialog.
If another project is still open, CODESYS instructs you to close it accordingly. After that the CoDeSys V2.3 converter automatically starts.
-
The V2.3 converter checks that the project can be compiled without errors. If so, then it processes the project automatically.
-
NOTE: If the project contains visualization objects with placeholder variables that the converter cannot resolve, the respective visualizations are shown as a group in place of the visualization references.
-
Device conversion: When a device (target system) is referenced in the project to be opened and no conversion rules are defined for the device, then the “Device Conversion” dialog opens. Specify here whether and how the converter should replace the previous device reference with a current one.
For replacement, the converter added the new device in the place of the old one in the device tree of the converted project.
-
Library conversion: if a library, for which no conversion rule has so far been defined, is referenced in the project to be opened, then the “Conversion of Library Reference” dialog opens. Specify here whether and how the converter should replace the existing library reference with a current one. If you select a library for which the project information is missing, then the “Enter Project Information” dialog opens in order to specify this information.
The converter loads the adapted project. Note: The redefined library references are to be found in the global Library Manager in the POUs view.
Restrictions when reusing a CoDeSys V2.3 project in CODESYS
Compilation: |
The project has to be compilable without errors in CoDeSys V2.3. Note: CODESYS stills issues warnings in V3 when compiling. These are caused by implicit conversions, which can lead to a loss of information (for example through sign changes). CODESYS checks "case" statements against the switch variable: |
|||
Controller configuration: |
The “Controller Configuration” of a CoDeSys V2.3 project cannot be imported into V3. You have to recreate the device configuration and re-declare the variables used in the controller configuration. |
|||
Network variables: |
For network variables, CODESYS creates V3 GVL objects and imports the variable declarations. However, the network properties are not imported. See the description of the network variable exchange for this. |
|||
Libraries: |
All variables and constants that are used in a library also have to be declared in the library. It must be possible to compile the library in CoDeSys V2.3 without errors. |
|||
Syntactic and semantic restrictions since CoDeSys V2.3: |
|
|||
Visualization: |
||||
Placeholders and their replacement |
Placeholders |
VAR_INPUT |
Usage |
Replacement |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Problematic placeholders |
|
|||
Non-importable elements: |
Trend, ActiveX – the import is not possible, because the implementation differs a great deal. In V3, a corresponding warning is issued and a corresponding manual reproduction is required. |
|||
Programming languages |
ST, IL, FBD: |
No restrictions |
||
LD: |
CODESYS imports function blocks with parallel branches in such a way that the part before the branch is repeated for each branch. This corresponds to the generated code that CoDeSys V2.3 creates for parallel branches. ![]() |
|||
SFC: |
Explanation: In V3 the implicit variables that CODESYS creates for actions are given an underscore character as prefix. An invalid identifier with a double underscore character would result. |
|||
CFC: |
|