PF_QtyAdjHopperTime Function

Returns the estimated amount of hopper operation time that is required to supply the optimal number of parts.

Syntax
PF_QtyAdjHopperTime(partID, SupplyQty, SupplyTime)

Parameters

  • Part ID
    Specify the part ID. (Use an integer from 1 to 32.)
  • Part Supply
    Specify the quantity of parts that are supplied in the SupplyTime.
  • SupplyTime
    Specify the hopper operating time in milliseconds that is required to supply the quantity of parts (number of parts) specified by SupplyQty.

Return values
Returns the estimated amount of hopper operation time (ms). The return value will be between 1 - 30000 [ms].
In the case of error, the return value will be 1.

Description
PF_QtyAdjHopperTime uses vision, to calculate the hopper operation time required to ensure that the platform has the optimal number of parts (determined by feeder calibration). The return value is used as the duration parameter for the PF_OutputOnOff statement.
SupplyQty and SupplyTime are determined by the developer. You can use the Test Hopper button on the Part Feeding Supply page to perform the adjustments. These values indicate how many parts are supplied in a given amount of time. Refer to the following section for further details.
Calibration

In the case of multi-part operation, the calculated operating time assumes that an equal quantity of each part type is optimal. If PF_QtyAdjHopperTime is executed while parts are running on the feeder, then the Part Blob vision sequence (for the supplied PartID) is run as well as each individual Part Sequence (for each part in the _Start grouping). If PF_QtyAdjHopperTime is executed when no parts are running on the feeder, then only the Part Blob Sequence (for the supplied PartID) is used.

This command cannot be executed from a virtual controller or command window.
This command cannot be used with mobile cameras.
If the User processes vision (i.e., the PF_Vision callback function is used) for any part running on the feeder then PF_QtyAdjHopperTime will only use the Part Blob Sequence to determine the hopper operation time for the part specified by the Part ID parameter.
Please note that if "Supply parts during pick and place" is selected and this command is executed while the robot arm is in the camera’s field of view, the arm will be recognized as a part and an incorrect hopper operation time may be returned.
Refer to the following section for further details.
Part Supply

Examples
This example uses the PF_Control callback to turn on the optional hopper for the estimated amount of time that is necessary to supply the optimal quantity of parts. The hopper is adjusted to deliver 10 parts per second (1000ms).

Function PF_Control(PartID As Integer, Control As Integer) As Integer
   Integer hopperOnTime

   Select Control
       'Request for part supply (add up to optimum number)
       Case PF_CONTROL_SUPPLY
           hopperOnTime = PF_QtyAdjHopperTime(PartID, 10, 1000)
           PF_OutputOnOff 1, On, 1, hopperOnTime
           Wait hopperOnTime / 1000
   Send
   PF_Control = PF_CALLBACK_SUCCESS
Fend