FB_RTMon_LogMark

FB_RTMon_LogMark 1:

The FB_RTMon_LogMark is an extended function block that enables the setting of "simple" (time) markers.

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. state of a state machine, error message, etc.).

FB_RTMon_LogMark 2: Inputs

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

Name

Type

Description

nContextId

UINT

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

BOOL

Boolean parameter that defines whether the executing task is also saved for the marker. The initial value is TRUE.

FB_RTMon_LogMark 3: Outputs

VAR_OUTPUT
    bError            : BOOL;         // TRUE if an error occurred
    hrErrorCode       : HRESULT;     // outputs the error code which occurred
END_VAR

Name

Type

Description

bError

BOOL

Boolean value that indicates whether the function block is in error state.

hrErrorCode

HRESULT

HResult-Error Code. If the output bError is true, the error code can be read at this output.