getting KSS01437 "Reposition" error in my program...can't find any reference to it anywhere. Anyone know what this refers to?
thanks!
getting KSS01437 "Reposition" error in my program...can't find any reference to it anywhere. Anyone know what this refers to?
thanks!
Circumstances? Are you running an interrupt?
yes, using an interrupt -- essentially, want to use state of digital inputs to trigger robot to brake/stop current motion and move smoothly to two locations (loc_a for input 1 high, loc_b for input 2 high, brake and stay put if neither)
along the lines of:
$cycflag[1] = $in[1] exor $in[2]
interrupt decl 1 $cycflag[1] do handler()
while true
lin dest
endwhile
end
def handler()
brake f
if $in[1] and not $in[2] then
dest.z = 100
else
if $in[2] and not $in[1] then
dest.z = -100
else
dest = $pos_act
endif
end
i similarly get the "reposition" error if I try to do something like -
$cycflag[1] = $in[1] exor $in[2]
interrupt decl 1 $cycflag[1] do handler()
interrupt on 1
interrupt decl 2 $in[1]==true do up()
interrupt decl 3 $in[2]==true do down()
while true
endwhile
end
def handler()
if $in[1]==true then
interrupt on 2
interrupt off 1
interrupt off 3
wait sec .012
else
if $in[2]==true then
interrupt on 3
interrupt off 1
interrupt off 2
wait sec .012
else
interrupt off 2
interrupt off 3
endif
endif
end
def up()
lin loc_a
end
def down()
lin loc_b
end
any and all help is much appreciated!
Hi,
you have to reposition to the original path active when the interrupt kicked in. This can be done by e.g. LIN/PTP $POS_INT or LIN/PTP $POS_RET at the end of your interrupt program.
If you do not want to continue where the original program move read about the "RESUME" command.
Fubini
thanks for the reply. As you mention, i don't want to continue where the original program moved. however, using the "RESUME" command at the end of my interrupt seems to be disallowed (or any interrupt for that matter, even in simple test programs...and I believe I am using it in keeping with what I've read about it from the various -- but sparse -- kuka documentation) It always complains about program structure when it hits the resume line. I am unfortunately off-site today so I can't get you the exact error right away, but will be able to soon.
thanks again
k
using RESUME command abandons main programed path. because of that, motions to be abandoned must be:
a) placed into a subroutine (so when abandoned, MAIN program continues)
b) must keep advance pointer there (for example add "WAIT SEC 0" just before end of motion sub that is abandoned).
You also have to prevent the advance run pointer from getting to another motion beyond the interrupted motion.
As a general rule, I do motion-interrupt programs like this:
DEF MainProgram()
DECL BOOL SearchSuccessful
INTERRUPT DECL 33 WHEN $IN[1] DO ISR() ; this is the stack level the pointer will return to once the RESUME command executes
SearchMove(SearchSuccessful)
; On RESUME, pointer will jump to this line
IF SearchSuccessful THEN
; input went True during search motion
ELSE
; input did not go True during search motion
END
DEF SearchMove(InputTripped :OUT)
DECL BOOL InputTripped
InputTripped = FALSE
INTERRUPT ON 33 ; arm interrupt
LIN P1 ; search motion
WAIT FOR TRUE ; break advance pointer
END
DEF ISR ()
; Interrupt Service Routine
INTERRUPT OFF 33 ; prevent "bounce"
BRAKE ; halt motion
RESUME ; terminate motion, jump program pointer back to Main
END
Display More
Using Interrupts with RESUME can be a bit tricky, and requires you to arrange your subroutine structures carefully, as well as controlling the Advance pointer.