#WAIT MC_Status command

The #WAIT MC_Status command makes the system wait for a job acknowledgement. Several events can be specified for job acknowledgements. The command return value can be used to continue program execution.

Available as of V3.1.3110

Syntax of the NC command:

#WAIT MC_Status [ JobID=.. [MC_NEW] [MC_BUSY] [MC_ACTIVE] [MC_DONE]
                                               [MC_ABORTED] [MC_ERROR] ]

JobID=..

User-specific JobID/job identification number. Every number must be unique in the commanding program.

MC_NEW

New job received but not yet processed in the commanded channel.

MC_BUSY

New job waits for execution in the commanded channel.

MC_ACTIVE

The job is active in the commanded channel but was not completed.

MC_DONE

The job was successfully completed in the commanded channel.

MC_ABORTED

The job was aborted in the commanded channel before completion.
An abort can be forced by a reset command, e.g. #MC_GroupResetForced.

MC_ERROR

An error occurred while the job is in progress.

Properties:

Notice

notice

If no expected status is defined for #WAIT MC_Status, an implicit MC_DONE and MC_ABORTED apply.

Programing Example

prg_example

Waiting for job state

The program starts a “SlaveFile”.nc program in logical channel 3 with job 633, then waits for the job to be completed with the alternative states MC_DONE, MC_ABORTED or MC_ERROR. If none of the states is reached, the program stops.

%Example MC_Wait

N010 #MC_MovePath SYN[ CH=3 JobID=633 FileName=”SlaveFile.nc”]

N020 #WAIT MC_Status [JobID=633 MC_DONE MC_ABORTED MC_ERROR]

N100 M30