The Festo_PartDetector.lib library
10
1.6 Interfaces – Inputs
Input Type Description
Connect BOOL If there is a rising edge, the module takes the created access data
and attempts to log in. If there is a falling edge, the module
attempts to log out.
StartDetection BOOL The taking of pictures and processing runs continuously as long as
this input is TRUE.
SinglePicture BOOL If there is a rising edge, a single picture is taken.
MinPictureDistance LREAL Specifies the minimum distance between two successive pictures.
The frequency of the pictures is thus also specified indirectly. If the
distance between two pictures is significantly greater than
MinPictureDistance, the maximum frame rate could be used.
ResetIDCounter BOOL If there is a rising edge, the counter for the part ID is set to the
value IDResetValue+1. The part ID is an identification number,
which is assigned to each newly detected part.
IDResetValue DINT  ResetIDCounter.
ClearInternalBuffer BOOL A rising edge causes clearing of the internal buffer for duplicate
part detection.
1.6.1 Settings for the detection of parts detected multiple times
Input Type Brief description
DuplicateDetectionEnabled
Default: TRUE
BOOL Default for the recognition of parts on the conveyor.
PositionTolerance
Default: 1
LREAL Tolerance range for the recognition of parts on the
conveyor.
ConveyorLimit
Default: 1000
LREAL Maximum distance for saved parts on the conveyor in the
allPartsList array.
DuplicateDetectionEnabled
If the DuplicateDetectionEnabled parameter is TRUE, parts are only output as "new parts" if they were not
already detected at the same position on the conveyor. Previously detected parts are saved in the
allPartsList array.
If the DuplicateDetectionEnabled is FALSE, all detected parts are output as "new parts" for each picture.
Furthermore, they are not saved in the allPartsList array.
PositionTolerance
Given the fact that the part position when detected by the Compact Vision System can vary slightly
(particularly if the conveyor position is changed), a tolerance range must be specified. The tolerance range
specifies the maximum value (e.g. in mm) by which the part position can deviate from the assumed part
position without the part being interpreted as a new part. The tolerance range is set in global coordinate
units.
Example
A part is detected at the position (X= 40 mm / Y= 50 mm). The conveyor moves 100 mm in the X direction.
(X= 140 mm / Y= 50 mm) is expected as the new position for the part. However, due to visual effects and
inaccuracies in the calculation, the part is detected at the position (X= 142 mm / Y= 49 mm).
– If the PositionTolerance parameter = 1 (mm) or less, the part is detected as a new part, as the
tolerance range for X extends from 139 mm to 141 mm (40 mm + 100 mm +/– 1 mm). The part is thus
incorrectly detected as a second (new) part and output.
– If the PositionTolerance parameter = 2 (mm) or more, the tolerance range extends from 138 mm to
142 mm (40 mm + 100 mm +/– 2 mm). The part position is thus within the tolerance range, whereby it
assumed that only the part has moved. Only one part is then correctly output.