Infosys在阅读器中打开 / AI 翻译

TF5xxx - Motion · 0 次阅读

#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:

  • Job IDs are stored in a history when #WAIT MC_Status is called in order to return a correct status in a “later” request even after the job is completed/cancelled. If the job ID specified in JobID is unknown because it was never commanded or is no longer in the history, an error is output.
  • The job ID history is deleted at program end. It is therefore no longer possible to synchronise with jobs from previous (client) jobs. It is also not possible to synchronise with jobs from another client.

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

Programming Example

Waiting for job state

%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