that is ok as an interlock or handshake between pieces of equipment but it is not ok for safety of humans.
Sounds good to me. it just internal cell safety between the Mold and the robot.
that is ok as an interlock or handshake between pieces of equipment but it is not ok for safety of humans.
Sounds good to me. it just internal cell safety between the Mold and the robot.
KSS 8.5.8
i have a Robot tending some molds and i would like to have dynamic Workspaces to control safety
I figured i would do something like this since its being controlled by a PLC.
IF $IN[74] THEN
$WORKSPACE[3].MODE= #OFF
ENDIF
IF $IN[75] THEN
$WORKSPACE[3].MODE= #INSIDE
ENDIF
I was planning on putting this in the SPS.sub program. Let me know what you think
KRC4
KSS 8.5.8
One of my machines i have a customer that is being a little too hands on and moving the robot for some reason. They clumsy restart the machine without resetting or exiting the program and this has caused them to crash multiple times . I would like to implement the $On_Path tool that if it is false it wont let the program run or continue in the present program until it is true. I'm a little lost on how to implement something like this so if there is an example i could look at that would help greatly.
still way too many things are in there, how about this
Even with the simple code im still getting the error
Think using that much movements in an ISR is not a good idea. Specially if you want to cancel the job and move to home.
Have a look at: RE: taking Robot to Home Position in EXT mode?
and of course the whole thread. May be you can use something from that thread.
Yeah i tried to make it simpler so and in that but now I have an error,KSS01425 Instruction sint() inadmissible (module INTERline:3)
The simplified code
&ACCESS RV
&PARAM EDITMASK = *
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
DEF INTER( )
INTERRUPT off 20
Brake
;FOLD SPTP home2 Vel=100 % PDAT9 ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=home2; Kuka.BlendingEnabled=False; Kuka.MoveDataPtpName=PDAT9; Kuka.VelocityPtp=100; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SPTP
;ENDFOLD
SPTP Xhome2 WITH $VEL_AXIS[1] = SVEL_JOINT(100.0), $TOOL = STOOL2(Fhome2), $BASE = SBASE(Fhome2.BASE_NO), $IPO_MODE = SIPO_MODE(Fhome2.IPO_FRAME), $LOAD = SLOAD(Fhome2.TOOL_NO), $ACC_AXIS[1] = SACC_JOINT(PPDAT9), $APO = SAPO_PTP(PPDAT9), $GEAR_JERK[1] = SGEAR_JERK(PPDAT9), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
RESUME
END
Display More
To the pointer makes sense, To the code most of it was missing since i had a character limit. I just placed the important part in it. But there is checks and balances.
oh, and you should not use $POS_ACT_MES to check position. by the time program gets there robot already traveled some distance. use $POS_INT, even if instruction is processed later (you have there 1 sec delay), it will still tell you same position ... not where robot is now but where robot was when input was triggered..
I think POS_ACT_MES is what i need since i don't care about where it is when it when the Interrupt function is triggered, I care about where it is when it starts the program. Were dealing with molds and i rather not slam into them while its homing.
Do you have a good example of how this function is written, i would love to take a look at a working real life application
Remove the Interrupt section and the code work fine.
you are not taking care of advance run pointer.
you are using input 22 to trigger start of the search, instead of using it to end the search, so if the search is started robot would keep on moving and crash into target it looks for. etc....
Can you Expand on the "Pointer" and the trigger event further, When reading the manual it states that you should trigger it.
This is no error message of the robot. You should describe the issue clear and precise. Do you get a compile error, or a runtime error, and what exactly are the messages.
The final error is $Gear_Jerk variable write-protected in module, BAS line 1131
Main Code
DEF MAIN( )
int iCase
GLOBAL INTERRUPT DECL 20 WHEN $IN[21]==TRUE DO HOMING_SWITCH()
;FOLD INI;%{PE}
;FOLD BASISTECH INI
GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
INTERRUPT ON 3
BAS (#INITMOV,0 )
;ENDFOLD (BASISTECH INI)
;FOLD USER INI
;Make your modifications here
;ENDFOLD (USER INI)
;ENDFOLD (INI)
;FOLD OUT 1 'In Cycle' State=TRUE CONT;%{PE}%R 8.5.19,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:1, 3:In Cycle, 5:TRUE, 6:CONTINUE
CONTINUE
$OUT[1]=TRUE
;ENDFOLD
INTERRUPT ON 20
lOOP
;fold Cases
iCase = -1
IF $IN[21] THEN
iCase = 1
ENDIF
IF $IN[22] THEN
iCase = 2
ENDIF
IF $IN[23] THEN
iCase = 3
ENDIF
....
...
...
;endfold
Switch iCase
Case 1
;FOLD OUT 21 'Running Home Program' State=TRUE CONT;%{PE}%R 8.5.19,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:21, 3:Running Home Program, 5:TRUE, 6:CONTINUE
CONTINUE
$OUT[21]=TRUE
;ENDFOLD
HOMING()
;FOLD OUT 21 'Running Home Program' State=FALSE CONT;%{PE}%R 8.5.19,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:21, 3:Running Home Program, 5:FALSE, 6:CONTINUE
CONTINUE
$OUT[21]=FALSE
;ENDFOLD
...
...
ENDSWITCH
ENDLOOP
;FOLD OUT 1 'In Cycle' State=FALSE CONT;%{PE}%R 8.5.19,%MKUKATPBASIS,%COUT,%VOUTX,%P 2:1, 3:In Cycle, 5:FALSE, 6:CONTINUE
CONTINUE
$OUT[1]=FALSE
;ENDFOLD
END
Display More
Interrupt Program
DEF HOMING_SWITCH( )
DECL REAL MyX
DECL CHAR DMY[3]
INT Icase
INTERRUPT OFF 20
Brake
;FOLD WAIT Time=1 sec;%{PE}%R 8.5.19,%MKUKATPBASIS,%CWAIT,%VWAIT,%P 3:1
WAIT SEC 1
;ENDFOLD
Icase=0
MyX = $POS_ACT_MES.X
XMyPosition = $POS_ACT_MES
XMyPosition.Z = XMyPosition.z + 100
;FOLD SPTP MyPosition Vel=100 % PDAT29 Tool[1]:EOAT_1 Base[0] ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=MyPosition; Kuka.BlendingEnabled=False; Kuka.MoveDataPtpName=PDAT29; Kuka.VelocityPtp=100; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SPTP
;ENDFOLD
SPTP XMyPosition WITH $VEL_AXIS[1] = SVEL_JOINT(100.0), $TOOL = STOOL2(FMyPosition), $BASE = SBASE(FMyPosition.BASE_NO), $IPO_MODE = SIPO_MODE(FMyPosition.IPO_FRAME), $LOAD = SLOAD(FMyPosition.TOOL_NO), $ACC_AXIS[1] = SACC_JOINT(PPDAT29), $APO = SAPO_PTP(PPDAT29), $GEAR_JERK[1] = SGEAR_JERK(PPDAT29), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
;Fold Switch Case
IF HomeLoc==1 THEN
ICASE=1
ENDIF
IF HomeLoc==2 THEN
ICASE=2
ENDIF
IF HomeLoc==3 THEN
ICASE=3
ENDIF
IF HomeLoc==4 THEN
ICASE=4
ENDIF
.
.
.
;EndFold
SWITCH Icase
CASE 1
MyX = $POS_ACT_MES.X
XMyPosition_1 = $POS_ACT_MES
XMyPosition_1.Z = XMyPosition_1.z + 100
;FOLD SPTP HOME Vel=100 % PDAT19 ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=HOME; Kuka.BlendingEnabled=False; Kuka.MoveDataPtpName=PDAT19; Kuka.VelocityPtp=100; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SPTP
;ENDFOLD
SPTP XHOME WITH $VEL_AXIS[1] = SVEL_JOINT(100.0), $TOOL = STOOL2(FHOME), $BASE = SBASE(FHOME.BASE_NO), $IPO_MODE = SIPO_MODE(FHOME.IPO_FRAME), $LOAD = SLOAD(FHOME.TOOL_NO), $ACC_AXIS[1] = SACC_JOINT(PPDAT19), $APO = SAPO_PTP(PPDAT19), $GEAR_JERK[1] = SGEAR_JERK(PPDAT19), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
.
.
.
.
ENDSWITCH
RESUME
END
Display More
So you get a lot of control over what the program does, but you also have to structure your programs, subroutines, and interrupts very carefully, with this in mind.
Actually after implementing it there seems to be a few issues,
It has a $advance error and $gearstop error on the interrupt program, Is the interrupt program suppose to formatted differently than a normal subprogram?
Cool so it works exactly how i thought it would
KRC4
KSS 8.5.8
I have a fairly simple question that I seem to cant find clarification in the manual. When the Interrupt condition is completed and it resumes, does it go to the program the interrupt was declared on or the program that was interrupted?
For my situation the Kuka has one Main program and a multitude of subroutines, so what I want to do I would declare the Interrupt in the main and then signal an interrupt the in a subprogram the interrupt calls the Homing and goes back to the main routine after the interrupt is complete. Is this correct to assume this is how Interrupt and Resume work or would I need different style of logic?
if variables are global and not write protected, sure...
So a simple IF than statement in SPS.sub should work?
KUKA KRC4 KSS 8.5.8
I was wondering if it's possible to have a background task so everytime im at the home certain variables will turn off or on. I was hoping both an INT and $OUT could be reconfigured. I figured if this would be possible that it should be done in the SPS.Sub. The idea is to clear a few bits and outputs when the robot was in the home position.
In my opinion this is not a good idea. Every time I see such a program I get high blood pressure, In case of optimization or reteaching some positions it is impossible to switch between operating modes without resetting the whole station. For me that is a nogo.
Yeah I decided to go with an external PLC sending the signal so its in External Run mode and Home it calls the Cell
The "Init" section of the SPS only runs once, when the robot boots (or when someone cancels and then re-starts the SPS from the pendant). The IF $MODE_OP==#EX checks to see if the robot is being booted in Automatic External mode, and if it is, then it uses $CMD RUN to select CELL.SRC. This way, if the robot was rebooted in Teach mode, CELL does not get selected automatically.
Okay and if it was booted up in Automatic External it calls it, But when im switching from T1 to Automatic External it doesnt call it. In that case I could send a signal from my PLC and have it call it to act in the same way.
And I have it in place that it doesn't run unless its at 1 of the Home positions. I'm more worried about Estops since it's more likely that an operator would hit one of those than a power failure.
What are you trying to accomplish? Normally, Cancelling an active program and re-selecting the "main" program (to begin running from the first line) is pretty rare, except under special circumstances.
The robot is tending a mold so all I want to do is make sure the robot doesnt ram into the mold by trying to restart the program completely. So I totally agree that what I'm doing is not what I want it to do.
CELL calls in such a way that, when they end, the robot is in a safe location and condition (typically at Home position) that any other CELL-called program is safe to begin.
As of right now this is how I programmed it.
Pretty much all I want to know how is the best practice to call the Cell of the Robot in the First go. Does something need to be done in the SPS to actually run Cell or will it always just pick Cell. If not I think the best way of doing that is to call the main Cell program is to anytime it turned to EXT run mode it calls that program. Then I send the remote start signal to actually run the program when the user presses start on the HMI.
The program that was selected during Estop will be continued by a signal change from 0 to 1 at $in[63].
There is no need to select it again.
The estop only stops the program, he doesn't cancel it.
Okay Yeah that makes sense but when in good practice should that program be called or selected to run. Should it be from an external or something else.
I guess i'm confused because no matter what a normal start up would call the program. Unless I could have it so anytime the Robot goes in EXT mode it calls the program automatically. Then I use the same cycle start principle to run the program.
If you want to continue the program from the point it was stopped by the E-stop, just delete the cwrite statement in your first version of Sps.sub, attach in[63] to ext_start, and you are done.
This cwrite thing you only need if you want to restart the program from beginning.
Really then how does it call the program externally so it can run?
So Something more like this?
IF($IN[26] == TRUE) THEN
CWRITE($CMD,STAT,MODE,"RUN /R1/CELL()")
ENDIF
IF($IN[27] == TRUE) THEN
CWRITE($CMD,STAT,MODE,"STOP 1")
ENDIF
IF($IN[28] == TRUE) THEN
CWRITE($CMD,STAT,MODE,"CANCEL 1")
ENDIF
Where IN[26] is cycle start
In[27] = Stop/Estop
In[28] Cancel
What I'm confused about how this pauses the program and makes it resume when an operator hits cycle start after an estop.
Thanks again
The manual you're referencing is that the one with all of the start charts?
Also for the CMD_Stop, CMD_Cancel and CMD Run. These should probably have different bits for each one correct? Is there a manual to read further on the function of each of these actions?