hexagon logo

Programming to allow for a choice between 2 different Auto Calibrate commands

This is relatively simple code, but new users might find it helpful. I was recently asked if I could help automate a company’s probe calibration routine and write a program that would run one of 2 Auto Calibrate routines: one for “yes, the cal sphere has moved,” and “no, the cal sphere has not moved.”

First question: Do you want to calibrate the probe?

Second question: Has the calibration sphere moved?

STARTUP    =ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES
            ALIGNMENT/END
            MODE/DCC
            FORMAT/TEXT,OPTIONS, ,HEADINGS,SYMBOLS, ;NOM,TOL,MEAS,DEV,OUTTOL, ,
            LOADPROBE/3X20MM
            TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=0
C2         =COMMENT/YESNO,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
            Do you want to calibrate?
            IF/C2.INPUT=="YES"
C1           =COMMENT/YESNO,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
              Has the cal sphere moved?
              IF/C1.INPUT=="YES"
                COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
                Take a manual hit to locate cal sphere
                AUTOCALIBRATE/PROBE, PARAMETER_SET=ALL-TIPS-WITH-DEFAULTS, QUALTOOL_MOVED=YES_MANUAL,
                              SHOW_SUMMARY=NO, OVERWRITE_RESULTSFILE=NO
              END_IF/
              ELSE_IF/C1.INPUT=="NO"
                AUTOCALIBRATE/PROBE, PARAMETER_SET=ALL-TIPS-WITH-DEFAULTS, QUALTOOL_MOVED=NO,
                              SHOW_SUMMARY=NO, OVERWRITE_RESULTSFILE=NO
              END_ELSEIF/
            END_IF/
            COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
            PRESS "OK" TO BEGIN CMM PROGRAM
            MODE/DCC
Parents
  • For this particular customer, I was focused more on the use of the IF/END_IF and ELSE_IF/END_ELSEIF commands to allow their operators to choose one of two options. I also added the option to not run any probe calibration at all, at their request.

    I posted this code in Tips & Tricks only to provide an example of how to program to either run “THIS” or “THAT.” So, for that reason, I wasn’t overly concerned with the details of the actual calibration – I just inserted the Auto Calibration command where I needed it.

    Having said all that, I agree with all the comments made on the BIG topic of probe calibration. The new Level 2 curriculum has expanded this topic greatly and addresses the use of a Master Probe when employing multiple Auto Calibration commands. The page from the training manual is shown below .



    I usually expand on the curriculum in this area when I teach Level 2 and show how you can use the PROBEDATA command with a variable (and a bunch of other code) to flag a failed calibration. I made a tutorial video on this a few years ago. You can watch it here if you’re interested: https://blog.cmmxyz.com/blog/displaying-autocalibration-results


Reply
  • For this particular customer, I was focused more on the use of the IF/END_IF and ELSE_IF/END_ELSEIF commands to allow their operators to choose one of two options. I also added the option to not run any probe calibration at all, at their request.

    I posted this code in Tips & Tricks only to provide an example of how to program to either run “THIS” or “THAT.” So, for that reason, I wasn’t overly concerned with the details of the actual calibration – I just inserted the Auto Calibration command where I needed it.

    Having said all that, I agree with all the comments made on the BIG topic of probe calibration. The new Level 2 curriculum has expanded this topic greatly and addresses the use of a Master Probe when employing multiple Auto Calibration commands. The page from the training manual is shown below .



    I usually expand on the curriculum in this area when I teach Level 2 and show how you can use the PROBEDATA command with a variable (and a bunch of other code) to flag a failed calibration. I made a tutorial video on this a few years ago. You can watch it here if you’re interested: https://blog.cmmxyz.com/blog/displaying-autocalibration-results


Children
No Data