[Ca...] Posted March 15 Share Posted March 15 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 Share on other sites More sharing options...
[Ch...] Posted March 18 Share Posted March 18 (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 Link to comment Share on other sites More sharing options...
[Ch...] Posted March 18 Share Posted March 18 Mine is all 0's from simulation. 😃 Link to comment Share on other sites More sharing options...
[Je...] Posted March 20 Share Posted March 20 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 Share on other sites More sharing options...
[Ch...] Posted March 20 Share Posted March 20 (edited) Jeff - well done sir ! But can they be written to with PCM ?? Hmmm... Edited March 20 Link to comment 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