[Ro...] Posted Monday at 06:16 AM Share Posted Monday at 06:16 AM 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 More sharing options...
[I...] Posted Monday at 08:48 AM Share Posted Monday at 08:48 AM 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 More sharing options...
[I...] Posted Monday at 10:06 AM Share Posted Monday at 10:06 AM sorry, not correct (the forum doesnt allow me to edit??🫤 Link to comment Share on other sites More sharing options...
[I...] Posted Monday at 10:42 AM Share Posted Monday at 10:42 AM 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 More sharing options...
[Ro...] Posted Monday at 11:17 AM Author Share Posted Monday at 11:17 AM Hi Soto, Unfortunately, it doesn't work – the coordinates displayed are incorrect 😕 Link to comment Share on other sites More sharing options...
[I...] Posted Monday at 12:59 PM Share Posted Monday at 12:59 PM 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) Link to comment Share on other sites More sharing options...
[Ro...] Posted yesterday at 05:45 AM Author Share Posted yesterday at 05:45 AM I tied several different coordinate systems, but soehow it never displays 0 for me Link to comment Share on other sites More sharing options...
[I...] Posted yesterday at 09:17 AM Share Posted yesterday at 09:17 AM (edited) Please sign in to view this quote. 🫤, Edited yesterday at 09:38 AM Link to comment Share on other sites More sharing options...
[I...] Posted yesterday at 12:55 PM Share Posted yesterday at 12:55 PM 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 More sharing options...
[Ro...] Posted 11 hours ago Author Share Posted 11 hours ago For some reason i still get the (almost) same wrong coordinates. Are you also on an offline seat? Link to comment Share on other sites More sharing options...
[I...] Posted 8 hours ago Share Posted 8 hours ago (edited) 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: 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: 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) .") 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 8 hours ago 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