CODESYS

Overview

Copia provides support for CODESYS v3.5 SP 11-21, with advanced feature support for the following:

Configuration

Copia supports CODESYS project files, with rendering for .project , .library and .export files.

Since .project and .library files are the standard working file, it is the recommended format for storage in Copia.

To get set up, simply store the file in a Copia repository. Once you perform the appropriate commit and push operations, you'll be able to see your project file and all of its data from both the Web App and Desktop App.

Configuring Export Files

You can alternatively choose to generate .export files from CODESYS by clicking the Export button under the Project dropdown.

While you can export a subset of your project, we recommend that you export everything. Highlight all content and press OK to continue.

As with the process outlined for .project and .library files, place your .export file in a Copia repository and perform the required commit and push operations to store it on the Copia system.

Graphical Display and Differences

General

When the exported project file is selected in the Web App or Desktop App, Copia displays the project tree structure in a way that's familiar to users of CODESYS based software. This way, you can easily navigate to a project item or identify differences.

Supported Types

The following CODESYS types are currently supported for graphical rendering and change detection:

  • Ladder (LAD)

  • Function Block Diagram (FBD)

  • Sequential Function Chart (SFC)

  • Structured Text (ST)

  • Continuous Function Chart (CFC)

    • Only the classic CFC language is supported. The Page-Oriented CFC language is not supported at this time.

  • Tasks

  • UDT

  • Global Variable List

  • Libraries

Copia also supports the following types:

  • PLC Device

  • Alarm Configuration

  • Application

  • Communication Manager

  • Data Sources Manager

  • DUT

  • Global Variable List (tasklocal)

  • Interface

  • Network Variable List (Receiver)

  • Network Variable List (Sender)

  • Persistent Variables

  • POU's to include:

    • Action

    • Method

    • Property

    • Transition

  • Recipe Manager

  • Task Configuration

    • Task

  • Trace

  • Trend Recording Manager

Code Commenting for Code Review

Copia supports rung commenting for CODESYS for Ladder Logic, Structured Text, Function Block Diagram (FBD), Sequential Function Chart (SFC), and Continuous Function Chart (CFC) .

Code Commenting enhances the Code Review process once someone generates a Pull Request to merge a Branch. During the review process, users can add comments directly to the supported parts of the code.

You can watch an overview of rung commenting in the video below.

The product version in the video may be older than the current release, but the process is still applicable.

Integration with the CODESYS Project Comparison Tool for Conflict Resolution

While the Copia Web App has no merge tool available for conflict resolutions in Pull Requests, the Desktop App can be configured to launch a user's local CODESYS IDE Project Comparison tool to resolve merge conflicts within a project. This provides users an alternative to manually resolving conflicts between project versions.

Requirements & Limitations

This option is available only if a supported version of the CODESYS IDE is installed on the same user computer that the Copia Desktop App is installed. RSLCompare must be installed on the same host OS as the Copia Desktop App. Users must enable this feature in the Copia Desktop App's settings. The level of granularity with which the CODESYS tool is able to resolve conflicts is outside the control of Copia. Local merges may not be possible if a repository has branch protections requiring Code Approval.

The CODESYS Project Comparison tool does not perform conflict resolutions in the traditional Git 3-way merge. Instead, it compares only the two files from the target and source branches.

Setup

This feature needs to be enabled in the Copia Desktop App's settings before use. Follow the instructions below to enable the feature:

  1. In the Copia Desktop App, open the Advanced Settings by clicking File > Options > Advanced

  2. Click the Enable Codesys Merge Tool checkbox

  3. Enter the local path to the CODESYS IDE version that you wish to use to launch your resolution

    1. Note: If you have multiple versions of CODESYS installed on your system, be sure to select the version with which you'd like to resolve your conflicts

Instructions

Follow the steps below when using the CODESYS Project Comparison tool to resolve merge conflicts in the Copia Desktop App. A video demonstration can be found at the end of the list.

  1. Important: Close any active instances of CODESYS that have the project file in question open before proceeding with the following steps.

  2. Ensure both the target and source branches are locally available

    1. Identify the branch that needs to merge into current branch from the branch list by clicking Desktop Application -> View -> Branch List

    2. Select that branch so that it is fetched to the local repo. If this step is skipped a warning dialog box will pop up during the merge process branch missing locally with recommended step to fetch the branch

  3. Switch back to the current (source) branch

  4. Start merge by clicking Application -> Branch -> Merge into current branch, or click the branch dropdown selector and click the Choose a branch to merge into <branch_name> button

  5. Click on branch that needs to merged into

  6. Select Merge button

  7. Click Resolve button on .project and .library files containing conflicts

  8. To use the Project Comparison tool that is installed with CODESYS, click "Resolve with Codesys Compare Tool"

    1. This will launch the CODESYS IDE and the compare tool. This may take some time.

  9. Once the merge tool completes loading, select the appropriate elements to merge and click Save

    1. Note: Do not use Save As.

  10. Select Yes when the CODESYS dialog box appears asking if you want to commit the changes you made in the diff view.

  11. After saving the CODESYS IDE should automatically close. Close it manually if it doesn't.

  12. Return to the Copia Desktop Application. The file that was merged will be removed from the list of conflicts and will be marked as resolved in the repository view

  13. Perform the same action if there are conflicts in other supported file types

  14. Commit the merge

Last updated

Was this helpful?