Flow control commands

  • Filter
  • Time
  • Show
Clear All
new posts

  • Flow control commands

    Hello, I have an easy one for the experts. I’m looking to add a goto command (I think). I want to ask the question at the beginning of the program “does this part have the 8mm hole?” If answered “yes” it will run the program as normal. If no it will skip that block where it measures that hole. Could someone help me with the code?

  • #2
    You just have to add a label at the end of the block that you want to skip. Be carefull about move to clear plane or clear point.
    Then, after the comment, insert
    IF/ C1.INPUT=="NO"
    GOTO L1
    END IF

    You could also decrease the speed before the hole measurement, in case of the operator gave the bad answer !


    • #3
      YES or NO Comment. IF/ END_IF. Like Jeffery said make sure you have some clearance move or something before and/or after so it can continue through the program, no real need for a GOTO command.

      Is 8 MM Hole There?[/COLOR]
      START ANG=0,END ANG=360
      ANGLE VEC=<1,0,0>
      (In Memory of my Loving wife, "Ronda" who I lost March 7, 2016. I love you baby.)
      They say "Nobody's Perfect." I must be Nobody.


      • Jay_Q
        Jay_Q commented
        Editing a comment
        Never mind I got it. Thanks for the idea!

      • A-machine-insp
        A-machine-insp commented
        Editing a comment
        Jay_Q I dont remember which programs I have that use it but what I do is:
        C1 =YESNO (comment parameters here)
        Does part have tooling tabs attached?

        Ask operator if tabs are attached. The first assignment sets OPTOGGLE to "NONE". If the operator selects "NO" then the program will run the IF/END_IF comment assigning OPTOGGLE to "BOTH". All you need to do is set the output on the dimensions you want to toggle on and off to OPTOGGLE. Easiest way to do that is put the cursor somewhere in "OUTPUT" then hit tab and that will highlight "BOTH", then just type OPTOGGLE.

      • Jay_Q
        Jay_Q commented
        Editing a comment
        Awesome, thanks

    • #4
      Or get real guru like and have the CMM attempt to take a point at the center of the hole. If the point is taken then skip to the next feature. If the point is not taken because there's a hole, then use an ON ERROR command to go to the Auto Circle. This takes the operator completely out of it and probably save a few styli and maybe a TP 20. Even the best of us have been known to hit the wrong key.


      • JEFMAN
        JEFMAN commented
        Editing a comment
        Very clean, very nice !

      • Jay_Q
        Jay_Q commented
        Editing a comment
        Kingsld1, what if it was a small hole (.080”) that you are checking w/ a .040” probe that had potential to be off location .100” in either direction? So one center target point wouldn’t work. I currently use find hole (center). But if the hole wasn’t there can you still use a ON ERROR command with find hole to take the operator out of it? So if it doesn’t find the hole instead of asking to read the position it will just skip it?

    • #5
      This complicates things considerably.
      Yes you can use ON ERROR with Auto Circles. The default would be to skip it which is probably not what you want. In Theory, some really complicated code could be written to attempt measuring the hole in several places but it would be really messy to write and maintain. Is there a feature that you could use the "relative to" option in the Auto Circle dialog to give you a better shot at hitting the hole? Something relatively large that the probe hits every time that is put in at the same time as the small hole?


      • Jay_Q
        Jay_Q commented
        Editing a comment
        That small hole is put in on a 1/4 tab it’s just for a safety wire or something it has no location on the print just a minimum wall thickness on that tab. The machinist just eyeball it and drill it by hand. And it’s not always in the part when we first check it because the can put it in at anytime. I do pick up that tab with a point on the face and on the side for relative measure but I haven’t had a chance to try it . My thoughts was find hole, but then on this thread talking about being able to make it fully automated without human error sounded nice.

    Related Topics