[To...] Posted March 29, 2023 Share Posted March 29, 2023 I need to add Mean Deviation to the feature information of a line profile. Does anyone know if mean deviation is a selectable variable or does it need to be calculated? Also, does anyone know how to activate this data on the report? I found some code for displaying it but not sure how to activate it.maxdev.JPGfeature info.JPG Link to comment Share on other sites More sharing options...
[Ri...] Posted March 29, 2023 Share Posted March 29, 2023 Please sign in to view this quote. ${List.Mean(Qdb.Measurement.Deviation("NominalValue"))} Link to comment Share on other sites More sharing options...
[Ri...] Posted March 29, 2023 Share Posted March 29, 2023 Please sign in to view this quote. To your second question, if you remove the conditional statement, does it allow you to activate it then? Link to comment Share on other sites More sharing options...
[To...] Posted March 29, 2023 Author Share Posted March 29, 2023 Please sign in to view this quote. I tried to add a text field to apply ${List.Mean(Qdb.Measurement.Deviation("NominalValue"))} but had to first un-group the Feature Info item. (Something I learned from Laura's PiWeb Workshop) Once I did that, everything showed up on the report. Since I don't believe the un-grouping was the key, I don't know why or how it caused it to work. Thank you Richard. Link to comment Share on other sites More sharing options...
[To...] Posted March 30, 2023 Author Share Posted March 30, 2023 Please sign in to view this quote. I tried this again. I un-grouped the "Feature Info", copied and pasted a text and variable field from the group and edited them using the script you posted and re-grouped the items. All info posted when I ran a sample program. So, I still don't know how it was activated. I'm curious if the "Feature Info" group originates from a master template. I would hate to have to edit a whole bunch of plots. However, I am suspicious that the Mean Deviation is equal to the result..... thoughts?MeanDeviation on Plot Protocol.jpg Link to comment Share on other sites More sharing options...
[To...] Posted March 30, 2023 Author Share Posted March 30, 2023 Please sign in to view this quote. What do you think of this PCM code? I wonder if there is a PiWeb solution using this thinking.Screenshot 2023-03-30 085220.jpg Link to comment Share on other sites More sharing options...
[La...] Posted March 30, 2023 Share Posted March 30, 2023 I can take a look at this, sorry I didn't get back to you Tom. It's been nuts lately. I will see if I can test something this afternoon Link to comment Share on other sites More sharing options...
[Ri...] Posted March 30, 2023 Share Posted March 30, 2023 Please sign in to view this quote. Hi Tom, It appears that I did another not reading exactly what you were asking to do. My apologies. The code that I gave you was for calculating the mean deviation from nominal when evaluating multiple parts. So if your sample size was (1), then yes the results would match the actual exactly. I understand this isn't what you are looking to do. Unfortunately I cannot test right now, but does ${Qdb.Property("MeanDev")} get you what you are looking for? Or am I still way off base? If that isn't pulling the Mean Deviation, then you will either have to add the characteristic or see if Laura can come up with a method (she's pretty smart). Link to comment Share on other sites More sharing options...
[To...] Posted March 30, 2023 Author Share Posted March 30, 2023 Please sign in to view this quote. No, it did not work. Neither did this getActual("Curve_Kidney Slot").mean, which is a selectable formula Thanks. There is a formula that allows me to find the deviation of a single point in a curve but then I would have grab all of the points and do the math. I would need to figure out how to get all of the points (without knowing how many points in each curve). I'm sure LOOP will play a part. Link to comment Share on other sites More sharing options...
[La...] Posted March 30, 2023 Share Posted March 30, 2023 There's a function called Output point list, but that's really going to convolute your regular end-of-run report since it creates a sub-table on reports such as StandardProtocol. For other reports like TableProtocol it creates a new characteristic row as if every point were it's own characteristic. So if this were a type of report you'd be running all the time, you might want to set your report to "All direct child characteristics" instead of "All characteristics and child characteristics". Which hides other sub characteristics like X & Ys in Positions... maybe not ideal... Anyways - that stuff is symptomatic of turning that Output List on - but having that output point list makes it easy for us to calculate values such as Mean. You can modify your PlotProtocol to contain this data, probably...I haven't tried, but... If turning off child characteristics causes other types of problems in your report output in other parts, the other idea I have is to export the point list automatically in a text file and you can actually read that list in PiWeb via the ${Qdb.Measurement.AdditionalData.Txt("*.txt")} and we can calculate values from the data sucked in from that txt? Link to comment Share on other sites More sharing options...
[Ri...] Posted March 30, 2023 Share Posted March 30, 2023 I mean, if you turn on the Output Point List, then inside of your PiWeb Report, you can just pull the mean of all those points. 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