Omron trajexia CJ1W-MCH72 Operation Manual page 273

Sysmac cj-series programmable controller
Hide thumbs Also See for trajexia CJ1W-MCH72:
Table of Contents

Advertisement

All BASIC commands
4-2-259 WA
4-2-260 WAIT IDLE
Note
262
/i
Type
System command
Syntax
WA(time)
Description
The WA command pauses program execution for the number of milli-
seconds specified for time. The command can only be used in a pro-
gram.
Arguments
time
The number of milliseconds to hold program execution.
Example
The following lines would turn ON output 7 two seconds after turning off
output 1.
OP(1,OFF)
WA(2000)
OP(7,ON)
See also
N/A
/i
Type
System command
Syntax
WAIT IDLE
Description
The WAIT IDLE command suspends program execution until the base
axis has finished executing its current move and any buffered move.
The command can only be used in a program. WAIT IDLE works on the
default basis axis (set with BASE) unless AXIS is used to specify a tem-
porary base axis.
Note: The execution of WAIT IDLE does not necessarily mean that the
axis will be stationary in a servo motor system.
Arguments
N/A
Example
MOVE(1000)
WAIT IDLE
PRINT "Move Done"
The print statement is printed at the end of the movement.
Example
MOVE(1000)
WAIT UNTIL MTYPE=0
PRINT "Movement finished"
The print statement is printed, most of the times BEFORE the move-
ment starts, and sometimes, when the movement is finished.
Explanation
Motion programs and motion sequence work in parallel and unsynchro-
nized. One complete cycle can occur before the movement is loaded
into the buffer. The program executes MOVE(1000) but the movement
is not loaded to the buffer until the start of the next "motion sequence"
so when you check MTYPE=0, it is 0 because the movement HAS NOT
STARTED YET, not because it has finished.
See also
AXIS, WAIT LOADED.
WAIT IDLE is a command specifically designed to wait until the previous movement
has been finished so, it handles the delay from when the previous command is exe-
cuted in the program until the command is correctly loaded in the motion buffer.
Section 4-2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents