Jump to content

Use PCM to get all stylus name


---
 Share

Recommended Posts

---
I want to get a list of the probes in each probe and how to do it with PCM. All I know now is getProbe (). probeName, but it needs to pass the probe name in parentheses
Link to comment
Share on other sites

---

Please sign in to view this quote.

Original post located


// Get values of the Dictionary "allProbes", as a List (asList not necessary, though)
activeStylusTips = baseSystem().machine.machineProbeConfiguration.allProbes.values.asList

// Above explained:
//  - baseSystem()                       → the traditional gateway to enter the matrix
//  - .machine.machineProbeConfiguration → the active stylus system in the probe head
//  - .allProbes.values                  → values of the Dictionary of allProbes (OrderedCollection)
//  - .asList                            → OrderedCollection as a List, in this case makes no difference

// Each item in activeStylusTips is what you get when you use getProbe() on an individual stylus tip
for i = 1 to activeStylusTips.size
    // access elements of list one by one
    currentTip = getParameterNamed(activeStylusTips, i)
    
    // display getProbe instance variable information for each tip of the active stylus system
    display("Conf Name: ", currentTip.confName, " Probe Name: ", currentTip.probeName, " Ident: ", currentTip.ident)
next i

Hopefully that answers your question!

Link to comment
Share on other sites

---
Thank you very much, Andrew Brogan,

The code you provided is exactly what I want to know or what is real. I would like to know where you learned about these codes, as they cannot be found in our PCM manual. I would like to know more code information.
Link to comment
Share on other sites

---
Hello Andrew Brogan,

stylus system How to obtain the calibration time? In the above list, only. protoDate can only obtain the calibration date of the measuring needle, without providing the property of obtaining accurate hours, minutes, and seconds. I don't know how to get it. I want to get accurate calibration time, so let me record and save how many times the same measuring needle was
Link to comment
Share on other sites

---

Please sign in to view this quote.

You are welcome! This knowledge comes from skimming the forums + years trial and error until things worked. Also some schooling in computer science helps the troubleshooting process 😃

Please sign in to view this quote.

Here is a solution for getting the calibration date AND time, citing my sources from the forums that helped me get there: [list=1]

  • https://qualityforum.zeiss.com/topic/18616-reference-sphere-and-probe-data/?do=findComment&comment=104734
  • Please sign in to view this quote.

  • https://qualityforum.zeiss.com/topic/7696-pcmobtain-probe-calibration-time-instead-of-calibration-date/?do=findComment&comment=33144

    Please sign in to view this quote.

  • Combining sdoInfo() from the first source and "calDate" from the second source, along with some trial and error:
     
    sdoInfo("sensor", "sensor.calDate")
    This only gets the information for the active stylus system tip. You will need to cycle through all tips of the stylus system to get all of the data. Here is an example of one way to do the cycle:
     
    
    // Get list of tips for the active stylus system
    activeStylusTips = baseSystem().machine.machineProbeConfiguration.allProbes.values.asList
    
    // Loop through all tips of the active system,
    // repeat the following for each tip in the list
    //  1. use changeStylusNo to activate tip
    //      - by tip number (.ident), not the name (.probeName)
    //  2. use sdoInfo to collect calDate information for that tip
    //  3. display calDate info for current stylus tip
    
    for i = 1 to activeStylusTips.size
        // 1.
        changeStylusNo(getParameterNamed(activeStylusTips, i).ident.asInteger)
        // 2.
        thisIdent = "Ident: " + getParameterNamed(activeStylusTips, i).ident + ", "
        thisName = "Name: " + getParameterNamed(activeStylusTips, i).probeName + ", "
        thisCalDateInfo = "Cal Date: " + sdoInfo("sensor", "sensor.calDate")
        // 3.    
        display(thisIdent, thisName, thisCalDateInfo)
    next i
    
    Edit inside the loop as needed to do what you want with the information.

    Example output (of MasterProbe):
     
    Ident: 1, Name: 1, Cal Date: 7/23/24 7:15:05 AM 3899171705
    Add more code to the loop above and you can extract a lot of relatively useful qualification information about the current stylus system without needing to open a lot of menus and submenus.

    Disclaimer:
    changeStylusNo() and sdoInfo() are undocumented and unofficially supported, just like executeCode(). There is no guarantee these methods will keep working in future releases of CALYPSO. Use with caution.

    Very long post. 🤣 Hope this helps!

     

Link to comment
Share on other sites

---
Andrew,

thank you, amazing work. I'm learning how to access more and more all the time.

Any solutions for getting the probe calibration LIMIT value ? of any stylus, mainly one that is NOT the active stylus ?

Thank you sir !

🧑‍💻

P.S. Interesting right click menu you have there. I though I heard rumors we would be getting something like that in 2024. I have not found it yet, perhaps in SP1 (wait was that just released?) , ok SP2 ?? 🤣

😉
Link to comment
Share on other sites

---

Please sign in to view this quote.

I ran into this issue as well. I believe you have to run the measurement plan first for the code to run and get stored. At least that's what I did to have mine show up.
659_20dd61fd276af26e93cfb2d01c835017.png
Having said that, the unfortunate thing is that it doesn't appear to share across measurement plans. 🙁
Link to comment
Share on other sites

---

Please sign in to view this quote.

Man this gives me inspiration to go back to making a Calibration program with a nice pretty output I had gotten most of the way there but it became less important, I know PCM a lot better now than I did then though... Thank you sir.

Edited
replaced link from messtechnik zu qualityforum
Link to comment
Share on other sites

---

Please sign in to view this quote.

This will extract (only the sigma limit value) data for EVERY stylus system in your probe database, may take a while to run. Generates a .csv in the results folder at the end. Could, in theory, add more data to extract in the info[x] section and more "headers" to the top outputCSV string. 😃

Use at own risk, quite risky.

outputCSV = "System Name,Stylus Name,Global / Stylus,Sigma Limit" + cr()

initialSystem = getProbe().confName
initialStylus = getProbe().probeName

// Get list of all stylus system OBJECTS
systemList = baseSystem().machine.machineAllProbeObjects.asList

for i = 1 to systemList.size
    // get stylus system name and one of the tips
    thisSystem = getParameterNamed(systemList, i).confName
    thisStylus = getParameterNamed(systemList, i).allProbes.asList.first.probeName
    
    // Change In Place !!! to stylus name and tip
    //  - DANGER, WILL ROBINSON!!
    executeCode("Zeiss.Calypso.OMTCOInternalControl current changeToAnotherHolder: '" + thisSystem + "' withSensor: '" + thisStylus + "'")

    // Get all active tips for this system
    thisActiveStyliiList = baseSystem().machine.machineProbeConfiguration.allProbes.values.asList
    
    // Loop through all tips & collect information
    for j = 1 to thisActiveStyliiList.size
        // Cycle active tip
        changeStylusNo(getParameterNamed(thisActiveStyliiList, j).ident.asInteger)
        
        // Collect tip information
        //  1. System Name (MasterProbe)
        //  2. Stylus Name (#1)
        //  3. Global or Stylus Limit Setting (global or stylus)
        //  4. Sigma Limit (0.010000)
        info[1] = thisSystem
        info[2] = getParameterNamed(thisActiveStyliiList, j).ident
        info[3] = executeCode("|t1| t1:=Zeiss.CMMOS.OMVirtualControl actual sdo sdoAccess. (t1 readStylusCriteriaForSensor: t1 sdo2SensorSys) globalOrStylus.")
        info[4] = formatL(executeCode("|t2| t2:=Zeiss.CMMOS.OMVirtualControl actual sdo sdoAccess. (t2 readStylusCriteriaForSensor: t2 sdo2SensorSys) getSigmaValue."), 0, 6)
        
        // Build output CSV formatting
        thisInfo = info[1]
        for k = 2 to 4
            thisInfo = thisInfo + "," + info[k]
        next k
        
        // Append line to CSV
        outputCSV = outputCSV + thisInfo + cr()
    next j
next i

// Write CSV to results folder
addToFile(directoryPath("results") + "\stylii.csv", outputCSV)

// Change back to the initial stylus system that was in the head when we started
// Change In Place !!! to stylus name and tip
    //  - DANGER, WILL ROBINSON!!
executeCode("Zeiss.Calypso.OMTCOInternalControl current changeToAnotherHolder: '" + initialSystem + "' withSensor: '" + initialStylus + "'")

message("Complete.")
5375_a67313e2add82054a9d305496499036f.png
Open in excel, add a filter to the top row with Ctrl + Shift + L, and we're data mining!

Happy hunting!
Link to comment
Share on other sites

---
Andrew,

Love it, thank you sir. Brilliant and also quite possibly dangerous as well, but well done !

So can Calypso really only access the current active stylus sigma limit values ? Maybe this is locked away on purpose? You think this would be tied directly into a 'stylus system qualification' characteristic, so you could 'activate limit comparison' with an actual report with values, etc..... Maybe in 2031 or something....
Link to comment
Share on other sites

 Share

×
×
  • Create New...