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

  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

                TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=0
                Do you want to calibrate?
                  Has the cal sphere moved?
                    Take a manual hit to locate cal sphere
                                  SHOW_SUMMARY=NO, OVERWRITE_RESULTSFILE=NO
                                  SHOW_SUMMARY=NO, OVERWRITE_RESULTSFILE=NO
    CMMXYZ Applications Specialist: PC-DMIS Support and Training. Check out my PC-DMIS tutorial videos...

  • #2
    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)

    AndersI 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.


    • #3
      I have this type of Auto Calibration built into the PC-DMIS program template for Non-Probe Rack probes. A Forum or Comments control this Auto Calibration depending on the Template settings.
      Within the Auto Calibration Group I also, have an Input Comment to choose from a list of probes to recalibrate. A comment to display the last time calibration was complete. Print Commands and Basic scripts to Save the Auto Calibration report and automatically open the report when using Inspect. For the Master probes can be forced to be calibrated using the Auto Calibration within this Auto Calibration Group. I do have a separate Mater Probe Calibration Program that can be executed within Inspect that will automatically open the probe results file.
      There are right ways to do this and wrong ways to do this with PC-DMIS and this should not be the case with this software.


      • #4
        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:

        CMMXYZ Applications Specialist: PC-DMIS Support and Training. Check out my PC-DMIS tutorial videos...


        • #5
          Thank you Trevor for your post. The tutorial videos that cmmxyz have provided have been very helpful over the years.


          • kingsld1
            kingsld1 commented
            Editing a comment
            +1 +1 +1 I've learned a lot of really good stuff from cmmxyz's videos. It's pretty much all practical stuff that can be used every day.

        • #6
          Hey, no problem and thanks for the feedback! By the way, how does one graduate from being a "Junior Member" on this forum?? That title is really starting to hurt my ego! Hahaha
          CMMXYZ Applications Specialist: PC-DMIS Support and Training. Check out my PC-DMIS tutorial videos...


          • davehocum
            davehocum commented
            Editing a comment
            A Lot of Posting and Replying. I wouldn't worry about it. It's Just a number and Title.
            Last edited by davehocum; 10-08-2018, 07:35 AM.

          • Kp61dude!
            Kp61dude! commented
            Editing a comment
            Relevant Posting and Replying. My ego is still sore from that. Keep posting and your 'street cred' will spike in no time.

        • #7
          Hey Trevor, I have a quick question, my program starts with this code for my initial probe," TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=-90", your sample program shows the ANGLE=0 DEG, is there something wrong with the probe setup?
          I have not watched your tutorial video yet but will today.


          • #8
            To be honest, I've never actually paid attention to that bit of code. If your probe is built, defined and calibrated correctly, then the code should show the angle it needs to show. I did a quick search and couldn't find a description for that field. I'll keep digging now that you've got me curious.

            Are you having issues with running your program or are you just wondering why yours looks different than mine?
            Last edited by Trevor McLaughlin; 10-09-2018, 04:24 PM. Reason: Corrected a typo...
            CMMXYZ Applications Specialist: PC-DMIS Support and Training. Check out my PC-DMIS tutorial videos...


            • lcrowston
              lcrowston commented
              Editing a comment
              The code just looked different, I am having no trouble with prob cal results or measurements. Thanks for the great videos!
          widgetinstance 190 (Related Topics) skipped due to lack of content & hide_module_if_empty option.