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.
- On the Project tab of the ribbon, in the
Settings group, click
Communication. The
Project Settings dialog is
displayed, with the Communication tab selected.
- In the Tag Integration area, click Add. The Tag Integration Source dialog is
displayed.
Figure 1.
Tag Integration Source
dialog
- In the Type list, select Integrated if it's not already
selected.
- In the Provider list, select TwinCAT if it's not already selected.
- 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.
- Click Add. The TwinCAT Interface Configuration dialog is
displayed.
Figure 2.
TwinCAT Interface
Configuration dialog
- 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.
- Select the port number on
which the TwinCAT runtime system has been configured to run.
- To the right of the
Symbol File box, click
Browse. A standard
Open dialog is
displayed.
- Use the Open dialog to locate and select the
TwinCAT symbol file (*.TPY).
- Click OK to close the Open dialog.
- 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.