Skip to content

Instructions - Vision Commands

Vision Start

Description: After executing the vision start instruction, the controller connects to the camera.

Instruction Name: VISION_RUN

ParameterTypeRequiredDescription
IDintYesProcess number, value range [1,99]
logoutboolYesWhether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable
typeintYesVISION_RUN is 79 in the enum type list
userParamIntintNoCustomer-defined for secondary development, currently meaningless
userParamStringstringNoCustomer-defined for secondary development, currently meaningless

JSON Example:

json
{
  "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

ParameterTypeRequiredDescription
IDintYesProcess number, value range [1,99]
logoutboolYesWhether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable
typeintYesVISION_TRG is 80 in the enum type list
userParamIntintNoCustomer-defined for secondary development, currently meaningless
userParamStringstringNoCustomer-defined for secondary development, currently meaningless

JSON Example:

json
{
  "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

ParameterTypeRequiredDescription
IDintYesProcess number, value range [1,99]
M_STRPOSNUMobjectYesGlobal numeric variable, global int variable or bound variable, value range [1,990]
logoutboolYesWhether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable
typeintYesVISION_POSNUM is 81 in the enum type list
userParamIntintNoCustomer-defined for secondary development, currently meaningless
userParamStringstringNoCustomer-defined for secondary development, currently meaningless

M_STRPOSNUM Structure:

json
{"data": 0.0, "secondvalue": 1, "value": 4, "varname": "GI[GI001]"}

JSON Example:

json
{
  "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

ParameterTypeRequiredDescription
IDintYesProcess number, value range [1,99]
dataVariableobjectYesFirst additional numeric variable, global int variable or bound variable, value range [1,990]
logoutboolYesWhether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable
posidnamestringNoPoint variable name, e.g. "GP$GI001"
posidtypeintNoWhether the posidname node is a bound point or a point: 0=point; 1=bound point
typeintYesVISION_POS is 82 in the enum type list
userParamIntintNoCustomer-defined for secondary development, currently meaningless
userParamStringstringNoCustomer-defined for secondary development, currently meaningless

dataVariable Structure:

json
{"data": 0.0, "secondvalue": 1, "value": 9, "varname": "GS[I001]"}

JSON Example:

json
{
  "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

ParameterTypeRequiredDescription
IDintYesProcess number, value range [1,99]
logoutboolYesWhether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable
typeintYesVISION_CLEAR is 83 in the enum type list
userParamIntintNoCustomer-defined for secondary development, currently meaningless
userParamStringstringNoCustomer-defined for secondary development, currently meaningless

JSON Example:

json
{
  "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

ParameterTypeRequiredDescription
IDintYesProcess number, value range [1,99]
logoutboolYesWhether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable
typeintYesVISION_END is 84 in the enum type list
userParamIntintNoCustomer-defined for secondary development, currently meaningless
userParamStringstringNoCustomer-defined for secondary development, currently meaningless

JSON Example:

json
{
  "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

ParameterTypeRequiredDescription
IDintYesProcess number, value range [1,99]
M_POINTSTORAGENUMobjectYesPoint storage count, int type global or local variable or bound variable
dataVariableobjectNoFirst 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":""}
logoutboolYesWhether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable
pointStoragePosTypeintYesPoint storage location: 0=external point queue; 1=variable
posidnamestringYesFirst variable for point storage, global or local point variable or bound variable
posidtypeintYesWhether the posidname node is a bound point or a point: 0=point; 1=bound point
typeintYesVISION_TRACE is 236 in the enum type list
userParamIntintNoCustomer-defined for secondary development, currently meaningless
userParamStringstringNoCustomer-defined for secondary development, currently meaningless

JSON Example:

json
{
  "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

ParameterTypeRequiredDescription
DelayobjectYesRecord coordinate delay, global or local double type manually entered value or int/double type variable or bound variable, value range [0,1000]
axisNumobjectNoAxis, string type manually entered value or int type global or local variable or bound variable
_posIdTypeintYesWhether the phonePos node is a point variable or bound point variable: 0=point variable; 1=bound point variable
IOPortobjectNoIO port, int type or bound variable type, value range [1,1000]
IOValueobjectNoPort value, bool type manually entered value or variable or bound variable
cameraTriggerDelayTimeobjectYesCamera trigger delay, double type manually entered value or int type, value range [0,1000]
craftIDobjectYesProcess number, int type, value range [1,99]
logoutboolYesWhether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable
triggerAngleSpacingobjectNoTrigger angle spacing, double type manually entered value or int/double type global or local variable or bound variable, value range [-360,360]
triggerCountobjectNoTrigger 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":"[-]"}
triggerStartPosobjectNoTrigger start position, double type manually entered value or global or local int/double type variable or bound variable
phonePosstringYesPhoto point, string type, global or local P point or E point variable or bound variable
radiusobjectYesPhoto point range radius, value range [0.001,1000]
typeintYesONFLY_INIT is 239 in the enum type list
userParamIntintNoCustomer-defined for secondary development, currently meaningless
userParamStringstringNoCustomer-defined for secondary development, currently meaningless
visionCraftIDobjectNoVision process number

When triggerType=0

json
{
  "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

json
{
  "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

json
{
  "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

ParameterTypeRequiredDescription
craftIDobjectYesProcess number, int type, value range [1,99]
logoutboolYesWhether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable
typeintYesVISION_END is 240 in the enum type list
userParamIntintNoCustomer-defined for secondary development, currently meaningless
userParamStringstringNoCustomer-defined for secondary development, currently meaningless

JSON Example:

json
{
  "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

ParameterTypeRequiredDescription
ResultobjectYesResult, global or local bool variable or local variable
craftIDobjectYesProcess number, int type manually entered value or global or local variable or bound variable, value range [1,99]
logoutboolYesWhether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable
typeintYesONFLY_GET_STATUS is 241 in the enum type list
userParamIntintNoCustomer-defined for secondary development, currently meaningless
userParamStringstringNoCustomer-defined for secondary development, currently meaningless

JSON Example:

json
{
  "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

ParameterTypeRequiredDescription
craftIDobjectYesProcess number, int type manually entered value or global or local variable or bound variable, value range [1,99]
grabToolobjectYesGripping tool, int type manually entered value or global or local variable or bound variable, value range [1,999]
logoutboolYesWhether commented out: true=the instruction will not be executed in the job file; false=not commented out, executable
newToolobjectYesNew tool, int type manually entered value or global or local variable or bound variable, value range [1,999]
typeintYesONFLY_CALC_TOOL is 242 in the enum type list
userParamIntintNoCustomer-defined for secondary development, currently meaningless
userParamStringstringNoCustomer-defined for secondary development, currently meaningless

JSON Example:

json
{
  "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": ""
}