Instructions - Vision Commands
Vision Start
Description: After executing the vision start instruction, the controller connects to the camera.
Instruction Name: VISION_RUN
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | int | Yes | Process number, value range [1,99] |
| logout | bool | Yes | Whether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable |
| type | int | Yes | VISION_RUN is 79 in the enum type list |
| userParamInt | int | No | Customer-defined for secondary development, currently meaningless |
| userParamString | string | No | Customer-defined for secondary development, currently meaningless |
JSON Example:
{
"ID": 14,
"logout": false,
"type": 79,
"userParamInt": 0,
"userParamString": ""
}Vision Trigger
Description: After executing the vision trigger instruction, it waits for the return value (position data sent) from the vision server. After receiving the position data, it continues to execute the next instruction.
Instruction Name: VISION_TRG
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | int | Yes | Process number, value range [1,99] |
| logout | bool | Yes | Whether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable |
| type | int | Yes | VISION_TRG is 80 in the enum type list |
| userParamInt | int | No | Customer-defined for secondary development, currently meaningless |
| userParamString | string | No | Customer-defined for secondary development, currently meaningless |
JSON Example:
{
"ID": 23,
"logout": false,
"type": 80,
"userParamInt": 0,
"userParamString": ""
}Get Vision Position Count
Description: Records the number of points sent by the camera and stores the point count into the selected variable.
Instruction Name: VISION_POSNUM
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | int | Yes | Process number, value range [1,99] |
| M_STRPOSNUM | object | Yes | Global numeric variable, global int variable or bound variable, value range [1,990] |
| logout | bool | Yes | Whether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable |
| type | int | Yes | VISION_POSNUM is 81 in the enum type list |
| userParamInt | int | No | Customer-defined for secondary development, currently meaningless |
| userParamString | string | No | Customer-defined for secondary development, currently meaningless |
M_STRPOSNUM Structure:
{"data": 0.0, "secondvalue": 1, "value": 4, "varname": "GI[GI001]"}JSON Example:
{
"ID": 31,
"M_STRPOSNUM": {"data": 0.0, "secondvalue": 1, "value": 4, "varname": "GI[GI001]"},
"logout": false,
"type": 81,
"userParamInt": 0,
"userParamString": ""
}Get Vision Position
Description: Executing this instruction stores the point information sent by the camera into a variable.
Instruction Name: VISION_POS
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | int | Yes | Process number, value range [1,99] |
| dataVariable | object | Yes | First additional numeric variable, global int variable or bound variable, value range [1,990] |
| logout | bool | Yes | Whether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable |
| posidname | string | No | Point variable name, e.g. "GP$GI001" |
| posidtype | int | No | Whether the posidname node is a bound point or a point: 0=point; 1=bound point |
| type | int | Yes | VISION_POS is 82 in the enum type list |
| userParamInt | int | No | Customer-defined for secondary development, currently meaningless |
| userParamString | string | No | Customer-defined for secondary development, currently meaningless |
dataVariable Structure:
{"data": 0.0, "secondvalue": 1, "value": 9, "varname": "GS[I001]"}JSON Example:
{
"ID": 38,
"dataVariable": {"data": 0.0, "secondvalue": 1, "value": 9, "varname": "GS[I001]"},
"logout": false,
"posidname": "GP$GI001",
"posidtype": 1,
"type": 82,
"userParamInt": 0,
"userParamString": ""
}Clear Vision Position Information
Description: Clears the point information sent by the camera in the current process number.
Instruction Name: VISION_CLEAR
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | int | Yes | Process number, value range [1,99] |
| logout | bool | Yes | Whether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable |
| type | int | Yes | VISION_CLEAR is 83 in the enum type list |
| userParamInt | int | No | Customer-defined for secondary development, currently meaningless |
| userParamString | string | No | Customer-defined for secondary development, currently meaningless |
JSON Example:
{
"ID": 17,
"logout": false,
"type": 83,
"userParamInt": 0,
"userParamString": ""
}Vision End
Description: Ends the vision process, the controller disconnects from the camera.
Instruction Name: VISION_END
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | int | Yes | Process number, value range [1,99] |
| logout | bool | Yes | Whether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable |
| type | int | Yes | VISION_END is 84 in the enum type list |
| userParamInt | int | No | Customer-defined for secondary development, currently meaningless |
| userParamString | string | No | Customer-defined for secondary development, currently meaningless |
JSON Example:
{
"ID": 1,
"logout": false,
"type": 84,
"userParamInt": 0,
"userParamString": ""
}Get Vision Trajectory Position
Description: When the camera sends multiple points, different point storage methods can be selected to execute the trajectory.
Instruction Name: VISION_TRACE
| Parameter | Type | Required | Description |
|---|---|---|---|
| ID | int | Yes | Process number, value range [1,99] |
| M_POINTSTORAGENUM | object | Yes | Point storage count, int type global or local variable or bound variable |
| dataVariable | object | No | First additional data variable, int/double/string type global or local variable or bound variable; when not in use: {"data":0.0,"secondvalue":0,"value":0,"varname":""} |
| logout | bool | Yes | Whether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable |
| pointStoragePosType | int | Yes | Point storage location: 0=external point queue; 1=variable |
| posidname | string | Yes | First variable for point storage, global or local point variable or bound variable |
| posidtype | int | Yes | Whether the posidname node is a bound point or a point: 0=point; 1=bound point |
| type | int | Yes | VISION_TRACE is 236 in the enum type list |
| userParamInt | int | No | Customer-defined for secondary development, currently meaningless |
| userParamString | string | No | Customer-defined for secondary development, currently meaningless |
JSON Example:
{
"ID": 17,
"M_POINTSTORAGENUM": {"data": 0.0, "secondvalue": 1, "value": 4, "varname": "GI[GI001]"},
"dataVariable": {"data": 0.0, "secondvalue": 1, "value": 9, "varname": "GS[GI001]"},
"logout": false,
"pointStoragePosType": 1,
"posidname": "P$GI001",
"posidtype": 1,
"type": 236,
"userParamInt": 0,
"userParamString": ""
}On-Fly Start
Description: When the robot tool moves past the photo point, it quickly triggers the camera to take a photo. During the photo process, the object or camera is in motion.
Instruction Name: ONFLY_INIT
| Parameter | Type | Required | Description |
|---|---|---|---|
| Delay | object | Yes | Record coordinate delay, global or local double type manually entered value or int/double type variable or bound variable, value range [0,1000] |
| axisNum | object | No | Axis, string type manually entered value or int type global or local variable or bound variable |
| _posIdType | int | Yes | Whether the phonePos node is a point variable or bound point variable: 0=point variable; 1=bound point variable |
| IOPort | object | No | IO port, int type or bound variable type, value range [1,1000] |
| IOValue | object | No | Port value, bool type manually entered value or variable or bound variable |
| cameraTriggerDelayTime | object | Yes | Camera trigger delay, double type manually entered value or int type, value range [0,1000] |
| craftID | object | Yes | Process number, int type, value range [1,99] |
| logout | bool | Yes | Whether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable |
| triggerAngleSpacing | object | No | Trigger angle spacing, double type manually entered value or int/double type global or local variable or bound variable, value range [-360,360] |
| triggerCount | object | No | Trigger count, int type manually entered value or global or local bound variable or variable, value range [0,10]; when not in use: {"data":0.0,"secondvalue":0,"value":1,"varname":"[-]"} |
| triggerStartPos | object | No | Trigger start position, double type manually entered value or global or local int/double type variable or bound variable |
| phonePos | string | Yes | Photo point, string type, global or local P point or E point variable or bound variable |
| radius | object | Yes | Photo point range radius, value range [0.001,1000] |
| type | int | Yes | ONFLY_INIT is 239 in the enum type list |
| userParamInt | int | No | Customer-defined for secondary development, currently meaningless |
| userParamString | string | No | Customer-defined for secondary development, currently meaningless |
| visionCraftID | object | No | Vision process number |
When triggerType=0
{
"Delay": {"data": 0.0, "secondvalue": 1, "value": 4, "varname": "GI[GI001]"},
"_posIdType": 1,
"cameraTriggerDelayTime": {"data": 0.0, "secondvalue": 1, "value": 5, "varname": "GD[I001]"},
"craftID": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"logout": false,
"phonePos": "P$GI001",
"radius": {"data": 0.0, "secondvalue": 1, "value": 4, "varname": "GI[I001]"},
"triggerType": 0,
"type": 239,
"userParamInt": 0,
"userParamString": "",
"visionCraftID": {"data": 0.0, "secondvalue": 1, "value": 1, "varname": "I[GI001]"}
}When triggerType=1
{
"Delay": {"data": 0.0, "secondvalue": 1, "value": 4, "varname": "GI[GI001]"},
"IOPort": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "DIN[I003]"},
"IOValue": {"data": 0.0, "secondvalue": 1, "value": 6, "varname": "GB[I001]"},
"cameraTriggerDelayTime": {"data": 0.0, "secondvalue": 1, "value": 5, "varname": "GD[I001]"},
"craftID": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"logout": false,
"triggerType": 1,
"type": 239,
"userParamInt": 0,
"userParamString": "",
"visionCraftID": {"data": 0.0, "secondvalue": 1, "value": 1, "varname": "I[GI001]"}
}When triggerType=2
{
"Delay": {"data": 0.0, "secondvalue": 1, "value": 4, "varname": "GI[GI001]"},
"axisNum": {"data": 0.0, "secondvalue": 0, "value": 7, "varname": "J6"},
"cameraTriggerDelayTime": {"data": 0.0, "secondvalue": 1, "value": 5, "varname": "GD[I001]"},
"craftID": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I001"},
"logout": false,
"triggerAngleSpacing": {"data": 0.0, "secondvalue": 1, "value": 5, "varname": "GD[GI001]"},
"triggerCount": {"data": 0.0, "secondvalue": 1, "value": 1, "varname": "I[I001]"},
"triggerStartPos": {"data": 0.0, "secondvalue": 0, "value": 1, "varname": "I003"},
"triggerType": 2,
"type": 239,
"userParamInt": 0,
"userParamString": "",
"visionCraftID": {"data": 0.0, "secondvalue": 1, "value": 1, "varname": "I[GI001]"}
}On-Fly End
Description: Ends the vision process, the controller disconnects from the camera.
Instruction Name: VISION_END
| Parameter | Type | Required | Description |
|---|---|---|---|
| craftID | object | Yes | Process number, int type, value range [1,99] |
| logout | bool | Yes | Whether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable |
| type | int | Yes | VISION_END is 240 in the enum type list |
| userParamInt | int | No | Customer-defined for secondary development, currently meaningless |
| userParamString | string | No | Customer-defined for secondary development, currently meaningless |
JSON Example:
{
"craftID": {"data": 0.0, "secondvalue": 0, "value": 4, "varname": "GI006"},
"logout": false,
"type": 240,
"userParamInt": 0,
"userParamString": ""
}Get On-Fly Status
Description: Gets whether the on-fly task is enabled and stores the obtained status into the selected variable.
Instruction Name: ONFLY_GET_STATUS
| Parameter | Type | Required | Description |
|---|---|---|---|
| Result | object | Yes | Result, global or local bool variable or local variable |
| craftID | object | Yes | Process number, int type manually entered value or global or local variable or bound variable, value range [1,99] |
| logout | bool | Yes | Whether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable |
| type | int | Yes | ONFLY_GET_STATUS is 241 in the enum type list |
| userParamInt | int | No | Customer-defined for secondary development, currently meaningless |
| userParamString | string | No | Customer-defined for secondary development, currently meaningless |
JSON Example:
{
"Result": {"data": 0.0, "secondvalue": 0, "value": 6, "varname": "GB001"},
"craftID": {"data": 0.0, "secondvalue": 1, "value": 4, "varname": "GI[GI001]"},
"logout": false,
"type": 241,
"userParamInt": 0,
"userParamString": ""
}On-Fly Calculate Tool
Description: On-fly calculate tool is used when the robot arm grips the workpiece and there may be an eccentric position, and the workpiece has a rotation angle. By calculating and switching to a new tool, the workpiece center is placed at the loading position point without eccentricity or rotation.
Instruction Name: ONFLY_CALC_TOOL
| Parameter | Type | Required | Description |
|---|---|---|---|
| craftID | object | Yes | Process number, int type manually entered value or global or local variable or bound variable, value range [1,99] |
| grabTool | object | Yes | Gripping tool, int type manually entered value or global or local variable or bound variable, value range [1,999] |
| logout | bool | Yes | Whether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable |
| newTool | object | Yes | New tool, int type manually entered value or global or local variable or bound variable, value range [1,999] |
| type | int | Yes | ONFLY_CALC_TOOL is 242 in the enum type list |
| userParamInt | int | No | Customer-defined for secondary development, currently meaningless |
| userParamString | string | No | Customer-defined for secondary development, currently meaningless |
JSON Example:
{
"craftID": {"data": 0.0, "secondvalue": 1, "value": 4, "varname": "GI[GI001]"},
"grabTool": {"data": 0.0, "secondvalue": 1, "value": 1, "varname": "I[GI001]"},
"logout": false,
"newTool": {"data": 0.0, "secondvalue": 1, "value": 4, "varname": "GI[I006]"},
"type": 242,
"userParamInt": 0,
"userParamString": ""
}