svm_get_vision_info(job_id)
Features
Performs the measurement command corresponding to the input vision task. The detailed information of the measurement command of the vision work should be entered in advance through the Workcell manager(WCM).
Parameters
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
job_id | int | - | Vision Task id (ex. 1000, 2000, …) |
Return
Value | Description |
---|---|
1 | Measurement success – One object was detected / measured successfully. |
0 | Measurement failed – Failed to detect the corresponding vision work object. |
-1 | Measurement failed – Communication error (timeout) |
Example
svm_connect() # Connect to vision
vision_test=1000 # Define vision job ID
svm_set_job(vision_test) # Load the vision_test (1000)
shoot_pos=svm_get_robot_pose (vision_test) # Load the robot pose of vision_test
count=svm_get_vision_info(vision_test) # Execute the vision measurement
tp_popup("{0}".format(count)) # Check the result
svm_disconnect() # Disconnect to vision