Creating a program that loops.

  • Heya all,


    Hope this thread finds you all happy and healthy!


    Just a quick question, but before that here are my robot details: using an Motoman XRC, this robot is primarily used to quality test Product Development goods (hinge tests etc).


    I've been asked to write a program that loops on itself for a period of time. I have never done this in any of my programming experience.


    I've been getting confused at work as the people I asked have given me multiple ways of accomplishing the task but without an in-depth explanation. "Just use labels" was one direction I was given, I've never used labels prior to this either.


    This is what I have so far from some research online:


    "NOP

    SHKST <1>

    <SPEED SETTINGS>

    TOOLON

    *LOOP

    MOVJ

    MOVL

    MOVL

    MOVJ

    *JUMP LOOP IF PULSE OT#1 T=60

    MOVJ

    TOOLOFF

    MOVJ"


    So, from my VERY basic understanding of this is that the motoman will complete the program and loop the program for 60 seconds correct then go home and turn the tool off?


    Thank you guys for any and all the support I might get for this. ^^

  • AD
    • Helpful

    On the XRC due to age, there is not an easy way to do this. The time amount would be over 60 seconds. How much over depends on where the cursor is at the 60 second mark. The robot job is sequential, do this, then this, then this. If the cursor was 1 line above the cursor at the 60 second mark then the JUMP would be false and bail out at 60 seconds and a hundredth or so. If the cursor was at the *LABEL then at the time would be 60 seconds plus how ever long the instructions took to execute down to the JUMP.


    Probably the only true way to make this work repeatably very close to 60 seconds is with the INTERRUPT job option and possibly the CONCURRENT job option.


    The way you have it written is close. The PULSE would need to be above the *LABEL. The JUMP would be IF OT#( )=OFF.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now