GETCURTASKINDEX
Outdated function block This function block is outdated. Use the function GETCURTASKINDEXEX() instead. |
The function block GETCURTASKINDEX determines the task index of the task in which it is currently called.
To differentiate whether the current call occurs in the real-time context or from a cyclic PLC task, see the documentation for the function GETCURTASKINDEXEX. For example, the automatic call of FB_init methods during initialization does not occur from a cyclic PLC task.
Inputs
VAR_INPUT
(*none*)
END_VAR
Outputs
VAR_OUTPUT
index : BYTE;
END_VAR
Name | Type | Description |
---|---|---|
index | BYTE | Returns the current task index of the calling task (1..4 ). |
Example of calling the block in FBD:
Requirements
Development environment |
Target system type |
PLC libraries to include (Category group) |
---|---|---|
TwinCAT v3.1.0 |
PC or CX (x86, x64, ARM) |
Tc2_System (System) |