Requesting the last valid status in #WAIT MC_Status

After one or more previous #WAIT MC_Status commands, the last valid return value of #WAIT MC_Status can be read out by the MCV_WAIT_STATUS function and used to continue program execution.
The numerical values stored in the constants apply as return values.

The following constants for status are available in the CNC code:

They are used to compare a stored variable after a #MCV_WAIT_STATUS.

Syntax:

#MCV_WAIT_STATUS [JobID=..]

JobID=..

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

To call this function, it requires one or more #WAIT MC_Status commands with the same JobID=... for the number stored in <JobID>.

If this is not the case, an error is output.

Programming Example

Waiting for a job signal

%Example MC_Wait
N010 #MC_MovePath SYN[ CH=3 JobID=633 FileName=”SlaveFile.nc”]
N010 #WAIT MC_Status [JobID=633 MC_DONE MC_ABORTED MC_ERROR]
N020 V.P.McStatus = MCV_WAIT_STATUS [633]
N030 $IF V.P.McStatus != MC_DONE
N040   #ERROR [ID455 MID0 RC2 PV1=V.P.McStatus \
              PV2=MC_DONE PM1=3 PM2=633]
N050 $ENDIF
N100 M30