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

svm_get_offset_pos(posx_robot_init, job_id, tool_id)

기능

사용자가 입력한 로봇 작업 좌표정보에 비전 측정결과를 반영한 로봇 작업 좌표정보를 불러온다.

  • 순서: posx_robot_init 입력 → vision 측정 →  svm_get_offset_pos 호출 → 변경된 로봇작업 좌표 (posx_robot_offset) 출력

인수

인수명

자료형

기본값

설명

posx_robot_init

posx

-

로봇 작업 좌표정보
(직접교시 등의 방법으로 입력됨)

job_id

Int

-

비전잡 id (예. 1000, 2000, 3000, …)

tool_id

int

-

비전툴 id (예. 1000, 1001, 1002, …)

리턴

값

설명

posx

비전 측정결과를 반영한 로봇 작업 좌표정보

-1

실패 – 측정데이터 없음 또는 입력 변수 오류

예제

Python
svm_connect()                              # Connect to vision 
vision_test=1000                            # Define vision job ID
count=svm_get_vision_info(vision_test)        # Execute the vision measurement
if (count == 1):                            # Check the result 
   # Get the position information (posx) of vision_test tool
   pos_result=svm_get_variable(vision_test, POSX_TYPE)
   tp_popup("{0}".format(pos_result))   
   # Get the vision guided robot pose
ld_list =[vision_test]
   pos_list =[pos_result]
svm_set_init_pos_data(Id_list,pos_list)


   rob_posx=svm_get_offset_pos(posx(200,200,100,0,180,0), vision_test)
   tp_popup("{0}".format(rob_posx))   
   # move to the rob_posx
   movel(rob_posx, vel=30, acc=100)   
svm_disconnect()                              # Disconnect to vision