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.
- Open your CoDeSys 2.x project.
Figure 4. Opening a CoDeSys 2.x project
- In the project explorer on the right, click the Resources tab.
- In the list of resources, double-click Target Settings. The Target Settings dialog is displayed.
- Click the General tab.
Figure 5. General tab of the Target Settings dialog
- Make sure that Download symbol file is selected.
- Click OK to close the Target Settings dialog.
- On the Project menu, click Options. The Options dialog is displayed.
- In the Category list, click Symbol configuration.
Figure 6. Selecting “Symbol configuration”
- Select Dump symbol entries and Dump XML symbol table.
- Click Configure symbol file. The Set object attributes dialog is displayed.
- 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
Tip: You may need to select Export variables of object in order to activate the other checkboxes before clearing them.
- 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.
- Click OK to close the Set object attributes dialog, and then click OK again to close the Options dialog.
- On the Project menu, click Clean All.
- 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.