Thanks for the reply but still doesn't seem to want to function properly. The same bit of code works fine if looped within a program but as soon as you put it into the interrrupt sub-program it does not jog acording to TCP.
Posts by rbreker
-
-
Hopefully someone can tell me what I'm doing wrong here. We use a KUKA bot to do mig welding in our plant. It is equiped with a torch collision clutch that triggers a BRAKE F when the welding torch comes in contact with the workpiece. I have been trying to program the collision interrupt sub-program so that if the torch hits something and triggers the interrupt, the opperator is able to back the torch out through the -X direction of the TCP coordinate system. This will eliminate the need for the Opperator to use the KCP. Here is my code so far -
DEF SAFETY_HOLDER( )
GLOBAL INTERRUPT OFF 5
BRAKE F ;Fast brakeWHILE $IN[5]==FALSE ;Input for collision box
IF ($IN[264]==TRUE)THEN ;Button on input panel
LIN_REL {X-10} #TOOL
ENDIF
ENDWHILEWAIT SEC 0
HALT
wait for ($IN[5]==TRUE)
GLOBAL INTERRUPT ON 5END
Even with the #TOOL command though, my robot seems to want to move according to the base when the input is pressed. I've used a similar code to automatically back the torch out in the event of an arc start failure but for some reason I am having no luck here. What am I doing wrong here?
Thanks!
-
Thanks SkyeFire!
I was making a stupid mistake but atleast now I know where these templates are located. The cause of my problem was that when you create a new module, there is the option to create a standard module (vorgabe.src is used) or an arctech module. It's been so long since I've had to create a weld program from scratch that I completely forgot about these options and just selected the standard module option.
I always appreciate the weath of knowledge you are willing to share!
-
Latey I have been having issues with the INI fold of new modules. The initialization code for technology packages used by my robot (arctech etc..) don't seem to be automatically added like in the past. Any ideas as to why this would be? Where is the INI configuration stored?
Thanks!
-
It is declared as a REAL variable, hence the subject of the thread. I'll try like this 60000.0 and see if that works.
-
I've been trying to set up some variables that log things like the last cycle time, average cycle times etc. Here is a simple example:
$TIMER_STOP[11]=TRUE ;STOP CURRENT SEG. TOTAL TIMER
TIME_LAST_SEG=$TIMER[11]/60000 ;LOG LAST SEG. TOTALThe problem I have been having is with the division to convert from milliseconds to minutes. The value of the variable always comes out to be rounded to the nearest minute. This is not really helpful when every second counts.
Is there something I am doing wrong or is this just the way this is handled in KRL?
Thanks