Import tags from the PLCs

Premise

In this module, the procedures to import tags from non-OPC UA PLCs into Q Studio at design time are described. To import the variables/nodes shown by a PLC with an OPC UA server, see How to use an OPC UA Client object.

Depending on the driver, tags can be imported online from a PLC connected to the network or offline by uploading a file. For online import, the communication with the PLC must first be configured (see Configure the communication with a PLC). For offline import, the communication can be configured even after the import.

Configure the communication with a PLC

  1. In Project, click the CommDrivers folder, then click image1 and select the desired protocol depending on the PLC: the selected communication Driver object appears in the folder.

  2. In Project, click the driver, then click image2, then select the Communication station object required by the specific driver: the Communication station object appears inside the driver.

  3. Click the station and in Properties set the properties for communication with the PLC.

    Note

    to know the specific properties of each protocol, refer to the Reference on objects and variables section of this manual.

Import tags at design time

  1. In Project, in the driver of interest, expand the node of the desired PLC and click TagImporter.

  2. In Properties, set the necessary properties to read PLC tags.

    If you import in mode…

    Then…

    Online

    set Mode to Online.

    Offline

    set Mode to Offline, and in File path, select the file with the PLC tags information.

    Note

    for details on how to export the file from the PLC, see the next modules.

  3. In Project, double-click TagImporter: the list of tags appears in the editor.

    Column

    Description

    PLC Item

    Name of the tag on the PLC

    HMI Item

    Name of the variable corresponding to the tag in UNIQO

    DataType

    Tag data type

    Status

    • New: tag never imported

    • Modified: since the last synchronization the tag has been modified in the project or in the PLC:

      • structured tags: the tag structure has been modified (tag added or deleted), or data types of existing tags have been modified

      • unstructured tags: the data type has been changed

    • Synchronized: tag imported and synchronized with the corresponding project variable

    • Missing: since the last synchronization the tag has been removed from the PLC, or the tag has been created in the project, but is not present in the PLC

  4. Select the tags of interest and click Synchronize: in Project, in the PLC station node, the variables corresponding to the selected tags will be created.

Organize the imported tags

It is possible to organize the synchronized tags in folders. In particular, folders can be created inside the Tags object of the different PLCs and the desired tags moved into them. Even after relocation, the tags imported in UNIQO remain synchronized with the PLC.

Warning

It is not recommended to separate and reorganize the tags contained in a structured tag since their initial structure is restored if the tag is resynchronized.

  1. Right-click the Tags object, then select New > Folder.

  2. Drag the desired tags into the folder.

Synchronizing Imported Tags

To update the data types, names and structures of already imported variables at design time, do the following:

  1. Double-click the desired tag importer. The status of each PLC tag with respect to the Q Studio project is indicated in the editor.

  2. Click Synchronize.

Ignoring Tags

  1. Double-click the desired tag importer.

  2. In the editor, select the tags to ignore and click the Ignore button: the selected tags are hidden in the editor.

Show the ignored tags

  1. Double-click the desired tag importer.

  2. In the editor’s toolbar, click image3, then select Show ignored items: all the tags are shown in the editor.

See also

Related concepts

Communication driver