Warning

You are reading an old version of this documentation. If you want up-to-date information, please have a look at 5.0 .

get_part

Parameters

  • None

Returns

  • 200 x=<x> y=<y> rz=<rz>, where <x>, <y>, <rz> are coordinates and orientation of the part, else refer to error codes.

Description

Request one or more parts.

The number of part returned can be changed using the part_quantity parameter (refer to Table 27). This parameter is set to 1 by default.

Note

Notice that changing part_quantity while a get_part is pending will not affect it. Only subsequent get_part will consider the newly set part_quantity.

Note

This command will block until part_quantity parts are found and can be returned. A 30-second delay is set by default. The command returns an error if the requested number of parts cannot be found after the time period. The timeout can be adjusted before calling get_part (refer to set_parameter).

Default working principle: part_quantity = 1

The command get_part will give back the coordinates of a good candidate. This command has different behavior:

  • First command call: If it is the first command call of the whole production, get_part will follow the following steps:

    • When the command is called, an image is acquired and analyzed and if no good part is found, the vibration sequence is started, followed by an image analysis. These two actions are repeated until at least one good part is found.

    • When at least one part is found, the coordinates of all found parts are stored in a list of good parts. Then, the coordinate of the first part on the list is sent to the client and erased from the list.

  • Normal operation: If there is already at least one part in the list of good candidates, then command get_part will send the coordinates of the first part to the client and then erase it from the list. No image is acquired, and no vibration sequence is performed.

  • No more parts: If no more parts are in the list, the command get_part will follow the following steps:

    • When the command is called, a vibration sequence is started, followed by an image analysis. These two actions are repeated until at least one good part is found.

    • When at least one part is found, the coordinates of all found parts are stored in a list of good parts. Then, the coordinate of the first part on the list is sent to the client and erased from the list.

Working principle with part_quantity = n

It changes the minimum number of good candidates that must be found each time the get_part command is called. The quantity of parts can be changed with the command set_parameter.

The get_part command will not stop until getting at least n good candidates on the Asycube or reaching the timeout.

Warning

Once EYE+ sends the n coordinates to the client, it assumes that in the next step all of these parts have been picked up. It means that the coordinates of the parts are then erased from the list of good candidates.

Usage example

get_part
200 x=0.12345 y=0.11111 rz=0.99

set_parameter part_quantity 3
get_part
200 x=0.12345 y=0.11111 rz=0.99 x=3.67890 y=200.45612 rz=1.54 x=120.37000 y=-20.48484 rz=0.00