Synchronization
sync
sync()
Synchronizes the interpreter with the associated NC-channel. The sync()-command blocks until all pending NC-commands are completed, i.e. until the job-queue of the NC-channel is empty. This command replaces the former @714-command. Oftentimes, the sync()-command is combined with a preceeding M-function of type handshake. Then, the sync()-command will block until the M-function is acknowledged by the PLC.
wait
wait()
A wait() adds a blocking job to the job queue. The job blocks until a GoAhead signal is received. In contrast to sync(), the wait() job can already be released before it becomes active. Stopping the movement can thus be avoided.
The GoAhead signal, which releases the job, can be sent via the PLC using the function block ItpGoAheadEx. The function block returns the error code 0x410A if there is no wait() in the job queue at the time of the call.
The wait() command of the GST interpreter corresponds to the @717 command in the Classic interpreter.