When you open an example project, it may have been created in an older or newer version, with missing plugins, or with a different type of PLC to the one you are using.

These instructions list the general procedure which can be translated to most any CODESYS example project.

Quick step-by-step guide

The steps can be summarised as:

  1. Ensure IDE version is newer than the one the project was created in
  2. Obtain all addons used in the project
  3. Change the PLC to the one you are using
  4. Update and or obtain device descriptions
  5. Update project environment
  6. Obtain missing libraries
  7. Compile and download
  8. Fix any outstanding errors

Detailed step-by-step guide

Detailing each step:

  1. IDE version must be newer than the one it was created in

    1. The simplest would be to always use the latest CODESYS Development System from Store
    2. If you must use an older version, for example you use a custom IDE from an Original Equipment Manufacturer, then you must first open the example in the later version, and use the Save As... dialog to save it as an older version.


  2. Obtain all addons used in the project

    1. Projects saved from SP17 contain a list of installed addons.  When you open these projects, you are prompted to install any missing addons. 
      CODESYS GmbH addons can be downloaded through CODESYS installer.
      Third party addons will have to be obtained from elsewhere and installed seperately.
    2. For projects prior to SP17, no such information is available in the project itself.
      Much of the inbuilt features from SP16's development system has been modularised into addons, so it is wise to start with a complete installation if you want to open an example which was created in a version prior to SP17 (see Modularisation of the Development System - Installation Issues (>= SP17)). 
    3. Any additional Addons should be clearly documented by the example, and may need to be obtained from the Manufacturer or Addon Developer.

  3. Change the PLC to the one you are using

    1. So now you have opened the project, but perhaps see lots of compile errors and maybe red circles in your device tree.
    2. For some reason, a prompt appears to update some things in your project  But you should cancel this dialog, at least until you have selected the right PLC.
    3. Open the devices view (Alt + 0), right click the PLC device, and update it to the PLC you are actually going to run the example on.

  4. Update and or obtain device descriptions

    1. Some device descriptions contain a clear update path, and can be updated via the Project Environment dialog in the next step.
      But some you will need to right click in the device tree and choose 'Update Device' and see if you have a newer version of that same device.
    2. If you still have some devices which you do not have device description for, you will see a red circle with a question mark as the icon for this object.
      Right click them and select "Download Missing Device Description".
      If this fails to download, you will have to seek out a device description from the manufacturer of the device.

  5. Update project environment

    1. By now, all of your device version should be correct.
    2. Using the Menu command Project > Project Environment , click the "Set All to Newest" Button and hit OK.

      OSCAT BASIC is one specific exception here:
      The older version was v3.31, but the newer version currently downloadable from store is v3.3.4.0.
      The version 3.31 is offered as an upgrade, but the version from store.codesys.com should be used.


  6. Obtain missing libraries

    1. Open the Library Manager of every application and hit the download missing libraries button (this button is only shown if you have missing libraries).
      Prior to SP16, you may have to hit this several times to download the dependencies of your newly downloaded libraries.
    2. Additionally, do this for the Library Manager in the POUs view.
    3. Any other missing libraries, you may have to track them down from their manufacturer.

      Libraries marked as version ( * ) mean to always use the newest version.
      These cannot be automatically downloaded, if you should find yourself without this library.
      This is because the download mechanism requires a specific version.
      In most cases, this library can be obtained from the latest version of the CODESYS Development System.


  7. Compile and download

    1. Press the F11 to compile the code.
    2. Login to your PLC to download it and run.

  8. fix any outstanding errors

    1. In rare circumstances there will be some outstanding build errors.
      Try to solve them yourself.
      When asking for help, it is helpful to refer to this FAQ and at what point you could not proceed.