Jump to content

Reference Sphere data in Result element


---
 Share

Recommended Posts

I use two different reference spheres to qualify a cmm. I would like to get the Sigma value and the date used for each sphere.



The report would display "Reference sphere #1: 0.0003 8/27/24" and "Reference sphere #2: 0.0001 8/27/24". I have managed to get the Master probe position #1 value and date in a result element but cannot figure out how to reference the individual reference sphere data.

Thanks in Advance!
Link to comment
Share on other sites

try these...
baseSystem().machine.machineControl.sphereNormalObject.sphereName
baseSystem().machine.machineControl.sphereNormalObject.stdSphereDev
baseSystem().machine.machineControl.sphereNormalObject.sphereDate
credits go to another helpful user on the forums named Andrew ...

these worked for me with PCM, except name returns 'nil'

try this one :
baseSystem().machine.machineControl.sphereNormalObject.ident
good luck.
Link to comment
Share on other sites

I do not have PCM which really limits what I can do in formulas, I will give it a try when I have a chance
Link to comment
Share on other sites

Please sign in to view this quote.

This formula should be able to work inside a Result Element without the PCM license.
Link to comment
Share on other sites

Clarke, that definitely is close to what I am looking for. Those all worked as you described.

baseSystem().machine.machineControl.sphereNormalObject.ident

^ That would return the value I am looking for(Reference Sphere number) but it would return the number that it is currently selected in the "Stylus System" window. What I am hoping to do is be able to have the report show which stylus was qualified on which reference sphere in addition to displaying the date in which each reference sphere was qualified. Is there some variable that can be changed in that line of code to get specific stylus data?
Link to comment
Share on other sites

I think there is no function to get it like this.

I believe this formula will return no. calibration sphere for active probe.
baseSystem().machine.machineControl.sphereNormalObject.sphereName
So for tryout select one probe with known cal. sphere n.1 - run formula, then find another probe with known cal. sphere n.2 and run it again.
Link to comment
Share on other sites

Yes,

for whatever reason some things like sphere # and probe qualification LIMITs can only be accessed for 'current stylus'.

So if you had master probe loaded and wanted to see what sphere another stylus uses, or its allowable calibration limit -for some reason, cannot be accessed unless probe is changed, either physically or by some other virtual 'magic' way... 🤣
Link to comment
Share on other sites

Please sign in to view this quote.



baseSystem().machine.machineControl.sphereNormalObject.sphereName

I am attempting to run that line of code but I am struggling to figure out the variable name that Calypso assigns for each reference sphere. Is there a resource that Zeiss provides for all of their variables? Whenever I am trying to do stuff like this it takes a fair amount of trial and error in addition to foruming.

Capture.PNG

Link to comment
Share on other sites

To be more specific,

".sphereName" at the end of the line I assume needs to be changed to match our reference sphere name. I have tried a few things from the above screenshot but with no success
Link to comment
Share on other sites

This may help...

As always, you're on your own to utilize/adapt. (Read: Unsupported and unofficial - use at your own risk)
//spherelist info
referenceSphereList=executeCode("Zeiss.CMMOS.OMSphereNormal getAllSphereNormals")
numberOfSpheres=referenceSphereList.size
for i = 1 to numberOfSpheres
	    currentSphere=round(getParameterNamed(referenceSphereList.asArray,i).ident)
            sphereNo[currentSphere]=round(getParameterNamed(referenceSphereList.asArray,i).ident)
            sphereSN[currentSphere]=getParameterNamed(referenceSphereList.asArray,i).serialNo
            sphereCenter[currentSphere]=getParameterNamed(referenceSphereList.asArray,i).spherePosition
            sphereRAD[currentSphere]=getParameterNamed(referenceSphereList.asArray,i).sphereRadius     
            display("Sphere Number: "+sphereNo[i]+cr()+"Sphere SN: "+sphereSN[i]+cr()+"X= "+formatR(sphereCenter[i].x,10,5)+cr()+"Y= "+formatR(sphereCenter[i].y,10,5)+cr()+"Z= "+formatR(sphereCenter[i].z,10,5)+cr()+"RAD= "+formatR(sphereRAD[i],10,5)+cr()+cr())
next i

//To access the info use this

sphereNo[1]  //change the number to 2, or 3, or whatever sphere you're looking for
sphereSN[1]
sphereCenter[1].x
sphereCenter[1].y
sphereCenter[1].z
sphereRAD[1]
Link to comment
Share on other sites

According to Jeffrey's post, it appears that is possible to access the radius info of the Reference Sphere, but is there just a simple formula to pull that info into a Sphere feature.
Link to comment
Share on other sites

Please sign in to view this quote.

I tried this without PCM licence in Result Element and i got sphere radius for #1 sphere ( change number after "asArray" to get another sphere).

getParameterNamed(executeCode("Zeiss.CMMOS.OMSphereNormal getAllSphereNormals").asArray,1).spherePosition.x
getParameterNamed(executeCode("Zeiss.CMMOS.OMSphereNormal getAllSphereNormals").asArray,1).spherePosition.y
getParameterNamed(executeCode("Zeiss.CMMOS.OMSphereNormal getAllSphereNormals").asArray,1).spherePosition.z
getParameterNamed(executeCode("Zeiss.CMMOS.OMSphereNormal getAllSphereNormals").asArray,1).sphereRadius
Link to comment
Share on other sites

 Share

×
×
  • Create New...