FB_ResetTaskExceedCounter

FB_ResetTaskExceedCounter 1:

The function block can reset the Exceed Counter. The Exceed Counter is incremented whenever the selected task exceeds the set task time. This means that maintaining real-time in the cycle was not possible.

There can be many reasons for exceeding real-time, but it is usually due to the PLC runtime and the application within this runtime. An example of this is programming loops such as FOR, WHILE, REPEAT, since these are always processed in one cycle.

FB_ResetTaskExceedCounter 2: Inputs

VAR_INPUT
    bExecute         : BOOL;
    nTaskAdsPort     : UINT;
END_VAR

Name

Type

Description

bExecute

BOOL

A positive edge activates the function block.

nTaskAdsPort

UINT

ADS Port of the selected task
Example of a possible assignment:
TwinCAT_SystemInfoVarList._TaskInfo[GETCURTASKINDEXEX()].AdsPort

FB_ResetTaskExceedCounter 3: Outputs

VAR_OUTPUT
    bBusy          : BOOL;
    bError         : BOOL;
    nErrorID       : UDINT;
END_VAR

Name

Type

Description

bBusy

BOOL

The function block is active and working.

bError

BOOL

An error has been detected in the function block.

nErrorID

UDINT

ADS error code.

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024.22

PC or CX (x86, x64, ARM)

Tc2_System (system) >= 3.4.25.0