Yes.
Cool.
Anyway, I actually changed it back to what panic mode was telling, so I am using a frame that I return. I think in this way, the code is cleaner, so you can see more what is returned...
Yes.
Cool.
Anyway, I actually changed it back to what panic mode was telling, so I am using a frame that I return. I think in this way, the code is cleaner, so you can see more what is returned...
Sorry I do net get this remark. I do not see anything here that requires creation of an dat file. What do you mean by this?
BTW you can also use arrays as OUT parameters so you can combine a,b,c into a single parameter.
Fubini
Hi Fubini.
Ahh, perhaps it is me that is making a mistake.
So when I make a new sub function, I either make a "Module", which gives a .src and .dat file, and the default is
DEF someModuleName()
INI
END
But when I make a "Function", this only gives me .src and the default is
DEFFCT BOOL someFunction()
RETURN TRUE
ENDFCT
So basically:
I can just make a "Module", and then delete the .dat file that is automatically generated?
Hi PanicMode and Fubini.
Thanks for your reply. Perhaps this confuse me a bit, but in order to follow Fubini's sugestions, would the code have to be like this?
Add your desired outputs to function parameter list and set them to call by reference using :out.
Fubini
Please, just write how you would do that...
Hi guys.
I was looking into the System Integrator manual, but could not find anything regarding returning an array.
So my code below is a simple LineEquation.src which should based on input, x1,x2,y1,y2 returns the line with the coefficients of ay + bx + c = 0.
In case I will make the LineEquation as returning just a,b like y = ax + b, I still need to figure out how to return an array.
Below WorkVisual exspect that I index what I want to return, but I would like to return the [a,b,c].
Hi all.
Thanks for all the answers. I tried following @SkyeFire's suggestion with the SLIN-SLIN-.... SPTP....-SLIN-SLIN method
It does the trick for now, so I would say this is something that I will take with me into the long-term testing process.
So thanks for your comments and answers one again guys
Hi all out there.
So I have a bit of issue regarding a SLIN movement.
First of all: It is not possible for me to carry out a SPTP, because I need to ensure that the tool of the robot is aligned parallel to the floor. Otherwise I risk that the tools TCP will change orientation in axis B and C, which will increase the risk of dropping objects on the floor.
Also: I can not move the conveyor and robot at the moment.
The robot picks up object at the conveyor in the position below in the left picture.
Then the robot moves in SLIN a bit up and away from the conveyor.
Then the robot needs to move to the last position, which is shown in the right side of the pictures below.
So what I have is as followed:
- I can not just use SPTP after I have lifted up the fork tool, because this will make the tool starting to tilt in B and C axis (robot controller most optimum path), which will however tilt whatever the robot is carrying with the tool, and this will risk that I will drop the objects on the floor.
- If I simply just juse SLIN, I will encounter the singularities in axis 4, i.e the robots TCP stands still while axis 4 rotates a lot.
- What I consulting in the manual, was that I could use REL for axis 5. This works in jogging mode, i.e. I came through the singularity simply by increasing angle of axis 5, but I tried teaching a position just before singularity, then jogged axis 5 till I it was OK, then made a new position, but when the robot controller executes the program, the singularities still occurred with SLIN. Using SPTP the robot started to tilt the tool. The manual was also referring to that using REL could be potential bad, because if the robot program is somehow interrupted, the robot do not know where it is, and therefore e.g. REL A5 180 degree could lead to that the axis 5 will self-collide, because the robot just start moving axis 5 180 degree and dont take into account the absolute angle. However, I could somehow solved this with some method in a loop function, where I for each cycle ensure that I am on the track of moving towards the axis axis position, but that would perhaps be a bit complicated?
At the moment my solution is to go "down-in-the-valley" movement, so I literally move away from the singularity. I.e. the robot will from the conveyor move the tool down towards the floor, so the angles of the robot are better and hence I dont see the stress and singularity. However it is a bit of detour and therefore the cycle time is still the same as if I was choosing the direct path with singularities plus that it just looks a bit weird.
So is there a way to make a SPTP movement, but with constrains on B and C movement of TCP?
Or is there an totally another approach I should go for?
Hope this thread is not too confusing
Hi guys. Something with the approximation is still a bit confusing for me.
When I am looking in the manual, KSS_87_en_pdf, section 10.3.6, page 447, my positions should be approximated by userfined radius. As I read the manual, I understand that I can set the $APO.CDIS to how large the approximation circle should be. However, setting the values from default 500 down to 200 mm or 5 mm or 0.5mm, I dont see any change when I am executing my robot program.
I can of cause remove the C_DIS in e.g. below, but then I am back to the jerky motions for the SLIN. So the code below do not have really any inpact on approximation. The reason for why I am using SLIN {offsetting} : myPostion is to safe having many different positions. Then I think the code is more cleaner and easier to understand, because you can look into the code and see: "Ahh, so the robot moves to the standard approach poistion and then move down 300 mm in the Z direction, e.g. It would be harder to understand if it was just P1, P2 or other names...
The whole program is shown below:
; Setting the approximation in mm
$APO.CDIS = 0.5
SWITCH GetColorOfLiftedStack()
;// If green
CASE 1
nhandle = Set_KrlMsg (#notify, greenStackmessage, mypar[], myoptions)
;FOLD SLIN placeStack1 Vel=2 m/s CPDAT01 Tool[3]:ForkCenterOfBox Base[4]:EUpalletNEW ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=placeStack1; Kuka.BlendingEnabled=False; Kuka.MoveDataName=CPDAT01; Kuka.VelocityPath=2; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SLIN
;ENDFOLD
SLIN XplaceStack1 WITH $VEL = SVEL_CP(2.0, , LCPDAT01), $TOOL = STOOL2(FplaceStack1), $BASE = SBASE(FplaceStack1.BASE_NO), $IPO_MODE = SIPO_MODE(FplaceStack1.IPO_FRAME), $LOAD = SLOAD(FplaceStack1.TOOL_NO), $ACC = SACC_CP(LCPDAT01), $ORI_TYPE = SORI_TYP(LCPDAT01), $APO = SAPO(LCPDAT01), $JERK = SJERK(LCPDAT01), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
;/ Move down a bit when having a green stack --> It is here, where I see that the C_DIS with different radius do not have any changes.
SLIN {X 0,Y 0,Z -300,A 0,B 0, C 0}:XplaceStack1 C_DIS
;/ Move out to prepare to move to stack1home pos --> It is here, where I see that the C_DIS with different radius do not have any changes.
SLIN {X -500,Y 0,Z -300,A 0,B 0, C 0}:XplaceStack1 C_DIS
;// If blue
CASE 2
nhandle = Set_KrlMsg (#notify, blueStackmessage, mypar[], myoptions)
;FOLD SLIN placeStack1 Vel=2 m/s CPDAT01 Tool[3]:ForkCenterOfBox Base[4]:EUpalletNEW ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=placeStack1; Kuka.BlendingEnabled=False; Kuka.MoveDataName=CPDAT01; Kuka.VelocityPath=2; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SLIN
;ENDFOLD
SLIN XplaceStack1 WITH $VEL = SVEL_CP(2.0, , LCPDAT01), $TOOL = STOOL2(FplaceStack1), $BASE = SBASE(FplaceStack1.BASE_NO), $IPO_MODE = SIPO_MODE(FplaceStack1.IPO_FRAME), $LOAD = SLOAD(FplaceStack1.TOOL_NO), $ACC = SACC_CP(LCPDAT01), $ORI_TYPE = SORI_TYP(LCPDAT01), $APO = SAPO(LCPDAT01), $JERK = SJERK(LCPDAT01), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
;/ Move down a bit when having a blue stack --> It is here, where I see that the C_DIS with different radius do not have any changes.
SLIN {X 0,Y 0,Z -200,A 0,B 0, C 0}:XplaceStack1 C_DIS
;/ Move out to prepare to move to stack1home pos --> It is here, where I see that the C_DIS with different radius do not have any changes.
SLIN {X -500,Y 0,Z -200,A 0,B 0, C 0}:XplaceStack1 C_DIS
;// If red
CASE 3
nhandle = Set_KrlMsg (#notify, redStackmessage, mypar[], myoptions)
;FOLD SLIN placeStack1 Vel=2 m/s CPDAT01 Tool[3]:ForkCenterOfBox Base[4]:EUpalletNEW ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=placeStack1; Kuka.BlendingEnabled=False; Kuka.MoveDataName=CPDAT01; Kuka.VelocityPath=2; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SLIN
;ENDFOLD
SLIN XplaceStack1 WITH $VEL = SVEL_CP(2.0, , LCPDAT01), $TOOL = STOOL2(FplaceStack1), $BASE = SBASE(FplaceStack1.BASE_NO), $IPO_MODE = SIPO_MODE(FplaceStack1.IPO_FRAME), $LOAD = SLOAD(FplaceStack1.TOOL_NO), $ACC = SACC_CP(LCPDAT01), $ORI_TYPE = SORI_TYP(LCPDAT01), $APO = SAPO(LCPDAT01), $JERK = SJERK(LCPDAT01), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
;/ Move down a bit when having a red stack -->It is here, where I see that the C_DIS with different radius do not have any changes.
SLIN {X 0,Y 0,Z -200,A 0,B 0, C 0}:XplaceStack1 C_DIS
;/ Move out to prepare to move to stack1home pos --> It is here, where I see that the C_DIS with different radius do not have any changes.
SLIN {X -500,Y 0,Z -200,A 0,B 0, C 0}:XplaceStack1 C_DIS
;// If yellow
CASE 4
nhandle = Set_KrlMsg (#notify, yellowStackmessage, mypar[], myoptions)
;FOLD SLIN placeStack1 Vel=2 m/s CPDAT01 Tool[3]:ForkCenterOfBox Base[4]:EUpalletNEW ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=placeStack1; Kuka.BlendingEnabled=False; Kuka.MoveDataName=CPDAT01; Kuka.VelocityPath=2; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SLIN
;ENDFOLD
SLIN XplaceStack1 WITH $VEL = SVEL_CP(2.0, , LCPDAT01), $TOOL = STOOL2(FplaceStack1), $BASE = SBASE(FplaceStack1.BASE_NO), $IPO_MODE = SIPO_MODE(FplaceStack1.IPO_FRAME), $LOAD = SLOAD(FplaceStack1.TOOL_NO), $ACC = SACC_CP(LCPDAT01), $ORI_TYPE = SORI_TYP(LCPDAT01), $APO = SAPO(LCPDAT01), $JERK = SJERK(LCPDAT01), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
;/ Move down a bit when having a yellow stack --> It is here, where I see that the C_DIS with different radius do not have any changes.
SLIN {X 0,Y 0,Z -100,A 0,B 0, C 0}:XplaceStack1 C_DIS
;/ Move out to prepare to move to stack1home pos --> It is here, where I see that the C_DIS with different radius do not have any changes.
SLIN {X -500,Y 0,Z -100,A 0,B 0, C 0}:XplaceStack1 C_DIS
;// Opps, something is not right.
DEFAULT
ENDSWITCH
Display More
Hi all out there.
So I having a bit of issues with these rapid stopping motions, which is caused because it is not possible for the advance run pointer to approximate where the next motion is. I was reading through the forum regarding approximation, but I really did not find the thread that could help me further, so therefore this new one.
And sorry for the inline form below. I dont know if this is something that is useful or rather bad to see. Anyway, my question for avoid this jerky movements is of couse to use CONT. However even at the default 500mm of approximation, I get warning on the teach-pendant, like: "Sequence of statement that cannot be approximated". The SPTP motion to position OutboundGreenApp is with the CONT from the inline form, which is also stated at the end of the code with C_Spl.
; Move to home position for stack 1.
;FOLD SPTP stack1home Vel=100 % PDAT13 Tool[3]:ForkCenterOfBox Base[4]:EUpalletNEW ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=stack1home; Kuka.BlendingEnabled=False; Kuka.MoveDataPtpName=PDAT13; Kuka.VelocityPtp=100; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SPTP
;ENDFOLD
SPTP Xstack1home WITH $VEL_AXIS[1] = SVEL_JOINT(100.0), $TOOL = STOOL2(Fstack1home), $BASE = SBASE(Fstack1home.BASE_NO), $IPO_MODE = SIPO_MODE(Fstack1home.IPO_FRAME), $LOAD = SLOAD(Fstack1home.TOOL_NO), $ACC_AXIS[1] = SACC_JOINT(PPDAT13), $APO = SAPO_PTP(PPDAT13), $GEAR_JERK[1] = SGEAR_JERK(PPDAT13), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
; Using the cycle flag to check the analog input. The value is without stack equal to 10.0, but the program sees it as 1.0.
; Therefore the values is between 0.0 and 1.0. If the value is equal to 1.0, there is no stacks.
$CYCFLAG[1]= ($ANIN[1] < 1.0)
;// Interrupt instruction -- Using the WITH BRAKE in in oreder to stop the break function right away.
; Removed the WITH BRAKE in the DECL below
INTERRUPT DECL 21 WHEN $CYCFLAG[1] DO ISR_StackIsFound()
;From home position, go to appoach position, as if the stack was green.
;FOLD SPTP OutboundGreenApp CONT Vel=100 % PDAT1 Tool[3]:ForkCenterOfBox Base[4]:EUpalletNEW ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=OutboundGreenApp; Kuka.BlendingEnabled=True; Kuka.MoveDataPtpName=PDAT1; Kuka.VelocityPtp=100; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SPTP
;ENDFOLD
SPTP XOutboundGreenApp WITH $VEL_AXIS[1] = SVEL_JOINT(100.0), $TOOL = STOOL2(FOutboundGreenApp), $BASE = SBASE(FOutboundGreenApp.BASE_NO), $IPO_MODE = SIPO_MODE(FOutboundGreenApp.IPO_FRAME), $LOAD = SLOAD(FOutboundGreenApp.TOOL_NO), $ACC_AXIS[1] = SACC_JOINT(PPDAT1), $APO = SAPO_PTP(PPDAT1), $GEAR_JERK[1] = SGEAR_JERK(PPDAT1), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0) C_Spl
;ENDFOLD
; Now from the approach position, the robot will continue to move in its tools X positive direction.
SeachForStackAtOutbound()
Display More
So basically I already get the error before reaching to the function "SearchForStackAtOutbound".
DEF SeachForStackAtOutbound ( )
$OUT[15] = TRUE
INTERRUPT ON 21
$OUT[16] = TRUE
;FOLD SPTP test Vel=100 % PDAT1 Tool[3]:ForkCenterOfBox Base[4]:EUpalletNEW ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=test; Kuka.BlendingEnabled=False; Kuka.MoveDataPtpName=PDAT1; Kuka.VelocityPtp=100; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SPTP
;ENDFOLD
;SPTP Xtest WITH $VEL_AXIS[1] = SVEL_JOINT(100.0), $TOOL = STOOL2(Ftest), $BASE = SBASE(Ftest.BASE_NO), $IPO_MODE = SIPO_MODE(Ftest.IPO_FRAME), $LOAD = SLOAD(Ftest.TOOL_NO), $ACC_AXIS[1] = SACC_JOINT(PPDAT1), $APO = SAPO_PTP(PPDAT1), $GEAR_JERK[1] = SGEAR_JERK(PPDAT1), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
;FOLD SLIN OutboundMaxReachPos Vel=2 m/s CPDAT3 Tool[3]:ForkCenterOfBox Base[4]:EUpalletNEW ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=OutboundMaxReachPos; Kuka.BlendingEnabled=False; Kuka.MoveDataName=CPDAT3; Kuka.VelocityPath=2; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SLIN
;ENDFOLD
SLIN XOutboundMaxReachPos WITH $VEL = SVEL_CP(2.0, , LCPDAT3), $TOOL = STOOL2(FOutboundMaxReachPos), $BASE = SBASE(FOutboundMaxReachPos.BASE_NO), $IPO_MODE = SIPO_MODE(FOutboundMaxReachPos.IPO_FRAME), $LOAD = SLOAD(FOutboundMaxReachPos.TOOL_NO), $ACC = SACC_CP(LCPDAT3), $ORI_TYPE = SORI_TYP(LCPDAT3), $APO = SAPO(LCPDAT3), $JERK = SJERK(LCPDAT3), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
WAIT FOR TRUE
END
Display More
Is it because I need to set the Advance run pointer or reset to 0, by $ADVANCE = 0 or anything else?
Or is it because that I am calling a subfuction, SeachForStackAtOutbound() ?
Should I use different that e.g C_Spl, I.e. like C_DIS?
Or is it something else, that I have missed?
My information of the system is:
panic mode You are the BEST!!!! I removed it like above, and now the ISR is WORKING!!!!
So I gave you a like, but I hope the next people do not make the same mistake by using "Modules" generation instead of "Functions".
ISR_StackIsFound() is an ISR and as such it cannot have INI and inline form motions.
In fact INI and BCO are only needed once - when program is starting. Doing this later on is undesirable in most cases.
So you are saying, that is should just be like this?
Hi panic mode and SkyeFire. First of all, thanks for your effort in trying to make KUKA ISR to a pretty easy topic...
Well... I have spend almost the whole day on looking in the forum, and I am struggling with the error "Instruction $ADVANCE in interrupt inadmissible (Module: BAS Line: 154):
So how it looks in the real world is like this:
- The red cirlce indicates a sensor on the robots tool.
- The blue circle indicates a mock-up with a tri-pod with cardboard sticking out, that is used as trigger for the ISR.
I.e. when the robot starts its search towards the object, which is the mock-up in this example, I would like the robot to stop the movement and drive to home position.
The things that is happening now is that, when the robot starts its seach path and gets to the triggering point, the interrupt is fired, but I get the prompt error of: Error KSSo1425 - Instruction $ADVANCE in interrupt inadmissible
For quick overview, I have three positions:
1) xstack1home. That is a position nearby.
2) xstack1prep. That is the position, which the robot is in, in the attached left side picture.
3) xstackCalib. That is the end search position, where the interrupt will happen between the xstack1prep and xstackCalib.
As a last notice, I was not able to stop the interrupt at the tri-pod cardboard triggering point, unless I in the interrupt decl was using "WITH BRAKE". So if I remove this, the result is that the robot will move from start search position, i.e. xstack1prep to end search position, i.e. xstackCalib (and collide with the mockup) and then throw the error of $ADVANCE.
Lastly, I am pretty sure that this is all about having in control where the advance run pointer is located. I have seen different attempts to "tame the lion/ARP", but I have tried WAIT FOR TRUE, WAIT 0.1, WAIT 0, $ADVANCE = 0, etc.
Please notice, that I am using the $OUT[15-20] as pure debugging. Just for me to know if everything has carried out well.
So I would really appreciate, if there is some clue out there. For reference, the systems information are:
&ACCESS RVP
&REL 1
&PARAM EDITMASK = *
&PARAM TEMPLATE = C:\KRC\Roboter\Template\vorgabe
&PARAM DISKPATH = KRC:\R1\Program
DEF TestISR( )
DECL REAL toolValue
;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
;Just some debugging outputs signal to monitoring the program
$OUT[15] = FALSE
$OUT[16] = FALSE
$OUT[17] = FALSE
$OUT[18] = FALSE
$OUT[19] = FALSE
$OUT[20] = FALSE
toolValue = $ANIN[1]
;ENDFOLD (USER INI)
;ENDFOLD (INI)
; Using the cycle flag to check the analog input. The value is without stack equal to 10.0, but the program sees it as 1.0.
; Therefore the values is between 0.0 and 1.0. If the value is equal to 1.0, there is no stacks.
$CYCFLAG[1]= ($ANIN[1] < 1.0)
;// Interrupt instruction -- Using the WITH BRAKE in in oreder to stop the break function right away.
INTERRUPT WITH BRAKE DECL 21 WHEN $CYCFLAG[1] DO ISR_StackIsFound()
;FOLD SPTP stack1home Vel=100 % PDAT1 Tool[2]:ForkNew Base[4]:EUpalletNEW ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=stack1home; Kuka.BlendingEnabled=False; Kuka.MoveDataPtpName=PDAT1; Kuka.VelocityPtp=100; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SPTP
;ENDFOLD
SPTP Xstack1home WITH $VEL_AXIS[1] = SVEL_JOINT(100.0), $TOOL = STOOL2(Fstack1home), $BASE = SBASE(Fstack1home.BASE_NO), $IPO_MODE = SIPO_MODE(Fstack1home.IPO_FRAME), $LOAD = SLOAD(Fstack1home.TOOL_NO), $ACC_AXIS[1] = SACC_JOINT(PPDAT1), $APO = SAPO_PTP(PPDAT1), $GEAR_JERK[1] = SGEAR_JERK(PPDAT1), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
;FOLD SLIN stack1prep Vel=2 m/s CPDAT2 Tool[2]:ForkNew Base[4]:EUpalletNEW ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=stack1prep; Kuka.BlendingEnabled=False; Kuka.MoveDataName=CPDAT2; Kuka.VelocityPath=2; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SLIN
;ENDFOLD
SLIN Xstack1prep WITH $VEL = SVEL_CP(2.0, , LCPDAT2), $TOOL = STOOL2(Fstack1prep), $BASE = SBASE(Fstack1prep.BASE_NO), $IPO_MODE = SIPO_MODE(Fstack1prep.IPO_FRAME), $LOAD = SLOAD(Fstack1prep.TOOL_NO), $ACC = SACC_CP(LCPDAT2), $ORI_TYPE = SORI_TYP(LCPDAT2), $APO = SAPO(LCPDAT2), $JERK = SJERK(LCPDAT2), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
; execute motion during which Interrupt is expected
SeachForStack()
;The program pointer will jump back to this line
;when the RESUME command in ISR_StackIsFound executes
;That is because the INTERRUPT DECL is in this subroutine
$OUT[20] = TRUE
;FOLD SLIN stack1prep Vel=2 m/s CPDAT2 Tool[2]:ForkNew Base[4]:EUpalletNEW ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=stack1prep; Kuka.BlendingEnabled=False; Kuka.MoveDataName=CPDAT2; Kuka.VelocityPath=2; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SLIN
;ENDFOLD
SLIN Xstack1prep WITH $VEL = SVEL_CP(2.0, , LCPDAT2), $TOOL = STOOL2(Fstack1prep), $BASE = SBASE(Fstack1prep.BASE_NO), $IPO_MODE = SIPO_MODE(Fstack1prep.IPO_FRAME), $LOAD = SLOAD(Fstack1prep.TOOL_NO), $ACC = SACC_CP(LCPDAT2), $ORI_TYPE = SORI_TYP(LCPDAT2), $APO = SAPO(LCPDAT2), $JERK = SJERK(LCPDAT2), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
END
Display More
&ACCESS RVO1
DEF SeachForStack ( )
;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)
$OUT[15] = TRUE
INTERRUPT ON 21
; Do to page 614 in KSS_87_SI_en.pdf, it is required to wait 12ms as minimum
;WAIT SEC 0.1 ; Waiting 100 ms.
$OUT[16] = TRUE
;FOLD SLIN stack1Calib Vel=2 m/s CPDAT3 Tool[2]:ForkNew Base[4]:EUpalletNEW ;%{PE}
;FOLD Parameters ;%{h}
;Params IlfProvider=kukaroboter.basistech.inlineforms.movement.spline; Kuka.IsGlobalPoint=False; Kuka.PointName=stack1; Kuka.BlendingEnabled=False; Kuka.MoveDataName=CPDAT3; Kuka.VelocityPath=2; Kuka.VelocityFieldEnabled=True; Kuka.ColDetectFieldEnabled=True; Kuka.CurrentCDSetIndex=0; Kuka.MovementParameterFieldEnabled=True; IlfCommand=SLIN
;ENDFOLD
SLIN Xstack1Calib WITH $VEL = SVEL_CP(2.0, , LCPDAT3), $TOOL = STOOL2(Fstack1), $BASE = SBASE(Fstack1.BASE_NO), $IPO_MODE = SIPO_MODE(Fstack1.IPO_FRAME), $LOAD = SLOAD(Fstack1.TOOL_NO), $ACC = SACC_CP(LCPDAT3), $ORI_TYPE = SORI_TYP(LCPDAT3), $APO = SAPO(LCPDAT3), $JERK = SJERK(LCPDAT3), $COLLMON_TOL_PRO[1] = USE_CM_PRO_VALUES(0)
;ENDFOLD
; If the interrupt fires, no code below this line will execute
; due to the RESUME command in the ISR
; Instead, the RESUME command will "cancel" the rest of this subroutine
; and jump the program pointer back to one line after where this subroutine was called
; Do to page 614 in KSS_87_SI_en.pdf, it is required to wait 12ms as minimum
;WAIT SEC 0.1 ; Waiting 100 ms.
;WAIT FOR TRUE ;// this is causing the error.
WAIT SEC 0 ;// This is also causing the error of $ADVANCE in interrupt inadmissible.
END
Display More
&ACCESS RV1
DEF ISR_StackIsFound()
;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)
;From KSS_87_SI_en, page 620
INTERRUPT OFF 21
BRAKE
RESUME
END
Display More
So please, let me know if you need any further information. I would strongly apprecirate your support. Thanks in advance