This page explains how to import TwinCAT tags from TMC, TPY, and XML files, allowing for the quick creation of tags, templates, and device configurations. By double-clicking on TwinCAT and executing it, users can choose the option to import tags, thereby creating communication configurations for either the ProtocolDriver or the TagProvider. When importing tags for the TwinCAT, it is possible to set up the device configuration enabling communication with Beckhoff devices and facilitating the direct import of TwinCAT tags.

On this page:


Instructions

This section explain step-by-step how to import TwinCAT tags from TMC, TPY, XML files into a solution, automatically creating thousands of Tags, Templates, and all device configurations in just a few seconds.

Wizard Startup

On the Solution Designer, go to Solution → Import Tags and select "Import Beckhoff TwinCAT configuration." Double-click or press the "Execute" button to open the initial configuration popup.

TwinCAT Import Tags is available only for Windows Solutions.

Initial Configuration

In the initial configuration dialog, enter the TwinCAT device information. This information will be used to create the Device configuration for future communication between the runtime solution and the Bechkoff device. Also, it will be used to import the TwinCAT tags directly from the devices.

  • Import To: This field allows you to select the type of communication that will be established for the tag import:
    • ProtocolDriver: Select this option to configure the communication for the ProtocolDriver, which will create Channel, Node, and Points in the Devices Module. This establishes a direct connection between your system and the Beckhoff device using the AMS Net ID and Port.

    • TagProvider: Choose this option to create a TagProvider configuration, which will create and link tags with the TagProvider. This allows you to manage tags for accessing Beckhoff device values. In this case, each tag’s SourceLink column will be populated with a link to the respective value in the TagProvider.

  • AmsNetID: The IP address of your device (e.g., 192.168.1.1).
  • AmsSrvPort: The communication port (default: 44818). Port number is typically 801 or 851.
  • Data Browser Configuration File: This field is used only when importing tags to the TagProvider. You must provide the path to the Data Browser Configuration File (e.g., TMC, TPY, or XML files). This configuration file sets up the TagProvider to handle the imported tags and manage their communication with the Beckhoff devices.

Sync Device Node

The "Sync Device Node" dialog will appear when importing tags to ProtocolDriver. Provide the path of your target file (supported files: TMC, TPY, and XML) to load the imported TwinCAT tags.

Sync TagProvider

For TagProvider imports, the "Sync TagProvider" dialog will appear. This dialog allows you to import tags directly from the Data Browser Configuration File (supported formats: TMC, TPY, or XML files). It establishes the connection between the imported tags and the created TagProvider by populating the SourceLink column for tags and the RelativeAddress column for DataTemplates, ensuring seamless integration and access to the TagProvider values directly in Tags.

Prefix Option (Optional)

This option will appear when importing tags to ProtocolDriver. Select "Add NodeName as Prefix" option to automatically add the PLC's name as a prefix to all imported tags. It improves organization, especially in solutions with multiple PLCs.

Refresh

Click "Refresh" to display a preview of available tags.

When you click the Refresh button, the TwinCAT tags will be appear for you to select what you want to import to your solution. You can use the Import column to enable or disable each specific tag.

Import

Finally, press "Ok" to start the import process.

When you finish verifying and selecting the TwinCAT tags, click the Ok button to create the Tags, Templates and all Points if importing to ProtocolDriver.

After the first import, for ProtocolDriver cases, you have the option to Sync the TwinCAT tags already imported with the current file or device configuration. To do this, go to Devices → Nodes, select the Node, and click on the Sync button.

After the Sync Device Node appears, select the File and click on the Refresh button. The TwinCAT tags that were already imported will be showed in the list as X.


Tutorial

The tutorial in the image below shows how to import tags from TwinCAT to ProtocolDriver or TagProvider.


In this section: