Skip to main content

Atributo: monitorización_codificación

El atributo pragma está permitido para variables de tipo de datos. STRING y para variables de un tipo de datos de alias de tipo STRING. El atributo tiene como efecto que los valores de las variables se marquen con él para ser descodificados en formato UTF-8 durante la monitorización.

Sintaxis:

{attribute 'monitoring_encoding' := 'UTF8'}

Ubicación de inserción: encima de la declaración de la variable

ejemplo 280. Ejemplo
PROGRAM PLC_PRG
VAR
    {attribute 'monitoring.encoding' := 'UTF8'}
    strDat : STRING := 'abc'; 
    attribute 'monitoring_encoding' := 'UTF-8'}	
    strVarUtf8: STRING := UTF8#'你好,世界!ÜüÄäÖö';
    {attribute 'monitoring_encoding' := 'UTF-8'}
    str1: STRING := UTF8#'AÄyyy';		
    {attribute 'monitoring_encoding' := 'UTF-8'}		
    str2: STRING := UTF8#'AÄxxxÜÜÜ';	
		
    strVarUtf8_1: STRING := '你好,世界!ÜüÄäÖö';
    str1_1: STRING := 'AÄyyy';				
    str2_1: STRING := 'AÄxxxÜÜÜ';			
END_VAR
_cds_monitoring_utf8.png