Jump to content
Private Messaging is activated - check "How to" on how to disable it ×

Alternative to getPositionCMM() for user-defined coordinate systems?


---
 Share

Recommended Posts

Hi everyone,

The function getPositionCMM() returns the current position in the machine coordinate system.
Is there a function that returns the position in a coordinate system of my choice?
At the moment, I'm doing it via a very cumbersome workaround with writeDiffCoordSysToFile(), which I would like to avoid.

Link to comment
Share on other sites

cannot find it,  but this is also a workaround:

 

alg = "Alignment1"
positionxyz=executeCode(getPositionCMM()  + " transformFrom: ((Zeiss.Calypso.OMInspection active  orderedCfs nodeNamedOverAllGroups: '" +  alg + "') element singleStepWithDialog: true)")

display(positionxyz.x)
display(positionxyz.y)
display(positionxyz.z)

 

Link to comment
Share on other sites

try this one:

 

alg = "Alignment1"
positionxyz =executeCode("Zeiss.CMMOS.OMVirtualControl actual transformVector: " +  getPositionCMM() + " to: ((Zeiss.Calypso.OMInspection active  orderedCfs nodeNamedOverAllGroups: '" +  alg + "') element singleStepWithDialog: true)")

display(positionxyz.x)
display(positionxyz.y)
display(positionxyz.z)

 

Link to comment
Share on other sites

sure?,  check the formating and the decimal places..  i think is correct:

 

alg = "Alignment1"
positionRS(0,0,0,alg)

positionxyz =executeCode("Zeiss.CMMOS.OMVirtualControl actual transformVector: " +  getPositionCMM() + " to: ((Zeiss.Calypso.OMInspection active  orderedCfs nodeNamedOverAllGroups: '" +  alg + "') element singleStepWithDialog: true)")

display(formatR(positionxyz.x.asNumber,0,4))
display(formatR(positionxyz.y.asNumber,0,4))
display(formatR(positionxyz.z.asNumber,0,4))
display(getPositionCMM())
display(cos(30)*50)
display(sin(30)*50)

 

 

image.png.3b61d570870ea3cc2b5f0300f55670ee.png

 

image.png.4c8fc78470110a18909b7f649209031d.png

Link to comment
Share on other sites

I think this is the good one, all tests give me the result of the positionRS value:

 

alg = "Alignment1"
positionxyz =executeCode("| v1 v2 v3 | v1:= Zeiss.CMMOS.OMVirtualControl actual. v2 := Zeiss.Calypso.OMInspection active. v3:= v1 transformVector: " +  getPositionCMM()  + " to: v2 baseSystem pcs  . v1 transformVector: v3 to: ((v2  orderedCfs nodeNamedOverAllGroups: '" +  alg + "') element singleStepWithDialog: true)")

display(formatR(positionxyz.x.asNumber,0,4))
display(formatR(positionxyz.y.asNumber,0,4))
display(formatR(positionxyz.z.asNumber,0,4))

 

 

Link to comment
Share on other sites

Please sign in to view this quote.

I develop normally in offline, and I request to our metrologists to test (then we move faster),  I’m also very interested in this function because currently I have another ugly method.

This is what i have observed until now:

I can transform the current position of the machine into the base Alignment with the following command:

positioninBA =executeCode("| v1 v2  | v1:= Zeiss.CMMOS.OMVirtualControl actual. v2 := Zeiss.Calypso.OMInspection active. v3:= v1 transformVector: " +  getPositionCMM()  + " to: v2 baseSystem pcs  .")

 

to verify it I have an empty alignment characteristic with the name BA (so the same as the base alignment), then I move to  the probe to BA [ positionRS(0,0,0,"BA") ] and the result must be 0

I can also confirm it in the traffic light:

image.png.335fb07d3a2de32230cbef18f71e1c5a.png

 

Something interesting, and this is the reason why I made this transformation to BA first. The coordinates in the traffic light blink with a different value when the window change focus and then the value is corrected after 1 second.

 

the second step is transform the coordinates from BA to the Alignment:

alg = "ALG_JOINTAXIS"
positionxyz =executeCode("| v1 v2  | v1:= Zeiss.CMMOS.OMVirtualControl actual. v2 := Zeiss.Calypso.OMInspection active. v3:= v1 transformVector: " +  positioninBA + " to: ((v2  orderedCfs nodeNamedOverAllGroups: '" +  alg + "') element singleStepWithDialog: true)  .")

 

I can move to 0 again [ positionRS(0,0,0,"ALG_JOINTAXIS") ] and use the traffic light coordinates to verify:

image.png.a4f206b635cd84642104e3c2b26782be.png

 

Now, here it happens the same weird thing than before, the traffic light coordinates blink when the window change focus and the value is corrected after one second.

 

I was able to obtain those wrong coordinates if I make the transformation directly (without to transform first to the BA):

 

alg = "ALG_JOINTAXIS"
positionxyz =executeCode("| v1 v2  | v1:= Zeiss.CMMOS.OMVirtualControl actual. v2 := Zeiss.Calypso.OMInspection active. v3:= v1 transformVector: " +  getPositionCMM() + " to: ((v2  orderedCfs nodeNamedOverAllGroups: '" +  alg + "') element singleStepWithDialog: true)  .")

image.png.2cdd75f394df650ebd7cf5490204b39c.png

 

 

 

Since now I have the expected value I can combine the two steps in a single script:

alg = "Alignment1"
positionxyz =executeCode("| v1 v2 v3 | v1:= Zeiss.CMMOS.OMVirtualControl actual. v2 := Zeiss.Calypso.OMInspection active. v3:= v1 transformVector: " +  getPositionCMM()  + " to: v2 baseSystem pcs  . v1 transformVector: v3 to: ((v2  orderedCfs nodeNamedOverAllGroups: '" +  alg + "') element singleStepWithDialog: true)")

display(formatR(positionxyz.x.asNumber,0,4))
display(formatR(positionxyz.y.asNumber,0,4))
display(formatR(positionxyz.z.asNumber,0,4))

 

I still don’t test it on CNC, maybe some weeks later..

Edited
Link to comment
Share on other sites

 Share

×
×
  • Create New...