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_force_condition()

정의

check_force_condition(axis, min, max, ref)

기능

주어진 힘 상태를 확인합니다. 단, 힘의 방향은 고려하지 않고 크기로만 비교합니다. while 또는 if 조건과 함께 사용하여 해당 조건을 반복 확인할 수 있습니다. 힘, 1)모멘트 측정 시 axis는 입력좌표계(ref) 기준의 축방향입니다.

1)V2.8버전 이전에서 모멘트 측정 시 axis는 툴 좌표계 기준의 축방향입니다.

인수

인수명

자료형

기본값

설명

axis

int

-

axis

  • DR_AXIS_X: x축

  • DR_AXIS_Y: y축

  • DR_AXIS_Z: z축

  • DR_AXIS_A: x축 회전

  • DR_AXIS_B: y축 회전

  • DR_AXIS_C: z축 회전

min

float

DR_COND_NONE

최소값 (min ≥ 0)

max

float

DR_COND_NONE

최대값 (max ≥ 0)

ref

int

None

reference coordinate

  • DR_BASE : base coordinate

  • DR_WORLD : world coordinate

  • DR_TOOL : tool coordinate

  • user coordinate: 사용자 정의

리턴

설명

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
fcon1 = check_force_condition(DR_AXIS_Z, min=5, max=10, ref=DR_WORLD) 
# 5 ≤f_z≤10

while (fcon1):
  fcon2 = check_force_condition(DR_AXIS_C, min=30) # 30≤m_z
  pcon1 = check_position_condition(DR_AXIS_X, min=0, max=0.1)# 0≤x≤0.1

  if (fcon2 and pcon1):
    break

관련 명령어

Keyword

check / force / condition / check_ / check_force / force_condition