Jump to content

Result Element - New GD&T Position


Recommended Posts

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

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)

 

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

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

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

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
  • 3 months later...
×
×
  • Create New...