When using Siemens AG, with system variables you can check if the tags you are importing into a project file in the display unit are the same as the tags in device/PLC.
You can check tag consistency while the display unit is operating.
The check result is saved in a CSV file.
If the same tag is used in multiple places, such as common settings and parts, it is checked only once.
The entire array/structure is checked even when a part of it is used.
Except for the String type arrays, for which the check is performed for each array elements.
If you have specified tags for [Base Address] and [Offset Value Specification Address] in the Data Display, only the tag specified for the [Base Address] is checked.
Operation Procedure for Checking Tag Consistency
To check consistency, please follow these steps. For more information about system variables, please see the following.
#H_TagConsistencyTrigger, #H_TagConsistencyCheckCancel
A.2.2.1 Bit Type - #H System Variables
#H_TagConsistencyConfig, #H_TagConsistencyStatus
A.2.2.2 Word Type - #H System Variables
Using the #H_TagConsistencyConfig, enter the consistency check settings, including the tag range and the location where the result is saved.
Please use the following table for reference:
Bit |
Value |
Description |
0 |
1 |
Location of check results: USB storage |
4 |
1 |
Setting for check results if file already exists: Do not overwrite |
8...9 |
00 |
Date format for saved check results: yy/mm/dd |
16...17 |
00 |
Items for consistency check: All tags imported into project file |
24...27 |
0000 |
Language for check results: English |
Other than those above |
0 |
Reserved |
Turn on the #H_TagConsistencyTrigger. The consistency check begins.
When the consistency check is complete, the bit 1 in the #H_TagConsistencyStatus turns ON. Review the check result, and turn off the #H_TagConsistencyTrigger.
If you want to stop the consistency check while it is running, turn ON the #H_TagConsistencyCheckCancel.
If you stop the consistency check while it is saving the check result, it outputs a part of the check result.
Saving Check Result
When you check tag consistencies, a folder called "CONSISTENCY" is created in the location which is specified by the bit 0 of the system variable #H_TagConsistencyConfig, and the check result is saved using the following folder structure.
Name |
Type |
Description |
Date |
Folder |
The system creates a new folder for each day you run the consistency check. The folder name is determined according to the data format specified in the bit 8 and 9 of the #H_TagConsistencyConfig. |
Series Name |
Folder |
The system creates a folder with the name of the device/PLC's series you have checked. |
Device Name |
File |
The system creates a folder with the name of the device/PLC you have checked. |
If there is any character that cannot be used for a folder or file name, or cannot be converted, it will be replaced with an underscore ( _ ). If the file name created as a result of the conversion is already used by other file, "~*" (* is a number) is appended to the file name.
Characters that cannot be used in a folder or file name: \/:?*”<>|
Characters that cannot be converted from GP-Pro EX's device name (Unicode) to the output language (specified by the bit 24 to 27 of #H_TagConsistencyConfig) for the check result
When you are using a language other than the system language, file names may not display the characters you specified.
Series names are in English only.
Formatting Check Result
After the tag consistency check, the check result is saved in a CSV file. The image below shows how the data appears when opened in Microsoft Excel.
Header Information
Date: The date when the file is saved (according to the data format specified in bits 8 and 9 of #H_TagConsistencyConfig.)
Time: The time when the file is saved.
Series: The name of the series for which you performed the consistency check.
Plc: The name of the external device for which you performed the consistency check.
Data
No.: The error number.
Error code: The error code.
Tag name: The name of the tag where the error occurred.
Error message: Message for the error that occurred.
For details about error codes and error messages, please refer to display-related errors.
T.7.1 Settings common to all Display models
For details about error codes and error messages, specific to the device/PLC, please refer to "Error Messages" in the GP-Pro EX Device/PLC Connection Manual.
The screen shows up to 1,000 errors. The message "There are more than 1000 errors" appears when there are more than 1,000 errors. In addition, the consistency check status (the bit 17 of the #H_TagConsistencyStatus) turns ON.
The system checks the consistency of tag names in Unicode, and converts the tag names to the output language for the check result (specified by the bit 24 - 27 of the #H_TagConsistencyConfig). If the system finds any character that cannot be converted, it will be replaced with an underscore ( _ ).
If the GP-Pro EX's display language is Japanese, error messages are displayed in Japanese. Therefore, if a language other than Japanese is specified in the bit 24 to 27, error messages will not be displayed properly. Select Japanese in bits 24 to 27.
If the GP-Pro EX's display language is not Japanese, error messages are displayed in English, regardless of the language specified in the bits 24 to 27.