Skip to main content
Skip table of contents

check_motion()

기능

현재 진행 중인 모션의 상태를 확인합니다.

리턴 (TBD)

설명

0

DR_STATE_IDLE (수행중인 모션이 없음)

1

DR_STATE_INIT (모션 연산 중)

2

DR_STATE_BUSY (모션이 수행 중)

예외

예외설명

DR_Error (DR_ERROR_RUNTIME)

C Extension 모듈 에러 발생 시

DR_Error (DR_ERROR_STOP)

프로그램 강제 종료 시

예제

PY
#1. q0로의 비동기모션 중 모션이 감속을 시작하면 다음모션(q99) 명령 수행

q0 = posj(0, 0, 90, 0, 90, 0) 

q99 = posj(0, 0, 0, 0, 0, 0)

amovej (q0, vel=10, acc=20) # q0로 모션 및 즉시 다음명령 수행

while True:

 if check_motion()==0: # 모션이 완료 된 경우

 amovej (q99, vel=10, acc=20) # q99로 조인트 모션

 break

 if check_motion()==2: # 모션 중인 경우

 pass

mwait(0)   # 모션이 종료할 때까지 프로그램 일시중지

관련 명령어


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.