Features
This function checks the status of the currently active motion.
Return
|
Value |
Description |
|---|---|
|
0 |
DR_STATE_IDLE (no motion in action) |
|
1 |
DR_STATE_INIT (motion being calculated) |
|
2 |
DR_STATE_BUSY (motion in operation) |
Exception
|
Exception |
Description |
|---|---|
|
DR_Error (DR_ERROR_RUNTIME) |
C extension module error occurred |
|
DR_Error (DR_ERROR_STOP) |
Program terminated forcefully |
Example
Python
#1. The next motion (q99) is executed when an asynchronous motion to q0 begins decelerating
q0 = posj(0, 0, 90, 0, 90, 0)
q99 = posj(0, 0, 0, 0, 0, 0)
amovej (q0, vel=10, acc=20) # Executes the next command immediately after the motion to q0.
while True:
if check_motion()==0: # A motion is completed.
amovej (q99, vel=10, acc=20) # Joint motion to q99.
break
if check_motion()==2: # In motion
pass
mwait(0) # Temporarily suspends the program execution until the motion is terminated.
Related commands
- movej(pos, vel, acc, time, radius, mod, ra, ref)
- movel(pos, vel, acc, time, radius, ref, mod, ra, app_type)
- movejx(pos, vel, acc, time, radius, ref, mod, ra, sol)
- movec(pos, pos2, vel, acc, time, radius, ref, mod, angle, ra, ori, app_type)
- movesj(pos_list, vel, acc, time, mod)
- movesx(pos_list, vel, acc, ref, mod, vel_opt)
- moveb(pos_list, vel, acc, time, ref, mod, app_type)
- move_spiral(rev, rmax, lmax, vel, acc, time, axis, ref)
- move_periodic(amp, period, atime, repeat, ref)
- amovej(pos, vel, acc, time, mod, ra, ref)
- amovel(pos, vel, acc, time, ref, mod, ra, app_type)
- amovejx(pos, vel, acc, time, ref, mod, ra, sol)
- amovec(pos, pos2, vel, acc, time, ref, mod, angle, ra, ori, app_type)
- amovesj(pos_list, vel, acc, time, mod)
- amovesx(pos_list, vel, acc, time, ref, mod, vel_opt)
- amoveb(pos_list, vel, acc, time, ref, mod, app_type)
- amove_spiral(rev, rmax, lmax, vel, acc, time, axis, ref)
- amove_periodic(amp, period, atime, repeat, ref)