×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 1138415, Entry date: 01/17/2006
(0)
Rate

How can you have a tag of the S7 data type IEC time (TIME) displayed in WinCC?

  • Entry
  • Associated product(s)

 

Instructions:
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
Maximum value 0x7FFFFFFF 2.147.483.647 T#-24d20h31m23s647ms
  0x00000001 1 T#1ms
  0x00000000 0 T#0ms
  0xFFFFFFFF -1 T#-1ms
Minimum value 0x80000000 -2.147.483.648 T#-24d20h31m23s648ms

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".
 

No. Procedure
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.


Fig. 01
 
 
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.


Fig. 02
 
 
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.


Fig. 03
 
 

Import the downloaded C function. Fig. 04 shows the "Import action" button.


Fig. 04
 
 


Fig. 05
 
 

Notes:

  • 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.


Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.
Rate entry
no rating
Requests and feedback
What do you want to do?
Note: The feedback always relates to the current entry / product. Your message will be forwarded to our technical editors working in the Online Support. In a few days, you will receive a response if your feedback requires one. If we have no further questions, you will not hear from us.