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
In Project, click the CommDrivers folder, then click and select the desired protocol depending on the PLC: the selected communication Driver object appears in the folder.
In Project, click the driver, then click , then select the Communication station object required by the specific driver: the Communication station object appears inside the driver.
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
In Project, in the driver of interest, expand the node of the desired PLC and click TagImporter.
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.
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
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.
Right-click the Tags object, then select New > Folder.
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:
Double-click the desired tag importer. The status of each PLC tag with respect to the Q Studio project is indicated in the editor.
Click Synchronize.
Ignoring Tags
Double-click the desired tag importer.
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
Double-click the desired tag importer.
In the editor’s toolbar, click , then select Show ignored items: all the tags are shown in the editor.