Skip to main content
Skip table of contents

thread_resume(th_id)

기능

일시 정지된 Thread를 다시 시작합니다.

인수

인수명자료형기본값설명

th_id

int

-

일시 정지를 풀고 재개하고자 하는 thread ID

리턴

설명

0

성공

음수값

실패

예외

예외설명

DR_Error (DR_ERROR_TYPE)

인수들의 데이터형 오류 시

DR_Error (DR_ERROR_VALUE)

인수의 값이 유효하지 않을 시

DR_Error (DR_ERROR_RUNTIME)

C Extension 모듈 에러 발생 시

DR_Error (DR_ERROR_STOP)

프로그램 강제 종료 시

예제

PY
def fn_th_func():
if check_motion()==0: # 수행 중인 모션이 없는 경우
set_digital_output(1, OFF)
else:
set_digital_output(1, ON)

#----- 메인 루틴 --------------------------------------
th_id = thread_run(fn_th_func, loop=True)

# do something…
thread_pause(th_id) #쓰레드 일시 정지

# do something…
thread_resume(th_id) #쓰레드 일시 정지 해제

JavaScript errors detected

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

If this problem persists, please contact our support.