SysIECTaskGetInfo

This function of type BOOL returns the current time values of an IEC task.

The task is identified by the task name or by the index, it has got in the task configuration.

As soon as the task has been found, TRUE will be returned, otherwise FALSE.

Input-Variable Data Type Description
stTaskName STRING Name of the task
pTaskInfo POINTER TO SYSIECTASKINFO Pointer to current data of the IEC task (structure, see below)

Structure SysIECTaskInfo:

TYPE SYSIECTASKINFO :

STRUCT

dwCount : DWORD; (* Number of cycles since start of task *)
dwCycleTime : DWORD; (* Current cycle time *)
dwCycleTimeMin : DWORD; (* Minimum cycle time *)
dwCycleTimeMax : DWORD; (* Maximum cycle time *)
dwCycleTimeAvg : DWORD; (* Average cycle time *)
wStatus : WORD; For cyclic task = 0 (PLC RUN) and for event triggered task wStatus = 1 (PLC STOP)
wMode : WORD; wMode = 1 (task mode running) for both tasks, although the event triggered task isn’t running

END_STRUCT

END_TYPE