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.
Note
The coordinates have 5 decimal digits (e.g. x = 10.00000
) and the angle has 2 (e.g. rz = 1.00
).
Note
EYE+ XTD aligns the x-axis of the TCF to the x-axis of the frame used during the hand-eye calibration (usually RCF). An additional RZ offset might be required when the RCF is not aligned with the TCF. See RZ angle correction for more details.
Description
Request one or more parts.
The number of part returned can be changed using the part_quantity parameter (refer to Table 21). 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
By default, the timeout parameter is set to 0.0
. This setting causes the system
to perform only a single image analysis. An error 504 is returned if the requested number
of parts cannot be found during this analysis. If the timeout is set to a greater value, the command will block until
part_quantity parts are found and can be returned, or until the timeout expires.
The command returns an error if the requested number of parts cannot be found after the specified time period.
The timeout can be adjusted before calling get_part
(refer to timeout).
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 call: On the first call, get_part will follow these steps:
An image is acquired and analyzed. If at least one part is found, the coordinates of all found parts are stored in a list of good parts. The coordinates of the first part on the list are sent to the client and erased from the list.
If no good part is found:
If the timeout parameter is set to
0.0
(the default), an error is returned.If the timeout parameter is set to a greater value, a new image is acquired and a new analysis is started. These two actions are repeated until at least one good part is found or until the timeout expires.
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 more parts: If no more parts are in the list, the command get_part will start over at 1.
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 are found or reaching the timeout.
Important
Once EYE+ XTD 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