Hi,
Sceanario:
I am searching(wanna depalletize) for a metal frame which is palletized vertically. I am trying to explain with a small rough figure.
Point P5 is above and from here my robot moves down(zaxis).
I am having a sensor S1 in griper AND Sensor S2 for checking the metal frame is there.
Point P6 is below my metal frames
-p5
-
-
-----------------------
-----------------------
S2 -----------------------
-------------p6----------
My program environment: (wrote only the important part only, not all)
INTERUPT DECL 2 WHEN S1=TRUE DO Huntframe()
PTP P3
LIN P4
LIN P5
INTERUPT ON 2
WAIT 0 SEC
If S2==TRUE THEN ; If my robot travels till to S2 then It should stop.
HALT
END IF
LIN P6
framehunted.z = framehunted.z + 4
LIN framehunted
FETCH() ; A sub program for fetching
DEF huntframe()
INTERUPT OFF 2
BRAKE
framehunted = $POS_INT ;framehunted=E6pos
RESUME
END
DEF Fetch()
WAIT 0SEC
ZYLINDERFETCH() ; A subprogram for fetching my metal frame.
END
My question : The robot will travel to P4 then to P5 Then the interupt will be ON while moving to point P6.
1)AFTER RESUMING FROM THE INTERUPT WILL IT GO TO POINT FRAMEHUNTER OR TO THE POINT P6.? I need to goto Point framehunter with +4 zaxis. Is this OK or ?
2)The area where I have the IF condition for S2. IS IT CORRECT. or should I have to give in huntframe()?
3) Is the programme is correct for hunting frame or do you have any better IDEA?
Thank you