Your Products have been synced, click here to refresh
version 2021.2 in case that matters.
I have a short arc, and I measured it as a cylinder (it's long even though the arc length is short) and I had to use Fixed Radius so I could get a reporting of the X and Y.
I need the radius.
So I aligned the cylinder, and then want the polar radius of each of 15 points.
I did a do/until and stuffed all the PR's into an array.
I then asked for the MAX and MIN value.
No joy.
I went to this thread: https://www.pcdmisforum.com/forum/pc-dmis-enterprise-metrology-software/pc-dmis-for-cmms/523659-help-with-min-and-max
and I copied the examples from people doing the same thing as me, just simple X and Y rather than PR, and no joy.
By "no joy" I mean that it is stuffing the ENTIRE array into the variable that is to get just the MAX or MIN.
I'm including a screen shot during run-time so you can see my mouse over the SECOND assignment (I think it should be ok at one, but I copied the example of the last helper when the first one failed).
I changed from variable names I could read and identify later to V1 and such.
VCNT is the counter to create the array and set indices in it.
V1 the array with all the PR's in it (evaluated as X^2 + Y^2, quantity square root) and the answers I get match what I would get doing the output manually. (Side note, it says .hits[vcnt] because .hit[vcnt] was giving me the nominal PR for all 15 indices)
V2 is supposed to be the MAX of V1.
VLRG is just putting the value of V2 in there, which should be JUST the Max value from V1.
The mouse is on VLRG, and you can see it has 15 values.
What am I doing stupid? I'm sure it is me, but I just don't see the logic error I'm making. Especially since I did it on my own and failed multiple ways for a long time before I found that thread and copied it. I was already doing it, for all intents and purposes, but I tried to copy it as verbatim as I could get.
(I can paste code, but I'm thinking the pic below of the code should be enough to see where I'm screwing up)
TIA
{"alt":"Click image for larger version Name:\tmin_max.png Views:\t71 Size:\t7.8 KB ID:\t533866","data-align":"none","data-attachmentid":"533866","data-size":"full"}
RECALL/ALIGNMENT,INTERNAL,ALN_AB MOVE/CLEARPLANE CYL4 =FEAT/CONTACT/CYLINDER/DEFAULT,CARTESIAN,IN,FIXED_RAD THEO/<-21.794,15.016,0>,<0,0,1>,16,4 ACTL/<-21.791,14.98,-0.002>,<-0.0031664,-0.00858,0.9999582>,16,4 TARG/<-21.793,15.017,0>,<0,0,1> START ANG=-67.705,END ANG=-37.405 ANGLE VEC=<1,-0.0000022,0> DIRECTION=CCW SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=YES NUMHITS=13,NUMLEVELS=3,DEPTH=0.5,END OFFSET=1.25,PITCH=0 SAMPLE METHOD=SAMPLE_HITS SAMPLE HITS=1,SPACER=1 AVOIDANCE MOVE=NO,DISTANCE=20 FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO SHOW HITS=NO A12 =ALIGNMENT/START,RECALL:ALN_AB,LIST=YES ALIGNMENT/TRANS,XAXIS,CYL4 ALIGNMENT/TRANS,YAXIS,CYL4 ALIGNMENT/END PNT23 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN THEO/<6.066,-5.216,-2>,<-0.7582322,0.6519847,0> ACTL/<6.062,-5.21,-2.004>,<-0.7582322,0.6519847,0> TARG/<6.066,-5.216,-2>,<-0.7582322,0.6519847,0> SNAP=NO SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=YES AVOIDANCE MOVE=NO,DISTANCE=10 SHOW HITS=NO PNT24 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN THEO/<4.935,-6.296,-2>,<-0.6169047,0.7870379,0> ACTL/<4.929,-6.285,-1.999>,<-0.6169047,0.7870379,0> TARG/<4.935,-6.296,-2>,<-0.6169047,0.7870379,0> SNAP=NO SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=YES AVOIDANCE MOVE=NO,DISTANCE=10 SHOW HITS=NO PNT25 =FEAT/CONTACT/VECTOR POINT/DEFAULT,CARTESIAN THEO/<3.491,-7.198,-2>,<-0.4363808,0.8997621,0> ACTL/<3.485,-7.187,-1.999>,<-0.4363808,0.8997621,0> TARG/<3.491,-7.198,-2>,<-0.4363808,0.8997621,0> SNAP=NO SHOW FEATURE PARAMETERS=NO SHOW CONTACT PARAMETERS=YES AVOIDANCE MOVE=NO,DISTANCE=10 SHOW HITS=NO ASSIGN/NOM4=8 ASSIGN/V29=ARRAY(PNT23.PR,PNT24.PR.PNT25.PR) ASSIGN/V30=ABS(NOM4-V29) ASSIGN/V31=MAXINDEX(V30) ASSIGN/V32=V29[V31] F14 =GENERIC/POINT,DEPENDENT,CARTESIAN,$ NOM/XYZ,<NOM4,ZERO,ZERO>,$ MEAS/XYZ,<V32,ZERO,ZERO>,$ NOM/IJK,<ZERO,ZERO,ONE>,$ MEAS/IJK,<ZERO,ZERO,ONE> COMMENT/REPT, DIM LOC7= LOCATION OF POINT F14 UNITS=MM ,$ GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH HALF ANGLE=NO AX NOMINAL +TOL -TOL MEAS DEV OUTTOL X 8.000 0.500 0.500 7.987 -0.013 0.000 END OF DIMENSION LOC7
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |