PF_Status
Describes processes (mainly error processes) based on the callback function return value, and the system status (parts not supplied, etc.).
Syntax
Function PF_Status(part ID As Integer, Status As Integer) As Integer
‘(Error processing)
Fend
Parameters
- Part ID
The part ID (integer number from 1 to 32) goes here.
When multi-part operation, the active part goes here. - Status
The status goes here.
This is either the callback function return value or a value set by the system (see Description).
Return values
PF_EXIT is set whenever a return value is not specified. This will terminate the Part Feeding process. Make sure to set a return value to avoid this.
PF_CONTINUE
Continues the Part Feeding process. Normally this value should be specified.PF_EXIT
Terminate the Part Feeding process. When this value is specified, the Part Feeding process will terminated. If this value is specified, the device should be returned to the initial state (i.e., returning the robot to the home position, returning the robot to the motor is off, etc.).PF_RESTART
Restart the Part Feeding process from vision.PF_RESTART_ACTIVEPART
Restart the Part Feeding process from vision. Only acquire an image and load the queue for the Active Part.
Description
This function runs after other callback functions (except the PF_CycleStop function and the PF_Status function).
The return value for the callback function just performed or the error that occurred in the Part Feeding process is set to the Status parameter. Describes processes based on these Status values.
PF_CALLBACK_SUCCESS
Callback function completed successfully. Normally nothing to be processed.PF_CALLBACK_RESTART
PF_Robot callback function finished successfully and the return value is PF_CALLBACK_RESTART. Normally nothing to be processed.PF_CALLBACK_RESTART_ACTIVEPART
PF_Robot callback function finished successfully and the return value is PF_CALLBACK_RESTART_ACTIVEPART. Normally nothing to be processed.PF_STATUS_NOPART
This status indicates that parts are not being supplied from the hopper. Describes the operation to supply parts to the hopper. Normally nothing to be processed.PF_STATUS_TOOMANYPART
This status indicates that too many parts are being supplied from the hopper, and that parts cannot be picked up. Describe the operation to remove parts from the hopper using an operator call, etc. Review hopper settings if this status occurs regularly.PF_STATUS_BAD_ID
The part ID specified when running the PF_Start command is invalid. Make sure that you have specified the registered part ID correctly. You tried to start with multiple feeders during a multi-part operation. Please review the settings for each part. This immediately terminates the Part Feeding process.PF_STATUS_BAD_PARAMETER
The part parameter specified when running the PF_Start command is invalid. This immediately terminates the Part Feeding process.PF_STATUS_CAL_NOT_COMPLETE
PF_Start The part specified when running the PF_Start command has not completed the feeder calibration process. This immediately terminates the Part Feeding process.
Refer to the following for further details.
CalibrationPF_STATUS_WRONGPART
The parts remaining on the feeder could not be detected. Check that the part vision sequence can detect the parts properly. Or check for different types of parts or damaged parts.
This Status value occurs after multiple attempts have been made to singulate the parts and the Part Blob sequence sees that there is something inside the Pick Region but the Part sequence is unable to identify it as a Front or Back part.PF_STATUS_PARTBLOB_ERROR
The vision sequence or object for part blob detection is not valid. This immediately terminates the Part Feeding process. Check the part blob sequence and object that is used for the part.PF_STATUS_PARTSEQ_ERROR
The vision sequence or object(s) used for part detection are not valid. This immediately terminates the Part Feeding process. Check the part sequence and object(s) that are used to detect the part.PF_STATUS_ERROR
An error (system error) occurred while running the PF_Start command. This immediately terminates the Part Feeding process. Check that the vision sequence set in Vision functions properly. Debug callback functions individually to verify whether they function properly. Error 7730 "The maximum number of robots per feeder has been exceeded." can also occur when attempting to share a feeder with more than 2 robots.
Operation process processes can be specified with the Status callback function return value.
PF_EXIT is set whenever a return value is not specified. This will terminate the Part Feeding process. Make sure to set a return value to avoid this.PF_STATUS_FEEDERINUSE_ERROR
The Part Feeding process was launched multiple times for the same feeder. The Feeding process is terminated immediately. Part Feeding process that is already running will continue. Recheck the program.PF_STATUS_PARTNOTENABLED
The part is disabled.
Make sure Enabled is checked in Epson RC+ 8.0 Menu - [Tools] - [Part Feeding] - [Parts] - [Part**] - [General].PF_STATUS_PURGENOTENABLED
The PF_Purge function has been executed, although purging has been disabled.
Make sure Enabled is checked in Epson RC+ 8.0 Menu - [Tools] - [Part Feeding] - [Parts] - [Part**] - [General].
NOTE
Ensure that errors do not occur inside the PF_Status callback. If errors occur inside PF_Status, then PF_Status could be called recursively and error processing may not complete.
It is strongly recommended not to execute Feeder control commands (PF_Center, PF_CenterByShift, PF_Flip, PF_Shift) inside the PF_Status function.
PF_Status is responsible for telling the system how to proceed after completing the previous callback function (i.e., how to proceed after _Robot, PF_Vision, PF_Control, PF_MobileCam, PF_Feeder). This is accomplished by setting the PF_Status return value to one of the following return values -PF_CONTINUE, PF_RESTART or PF_RESTART_ACTIVEPART or PF_EXIT. See the example program below for details. See the example program below for details.
Program Example
The following program describes error processing.
The user error referred to in this example is the suction timeout error referred to in the program example used for the Robot callback function.
If this error occurs, the robot motors are turned off.
' ** User Error **
' 8001 Suction timeout occurred
Function PF_Status(PartID As Integer, Status As Integer) As Integer
Select Status
Case PF_CALLBACK_SUCCESS
' Success (do nothing under normal circumstances)
Case PF_CALLBACK_RESTART
' Restart from vision
PF_Status = PF_RESTART
Exit Function
Case PF_CALLBACK_RESTART_ACTIVEPART
' Restart from vision –
' only acquire image and the load queue for Active Part
PF_Status = PF_RESTART_ACTIVEPART
Exit Function
Case PF_STATUS_NOPART
' No parts in hopper
MsgBox "Hopper empty."
Case PF_STATUS_TOOMANYPART
' Too many parts in feeder
MsgBox "Too many parts on Feeder."
Case PF_STATUS_BAD_ID
' The specified part ID does not exist
MsgBox "Bad PartID."
Case PF_STATUS_BAD_PARAMETER
' Invalid part parameter
MsgBox "Bad parameter."
Case PF_STATUS_CAL_NOT_COMPLETE
' Calibration not complete
MsgBox "Calibration incomplete."
Case PF_STATUS_WRONGPART
' There may be a wrong part on the feeder platform.
MsgBox "Wrong Part."
Case PF_STATUS_ERROR
' Error
MsgBox "Error!! (code: " + Str$(Err) + " ) " + ErrMsg$(Err)
Case PF_STATUS_PARTBLOB_ERROR
' Part Blob vision error
MsgBox "Part Blob vision error."
Case PF_STATUS_PARTSEQ_ERROR
' Part Sequence vision error
MsgBox "Part Sequence vision error."
Case PF_STATUS_FEEDERINUSE_ERROR
' Feeder is already in use
MsgBox "Feeder is already in use."
Case PF_STATUS_PARTNOTENABLED
' Part is disabled
MsgBox "Part is disabled."
Case PF_STATUS_PURGENOTENABLED
' Purge is disabled.
MsgBox "Purge is disabled."
Case 8001
' Example: Suction timeout
MsgBox " Vacuum Error!!"
Motor Off
PF_Status = PF_EXIT
Exit Function
Send
PF_Status = PF_CONTINUE
Fend