huntingpart programe - plz HELP

  • 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.? :help: I need to goto Point framehunter with +4 zaxis. Is this OK or ? :help:
    2)The area where I have the IF condition for S2. IS IT CORRECT. or should I have to give in huntframe()? :help:
    3) Is the programme is correct for hunting frame or do you have any better IDEA? :help:
    Thank you :merci:

  • Hi knowledgesharing
    There is a mistake in the program. Search move from p5 to p6 must be in subprogram, because command RESUME stop execute this subprogram and can be use only in subprogram. Then robot will go to framehunted point.


    If you start your program on a real robot it will be has error.


    You could find sample search program in manual on 132 page.
    http://www.robot-forum.com/rob…action=dlattach;attach=74


    But I don't understand why you use S1 sensor in the interrupt, if used S2 for search a metal frame.

  • INTERUPT DECL 2 WHEN S1=TRUE DO Huntframe()
    PTP P3
    LIN P4


    INTERUPT ON 2
    HUNTMOVE()
    framehunted.z = framehunted.z + 4
    LIN framehunted
    FETCH() ; A sub program for fetching
    .
    .
    .
    END


    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


    DEF HUNTMOVE()
    LIN P5
    WAIT 0 SEC
    If S2==TRUE THEN ; If my robot travels till to S2 then It should stop.
    HALT
    END IF
    LIN P6
    WAIT 0SEC
    END


    Is this OK? Now will it move to framehunted or...?
    Forgeur : My s1 sensor is on the gripper for part searching and S2 sensor is near to floor for filling the metalframe and stoping the robot.
    Thank you

  • Depending on the speed of your search movement, and if you are using the fast input or not, it may be an idea to used a fixed $ov_pro as the extra 4mm of movement could be variable.


    Just an observation. :smiling_face:



    Sent using Tapatalk 4

Advertising from our partners