Integrate tags from TwinCAT

More than simply importing the tags and interface from a TwinCAT PLC program, you can fully integrate your IWS project database with a running TwinCAT PLC so that tags are synchronized between the two systems, without the extra configuration required by an OPC connection or direct communication driver.

Before you begin this task, you must do the following:
  1. Configure your TwinCAT project to export a new symbol file with the correct variables. The symbol file is like an index of the TwinCAT tags that you want to integrate into your IWS project. For more infomation, see Export a symbol file from your TwinCAT project.
  2. Rebuild your TwinCAT project and send it to the PLC.
  3. Make sure the PLC is running and available on your network, and note its AMS Net ID and runtime system port number.
  4. Copy the new symbol file to your IWS project folder ([…]DocumentsInduSoft Web Studio v7.1 Projectsprojectname).

This feature works with all versions of TwinCAT through version 3.x.

To configure TwinCAT tag integration:

  1. On the Project tab of the ribbon, in the Settings group, click Communication. The Project Settings dialog box is displayed, with the Communication tab selected.
  2. In the Tag Integration area, click Add. The Tag Integration Source dialog box is displayed.
    Figure 1. Tag Integration Source dialog box
    Web Studio Help dialog tagintegrationsource twincat TwinCAT

  3. In the Type list, select Integrated if it is not already selected.
  4. In the Provider list, select TwinCAT if it is not already selected.
  5. In the Name box, type a name for the source. This name will be used as a prefix for all tags received from the source. For example, if the source name is DEV, a TwinCAT PLC tag named switch1 would subsequently be named DEV_switch1 in your project.
  6. Click Add. The TwinCAT Interface Configuration dialog box is displayed.
    Figure 2. TwinCAT Interface Configuration dialog box
    Web Studio Help dialog tagintegration twincatinterfaceconfig TwinCAT

  7. In the AMS Net ID box, type the AMS Net ID of the TwinCAT PLC that you want to communicate with. For example:
  8. Select the port on which the PLC’s runtime system has been configured to run. You can either select one of the standard ports (e.g., 801, 811, 821, 831) or specify a custom port number.
  9. To the right of the Symbol File box, click Browse. A standard Open dialog box is displayed.
  10. Use the Open dialog box to locate and select the TwinCAT symbol file (*.TPY) that you exported earlier.
  11. Click OK to finish the configuration.
If the configuration is successful, your TwinCAT PLC tags will be immediately available in the Object Finder in InduSoft Web Studio.