hexagon logo

AutoCalibration

Hi guys. I recently created a form in VB studio to be used for a front end GUI. I am currently creating a button for autocalibration. So in a nutshell this is what im doing. The operator will click on the autocalibration button and it opens up a file dialog box to navigate to whatever program they want to run. After they select the program I wrote a code to go into said program and find all the active tip angles in said program and it then writes them to a txt file on the desktop. After that, it opens up a program I wrote that pretty much just has a DO loop to open/read the text file with the tip angles and loops through each individual line/angle and calibrates them accordingly using the autocalibrate command, some IF/GOTO statements, and parameter sets. I have that working fluently, The problem is we use sooooo many different tip angles so this process would be extremely tedious and time consuming to do for every angle the machine is capable to index to. My question is, is there a way to assign a variable to a parameter set so I can just create one single autocalibrate command and loop through each line in my text file and assign that tip angle to both the tip command and parameter set? Or maybe an easier way than how i am going about doing this. Any help or direction would be appreciated. See attachment for my current program format.

Attached Files
  • Good luck!

    I'm pretty sure you could pass a variable into the AutoCalibrate command for the parameter set, but you'd have to create a parameter set for each probe-tip angle combo, 720 I believe for a Renishaw head, 1000's for a Tesa head (maybe 10,000 for the 2.5° tesastar head) - and this would have to be done for each probe file!

    Now, within the VB automation language there are two Probe.Calibrate methods (or maybe Probe.Qualify - I forget which) which are meant to achieve what you want, HOWEVER, I have tried numerous times to get this to work without success.

    One method appears to work (I can select the required tips, the machine moves and looks like it's calibrating the tips, BUT the .prb files are not updated with the latest measurements)

    The second method will calibrate the tips and the .prb file is updated, BUT before this happens it asks if I want to calibrate all the angles (even though I've already made it select just the ones used in the program).


    The only way I got it to work (proof of concept only - never really finished it) was to do this...

    For each probe used:
    Write out all tip data to a text file
    Delete all the tips
    Add in just the tips used in that program
    Calibrate using the method above which asks to calibrate all tips and updates the .prb file
    After calibration add back programatically the tips which hadn't just been calibrated






  • Yep! We have machines with the Renishaw head, and also machines with the Hexagon HH-AS8-T2.5. So I would be there for days creating all the separate parameter sets . And for every machine yet to boot . Haha have you ever messed around with the “calibrate single tip” command? I sort of got it to work , but I don’t know, there is just too much uncertainty there. Not sure I would feel confident enough using that . And for your last method, as long as you are grabbing the current active tips from each program that the operator would be running , would you have to write back the other tips ? Ugh you would think there would be an easier alternative then what there is. It would just be so convenient.
  • Good question - I think when I first tried it I was working to a customer spec and they wanted to be able to qualify all tips used in a program but not loose calibration data for other tips.

    Annoyingly it's just a bug in the automation language, if it worked it isn't overly complicated.



  • Ahh that makes sense. Yeah I’ve found out that after you work with vb inside pcdmis for a little bit, it’s isn’t as complicated as it first seemed to be. But don’t get me wrong, it it weren’t for all the vb wizards on here posting examples and what not, I would be lost haha. Well I’m going to keep working on it . If I ever make any progress Before I just give up, I will post back to this thread. Thanks for the input!
  • Good luck!

    I'm pretty sure you could pass a variable into the AutoCalibrate command for the parameter set, but you'd have to create a parameter set for each probe-tip angle combo, 720 I believe for a Renishaw head, 1000's for a Tesa head (maybe 10,000 for the 2.5° tesastar head) - and this would have to be done for each probe file!

    Now, within the VB automation language there are two Probe.Calibrate methods (or maybe Probe.Qualify - I forget which) which are meant to achieve what you want, HOWEVER, I have tried numerous times to get this to work without success.

    One method appears to work (I can select the required tips, the machine moves and looks like it's calibrating the tips, BUT the .prb files are not updated with the latest measurements)

    The second method will calibrate the tips and the .prb file is updated, BUT before this happens it asks if I want to calibrate all the angles (even though I've already made it select just the ones used in the program).


    The only way I got it to work (proof of concept only - never really finished it) was to do this...

    For each probe used:
    Write out all tip data to a text file
    Delete all the tips
    Add in just the tips used in that program
    Calibrate using the method above which asks to calibrate all tips and updates the .prb file
    After calibration add back programatically the tips which hadn't just been calibrated








    It's been a while but I finally started messing with this again haha. So I tried to get the "probe.Qualify()" method to work and I cant get the machine to set the probe in motion. I am just trying the bare bones way right now to prove concept. I got PCDMIS to open the Probe Utilities dialog box, and "SelectAllTips", but it just bombs out from there. Any recommendations? See code below. Hope to hear from you!

    probes = part.Probes
    probe = probes._Item("1MM_WITH_EXTENSION_ADAPTER")
    probe.Dialog()
    probe.SelectAllTips()
    probe.Qualify()
  • For anyone who's interested, we are about to release Inspect 5.1 which includes the ability to automatically calibrate all tips from all probes used within a routine. This was in response to multiple requests from users who were trying to do exactly what is being discussed in this thread. The aim was to make it much simpler for the average user to accomplish without the need for bespoke VB scripts and user interfaces. You can find more information on Inspect 5.1 in the current technical preview section of the main forum here : https://www.pcdmisforum.com/forum/de...ct-5-1-preview

    This is a link to a short "what's new" video : https://hexagonmetrology.wistia.com/medias/8824tl0ykh
  • Will the auto calibrate functionality of INSPECT 5.1 be compatible with PC-DMIS 2017 R2?
  • Update**
    I got this to Open my probe utilities, and select the tips. It then seems to be attempting to open the qualification settings window, but PCDMIS then deselects my tips and gives me this error (see attached).

    probes = part.Probes
    probe = probes.Item("1MM_WITH_EXTENSION_ADAPTER")
    probe.SelectAllTips()

    myquals = probe.QualificationSettings
    myquals.Mode = PCDLRN.QUALIFICATION_SETTINGS_MODE.PCD_QUALIFICATI ON_SETTING_MODE_DCC_PLUS_DCC
    myquals.ExecuteMode = PCDLRN.ENUM_CALIBRATION_EXECUTE_MODE.CALIBRATE_TIP S
    myquals.UserDefinedCalibrationMode = False
    myquals.UserDefinedCalibrationOrder = False
    myquals.PreHit = 0.1
    myquals.MoveSpeed = 100
    myquals.Touchspeed = 2
    myquals.NumLevels = 3
    myquals.NumHits = 17
    myquals.StartAngle = 0
    myquals.EndAngle = 90
    myquals.SetTool(part.Tools.Item("offline"))
    myquals.ToolMoved = PCDLRN.ENUM_TOOL_MOVED.TOOL_MOVED_NO

    probe.Qualify2(myquals)
    probe.Qualify()

    Attached Files
  • No, although most of the standard functionality of Inspect 5.1 is backward compatible, the auto calibration will only work with PC-Dmis 2021.2 onward.