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
  • In hindsight, the initial comment of "Would you like to calibrate?" is answered as YES when the individual runs the program, therefore is redundant.
    However, if this is placed at the beginning of each and every program, it MIGHT come in hand.,. although this in and of itself could be considered a "complete" autocalibration program, and doesn't need to be inserted into any programs; merely run as "the calibration program", then run whatever programs you need to.

    Good call on posting the code, however since this is, as stated above, more or less for new users, some explanation as to what you're doing would be helpful.
    Maybe an explanation on why your autocalibration program uses ALL_TIPS_WITH_DEFAULTS as opposed to a custom parameter set, or why you would NOT want to say yes it moved.

    In my opinion (and I do consider this an opinion), if you're calibrating, regardless of if the sphere actually physically moved or not, the first probe should ALWAYS answer "Yes, the sphere has moved", to designate that tip as the "Master" (because answering YES tells PC-DMIS that the probe is the master).
    Then, theoretically, every probe after that could answer NO, but still DCC the calibration, and you'd only need to take 1 manual point every time and walk away (setup-dependent, of course)

    provided a good explanation somewhere on the forum on why it's not necessarily a good idea to "truly" calibrate the master, hence why I believe you should always answer YES for calibration at least once. Something along the lines of, you want the master to be theoretically perfect, to reduce the amount of errors and such and such.
Reply
  • In hindsight, the initial comment of "Would you like to calibrate?" is answered as YES when the individual runs the program, therefore is redundant.
    However, if this is placed at the beginning of each and every program, it MIGHT come in hand.,. although this in and of itself could be considered a "complete" autocalibration program, and doesn't need to be inserted into any programs; merely run as "the calibration program", then run whatever programs you need to.

    Good call on posting the code, however since this is, as stated above, more or less for new users, some explanation as to what you're doing would be helpful.
    Maybe an explanation on why your autocalibration program uses ALL_TIPS_WITH_DEFAULTS as opposed to a custom parameter set, or why you would NOT want to say yes it moved.

    In my opinion (and I do consider this an opinion), if you're calibrating, regardless of if the sphere actually physically moved or not, the first probe should ALWAYS answer "Yes, the sphere has moved", to designate that tip as the "Master" (because answering YES tells PC-DMIS that the probe is the master).
    Then, theoretically, every probe after that could answer NO, but still DCC the calibration, and you'd only need to take 1 manual point every time and walk away (setup-dependent, of course)

    provided a good explanation somewhere on the forum on why it's not necessarily a good idea to "truly" calibrate the master, hence why I believe you should always answer YES for calibration at least once. Something along the lines of, you want the master to be theoretically perfect, to reduce the amount of errors and such and such.
Children
No Data