Warning
You are reading an old version of this documentation. If you want up-to-date information, please have a look at 5.0 .URCap functions
You can start programming with the EYE+ plugin on the TeachPendant in the Program tab. The EYE+ URCap is called “EYE+ Control”. This URCap allows sending TCP commands to the selected EYE+.
Important
The camera configuration and hand-eye calibration must be done from the EYE+ Studio interface before executing any URCap commands. If you do not know how to proceed, please refer to the Camera configuration wizard and Hand-eye calibration wizard sections.
Select the EYE+ (yellow rectangle)
You must first select the EYE+ to which you want to send a command. All connected EYE+ are listed in the drop-down list.
Warning
If no EYE+ is connected, the drop-down list contains only the EYE+ called “None”. The node cannot be validated with this fake EYE+ (the node remains yellow). Go back to the installation node and start the connection.
Select a basic command (green rectangle)
Select the command you want to send to the EYE+. The basic commands available are start production, stop, get_part, prepare_part. The view on the right (orange rectangle) changes depending on the selected command. This view gives some information about the behavior of the command in the Description field.
Note
Refer to chapter Commands for further information on the commands.
Select an advanced command (purple rectangle)
Select the command you want to send to the EYE+. The advanced commands available are force_take_image, can_take_image, get_parameter, set_parameter, feeder. The view on the right (orange rectangle) changes depending on the selected command. This view gives some information about the behavior of the command in the Description field.
Note
Refer to chapter Commands for further information on the commands.
Select parameter and argument (orange rectangle)
If the command requires input parameters or arguments, they must be provided in the right view.
Warning
If the parameter or argument is not valid according to the selected command, the node will not be defined (the node remains yellow and the main program cannot be started).
Basic command - start production
The start production command is the default command selected by the URCap. It is used to start EYE+ in the production state. This command requires the identifier of your recipe.
Note
The command will be invalid should the recipe identifier be left empty. The recipe identifier cannot be less than 0 and more than 65535.
Note
Refer to the section Recipes list if you do not know how to find the recipe identifier.
Basic command - stop
The stop command is used to interrupt the following: production, camera configuration, recipe edition, hand-eye calibration. The state to be stopped can be chosen from the drop-down list. EYE+ switches to the ready state if the command succeeds.
This command is always valid if at least one EYE+ is connected.
Basic command - get_part
The get_part command is used to request one or more parts from EYE+. This is a blocking command, meaning it will keep going until it gets a response from EYE+.
The coordinates of the first part returned by EYE+ are stored in a global variable named EYE1Pos.
Note
In advanced mode, if the part_quantity is set to more than 1, the next global variables are named from EYE1Pos2 to EYE1Pos5 according to the requested part quantity (using set_parameter part_quantity n command).
This command is always valid if at least one EYE+ is connected.
Basic command - prepare_part
The prepare_part command is used to request one or more parts from EYE+. This command is not a blocking command. The part coordinates can be retrieved later with the get_part command.
This command is always valid if at least one EYE+ is connected.
Advanced command - force_take_image
This command forces EYE+ to acquire an image as soon as possible. Each time this command is called, an image is acquired and an image analysis is performed to find the coordinates of the good candidates.
This command is always valid if at least one EYE+ is connected and the advanced plugin mode is selected in configuration.
Advanced command - can_take_image
This command tells EYE+ whether it is allowed acquire an image. It requires a boolean input parameter.
If its value is set to True, EYE+ is allowed to acquire an image. It must be called when the field of view is clear of any object that could obstruct the image acquisition (for example, the robot).
If its value is set to False, EYE+ is not allowed to acquire an image. It must be used in the opposite situation of the one described above.
This command is always valid if at least one EYE+ is connected and the advanced plugin mode is selected in configuration.
Advanced command - get_parameter
This command returns the value of the parameter specified as a command argument stored in EYE+. It requires a string as an input parameter. Refer to chapter Parameters to check the valid parameters to get.
The returned value is stored in a global variable named EYE1Prm.
Important
If the input parameter does not exist, the command will return the error
404 The given parameter does not exist
and the global variable keeps its former value. The error code can be
retrieved by calling the URScript function EYEcheckLastError(<name>).
Advanced command - set_parameter
This command assigns to the parameter of EYE+ a value equal to the argument of the command. It then requires an input parameter and an argument, both as strings. Refer to chapter Parameters to check the valid parameters and arguments to set.
Important
If the input parameter does not exist, the command will return the error
404 The given parameter does not exist
and the EYE+ parameter value will not changed. The error code can be
retrieved by calling the URScript function EYEcheckLastError(<name>).
Important
If the argument is not assignable to the parameter, the command will return the error
696 Wrong input parameter type
and the EYE+ parameter value will not changed. The error code can be
retrieved by calling the URScript function EYEcheckLastError(<name>).
Advanced command - feeder
This command sends a raw Asycube command from EYE+ to the connected Asycube. It requires a string as a parameter.
The returned value is stored in a global variable named EYE1AR.