hexagon logo

Coordinate System Control for Loops.

I am looking for guidance on how coordinate systems interact with loops. I can get stuff to work but often when I make a change inside the loop my Theoretical positions don't work correctly. As well as looking at Theoretical positions that are not correct for the current zero position but the loop works fine.
At end of each loop I recall starting coordinate system. Not sure if this is correct.
Parents
  • When you have a loop, you execute it, and then try to edit it, if the LOOP COUNT is still relative to the shifted alignment of that quantity.
    Editing a loop after executing with any value other than one will shift all your edited theo's to match THAT qty instance of the current loop count.

    Do yourself a favor, and ALWAYS set the loop count to a static 1, execute BEFORE making a single change (offline or online it doesn't matter, but offline will be "cleaner" as theo's & meas will match).
    voila problem solved.
  • It will complicate your loop syntax a LOT, but I always have an input comment for the quantity of parts to measure...
    That way once you create the routine, someone can load a partial shot or single position for a remeasure, and use the exact same code without having to load dummy parts.
    Here's my qty input syntax (ID10T-proofed validation added Smiley).

    QTYQUESTION=LABEL/
    QTY =COMMENT/INPUT,NO,FULL SCREEN=YES,
    How many parts will you
    load onto the fixture?
    (Hint: input 16 if you are
    running two 8cav shots!)
    IF/QTY.INPUT-INT(QTY.INPUT)<>0 OR !(QTY.INPUT>=1 AND QTY.INPUT<=16)
    COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
    Invalid input! Please input
    a value between 1 and 16.
    GOTO/QTYQUESTION
    END_IF/

    The IF validation makes sure the input is an integer first so alpha or alphanumeric combinations will fail. Then it makes sure that integer is appropriate to what the setup can handle. You don't want someone inputting a value of 90 if you've only got room & designed for for 6 parts, lol.
Reply
  • It will complicate your loop syntax a LOT, but I always have an input comment for the quantity of parts to measure...
    That way once you create the routine, someone can load a partial shot or single position for a remeasure, and use the exact same code without having to load dummy parts.
    Here's my qty input syntax (ID10T-proofed validation added Smiley).

    QTYQUESTION=LABEL/
    QTY =COMMENT/INPUT,NO,FULL SCREEN=YES,
    How many parts will you
    load onto the fixture?
    (Hint: input 16 if you are
    running two 8cav shots!)
    IF/QTY.INPUT-INT(QTY.INPUT)<>0 OR !(QTY.INPUT>=1 AND QTY.INPUT<=16)
    COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
    Invalid input! Please input
    a value between 1 and 16.
    GOTO/QTYQUESTION
    END_IF/

    The IF validation makes sure the input is an integer first so alpha or alphanumeric combinations will fail. Then it makes sure that integer is appropriate to what the setup can handle. You don't want someone inputting a value of 90 if you've only got room & designed for for 6 parts, lol.
Children
No Data