Skip to main content
Skip table of contents

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

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

예제

PY
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
JavaScript errors detected

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

If this problem persists, please contact our support.