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:
- 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.
- Rebuild your TwinCAT project and send it to the PLC.
- Make sure the PLC is running and available on your network, and note its AMS Net ID and runtime system port number.
- Copy the new symbol file to your IWS project folder ([…]\Documents\InduSoft Web Studio v7.1 Projects\projectname).
This feature works with all versions of TwinCAT through version 3.x.
To configure TwinCAT tag integration:
- 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.
- In the Tag Integration area, click Add. The Tag Integration Source dialog box is displayed.
- In the Type list, select Integrated if it is not already selected.
- In the Provider list, select TwinCAT if it is 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, if the source name is DEV, a TwinCAT PLC tag named switch1 would subsequently be named DEV_switch1 in your project.
- Click Add. The TwinCAT Interface Configuration dialog box is displayed.
- In the AMS Net ID box, type the AMS Net ID of the TwinCAT PLC that you want to communicate with. For example: 18.104.22.168.1.1.
- Select the port you with to talk to. You can either select one of the standard ports for TWINCAT2 (e.g., 801, 811, 821, 831) or specify a custom port number; such as 851 as TwinCAT3 Runtime or any I/O- or Motion Port.
- To the right of the Symbol File box, click Browse. A standard Open dialog box is displayed. This option enables Offline Browsing.
- Use the Open dialog box to locate and select the TwinCAT symbol file (*.TPY or *.SYM) that you exported earlier.
- 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.