3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

check_position_condition()

정의

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)

프로그램 강제 종료 시

예제

Python
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

관련 명령어

Keyword

check / position / condition / check_ / check_position / position_condition