Vision Process
Set Vision Parameters
0x4101 VISION_PARAMETER_SET
{
"cameraType": "customize",
"robot": 1,
"vision": {
"protocol": {
"addDataInitialPara": "GD001",
"addDataNum": 5,
"angleUnit": 0,
"endMark": "$",
"failFlag": "NG",
"frameHeader": "@",
"hasTCS": true,
"hasUCS": false,
"separator": ",",
"singleTarget": false,
"successFlag": "OK",
"timeOut": 30,
"type": 1
},
"socket": {
"IP": "192.168.1.120",
"camera_data_type": 0,
"portNum": 1,
"portOne": 5050,
"portTwo": 0,
"server": true
},
"trigger": {
"IOPort": 0,
"duration": 1000,
"intervals": 35,
"triggerMode": 2,
"triggerOnce": true,
"triggerStr": "TRG"
},
"userCoordNum": 2
},
"visionNum": 0
}Parameter Description:
| Parameter Category | Parameter Name | Type | Description |
|---|---|---|---|
| cameraType | - | string | Camera type, default "customize" |
| robot | - | int | Robot number |
| vision.protocol | addDataInitialPara | string | Additional data initial variable |
| vision.protocol | addDataNum | int | Additional data count |
| vision.protocol | angleUnit | int | 0: Degree; 1: Radian |
| vision.protocol | endMark | string | End mark |
| vision.protocol | failFlag | string | Failure send flag |
| vision.protocol | frameHeader | string | Frame header |
| vision.protocol | hasTCS | bool | Receive coordinate system: Tool |
| vision.protocol | hasUCS | bool | Receive coordinate system: User |
| vision.protocol | separator | string | Separator |
| vision.protocol | singleTarget | bool | Single target enable |
| vision.protocol | successFlag | string | Success send flag |
| vision.protocol | timeOut | int | Timeout |
| vision.protocol | type | int | 0: 2D, 1: 2D+Height, 2: 3D |
| vision.socket | IP | string | Camera IP |
| vision.socket | camera_data_type | int | 0: Robot coordinate, 1: Pixel coordinate |
| vision.socket | portNum | int | Number of ports |
| vision.socket | portOne | int | Port 1 |
| vision.socket | portTwo | int | Port 2 |
| vision.socket | server | bool | true: Server, false: Client |
| vision.trigger | IOPort | int | Trigger method: Bound IO port |
| vision.trigger | duration | int | Duration |
| vision.trigger | intervals | int | Trigger period |
| vision.trigger | triggerMode | int | 1: IO, 2: Ethernet |
| vision.trigger | triggerOnce | bool | true: Single, false: Multiple |
| vision.trigger | triggerStr | string | Trigger string |
| vision | userCoordNum | int | Hand-eye calibration user coordinate system |
| - | visionNum | int | Process number, starting from 0 |
Query Vision Parameters
0x4102 VISION_PARAMETER_INQUIRE
{
"robot": 1,
"visionNum": 1
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number, starting from 0 |
Return Vision Parameter Query Result
0x4103 VISION_PARAMETER_RESPOND
{
"cameraList": {
"currentName": "customize",
"listNum": 0
},
"protocol": {
"addDataInitialPara": "GD002",
"addDataNum": 4,
"angleUnit": 1,
"endMark": "*",
"failFlag": "N",
"frameHeader": "#",
"hasTCS": true,
"hasUCS": true,
"separator": ".",
"singleTarget": true,
"successFlag": "OK",
"timeOut": 31,
"type": 2
},
"socket": {
"IP": "192.168.1.14",
"camera_data_type": 1,
"portNum": 2,
"portOne": 5052,
"portTwo": 5051,
"server": false
},
"trigger": {
"IOPort": 2,
"duration": 100,
"intervals": 35,
"triggerMode": 2,
"triggerOnce": false,
"triggerStr": "TG"
},
"userCoordNum": 100
}Return Parameter Description:
| Parameter Category | Parameter Name | Type | Description |
|---|---|---|---|
| cameraList | currentName | string | Current camera name |
| cameraList | listNum | int | Default value configuration |
| protocol | (Same as set) | - | Protocol parameters, see above |
| socket | (Same as set) | - | Socket parameters, see above |
| trigger | (Same as set) | - | Trigger parameters, see above |
| - | userCoordNum | int | User coordinate system number |
Vision Position Parameter Setting
0x4104 VISION_POS_PARAMETER_SET
{
"position": {
"angleDirection": 1,
"cameraPoint": [0.0, 0.0, 100.0, 0.0, 0.0, 0.0],
"datumPoint": [0.0, 0.0, 0.0, 3.140, 0.0, 0.0, 0.0],
"excursion": {
"Xexcursion": 1.0,
"Yexcursion": 2.0,
"Zexcursion": 3.0,
"angle": 4.0
},
"recvPointsType": 0,
"scale": 1.0
},
"robot": 1,
"visionNum": 0
}Parameter Description:
| Parameter Category | Parameter Name | Type | Description |
|---|---|---|---|
| position | angleDirection | int | Angle direction, 1 or -1 |
| position | cameraPoint | array | First value X, second value Y, third value height, fourth value angle. If parameter type is 2D or 2D+H, stores a 4-element array [x,y,H,angle]. If 3D, stores a 6-element array [x,y,z,a,b,c]. |
| position | datumPoint | array | Datum point x,y,z,a,b,c |
| position.excursion | Xexcursion | float | X direction offset |
| position.excursion | Yexcursion | float | Y direction offset |
| position.excursion | Zexcursion | float | Z direction offset |
| position.excursion | angle | float | Angle offset |
| position | recvPointsType | int | Received position type: 0: Point, 1: Trajectory |
| position | scale | float | Scale factor |
| - | robot | int | Robot number |
| - | visionNum | int | Process number, starting from 0 |
Vision Position Parameter Query
0x4105 VISION_POS_PARAMETER_INQUIRE
{
"robot": 1,
"visionNum": 1
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number, starting from 0 |
Return 0x4105 Query Result
0x4106 VISION_POS_PARAMETER_RESPOND
Same as: 0x4104
Query Vision Debug Point List
0x4107 VISION_DEBUGGING_POS_INQUIRE
{
"robot": 1,
"visionNum": 1,
"conveyorNum": 1
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number, starting from 0 |
| conveyorNum | int | Conveyor process number, starting from 1 |
Return Vision Debug Point List
0x4108 VISION_DEBUGGING_POS_RESPOND
{
"robot": 1,
"visionNum": 1,
"originPos": [
{"X": 0.0, "Y": 0.0, "Z": 0.0, "angle": 0.0},
{"X": 0.0, "Y": 0.0, "Z": 0.0, "angle": 0.0},
{"X": 0.0, "Y": 0.0, "Z": 0.0, "angle": 0.0}
],
"currentPos": [
{"X": 0.0, "Y": 0.0, "Z": 0.0, "angle": 0.0},
{"X": 0.0, "Y": 0.0, "Z": 0.0, "angle": 0.0},
{"X": 0.0, "Y": 0.0, "Z": 0.0, "angle": 0.0}
]
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number, starting from 0 |
| originPos | array | Original position list |
| currentPos | array | Current position list |
Clear Vision Debug Point List
0x4109 VISION_DEBUGGING_POS_CLEAR
{
"robot": 1,
"visionNum": 1
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number, starting from 0 |
Take Photo
0x410A VISION_DEBUGGING_TAKE_PICTURE
Power must be enabled before taking a photo
{
"robot": 1,
"visionNum": 0
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
Calculate Offset
0x410B VISION_DEBUGGING_CALCULATE
Returns 0x4108
{
"robot": 1,
"visionNum": 0,
"conveyorNum": 1
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
| conveyorNum | int | Conveyor process number |
Move to This Point
0x410C VISION_DEBUGGING_POS_MOVE
{
"robot": 1,
"visionNum": 1,
"type": 1,
"posNum": 1
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
| type | int | 0: Trial photo point, 1: Position adjustment point, 2: Grab posture datum point |
| posNum | int | Point number, 1-20 |
Calibrate Grab Posture
0x4110 VISION_GESTURE_CALIBRATION_SET
After calibration, use 0x4104 to write again
{
"robot": 1,
"visionNum": 1
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
Return Calibration Result
0x4111 VISION_GESTURE_CALIBRATION_RESPOND
{
"datumPoint": [0, 0, 0, 0, 0, 0],
"datumPointDeg": [0, 0, 0, 0, 0, 0]
}| Parameter Name | Type | Description |
|---|---|---|
| datumPoint | array | Datum point in radians |
| datumPointDeg | array | Datum point in degrees |
Clear Grab Posture Calibration
0x4116 VISION_GESTURE_CALIBRATION_CLEAR
After clearing, use 0x4104 to write again
{
"robot": 1,
"visionNum": 1
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
Trial Photo
0x4112 VISION_TRY_TAKE_PICTURE
{
"visionNum": 1,
"robot": 1
}| Parameter Name | Type | Description |
|---|---|---|
| visionNum | int | Process number |
| robot | int | Robot number |
Return Photo Result
0x4113 VISION_TAKE_PICTURE_RESPOND
{
"cameraData": "",
"cameraPoint": [0, 0, 0, 0, 0, 0]
}| Parameter Name | Type | Description |
|---|---|---|
| cameraData | string | Camera data |
| cameraPoint | array | Camera point. 6 values for 3D camera, otherwise 4 |
Vision IP Parameter Query
0x4114 VISION_IPPARAM_INQUIRE
{
"visionNum": 1,
"robot": 1,
"server": true
}| Parameter Name | Type | Description |
|---|---|---|
| visionNum | int | Process number |
| robot | int | Robot number |
| server | bool | true: Server, false: Client |
Return 0x4114 Query Result
0x4115 VISION_IPPARAM_RESPOND
{
"visionNum": 1,
"robot": 1,
"server": true,
"IP": "192.168.1.120"
}| Parameter Name | Type | Description |
|---|---|---|
| visionNum | int | Process number |
| robot | int | Robot number |
| server | bool | true: Server, false: Client |
| IP | string | IP address |
Vision Calibration Parameter Setting
0x4117 VISION_CALIBRATION_PARAM_SET
{
"robot": 1,
"visionNum": 1,
"calibration": {
"point_num": 9,
"calibrated": false,
"point": [
{
"pixel_pos": [1, 2, 3, 4, 5, 6, 7],
"robot_pos": [1, 2, 3, 4, 5, 6, 7]
},
{
"pixel_pos": [1, 2, 3, 4, 5, 6, 7],
"robot_pos": [1, 2, 3, 4, 5, 6, 7]
}
]
}
}Parameter Description:
| Parameter Category | Parameter Name | Type | Description |
|---|---|---|---|
| - | robot | int | Robot number |
| - | visionNum | int | Process number |
| calibration | point_num | int | Number of calibration points |
| calibration | calibrated | bool | Whether calibrated |
| calibration.point | pixel_pos | array | Pixel coordinates |
| calibration.point | robot_pos | array | Robot coordinates |
Vision Calibration Parameter Query
0x4118 VISION_CALIBRATION_PARAM_INQUIRE
{
"robot": 1,
"visionNum": 1
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
Return 0x4118 Query Result
0x4119 VISION_CALIBRATION_PARAM_RESPOND
{
"calibration": {
"calibrated": false,
"point": [
{
"pixel_pos": [0, 0, 0, 0, 0, 0, 0],
"pixel_pos_deg": [0, 0, 0, 0, 0, 0, 0],
"robot_pos": [0, 0, 0, 0, 0, 0, 0],
"robot_pos_deg": [0, 0, 0, 0, 0, 0, 0]
}
],
"point_num": 6
},
"robot": 1,
"visionNum": 0
}Return Parameter Description:
| Parameter Category | Parameter Name | Type | Description |
|---|---|---|---|
| calibration | calibrated | bool | Whether calibrated |
| calibration | point_num | int | Number of calibration points |
| calibration.point | pixel_pos | array | Pixel coordinates in radians |
| calibration.point | pixel_pos_deg | array | Pixel coordinates in degrees |
| calibration.point | robot_pos | array | Robot coordinates in radians |
| calibration.point | robot_pos_deg | array | Robot coordinates in degrees |
| - | robot | int | Robot number |
| - | visionNum | int | Process number |
Mark This Point for Calibration
0x411A VISION_CALIBRATION_MARK_POINT
{
"robot": 1,
"visionNum": 1,
"point_num": 1
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
| point_num | int | Calibration point number |
Return Response Data for Marking Calibration Point
0x411B VISION_CALIBRATION_MARK_RESPOND
{
"robot": 1,
"visionNum": 0,
"point_num": 1,
"pixel_pos": [1, 2, 3, 4, 5, 6, 7],
"robot_pos": [1, 2, 3, 4, 5, 6, 7],
"pixel_pos_deg": [1, 2, 3, 40, 50, 60, 7],
"robot_pos_deg": [1, 2, 3, 40, 50, 60, 7]
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Vision process number |
| point_num | int | Calibration point number |
| pixel_pos | array | Pixel coordinates |
| robot_pos | array | Robot coordinates |
| pixel_pos_deg | array | Pixel coordinates in degrees |
| robot_pos_deg | array | Robot coordinates in degrees |
Move to This Point
0x411C VISION_CALIBRATION_MOVE_TO_POINT
{
"robot": 1,
"visionNum": 1,
"point_num": 1
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
| point_num | int | Calibration point number |
Clear This Point Data
0x411D VISION_CALIBRATION_REMOVE_POINT
{
"robot": 1,
"visionNum": 1,
"point_num": 1
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
| point_num | int | Calibration point number |
Auto Calibration Run and Calculate
0x411E VISION_CALIBRATION_AUTO_RUN_AND_CALCULATION
{
"robot": 1,
"visionNum": 1,
"caculate_type": 0
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
| caculate_type | int | 0: Eye-in-hand |
Auto Calibration: Return Pixel Coordinates
0x4120 VISION_CALIBRATION_CAMERA_DATA_RESPOND
{
"robot": 1,
"visionNum": 1,
"point_num": 1,
"pixel_pos": [1, 2, 3, 4, 5, 6, 7],
"pixel_pos_deg": [1, 2, 3, 40, 50, 60, 7]
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
| point_num | int | Point number |
| pixel_pos | array | Pixel coordinates |
| pixel_pos_deg | array | Pixel coordinates in degrees |
Calibration Calculation Result
0x4121 VISION_CALIBRATION_CALC_RESPOND
{
"robot": 1,
"visionNum": 1,
"result": false
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
| result | bool | true: Success, false: Error |
Cancel Auto Calibration
0x4122 VISION_CALIBRATION_CANCEL_CALCULATION
{
"robot": 1,
"visionNum": 1
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
Set Vision Range
0x3F04 VISION_RANGE_SET
{
"robot": 1,
"visionNum": 0,
"visionRange": {
"maxX": "0",
"maxY": "1.1",
"maxZ": "222",
"minX": "0.003",
"minY": "0",
"minZ": "0"
}
}Parameter Description:
| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number, 1~4 |
| visionNum | int | Process number, 0~8 |
| visionRange.maxX | string | X maximum, empty string "" if not set |
| visionRange.maxY | string | Y maximum |
| visionRange.maxZ | string | Z maximum |
| visionRange.minX | string | X minimum |
| visionRange.minY | string | Y minimum |
| visionRange.minZ | string | Z minimum |
Query Vision Range
0x3F05 VISION_RANGE_INQUIRE
{
"robot": 1,
"visionNum": 0
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| visionNum | int | Process number |
Return Vision Range Query Result
0x3F06 VISION_RANGE_RESPOND
{
"maxX": "",
"maxY": "1.1",
"maxZ": "222",
"minX": "0.003",
"minY": "0",
"minZ": "0"
}| Parameter Name | Type | Description |
|---|---|---|
| maxX | string | X maximum, empty string "" if not set |
| maxY | string | Y maximum |
| maxZ | string | Z maximum |
| minX | string | X minimum |
| minY | string | Y minimum |
| minZ | string | Z minimum |
Position Calibration Protocol
0x4128 VISION_RANGE_CALIBRATION_POS_INQUIRE
{
"robotid": 1,
"craftid": 0
}| Parameter Name | Type | Description |
|---|---|---|
| robotid | int | Robot number, 1~4 |
| craftid | int | Process number, 0~99 |
Response to 0x4128
0x4129 VISION_RANGE_CALIBRATION_POS_RESPOND
{
"robotid": 1,
"craftid": 0,
"pos": [0, 0, 0, 0, 0, 0, 0]
}| Parameter Name | Type | Description |
|---|---|---|
| robotid | int | Robot number |
| craftid | int | Process number |
| pos | array | Current position |
#########################Below: Not available in 2207 version#############################
Save Calibration Result
Save the tool hand result of the 2nd type of auto calibration
0x4123 VISION_CALIBRATION_SAVE_RESULT
{
"robot": 1,
"tool_num": 1,
"tool_hand": [0, 0, 0, 0, 0, 0]
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| tool_num | int | Tool number |
| tool_hand | array | Tool hand data |
Hand-Eye Calibration: Calculate Transformation Matrix from Socket Data
0x4124 VISION_CALIBRATION_CALCULATE_BY_SOCKET_DATA
{
"robot": 1,
"vision_num": 1,
"calculation_type": 0,
"base_robot_pos": [0, 0, 0, 0, 0, 0],
"mark_pos": [
{
"robot_pos": [0, 0, 0, 0, 0, 0],
"camera_pos": [0, 0, 0, 0, 0, 0]
}
]
}Parameter Description:
| Parameter Category | Parameter Name | Type | Description |
|---|---|---|---|
| - | robot | int | Robot number |
| - | vision_num | int | Process number, starting from 0 |
| - | calculation_type | int | 0: Eye-in-hand fixed posture hand-eye calibration 1: Eye-in-hand variable posture hand-eye calibration 2: Eye-to-hand hand-eye calibration |
| - | base_robot_pos | array | Cartesian coordinates |
| mark_pos | robot_pos | array | Cartesian coordinates |
| mark_pos | camera_pos | array | Camera coordinates |
Vision Calibration Result Response
0x4125 VISION_CALIBRATION_CALCULATE_BY_SOCKET_DATA_RESPOND
{
"robot": 1,
"vision_num": 1,
"result": true,
"matrix": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
}| Parameter Name | Type | Description |
|---|---|---|
| robot | int | Robot number |
| vision_num | int | Process number, starting from 0 |
| result | bool | true: Success, false: Error |
| matrix | array | Transformation matrix |