Jump to content

Result Element - New GD&T Position


---
 Share

Recommended Posts

---

Has anyone found a way to pull the actuals for each axis like you can with the legacy Position?

 getActual("Position1").actual.x

It just pulls the actual value for the Position, not from the Axis. 

Link to comment
Share on other sites

---

Richard,

 

 I'm able to get the PCM to report the values.

 

Questions: did you meant to use "GDT Position1" ?  Also is your Position in polar? It shouldnt matter, but just for sanity check , make sure it's in cartesian for inital test.

Also - do you have 'additional report' turned on, it shouldnt matter, but could help.

 

Good luck !

 

gdt position.JPG

Link to comment
Share on other sites

---

Please sign in to view this quote.

Chris, I believe it's only reporting the actual of the Position itself, not the actual of the position. You can switch it to the Y or Z and nothing changes on the results. 

Link to comment
Share on other sites

---

Richard,

 

 not sure I follow - which actual position value are you interested in ?

I'll try the Y value as well...

Link to comment
Share on other sites

---
Posted (edited)

Please sign in to view this quote.

Please sign in to view this username.

This is what I'm trying to get. 

image.png.f548d33e929544fc489d8ed7ef2d48dc.png

image.png.bc39b6613f9cbb80572a71e2b5528dfc.png

image.png.a9284c4063cc6d62d5ddd038b70d0a24.png

 

image.png.96da2ad77c8f827224d86152a09cfd20.png

image.png.d8f7918f5e610add8d547294a897bdf4.png

image.png.d73261572c4327098890d33fd0ea6826.png

It's just pulling the actual value of the Position, not the actual value from the specific axis. 

See below. 

image.png.edad353b0d3bb7ba0a2305f4c453ad0f.png

image.png.433481b072391454f319771a2c915042.png

Edited
Link to comment
Share on other sites

---

Please sign in to view this quote.

And I apologize, my comment didn't make sense. Words are hard. 

Link to comment
Share on other sites

---

Probably you need to adapt it:

 

posResult=""
tmp1=getActual("Position1").tableBlock.asString.asArrayOfSubstrings
for n = tmp1.size to 1 step -1
tmp2=getParameterNamed(tmp1,n)
if (tmp2 == "mm")  or (tmp2 == "inch") then
posResult=vector(getParameterNamed(tmp1,n-3).asNumber,getParameterNamed(tmp1,n-2).asNumber,getParameterNamed(tmp1,n-1).asNumber)
n=0
endif
next n
display("x = " + posResult.x)
display("y = " + posResult.y)
display("z = " + posResult.z)

 

Link to comment
Share on other sites

---
Posted (edited)

Richard, I think I understand now.

 

What i strange though is above you show actual.x of a Position1 and it actually shows the Y value, and actual.y shows the Z value - Im assuming those were also in 2025.  Calypso didnt always behave that way correct ?

 

You're showing GDT Position1 if you use actual.y or actual.x  gives the total position result and not an individual axis result.

 

 The results I shared yesterday was in fact an individual axis result (in simulation, nominal X+Y = 0.0/0.0).  I will  try again with nominals not on 0.0. 

EDIT : Testing now and it seems you are correct actual.x, actual.y and actual.z all give the position result instead of axis results. I will do some testing.

 

Is yours by chance in simulation or on an actual machine ??

Edited
Link to comment
Share on other sites

---

Well, there must be some way to access with PCM. I'm still learning but I managed to pull the values :

 

GDTPOS=getActual("GDT Position1").extendedProtocol.actualCoord.asArray
GDTVAL=getParameterNamed(GDTPOS).first.asString
GDTX=strElement(1,"@",GDTVAL)
GDTY=strElement(2,"@",GDTVAL)
message("X = "+GDTX+"  Y ="+GDTY)

Try this in a PCM field not in result element. I couldn't quite figure how to separate the array, I think I've done it before but its not coming to me. This result is more of a string and may not work in results element.  I figure

Please sign in to view this username.

 or others will bursh up this code and figure something easier out.  I'll keep trying in the meantime - but yes I would agree, getting the actual axis value in 2025 GDT positions  is b0rked.  🤔

 

 

  • Like! 1
Link to comment
Share on other sites

---

Hi Chris, 

Thank you. This appears to work, but man does it make it way more complicated than what it used to be. Haha. 

Question - how in the world was I ever supposed to find "extendedProtocol.actualCoord" as a variable attribute??

  • Like! 1
Link to comment
Share on other sites

---
Posted (edited)

Richard, 

 

 good to hear. That is the million dollar question we are all asking ,and the reason I have to dig into to the 'backroom'.

I do like their new 'Intellisense autocomplete' for PCM however I think it could be improved even further with showing live actuals and more access so users can find what they need and are looking for , etc.

 

I do think I or someone can improve on the above code to keep it as a number(Double) rather than a string, but even then Im not sure this one will work in a results element. It may work somewhere else like text element/formula, etc.

 

Good luck.

Edited
Link to comment
Share on other sites

---

the autocomplete needs many improvements

getActual().extendedProtocol.actualCoord.x
getActual().extendedProtocol.actualCoord.y
getActual().extendedProtocol.actualCoord.z

 

 

  • Like! 1
Link to comment
Share on other sites

---

Thanks

Please sign in to view this username.

, thought I tried those and they did not work for me.

 

 

Link to comment
Share on other sites

---

Yeah this doesn't work in 2023 at least. I'll test in later versions.

Link to comment
Share on other sites

---

if the result of getActual().extendedProtocol is nil then you need to activate the extended protocol and refresh the characteristic.

 

for the other position characteristic is easier and funny:  getActual().getActual.x

 

 

  • Like! 1
Link to comment
Share on other sites

---

Please sign in to view this quote.

Not nil, but not accessible. 

image.png.bc27f14621458fd24039fd8a95cc568d.png

Link to comment
Share on other sites

---

image.png.4778c1b6eb89599e2706c3f0d42f0fbe.png

 

This works, and what Chris posted works as well, but I'd rather not have to go the PCM/Variables route as some of these programs can have hundreds of Positions - would be a nightmare. 

Link to comment
Share on other sites

---
Posted (edited)

Richard,

can you also possibly try this in a PCM field, like pre/post of a feature ? Just for clarification. I know you need it in a Result Element.

 

 
getActual().extendedProtocol.actualCoord.x
getActual().extendedProtocol.actualCoord.y
getActual().extendedProtocol.actualCoord.z

 

Thanks,

Edited
Link to comment
Share on other sites

 Share

×
×
  • Create New...