[Ch...] Posted May 26, 2022 Share Posted May 26, 2022 Hello, I have several characteristic values. I want find the range of the deviations and report them in a Result Element. Basically find the char that is the furthest positive value (if any) from nominal and the char with the furthest negative value (if any) from nominal. And use both values to calculate the range. View of the characteristics are the same. So a lot of the feature based options will not work. So I'm trying to figure out how to use PCM to get what I need. I would really be interested in learning how to use an if_endif statement to do this, since I've had so much trouble figuring this function out. If there is another way, of course I would be interested to know how, but I would also appreciate some guidance on using the if_endif statement. Thanks so much. Link to comment Share on other sites More sharing options...
[Is...] Posted May 27, 2022 Share Posted May 27, 2022 if you dont have to many characteristics: Range = max(getActual("DiamCircle1").actual,getActual("DiamCircle2").actual,getActual("DiamCircle3").actual) - min(getActual("DiamCircle1").actual,getActual("DiamCircle2").actual,getActual("DiamCircle3").actual) if you have many characteristics: ChrVar="" for n = 1 to 50 ChrVar=ChrVar + "getActual(" + chr(34) + "DiamCircle" + n + chr(34) + ").actual" + ", " next n ChrVar = mid(ChrVar,1,len(ChrVar)-2) Range = compute("max(" + ChrVar + ") - min(" + ChrVar + ")" ) Link to comment Share on other sites More sharing options...
[Er...] Posted May 27, 2022 Share Posted May 27, 2022 Another way, without PCM, would be get Maximum Result and Minimum result. Then use Result Element to get the range. 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