[Ca...] Posted March 15, 2025 Share Posted March 15, 2025 Is there a way to reset the position of the reference sphere using PCM? I'm talking about the possibility of creating an automated program for probe qualification. Link to comment https://qualityforum.zeiss.com/topic/22759-read-and-set-new-reference-sphere-position/ Share on other sites More sharing options...
[Ch...] Posted March 18, 2025 Share Posted March 18, 2025 (edited) Here is how to read the current reference sphere with PCM : (If you have more than one and need specific - it is likely do-able as well). RSPOS=baseSystem().machine.machineControl.sphereNormalObject.spherePosition.asString RSX=strElement(1,"@",RSPOS) RSY=strElement(2,"@",RSPOS) RSZ=strElement(3,"@",RSPOS) message("Ref Sphere X = "+RSX+cr()+"Ref Sphere Y = "+RSY+cr()+"Ref Sphere Z = "+RSZ) I'm not sure how to write to it - I'll dig a little... - you may need to round these values, let me know if you need further help. -CR Edited March 18, 2025 Link to comment https://qualityforum.zeiss.com/topic/22759-read-and-set-new-reference-sphere-position/#findComment-128569 Share on other sites More sharing options...
[Ch...] Posted March 18, 2025 Share Posted March 18, 2025 Mine is all 0's from simulation. 😃 Link to comment https://qualityforum.zeiss.com/topic/22759-read-and-set-new-reference-sphere-position/#findComment-128573 Share on other sites More sharing options...
[Je...] Posted March 20, 2025 Share Posted March 20, 2025 If you want to get fancy... display(baseSystem().machine.machineControl.sphereNormalObject) Ref1X=(baseSystem().machine.machineControl.sphereNormalObject.spherePosition.x) Ref1Y=(baseSystem().machine.machineControl.sphereNormalObject.spherePosition.y) Ref1Z=(baseSystem().machine.machineControl.sphereNormalObject.spherePosition.z) Ref1A1=deg(baseSystem().machine.machineControl.sphereNormalObject.rotationAngle) Ref1A2=deg(baseSystem().machine.machineControl.sphereNormalObject.inclinationAngle) Ref1Rad=(baseSystem().machine.machineControl.sphereNormalObject.sphereRadius) //spherelist referenceSphereList=executeCode("Zeiss.CMMOS.OMSphereNormal getAllSphereNormals") numberOfSpheres=referenceSphereList.size for i = 1 to numberOfSpheres sphereNo[i]=round(getParameterNamed(referenceSphereList.asArray,i).ident) sphereSN[i]=getParameterNamed(referenceSphereList.asArray,i).serialNo sphereCenter[i]=getParameterNamed(referenceSphereList.asArray,i).spherePosition sphereRAD[i]=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 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 https://qualityforum.zeiss.com/topic/22759-read-and-set-new-reference-sphere-position/#findComment-128769 Share on other sites More sharing options...
[Ch...] Posted March 20, 2025 Share Posted March 20, 2025 (edited) Jeff - well done sir ! But can they be written to with PCM ?? Hmmm... Edited March 20, 2025 Link to comment https://qualityforum.zeiss.com/topic/22759-read-and-set-new-reference-sphere-position/#findComment-128779 Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in