<< Click to Display Table of Contents >> Navigation: »No topics above this level« Description |
mapp Services V5.16
An MpLink of an MpCodeBoxFlexInstance configuration is used for the function block.
MpCodeBoxFlexMonitor provides a wide range of diagnostic information about the running Structured Text program. "ProgramMonitor" displays general information about the currently running program, such as the program name or the currently executed code line.
Additional information or error information is displayed on input parameter "Console". "ConsoleSize" specifies the size of parameter "Console".
Coroutines can be created when creating a Structured Text program. The code within a program can be divided up into processes via coroutines. The name of the currently running coroutine or its current state can be obtained via "CoroutineMonitor". "CoroutineMonitorSize" specifies the size of parameter "CoroutineMonitor".
Additional diagnostic information of the function block is displayed via the information structure.
An array can also be attached to "Console" or "CoroutineMonitor":
VAR
Console : ARRAY[0..19] OF MpCodeBoxFlexMonitorType;
CoroutineMonitor : ARRAY[0..19] OF MpCodeBoxFlexCoroutineType;
END_VAR
This allows the most recent pieces of information to be displayed on "Console" and not just one piece of information. If several different coroutines are called, the status of all coroutines can be displayed and not just the status of one single coroutine.
Parameters "ConsoleSize" and "CoroutineMonitorSize" can be specified in a Structured Text program in Automation Studio as follows:
MpCodeBoxFlexMonitor_0.Console := MyConsole;
MpCodeBoxFlexMonitor_0.ConsoleSize := SIZEOF(MyConsole);
MpCodeBoxFlexMonitor_0.CoroutineMonitor := MyMonitor;
MpCodeBoxFlexMonitor_0.CoroutineMonitorSize := SIZEOF(MyMonitor);
This automatically resizes parameters "Console" and "CoroutineMonitor" so that all diagnostic information can be displayed.