Configure your CoDeSys 2.x project for tag integration

This task describes how to configure a CoDeSys 2.x project to communicate with external programs, such as InduSoft Web Studio, during runtime. It is a prerequisite to integrating CoDeSys tags into your IWS project.

The CoDeSys 2.x project development software automatically exports its project database to a symbol file every time you rebuild your CoDeSys project. However, CoDeSys exports the entire database by default, including many system and library variables that IWS cannot import. You must reconfigure your CoDeSys project options to export only the POUs and Global Variables and then rebuild your CoDeSys project to generate a fresh symbol file.

  1. Open your CoDeSys 2.x project.
    Figure 4. Opening a CoDeSys 2.x project
    Web Studio Help illus codesys2 configuring 1 Configure your CoDeSys 3.x project for tag integration

  2. In the project explorer on the right, click the Resources tab.
  3. In the list of resources, double-click Target Settings. The Target Settings dialog is displayed.
  4. Click the General tab.
    Figure 5. General tab of the Target Settings dialog
    Web Studio Help illus codesys2 configuring 2 Configure your CoDeSys 3.x project for tag integration

  5. Make sure that Download symbol file is selected.
  6. Click OK to close the Target Settings dialog.
  7. On the Project menu, click Options. The Options dialog is displayed.
  8. In the Category list, click Symbol configuration.
    Figure 6. Selecting “Symbol configuration”
    Web Studio Help illus codesys2 configuring 3 Configure your CoDeSys 3.x project for tag integration

  9. Select Dump symbol entries and Dump XML symbol table.
  10. Click Configure symbol file. The Set object attributes dialog is displayed.
  11. For the sake of expediency, you should first disable the export of all objects and then reenable only the objects that you want to export to IWS — typically, the POUs and Global Variables. Select all of the objects in the tree and then clear all options for them at the bottom of the dialog.
    Figure 7. Clearing the options for all objects
    Web Studio Help illus codesys2 configuring 4 Configure your CoDeSys 3.x project for tag integration

    Tip: You may need to select Export variables of object in order to activate the other checkboxes before clearing them.
  12. Reselect only the POUs and Global Variables that you want to export to IWS. Do not select libraries. With the objects selected, select all of the options at the bottom of the dialog.
  13. Click OK to close the Set object attributes dialog, and then click OK again to close the Options dialog.
  14. On the Project menu, click Clean All.
  15. On the Project menu, click Rebuild All. The CoDeSys development software will rebuild the project, generating a symbol file that contains only the selected POUs and Global Variables.

Once the CoDeSys project is configured to export the selected variables, the next time you send the project to the PLC, it will include the new symbol file and your IWS project to be able to communicate with it.

You can also copy the CoDeSys symbol file to your IWS project folder, which will allow you to browse the tags when the PLC is not running.

Configure your CoDeSys 3.x project for tag integration