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.

Note: As of version 2.8, the TwinCAT software exports the symbol file in both *.SYM and *.TPY formats:
  • *.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:

  1. Open your TwinCAT project using the TwinCAT software.
  2. On the Project menu, click Options. The Options dialog box is displayed.
  3. In the Category list, click Symbol configuration.
    Figure 1. “Symbol configuration” in the Options dialog box
    Web Studio Help twincat symol configuration Export a symbol file from your TwinCAT project

  4. Select Dump symbol entries and Dump XML symbol table.
  5. Click Configure symbol file. The Set object attributes dialog box is displayed.
  6. 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.
    Figure 2. Clearing the options for all objects
    Web Studio Help tech0541 Export a symbol file from your TwinCAT project

    Tip: You may need to select Export variables of object in order to activate the other check boxes before clearing them.
  7. 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.
    Figure 3. Selecting the options for only POUs and Global Variables
    Web Studio Help tech0542 Export a symbol file from your TwinCAT project

  8. Click OK to close the Set object attributes dialog box, and then click OK again to close the Options dialog.
  9. On the Project menu, click Clean All.
  10. 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.

Export a symbol file from your TwinCAT project