Integrating the project database with a TwinCAT PLC

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

Before you can integrate with a TwinCAT PLC, you must do the following:
  • Make sure the PLC is running and available on your network, and then note its AMS Net ID and runtime system port number; and
  • Export a new symbol file (*.TPY) from the TwinCAT development application containing only the program variables that your project can use, and then copy the file to a location where the IWS development application can access it. (Typically, you should copy the symbol file to your project folder.) For more infomation, see Exporting the Symbol File from TwinCAT.
  1. On the Project tab of the ribbon, in the Settings group, click Communication. The Project Settings dialog is displayed, with the Communication tab selected.
  2. In the Tag Integration area, click Add. The Tag Integration Source dialog is displayed.
    Figure 1. Tag Integration Source dialog

  3. In the Type list, select Integrated if it's not already selected.
  4. In the Provider list, select TwinCAT if it's 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, a TwinCAT PLC tag named switch1 would subsequently be named DEV_switch1 in your project.
  6. Click Add. The TwinCAT Interface Configuration dialog is displayed.
    Figure 2. TwinCAT Interface Configuration dialog

  7. In the AMS Net ID box, type the AMS Net ID of the TwinCAT PLC that you want to communicate with. For example: 5.0.112.206.1.1.
  8. Select the port number on which the TwinCAT runtime system has been configured to run.
  9. To the right of the Symbol File box, click Browse. A standard Open dialog is displayed.
  10. Use the Open dialog to locate and select the TwinCAT symbol file (*.TPY).
  11. Click OK to close the Open dialog.
  12. Click OK to close the TwinCAT Interface Configuration dialog.
The integrated tags are listed in the Shared Database folder. They can be used in your project like normal tags, and they will be synchronized between the systems during project runtime.