FB_RTMon_LogMark
The FB_RTMon_LogMark is an extended function block that enables the setting of "simple" (time) markers.
VAR_INPUT
nContextId : UINT := TwinCAT_SystemInfoVarList._AppInfo.AdsPort;
bLogCallingTask : BOOL := TRUE; // specifies whether a reference to the calling task should be set with each mark
END_VAR
nContextId: | Context ID for which this marker is to be set. The initial value is TwinCAT_SystemInfoVarList._AppInfo.AdsPort. If this is not changed, the ADS port number is automatically used as the Context ID. |
bLogCallingTask: | Boolean parameter that defines whether the executing task is also saved for the marker. The initial value is TRUE. |
VAR_OUTPUT
bError : BOOL; // TRUE if an error occurred
hrErrorCode : HRESULT; // outputs the error code which occurred
END_VAR
bError: | Boolean value that indicates whether the function block is in error state. |
hrErrorCode: | HResult-Error Code. If the output bError is true, the error code can be read at this output. |
Description:
The FB_RTMon_LogMark extends the generic function block FB_RTMon_LogMarkBase. The context ID information is automatically initialized by the ADS port of the calling task and therefore no longer needs to be taken into account during the call. The various marker options (see TcMarkOption) have also been packaged in method calls so that the function block does not require a marker to be created beforehand. Only the marker ID (marker group) must be transferred by the user. This is used to identify the process to be displayed.
Optionally, an event ID is also available in which the user can transfer a user record (e.g. status of a state machine, error message …).