2.12.4 2.12.3 2.12.2 2.12.1 2.12 2.11.2 2.11.0.1 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
2.12.4 2.12.3 2.12.2 2.12.1 2.12 2.11.2 2.11.0.1 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

set_user_cart_coord(x1, x2, x3, pos, ref)

기능

사용자가 입력좌표계(ref) 기준의 포즈 x1, x2, x3를 사용하여 새로운 직교 좌표계를 설정할 수 있습니다. 1)x1x2의 단위 벡터를 ux, x1x2로부터 x3까지 최단거리로 잇는 vector의 단위벡터를 uy로 하여, ux, uy, uz를 각 축의 방향 벡터, 원점은 입력좌표계(ref) 기준의 pos에 위치한 직교 좌표계를 생성합니다. Workcell Item에서 설정한 좌표계를 포함하여 총 100개의 사용자좌표계를 설정할 수 있으며, 100개가 넘어가면 새로운 직교 좌표계를 설정할 수 없습니다. 명령어를 통해 설정한 사용자좌표계는 프로그램 실행 종료 시 삭제되므로, 사용자좌표계 정보를 유지하려면 Workcell Item에서 사용자좌표계를 설정하세요.

1)M2.0.2 이전 버전에서는 x2x1의 단위 벡터를 ux로 사용

인수

인수명

자료형

기본값

설명

x1

Posx

-

posx 또는
position list

list (float[6])

x2

Posx

-

posx 또는
position list

list (float[6])

x3

Posx

-

posx 또는
position list

list (float[6])

pos

Posx

-

posx 또는
position list

list (float[6])

ref

int

DR_BASE

reference coordinate

  • DR_BASE: base coordinate

  • DR_WORLD: world coordinate

리턴

값

설명

양의 정수

Coordinate 설정 성공
설정된 Coordinate ID (101 ~ 200)

-1

Coordinate 설정 실패

예외

예외

설명

DR_Error (DR_ERROR_TYPE)

인수들의 데이터형 오류 시

DR_Error (DR_ERROR_VALUE)

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

DR_Error (DR_ERROR_RUNTIME)

C Extension 모듈 에러 발생 시

DR_Error (DR_ERROR_STOP)

프로그램 강제 종료 시

예제

Python
x1 = posx(0, 500, 700, 0, 0, 0) # Euler angle은 계산시 무시
x2 = posx(500, 0, 700, 0, 0, 0)
x3 = posx(300, 100, 500, 0, 0, 0)
x4 = posx(300, 110, 510, 0, 0, 0)
pos = posx(10, 20, 30, 0, 0, 0)
user_tc1 = set_user_cart_coord(x1, x2, x3, pos, ref=DR_BASE)
user_tc2 = set_user_cart_coord(x2, x3, x4, pos, ref=DR_WORLD)


관련 명령어