Warnung

Sie lesen eine alte Version dieser Dokumentation. Wenn Sie aktuelle Informationen wünschen, schauen Sie bitte unter 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+.

Wichtig

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 Kamerakonfigurationsassistent and Hand-Augen Kalibrierungsassistent sections.

../../../_images/urcap_program.png

Abb. 179 EYE+ Control URCap - Advanced plugin selected

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.

Warnung

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.

Bemerkung

Refer to chapter Befehle 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.

Bemerkung

Refer to chapter Befehle 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.

Warnung

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.

Bemerkung

The command will be invalid should the recipe identifier be left empty. The recipe identifier cannot be less than 0 and more than 65535.

Bemerkung

Refer to the section Liste der Rezepte if you do not know how to find the recipe identifier.

../../../_images/urcap_start_production.png

Abb. 180 EYE+ Control - start production

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.

../../../_images/urcap_stop.png

Abb. 181 EYE+ Control - stop

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.

Bemerkung

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.

../../../_images/urcap_get_part.png

Abb. 182 EYE+ Control - get_part

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.

../../../_images/urcap_prepare_part.png

Abb. 183 EYE+ Control - prepare_part

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.

../../../_images/urcap_force_take_image.png

Abb. 184 EYE+ Control - force_take_image

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.

../../../_images/urcap_can_take_image.png

Abb. 185 EYE+ Control - can_take_image

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 Parameter to check the valid parameters to get.

The returned value is stored in a global variable named EYE1Prm.

Wichtig

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>).

../../../_images/urcap_get_parameter.png

Abb. 186 EYE+ Control - get_parameter

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 Parameter to check the valid parameters and arguments to set.

Wichtig

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>).

Wichtig

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>).

../../../_images/urcap_set_parameter.png

Abb. 187 EYE+ Control - set_parameter

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.

../../../_images/urcap_feeder.png

Abb. 188 EYE+ Control - feeder