EasyManua.ls Logo

ALTUS Nexto NX3004 - Page 377

ALTUS Nexto NX3004
388 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7. Maintenance
369
GetTaskInfo
This function returns the task information of a specific application.
Figure 7-8. GetTaskInfo Function
Below, the parameters that must be sent to the function for it to return the application information are
described.
Input parameter
Type
Description
psAppName
POINTER TO STRING
Application name
psTaskName
POINTER TO STRING
Task name
pstTaskInfo
POINTER TO stTaskInfo
Pointer to receive the application information
Table 7-29. GetTaskInfo Input Parameters
The data returned by the function, through the pointer informed in the input parameters are described
on Table 7-30.
Returned Parameters
Size
Description
dwCurScanTime
DWORD
Task cycle time (execution) with 1µs resolution
dwMinScanTime
DWORD
Task cycle minimum time with 1µs resolution
dwMaxScanTime
DWORD
Task cycle maximum time with 1µs resolution
dwAvgScanTime
DWORD
Task cycle average time with 1µs resolution
dwLimitMaxScan
DWORD
Task cycle maximum time before watchdog occurrence
dwIECCycleCount
DWORD
IEC cycle counter
Table 7-30. GetTaskInfo Returned Parameters
Possible ERRORCODE:
NoError: success execution
TaskNotPresent: the desired task does not exist
Example of utilization in ST language:
PROGRAM MainPrg
VAR
sAppName : STRING;
psAppName : POINTER TO STRING;
sTaskName : STRING;
psTaskName : POINTER TO STRING;
pstTaskInfo : POINTER TO stTaskInfo;
TaskInfo : stTaskInfo;
Info : ERRORCODE;
END_VAR
//INPUTS:
sAppName := 'Application'; //Variable receives the application name.
psAppName := ADR(sAppName); //Pointer with application name.
sTaskName := 'MainTask'; //Variable receives task name.
psTaskName := ADR(sTaskName); //Pointer with task name.
pstTaskInfo := ADR(TaskInfo); //Pointer that receives task info.
//FUNCTION:
//Function call.
Info := GetTaskInfo (psAppName, psTaskName, pstTaskInfo);
//Variable ‘Info’ receives possible function errors.

Table of Contents