Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 12267138, Entry date: 10/20/2010

Why are spaces displayed at the beginning of the process-associated value (text) and characters truncated at the end?

  • Entry
  • Associated product(s)

An 8-bit text tag is linked to an I/O field in WinCC. The associated value in the AS is to be displayed as such in the Alarm Logging Control and sent with SFB 35. This user-configured text tag is written to the AS as an S7 string. However, this data type has a header of 2 bytes which is not displayed.

Message-associated values are not of the "S7 string" type, but arrays of the CHAR type. The AS then sends the data as additional value as of a specified start address. If this address is put at the start of the above-mentioned text tag, the text including the header is displayed in the Alarm Logging Control. In order to avoid this, you must increase the start address by 2 bytes.

In the Tag Management, the string variable "varOtto" is configured with the address DB10.DBB16. If you write this variable with the text "anna", you have the following text as of DB10.DBB16:
"0A 04 a n n a". If you assign the parameter SD_n := P#DB10.DBX16.0 CHAR 4, when a message arrives, it transfers the header and two following characters, in this case therefore:
"0A 04 a n"
. In order to display the associated value correctly, you must set the following parameter: SD_n := P#DB10.DBX18.0 CHAR 4.

Fig. 1: Variable "varOtto" in the WinCC Tag Management, in the Step 7 data block and in the variable table ( 277 KB )  

Message configuration, Message-associated value

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