TECT_LOG_ENTRY_PH¶
The items of data TECT_LOG_ENTRY_PH array in logging buffer can be displayed in IEC 61131-3 editor Visualization, using dedicated visualization template. The following example shows how to realize it.
Visualization example of logging buffer
Definition of TECT_LOG_ENTRY_PH array
Define an array of TECT_LOG_ENTRY_PH with the size in number of entries (NUM_VISU_ENTRY = 10) to be displayed.
ptsLog_Visu: ARRAY[1…10] of TECT_LOGINFO_TYPE TECT_LOGINFO_TYPE
Visu_array: ARRAY[1…10] of Visu_LogEntry
VISU_BUFFER
Data type: POINTER TO TECT_LOGINFO_TYPE
Start address of the log visualization data. It is recommended to define the log visualization data in array. This can be used only with IEC 61131-3 editor visualization. For example, if there are 4 zones to be logged and each zone has 10 log visualization entries, then a one dimensional or two dimensional array can be defined (see TECT_LOGINFO_TYPE: TECT_LOGINFO_TYPE
visu_buffer: ARRAY[1..40] OF TECT_LOGINFO_TYPE; (in one dimensional array).
visu_buffer: ARRAY[1..4, 1..10] OF TECT_LOGINFO_TYPE; (in two dimensional array).
NUM_VISU_ENTRY
Data type: BYTE, Default value: 10
Number of log entries displayed in log visualization for one zone.
Creation of VISU element of type TECT_LOG_HEADER
Create a VISU element of type TECT_LOG_HEADER.
⇒
Creation of VISU element of type TECT_LOG_ENTRY_PH
Create a VISU element of type TECT_LOG_ENTRY_PH. Set the Visu_buffer [1] as replacement for the VISU placeholder.
Resize the VISU element as the same size of TECT_LOG_HEADER.
Creation of more VISU elements of type TECT_LOG_ENTRY_PH
Create more 9 VISU elements of type TECT_LOG_ENTRY_PH (or create 9 copies of the first TECT_LOG_ENTRY_PH item).
Set the visu_buffer [2] to visu_buffer [10] as replacement for the placeholders to the 9 VISU items.
Organization of VISU items
Place the 10 VISU items in an ascending order (the oldest entry Visu_array[1] on the top) or a descending order (the newest entry Visu_array[10] on the top).