Easy Looping Question (I Hope)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Easy Looping Question (I Hope)

    Good afternoon everyone,

    This should be an easy question with hopefully an even easier solution, but with the day ive had today I'm done dealing with the demon so figured id save time and just come on here and ask.....

    ANYWAYS, i have a program that i am using a loop that loops 4 times so the operator can measure 4 parts, so at the end of the loop the last thing i have is a comment to "load next part." How can i set this up in such a way that after the 4th part (the last part) it does not prompt the operator to "load next part"again. As it is now the they would measure their 4 parts and then that "load next part" comment would come up a 4th time, except the program would just end after that. I feel like this will lead to confusion. I hope my question makes sense and somebody can help me out!

  • #2
    Use input comments at the beginning to ask how many parts are being ran. Assign variables to to the inputs and replace the number of loops with the variable...
    Sheffield Endeavor3 9.20.8, Tesastar-SM, Leitz LSP-X1s & LSP-X1M, PCDMIS 2011 MR1

    Comment


    • #3
      If there's a loop counter I don't know about then this would simplify this.

      But, what I do is before the loop I define a variable and then increase it with each iteration to use it as a counter
      basically

      ASSIGN/L=1
      LOOP/START
      ~~~PROGRAM~~~~
      IF L<4
      COMMENT/OPERATOR
      LOAD NEXT PART!
      END_IF
      ASSIGN/L=L+1
      LOOP/END

      This way on the final iteration the IF command won't trigger

      Comment


      • angerji
        angerji commented
        Editing a comment
        Thank you, that worked exactly how i wanted it to.

    Related Topics

    Collapse

    Working...
    X