Skip to main content
Skip table of contents

check_position_condition(axis, min, max, ref, mod, pos)

기능

주어진 위치 상태를 확인합니다. while 또는 if 조건과 함께 사용하여 해당 조건을 반복 확인할 수 있습니다. axis, pos는 입력좌표계(ref) 기준의 축방향 및 포즈입니다.

입력좌표계(ref)DR_TOOL 인 경우 입력위치(pos)BASE좌표계 기준의 값을 입력하여야 합니다.

인수

인수명자료형기본값설명

axis

int

-

axis

  • DR_AXIS_X: x축
  • DR_AXIS_Y: y축
  • DR_AXIS_Z: z축

min

float

DR_COND_NONE

최소값

max

float

DR_COND_NONE

최대값

ref

int

None

reference coordinate

  • DR_BASE : base coordinate
  • DR_WORLD : world coordinate
  • DR_TOOL : tool coordinate
  • user coordinate: 사용자 정의

mod

int

DR_MV_MOD_ABS

이동 기준

  • DR_MV_MOD_ABS: 절대
  • DR_MV_MOD_REL: 상대

pos

posx

list (float[6])

-

posx 또는

position list



알아두기

  • mod가 DR_MV_MOD_ABS인 경우는 절대 위치 기준으로 확인합니다.
  • mod가 DR_MV_MOD_REL인 경우는 pos 위치 기준으로 확인합니다.
  • pos는 mod DR_MV_MOD_REL인 경우에만 의미가 있습니다


리턴

설명

True

조건이 참

False

조건이 거짓

예외

예외설명

DR_Error (DR_ERROR_TYPE)

인수들의 데이터형 오류 시

DR_Error (DR_ERROR_VALUE)

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

DR_Error (DR_ERROR_RUNTIME)

C Extension 모듈 에러 발생 시

DR_Error (DR_ERROR_STOP)

프로그램 강제 종료 시

예제

PY
CON1= check_position_condition(DR_AXIS_X, min=-5, max=0, ref=DR_WORLD) 
CON2= check_position_condition(DR_AXIS_Y, max=700) 
CON3= check_position_condition(DR_AXIS_Z, min=-10, max=-5) # -10≤z≤-5
CON4= check_position_condition(DR_AXIS_Z, min=30) # 30≤z

CON5= check_position_condition(DR_AXIS_Z,min=-10,max=-5, ref=DR_BASE) # -10≤z≤-5

CON6= check_position_condition(DR_AXIS_Z,min=-10,max=-5, mod=DR_MV_MOD_ABS) # -10≤z≤-5

posx1 = posx(400, 500, 800, 0, 180,0)
CON7= check_position_condition(DR_AXIS_Z,min=-10,max=-5,mod = DR_MV_MOD_REL, pos=posx1) # posx1_(z)-10≤z≤ posx1_(z)-5

관련 명령어

JavaScript errors detected

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

If this problem persists, please contact our support.