hexagon logo

Yes No Input comments

Is it possible to use a YES/NO comment to branch around a portion of a program? I don't want to have to do any gymnastics to get this done. I have a program that runs sub assemblies and one of these subs sometimes has a bracket on it that I want to skip the measurements on IF it isn't there.

I'm thinking something like

IF C1.INPUT = "NO" then goto XXXXX

I keep getting an "invalid number entered" error.

Thanks,

Bill
Parents
  • Thats whats cool about this Craig. You don't even need a lable. If the condition is false, it goes directly to the END/IF and continues from there. If its ture it runs the code that you would skip if false. It took exactly 3 lines to make this work, the comment, the condition, and the end/if.

    Bill


    I use this all the time with pictures of a part set-up. It asks if the operator would like to see a picture of the set-up. YES and the pic pops up, NO and it skips the pic and goes on it's merry way. Pretty easy.
Reply
  • Thats whats cool about this Craig. You don't even need a lable. If the condition is false, it goes directly to the END/IF and continues from there. If its ture it runs the code that you would skip if false. It took exactly 3 lines to make this work, the comment, the condition, and the end/if.

    Bill


    I use this all the time with pictures of a part set-up. It asks if the operator would like to see a picture of the set-up. YES and the pic pops up, NO and it skips the pic and goes on it's merry way. Pretty easy.
Children
No Data