3 Waiting for a command

When you first load your task, the only thing it is waiting for is a command. It can receive commands from other ADAM tasks telling it to SET or GET the value of one of its program parameters. The fixed-part handles this without your code being aware of it. It can also receive a command telling it to CANCEL an earlier command, but as there hasn’t yet been a command, the fixed-part will return an error to the other task.

If the fixed-part receives an OBEY <action_name> command, it checks whether the given action_name has been declared in the interface file. If it has, then your code is called. You can find out why your code has been called by using the TASK library, for example,

  CALL TASK_GET_NAME(NAME,STATUS)

returns the name of the action.