Hello all,
About the robot:
KR 180-PA.
KRC2 / Win 95.
Can't remember the KSS version now, I'll write it down next time I go to the customer place.
In a palletizing cell I programmed a while ago once robot finishes putting all the boxes on the pallet, sometimes a wood cover must be placed on top of the boxes.
Wood covers are placed in another pallet that can be replaced while the robot is stopped by an operator, therefore, in order to avoid any possible collision if the customer introduces a new pallet full of covers, I programmed the robot to perform a search every time it goes to pick a cover.
The search works more or less well performing those operations:
$TORMON for axis 2 and 3 are set to 50.
An interruption is activated.
Robot is sent to a position in which the vacuum cups would be on top of the pallet (this position can only be reached if no wood covers are present).
Once a laser sensor finds the wood cover the robot brakes fast.
See a fragment of the code involved:
; Notice routine names has been translated to English, maybe the names are longer than what is allowed.
;*****************************************
; At the beginning of the program
; I used a CYCFLAG because initially it was
; supposed to have more sensors to have redundancy
; But customer cut costs...
;*****************************************
$CYCFLAG[1] = diBrakeSensor
;*****************************************
; In the main routine:
;*****************************************
INTERRUPT DECL 20 WHEN $CYCFLAG[1]==TRUE DO BrakeWhenCoverFound()
INTERRUPT OFF 20
$TORQMON[1]=100
$TORQMON[2]=50
$TORQMON[3]=50
$TORQMON[4]=100
$TORQMON[5]=100
$TORQMON[6]=100
INTERRUPT ON 20 ; BrakeWhenCoverFound routine is the handler of this interruption.
$VEL.CP = 1.5 ; Speed at which the search will be performed.
MovementSearchCover() ; execution of the search movement.
$ADVANCE = 3 ; put the advance pointer again into the default value.
;*****************************************
; Routine to make the search movement.
;*****************************************
DEF MovementSearchCover()
LIN pVCupsTouchingPallet ; movement that put the vacuum cups touching the pallet (can only be reached if no wood covers are present).
$ADVANCE = 0
END
;*****************************************
; Interruption handler
;*****************************************
DEF BrakeWhenCoverFound()
INTERRUPT OFF 20 ; Disable the interruption
BRAKE F ; fast braking
RESUME
WAIT SEC 0
END
Display More
When the wood cover is found, another search starts, using another interruption, sensor... that ensures I'll get the vacuum cups touching the wood cover.
I do this because the robot robot reacts differently depending on the height in which the wood cover is found in the first search.
By "reacts differently" I mean the braking distance is different.
When the part found is at a position higher than the robot base, then the braking stops the vacuum cups almost touching the wood cover which is perfect. But, when the part is found at a lower position, the vacuum cups can be stopped even at 400 mm from the wood cover.
The problem with this is that the second search takes ages to finish.
I could remember where have I've found the last wood cover and search only after a program start as the operator must stop the machine to replace the wood covers pallet, but that could lead to a collision at full speed.
The inputs are normal ones, not connected to the $MEAS_PULSE... this should mean that I could have a 18mm of error due to the input itself, but never ever 400 (as 1,5m/s => 1,5mm/ms | 12 ms polling time => 12*1.5 = 18 mm of error max).
Notice I'm using a CYCFLAG and not the direct input, as the code comment explains, I did this to allow them to add another sensor to have some redundancy (more safety for the robot clamp),
What would recommend me to avoid this difference on the brake behavior?
Is that normal?
Could the TORQMON affect the braking distance?
Thank you very much in advance for your time and help.