Export a symbol file from your TwinCAT project
Configure the TwinCAT project development software to export a symbol file that provides information about your TwinCAT project database. The symbol file can then be used to bring your TwinCAT project database into your InduSoft Web Studio project database, via either tag integration or the database import wizard.
The TwinCAT software automatically exports your project database to a symbol file every time you rebuild your project. TwinCAT exports the entire database by default, however, including many system and library variables that InduSoft Web Studio cannot import. You must reconfigure your project options to export only the POUs and Global Variables, and then rebuild your project to generate a fresh symbol file.
- *.SYM is a legacy format that is included for backward compatibility. Beckhoff recommends that it be used only with TwinCAT OPC Server.
- *.TPY is a new, XML-based format that should be used in all other situations, including importing into IWS.
To export the symbol file:
- Open your TwinCAT project using the TwinCAT software.
- On the Project menu, click Options. The Options dialog box is displayed.
- In the Category list, click Symbol configuration.
- Select Dump symbol entries and Dump XML symbol table.
- Click Configure symbol file. The Set object attributes dialog box 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 — 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 box.
Tip: You may need to select Export variables of object in order to activate the other check boxes before clearing them.
- Reselect only the POUs and Global Variables that you want to export. Do not select libraries. With the objects selected, select all of the options at the bottom of the dialog box.
- Click OK to close the Set object attributes dialog box, 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 TwinCAT software will rebuild the project, and in the process of rebuilding, it will export a symbol file that contains only the selected POUs and Global Variables.
Once the TwinCAT 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 TwinCAT symbol file to your IWS project folder, which will allow you to browse the tags when the PLC is not running.