Why are spaces displayed at the beginning of the process-associated value (text) and characters truncated at the end?
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.
Message configuration, Message-associated value
- 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