How can you have a tag of the S7 data type IEC time (TIME) displayed in WinCC?
An S7 tag of the data type IEC time (TIME) is a signed 32-bit value that contains a time stamp in milliseconds.
|Value range||Hexadecimal||Decimal||IEC format|
It is useful to have suitable data preparation to display this data type. The following instructions take the example of how to convert a tag of the data type IEC time into a character string in order to display the value with a WinCC text field entitled "Static Text".
|1||Creating an external tag in the WinCC Tag Management|
In the WinCC Tag Management you create an external tag of the data type "Unsigned 32-bit value". Fill in the fields for the address description of the S7 controller.
|2||Dynamizing the "Fill Pattern Color" property of the static text|
Create an object of the type "Static Text" in a WinCC picture. Dynamize the property "Fill Pattern Color" with the tag created in Step 1.
|3||Dynamize the event "Fill Pattern Color > Change" of the static text|
The C action required in this step is available for downloading. Download it.
WinCC_S7_IEC_TIME_Verwenden.zip ( 1 KB )
Open the dialog to dynamize the event "Property Topics > Colors > Fill Pattern Color > Change" of the static text with a C action.
Import the downloaded C function. Fig. 04 shows the "Import action" button.
- This example is structured so that no direct access to a WinCC tag can be made in the C function. If several displays of this type have to be shown in WinCC pictures, the object dynamized in this way can be copied. Then all you have to do is replace the tag with a new one in the dynamization of the "Fill Pattern Color" property. It is no longer necessary to edit the C script.
- In a project it might be useful for the purpose of central changing to store the C action from Fig. 05 in a project function.
This entry was created for WinCC V6.0 SP3.
- You have a technical question / problem: Ask the Technical Support
- You want to discuss in our forum and exchange experiences with other users
- You want to create CAx data for one or more products
- You would like to send us feedback on this Entry