FB_GroupOrganizer
That function block handles the following issue:
We have an in-feed system where the products are coming randomly in series. The gap between the products is unknown and using the corrections of smart belts driver by servo motors we have to organize the products so that they became separated by constant gaps (see Fig.2)
Additionally, we can choose to create groups of products (See Fig.1)
The requirements are:
1. All the products separated with a gap of DR(mm) (no contact)
2. All the products without gap (DR=0) , should not exert force on neighboring products (soft contact)
3. Creating group of “n” products and inside the group the product gap is Dp and the gap between the groups is Dr.
The number of smart belts to satisfy conditions 1-3 depends by following factors:
Vpm : speed (number of product per minute).
LengthProduct : Product length.
K : Coefficient of friction between the product and the belt.
MaxGap : Maximum gap between two products on the first belt (upstream).
DP : Gap between two products
DR : Gap between two groups
Dftc : Distance between photocell and delivering axis
Dint : Distance between delivering axis and interference axis (positive when delivering axis is downstream to interference axis.
Vacuum or not.
Some definitions:
Delivering axis: position where the tail of product is delivered to the next belt
Interference axis: position of the head of product when it is in contact with the next belt (end of correction)
Dftc: distance photo-eye to delivering axis
Dint: Distance interference axis to delivering axis (positive if delivering axis is downstream to interference axis)
Case of:
DR(DP) =0 SOFT CONTACT
DR(DP) <0 HARD CONTACT
DR(DP) >0 NO CONTACT
Every product is triggered by the photocell and after that we know instant by instant the exact distance from the photocell. When the back of the product is on the delivering axis we calculate the gap between the tail of 2° product and the head of 3° product.
Now we have to correct positive or negative the upstream belt in order to have the desired gap between product 2° and 3° on the downstream belt.
The correction must be positive if we want to reduce the gap and negative if we want to increase the gap.
The correction is superimposed on a base gearing between the two belts. When the correction is completed (the head of product arrives on the interference axis) the speed of upstream belt is equal to the speed of downstream belt (in other words during the product transfer between two belts they have always the same speed) .Now we have to wait for the tail of the product arriving on the delivering axis to start the correction for the next product.
Is very important that the “DInt” is negative and must be as long as possible. The more distance we have from the delivering axis and interference axis, the reduction in time of 50% requires an acceleration of a magnitude time four.
In the fig.1/2 we can see the product after it has completed the correction (front of the product on interference axis) and starting the correction for the next product.
Following the function block: (the function block was developed in RSLogix system)
Explication of FB_GroupOrganizer Parameters:
(units---> i.e. mm)
I_bEnable BOOL: Enable of function block
I_bEnablePhotoeyeRegistration BOOL: Enable to function block if photo-eye registration is valid (The photo-eye registration is valid only if this bit is TRUE)
I_rLenBuffer REAL: Length of buffer where snap shots of the positions of the belt on edge positive trigger of photo-eye (the length of that buffer must be longer then the number of product on the belt =ROUND (Belt length / Belt pitch) +1)
I_rUnwMotorSlave [units] REAL: Unwind for motor belt (slave)
I_rUnwMotorMaster [units] REAL: Unwind for motor master
I_rPitchMotorSlave [units] REAL: Pitch of the belt every product cycle (slave)
I_rPitchMotorMaster [units] REAL: Pitch of the master every product cycle
I_rNumberProductPerGroup REAL: Number of product per group
I_rMaxCorrectionPositive [units] REAL: absolute value of the maximum correction positive permitted
I_rMaxCorrectionNegative [units] REAL: absolute value of the maximum correction negative permitted
I_rMinCorrection [units] REAL: if the absolute value of the correction is less then that value the correction is not done.
I_rDP [units] REAL : gap between two consecutive product in the same group (If I_rNumberProductPerGroup=1 is not significant)
I_rDR [units] REAL: gap between two group ((If I_rNumberProductPerGroup=1 is the gap between two consecutive product)
I_rProductLength [units] REAL: product length
I_rDftc [units] REAL: distance between photo-eye and the delivering axis
I_rDint [units] REAL: distance between interference axis and delivering axis
(positive if delivering axis is downstream to interference axis or vice-versa)
I_rOverPosition [units] REAL: if <>0 the delivering axis is shifted of that value
I_rDeltaPosRearmReg [units] REAL: delta position where the trigger is rearmed from the end of product If >0 is rearmed after the end of product else before.
I_rScanTimeTask_ms [] REAL: task time where the function block runs.
I_bResetGroupCompleted BOOL: if ON the next product coming on photo-eye is the first of the group.
I_bResetCorrections BOOL: initialized to zero all the corrections inside the FB (is equivalent to disable and enable the FB
I_bCorrectionOverlap BOOL: if ON the FB corrects opening the space between two products overlapped.
I_bEnableCorrMinProductGap BOOL: if ON the FB corrects the gap between two product inside the group if the gap is less then I_rDP
IO_CamProfileCorrection CAM_PROFILE[2]: camp profile of 2 point (poly 3)
I_bCorrectionWithModule BOOL: if ON the correction is remainded by the belt pitch.
O_bActive BOOL: FB active
O_bReady BOOL: FB ready
O_bCorrectionActive BOOL: Correction of the belt is active
O_bMaxCorrectionDetected BOOL: a max correction (positive or negative) is detected
O_rXcorrMasterUnits [units] REAL: scaling master for the cam in master units
O_rYCorrSlaveUnits [units] REAL: correction in slave units
O_bCaptureRegPosEdgeOK BOOL: the registration on positive edge is captured (go OFF when rearmed)
O_bGroupCompleted BOOL: the last product of the group is delivered
O_rProductsCounter REAL: increase every time the product is delivered and is unwinded by the I_rNumberProductPerGroup
O_diStateWR DINT: value of the write state
O_diStateDeliveringCorr DINT: value of the delivering Correction state
O_rRDDistanceFromTpEdgePos [units] REAL: distance between photo-eye and front of the product.
O_arBufferCorrections [units] REAL[10]: buffer of the correction values
O_rPointWR REAL: increases every positive edge on photo-eye
O_rPointRD REAL: increase every time a product is delivered
I_bPhotoeye BOOL: Photo-eye signal for correction
I_bPositiveEdgePhotoOn BOOL: must be ON if the photo signal is ON when detect the product, must be OFF if the photo signal is OFF when detect the product.
O_rTailToHead [units] REAL: distance from tail to head (gap between two consecutive products)
O_rRegistrationPositionEdgePos [units] REAL: registration position every positive edge of product
O_rDistanceFromPositiveEdge [units] REAL: distance from TP edge positive during product delivering
O_CounterPorductWithoutGap REAL: counting the number of product touching each others (if =1 product are not in contact on photocell,
=2 two products in contact or overlapped on photo-eye)
O_rNumberProductInTransit REAL: number of products registered by photo-eye but not yet
delivered
IO_mbMotorMaster AXIS: master
IOmbMotorSlave AXIS: axis slave
O_diCamStatus DINT: status of Camming motion
Bit 0=ENABLE
Bit 1=DN
Bit 2=IP
Bit 3=PC
Bit 4=ER
Meaning of two STATEs of FB_GroupOrganizer
O_diStateWR:
0: FB disable (go to 10)
10: Wait servo action status “ON” (go to 20)
20: Arm registration on positive edge (IO_mbMotorSlave); MAR.IP = 1 (ON) (go to 30)
30: Wait registration. If registration complete & I_bEnablePhotoeyeRegistration go to 35 else
if NOT and I_bEnablePhotoeyeRegistration go to 20
35: Wait product length + “I_rDeltaPosRearmReg” to avoid bouncing
of photo signal (go to 50)
40: Arm registration on positive edge (IO_mbMotorSlave) ; MAR.IP = 1 (ON) (go to 50)
50: Wait registration process complete or two products overlapped (if MAR.PC = 1 (ON), then MAR.IP =0 (OFF); then go to 30
else go to 35 if two products are back to back)
else if NOT I_bEnablePhotoeyeRegistration go to 40
*******************************************************************************
O_diStateDeliveringCorr:
0: FB disable
10: Wait servo action status “ON” (go to 20) and almost 1 product in transit
20: Wait product delivered (the back of product on delivering axis) (go to 30)
30: Wait product delivered OK and if at most one product in transit go to 40 else go to 10
40: Check if Group completed? (go to 60)
60: Calculate the correction to create the correct gap (go to 70)
70: If ServoActionStatus is ON Launch the cam for correction (go to 80) else nothing
80: Wait for position lock status ON (PositionCamLockStatus) (go to 90)
else If ServoActionStatus is OFF go to 10
90: Wait for position lock status OFF (PositionCamLockStatus) (go to 10)
else If ServoActionStatus is OFF go to 10
FB_MultiplyCorrection
We have an in-feed system where the products are coming randomly in series. The gap between the products is unknown and using the corrections of smart belt drive by servomotors we have to phase the product into a LUG CONVEYOR.
Every product is triggered by the photocell and after that we know instant by instant the exactly position from the photocell.
The correction must be positive or negative in order to advance or retard the product comparing to the position of LUG CONVEYOR.
The correction is superimposed on a base gearing between the belt and the LUG CONVEYOR.
Finished the correction when the head of product arrives on the Interference axis the belt speed is exactly equal to the speed of LUG CONVEYOR.
Now we have to wait the back of the product arriving on the pick-up axis to consider the next product to correct.
Is very important that the D_Int that is negative must be more longer as possible, more distance we have from Interference axis and pick-up axis more time we have to do the correction mitigating the acceleration (if that distance D_Int is the double the time at disposal to correct is the double and the acceleration/deceleration is four times less.
SmartBelt in line with LUG CONVEYOR
SmartBelt 90° with LUG CONVEYOR
Explication of FB_MultiplyCorrection_MV I/O:
I_bEnable BOOL: Enable of function block
I_bEnableCorrection BOOL: Enable the corrections
I_rUnwMotorSlave [units] REAL: Unwinding motor belt
I_rUnwMotorMaster [units] REAL: Unwinding motor master
I_rProductLength [units] REAL: product length
I_rBeltPitch [units] REAL: Pitch of the belt every master cycle
I_rLenBuffer InOut REAL: Lenght of buffer where are freezed the positions of the belt on edge positive trigger of photoeye (must be longer then the number of product on the belt =ROUND (Belt length / Belt pitch) +1 )
I_rFollowingArea REAL: 0%Correction always positive; 100% correction always negative 50% shortest path
I_rDftc [units] REAL: distance between photoeye and delivering axis
I_rDint [units] REAL: distance between interference axis and delivering axis
I_rDistPointPickUp [units] REAL: distance from product head where I want to pick up the product
I_rOverPosition [units] REAL: if <>0 the delivering axis is shifted of that value
I_rTolleranceProduct [units] REAL: tolerance of product (used to rearm the photo-eye after product length+tolerance product)
I_rPhasePickUpMasterProduct [units] REAL: phase of lug conveyor where I want to phase
the product
I_bEnableAdjustGear BOOL: enable the filter PI for errors
I_rMaxCorrAdjustGear REAL: max error that is considered in the filter adjust gear
I_rScanTimeTask_ms REAL: task time where the function block runs.
I_rKCorrection [%] REAL: percent of correction. If O_rXcorrMasterUnits > BeltPitch the correction=Error, If NOT correction = (I_rKCorrection /100)*error.
I_rAutomaticComputeXcorrBelt REAL: IF ON the FB calculate automatically the O_rXcorrMasterUnits , IF NOT O_rXcorrMasterUnits=I_rScalingXCorr
IO_CamProfileCorrection CAM_PROFILE[2]: camp profile of 2 point (poly 3)
O_bActive BOOL: FB active
O_bReady BOOL: FB ready
O_diStateWR DINT: value of the write state
O_diStateRD DINT: value of the state RD
O_bCorrectionActive BOOL: Correction of the belt is active
O_rXcorrBelt [units] REAL: scaling master for the cam in master units
O_rYCorrBelt [units] REAL: correction in slave units
O_rYRealCorrBelt [units] REAL: correction in slave units filtered by I_rKCorrection
O_rStepBeltTemp [units] REAL: pitch of belt filtered by adjust gear
O_rNumberProductInTransit REAL: number of products registered by photo-eye but not yet delivered
O_bCaptureReg1PosEdgeOK BOOL: registration 1 OK on positive edge
O_bCaptureReg2PosEdgeOK BOOL: registration21 OK on positive edge
O_bCaptureReg2NegEdgeOK BOOL: registration 2 OK on negative edge
O_bCorrMaxDetected BOOL: max correction detected
O_rDistanceBetweenTwoProducts [units] REAL: distance between two products
O_rProductRealLength REAL [units] : product length checked
O_rPosMasterAtPickUpPosition [units] REAL: position of master when the tail of product is on pick up axis
O_rRunTimeAccMS2[units*1000/s2] REAL: acceleration in m/s2 if units=mm
O_arBufferCorrBelt [units] ARRAY OF REAL: buffer of corrections
IO_mbMotorMaster AXIS: master
IOmbMotorSlave AXIS: axis slave
End_of_file