FB_ReadTaskExceedCounter

FB_ReadTaskExceedCounter 1:

The function block reads the Exceed Counter. The Exceed Counter is incremented by the system whenever the selected task exceeds the set task time. This means that the real-time could not be maintained in the cycle.

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

FB_ReadTaskExceedCounter 2: Inputs

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_ReadTaskExceedCounter 3: Outputs

Name

Type

Description

bBusy

BOOL

The function block is active and working.

bError

BOOL

The function block has an error.

nErrorID

UDINT

ADS error code

nExceedCounter

UDINT

Read value of the Exceed Counter

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