7. Maintenance
328
Table 7-6 describes the parameters that must be sent to the function so it can return the application
information.
Input parameters
Type
Description
pszAppName
POINTER TO
STRING
Application name
pszTaskName
POINTER TO
STRING
Task name
pstTaskInfo
POINTER TO
ST_TASK_INFO
Pointer to receive the application information
Table 7-6. Input Parameters
Table 7-7 describes the data returned by the function through the pointer, which was informed in the
input parameters.
Returned Parameters
Size
Description
dwCurScanTime
DWORD
Task cycle time (execution) with 1µs resolution.
dwMinScanTime
DWORD
Minimum task cycle time with 1µs resolution.
dwMaxScanTime
DWORD
Maximum task cycle time with 1µs resolution.
dwAvgScanTime
DWORD
Average task cycle time with 1µs resolution.
dwLimitMaxScan
DWORD
Maximum task cycle time before watchdog occurrence.
dwIECCycleCount
DWORD
IEC cycles counter.
Table 7-7. Returned Parameters
Possible TYPE_RESULT:
OK_SUCCESS: successful execution
ERROR_FAILED: the desired task does not exist
Example of utilization in ST language:
PROGRAM UserPrg
VAR
sAppName : STRING;
psAppName : POINTER TO STRING;
sTaskName : STRING;
psTaskName : POINTER TO STRING;
pstTaskInfo : POINTER TO ST_TASK_INFO;
TaskInfo : ST_TASK_INFO;
Info : TYPE_RESULT;
END_VAR
//ENTRADAS:
sAppName := 'Application';
// Variable gets the application name.
psAppName := ADR(sAppName);
// Pointer with application name.
sTaskName := 'MainTask';
// Variable gets the task name.
psTaskName := ADR(sTaskName);
// Pointer with task name.
pstTaskInfo := ADR(TaskInfo);
// Pointer that receives the task
information.
//FUNCTION:
//Function call.
Info := GetTaskInfo (psAppName, psTaskName, pstTaskInfo);
//Variable ‘Info’ gets possible function errors.
Graphic Display
The graphic display available in the Hadron Xtorm Series CPUs is an important tool for process
control, as through it is possible to recognize eventual error conditions, active components or
diagnostics presence. Furthermore, all diagnostics including the I/O modules are presented to the user