Direct tags import from devices (TwinCAT)

This driver supports the direct tags import from an external source. The requirement is a valid .EXP file, that can be easily produced using the “Project/Export” function from “Twincat PLC control” configuration software. During Export operation one can select which variables are to be exported.

The driver can import global variables and local variables from modules of type Program(PRG), Function or Function blocks (FB).

Choosing “Import from PLC database” from the driver context menu, the variables in the .EXP files are listed with the following format: <variable name>-<symbolic address>-<data type>-<data size>-<description>

as an example:

switch - .switch - BOOL -1 - Global variable switch

(data size = 1 bit)

string01 - .string01 - STRING - 82 - Global variable string01

(data size = 82 bytes)

Struct02.Field3 - .Struct02.Field3 - BYTE - 1 - Global variable Struct02.Field3

(data size = 1byte)

Members of arrays and structures are imported as single variables, as an example:

ArrayOfWord[0] - .ArrayOfWord[0] - INT - 2 - Global variable ArrayOfWord[0]

(first word of the array of words)

ArrayOfWord[1] - .ArrayOfWord[1] - INT - 2 - Global variable ArrayOfWord[1]

(second word of the array of words)

Starting from version 10.1.0.3 of the driver, also structures and arrays can be imported as single variables (but it depends also on the version of the supervisor program).

Moreover, it is also possible to import variables directly from the PLC (button ‘Get PLC Tags’ of the import dialog).

Starting from version 10.1.0.5 of the driver, the PLC variables can be imported also from files “.tpy”. The configuration software “Twincat PLC control” automatically creates a “.tpy” file for each PLC project. This is an XML-based file, that contains located PLC variables and their addresses as well as generic project information. The version of TwinCAT system required is 2.8.