Applies To:
  • CitectSCADA 3.00

Summary:
Question: When I enter some functions to the cicode window instead of displaying the return value the message 'Task still running, TaskHnd() = 5' is displayed. The number at the end of the message may sometimes be another value. What does this message mean and how can I get the return value of the function? 

Solution:
This message means that the cicode window has started your function and it is still running after its first time slice. As the function is still running then the return value has not yet been calculated and so it cannot be displayed at this time. The number at the end of the message is the cicode task handle of the task created. This number is normally returned from the function TaskHnd() and can be used to identify the task.

You may display the return value of the function by writing a stub calling function which will display the result of your functions. For example:

FUNCTION
MyStub()
   STRING sResult;
   sResult = MyFunc();
   TraceMsg("Result of function " + sResult);
END

 

Keywords:
 

Attachments