PF_Start / PF_Start Funtion
Starts the Part Feeding process for a specified part.
Syntax
PF_Start part ID1[, part ID2 [, part ID3 [, part ID4] ] ]
PF_Start (part ID1[, part ID2 [, part ID3 [, part ID4] ] ])
Parameters
- Part ID
Specify the part ID. (Use an integer from 1 to 32.) When taking a variable as an argument and do not specify the part ID, set the value to 0.
Return values
None
Description
Perform the following before starting PF_Start (refer to the usage example).
Refer to the following for further details.
- Select the robot in use
- Configure robot settings (Power, Speed, Accel, etc.)
- Turn the motors on
- Run PF_InitLog when outputting a log
Running PF_Start generates a new task (task number 32) and the part feeding process is started.
The control returns to the caller without waiting the end of the part feeding process.
In the following conditions, an error occurs and the Status callback function will be run. The Part Feeding process will not start.
Condition | Status callback function Status parameter value |
---|---|
The part ID is not exist Try to start a multi-part operation with parts from different feeders Duplicate part IDs are set | PF_STATUS_BAD_ID |
Part parameter settings are invalid (Enabled check box not selected, etc.) | PF_STATUS_BAD_PARAMETER |
Feeder calibration not complete | PF_STATUS_CAL_NOT_COMPLETE |
The part is disabled | PF_STATUS_PARTNOTENABLED |
The feeder is in use | PF_STATUS_FEEDERINUSE_ERROR |
An system error occurred | PF_STATUS_ERROR |
- Multi-feeder operation :
The Part Feeding process can be run simultaneously on parts that belong to different feeders. For example, if part 1 belongs to feeder 1 and part 2 belongs to feeder 2, you can run PF_Start 1 at first, then PF_Start 2 can be executed.
PF_Start creates a task for each feeder. The Task Number used starts at "32" and decreases by one for each PF_Start. The Task Number that is used depends upon the Feeder Number.Feeder Number Task 1 32 2 31 3 30 4 29
Each callback function (PF_Robot, PF_Control, PF_Status. PF_Vision, PF_MobileCam) is executed in the same task as PF_Start creates.
For T/VT series controller, up to two feeders can be controlled at the same time. If using three or more feeders, "the error 7731: The maximum number of simultaneous feeders for the controller type has been exceeded." occurs.
Multi-part operation
When you want to run the multi-part operation, you should specify multiple part IDs as arguments. Up to four part IDs can be specified. In this case, the feeder vibration is performed the Part ID (active part) specified by the first argument of PF_Start. You can use the PF_ActivePart command to switch the active part.
Only parts that belong to the same feeder can be specified in a multi-part operation. If a part from a different feeder is specified and PF_Start is executed, an error occurs and the PF_Status callback function is called with PF_STATUS_BAD_ID.
Up to two robots can share a single feeder at the same time. If you attempt to PF_Start a grouping of parts (i.e., PF_Start 1, 2, 5) and the parts are assigned to more than 3 robots, an error will occur.Other notes
While the Part Feeding process is running on a feeder, another Part feeding process cannot be executed for the same feeder. For example, if part 1 belongs to feeder 1 and part 2 belongs to feeder 1, run PF_Start 1 and then PF_Start 2, an error occurs and the PF_Status callback function is called with PF_STATUS_FEEDERINUSE_ERROR. At this time PF_Start 1 continues processing with no error.
PF_Start must be executed from a normal task. If PF_Start is executed from the background task, an error will occur.
Cannot be executed from a virtual controller or command window.
Examples
Robot 1
Motor On
Power High
Speed 100
Accel 100, 100
LimZ -80.0
PF_InitLog( "C:\log.csv", True)
PF_Start(1)