Program Example 8.3
Example Type:
Using Don’t Care Pixels for the Part Blob Search Window
Configuration
- Number of Robots: 1
- Number of Feeders: 1
- Number of Parts Types on the Feeder: 1
- Number of Placement Positions: 1
- Camera Orientation: Fixed Downward Camera over Feeder#1
Description
Even with the backlight turned on, the corners of the tray can have shadows. If the Part Blob search window includes the corners and if the Blob’s thresholds are not properly adjusted, then the shadows can be mistakenly identified as parts. The Part Blob Sequence is used to detect individual parts or an accumulation of parts. If the Part Blob sees the shadows as parts, then the system will make a bad decision on how to vibrate.
The following is an example of how the corner shadowing can be misidentified as parts.
The Blob’s Search Window can be masked by painting "Don’t Care Pixels" in the regions where you do not want to search (i.e., the corners of the tray).
Right click on the Blob and select "Edit Window" from the fly out menu or select the SearchWin "EditWindow" property for the Blob.
Use the paint brush to remove the tray from the Search Window.
Now when you Run the Blob, the tray will not be included in the Search Window (as shown below).
No special part feeding code is required.
Sample Code
Main.prg
Function main
If Motor = Off Then
Motor On
EndIf
Power Low
Jump Park
PF_Start 1
Fend
PartFeeding.prg
Function PF_Robot(PartID As Integer) As Integer
Do While PF_QueLen(PartID) > 0
P0 = PF_QueGet(PartID)
Jump P0
On Gripper; Wait 0.2
Jump Place
Off Gripper; Wait 0.2
PF_QueRemove PartID
If PF_IsStopRequested(PartID) = True Then
Exit Do
EndIf
Loop
PF_Robot = PF_CALLBACK_SUCCESS
Fend