PF_ActivePart
The PF_ActivePart statement notifies the Part Feeding process of the user’s intent at runtime. The system needs to know what part is desired. The system will feed parts to ensure that the desired part is available. (uses the correct vibration settings, supplies parts from the hopper, etc.)
A simple illustration of why PF_ActivePart is needed at runtime. Let’s consider a "kitting" application where all the parts are being fed by the same Part Feeder. An empty box is delivered to the robot on a conveyor. A barcode on the box indicates what part type and the quantity of parts that need to be placed into the box. The desired part type and the pick quantity are only known when the box is presented to the barcode reader. The Part Feeder needs to vibrate and find the parts that are needed to fill the order.
As another example of how PF_ActivePart is used, let’s consider a two-part assembly operation. Both parts are on the same Part Feeder. For this application, the robot needs to pick one of Part#1 and place it in a fixture. Then the robot picks two of Part#2 and inserts them into Part#1. PF_ActivePart tells the system which part it needs to feed so that the assembly process can be completed. To make this application more realistic, let’s assume that each part is inspected by a vision system prior to assembly. If Part#1 fails its inspection, PF_ActivePart must remain as Part#1 so that the robot can go back to the feeder and get a good Part#1. If Part’s#1 inspection passes then PF_ActivePart needs to switch to Part#2.
The first Part ID in PF_Start statement is the initial Active Part. PF_ActivePart normally is normally set prior to exiting the PF_Robot callback so that the feeding action will be specific to the desired part.
PF_ActivePart will be demonstrated by an example in a later section of this chapter.