02-18-2011 02:13 PM - edited 02-18-2011 02:14 PM
Hi, I'm using DIAdem 11.2 Evaluation version.
I am trying to use the dataplugin wizard to import some CSV files that I am using to store manufacturing test data.
Please open the attached csv file in excel. Row 113 is the "USL" row and Row 114 is the "LSL" row. These correspond to measurement limits for our product - ie: if the measurements are outside these bounds, it will report a failed unit.
In the dataplugin wizard, I can specify these two rows as channel type "Maximum" and "Minimum" respectively, which I believe is the field intended for my USL/LSL numbers.
However, when I import the channels into my data portal, the Maximum and MInimum fields are just showing the max and min of the channels. Is this the correct behaviour for the software?
If so, is there another way to bring in the USL/LSL test limits so that I can perform Process Capability analysis?
02-18-2011 02:43 PM
I have partially answered my own question.
You can open the .vbs file that the ASCII Dataplugin Wizard created for your particular .csv files.
In there, you can see where it has the strings "Maximum" and "Minimum". Manually change these to "Limit_LT" and "Limit_GT", save the file, and then the next time you import the data the Max/Min will come in as test limits.
The next thing I need to figure out is how to get these Limits into the Cp calculation ("Process Capability").
The current software does not automatically pull them into the manual calculation, although it probably should. I imagine its trivial to do it programmatically.
02-18-2011 02:47 PM
Could someone point me towards a script that automatically performs a function on all of the channels in memory?
If I can find one, I'll try to adjust it to do Cpk ("Process Capability"). I'm not a VB programmer so I'm trying to get to the end result without having to learn all of the gritty syntax details.
02-20-2011 05:44 PM
Hi twilson1111,
I can help you create a script to run the Cpk calculation on all the channels in the Data Portal, but first I'd like to ask you some questions. I looked at the data set you posted and am wondering if you intentionally removed most of the data from that file before posting it, or whether your data sets always contain exactly 1 data point for each measurement? If you usually have more data rows than you posted, are all of them of the same UUT/TestStep, or are some of the rows in your data files different enough that you want the Cpk calculation to only run over some of the rows from a given file or even 1 row from multiple files?
If you'll post or send me a TDM/TDX file of the data you've loaded into the Data Portal, I'll be happy to send you back a VBScript that runs the Cpk calculation over all those channels. What do you want to do with the results?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
02-21-2011 11:50 AM
Hello Brad,
Thank you very much for the offer, however, I have been able to hack together the functionality I required. With regards to your question on my data formatting - our data format only has one measurement per test per file (ie: I didn't delete any of the file). This makes it necessary to concatentate data from 100s of files before applying statistics. I won't go into the concatenation process now, but I believe there's an example out there of how to do it that I used.
I'll show how I tackled the statistics calculations below for the sake of someone else new to DIAdem & VB who needs to do something similar.
To recap - the task is to perform a statistics operation on every channel in the data portal. In this case, I needed to perform "Process Capability" aka Cp/Cpk. I had already concatenated all of my data files, and the test limits have been imported into two Channel Properties "Limit_LT" and Limit_GT". The following code will add a bunch of custom properties to each channel, pertaining to the Process Capability measurement.
The Calc is performed as follows:
DIM j
FOR j = 1 to ChnNoMax
Call CalcSPC(ChnName(j),j)
NEXT ' j
With the following sub defined:
sub CalcSPC(sChnName,index)
' IF statements only take Limit_LT/Limit_GT if they are defined. Otherwise choose some arbitrarily large/small number.
IF (ChnPropGet(index, "Limit_LT") <> "") THEN
SPCUSL = 1.0*ChnPropValGet(sChnName, "Limit_LT")
ELSE
SPCUSL = +100000000000000000
END IF
IF (ChnPropGet(index, "Limit_GT") <> "") THEN
SPCLSL = 1.0*ChnPropValGet(sChnName, "Limit_GT")
ELSE
SPCLSL = -100000000000000000
END IF
SPCSigmaType = "From StdDev"
SPCSigmaMult = 3
SPCMovingRangeNo = 2
SPCSigmaTol = 6
' Execute calculation
Call SPCProcessCapab(sChnName,SPCUSL,SPCLSL,SPCSigmaType,SPCSigmaMult,SPCMovingRangeNo,SPCSigmaTol)
'... ChnNoStr,SPCUSL,SPCLSL,SPCSigmaType,SPCSigmaMult,SPCMovingRangeNo,SPCSigmaTol
end sub
Hope this helps someone. I based the SPC call on an example in the DIAdem library (the "Long Measurement" example).
02-21-2011 03:08 PM
Hi twilson1111,
OK, so you have exactly 1 data row from each file, and you ALWAYS need to concatenate data together from multiple files. This is an example of what I call "record-based" data files, where your one data row is the record. If you let me create a record-based DataPlugin for those data sets, the DataFinder would make it super easy to select the files you want to concatenate together. You'd then just need to define a query that describes the kinds of files you want, and the DataFinder would return the rows from only thos files-- ready to load. I also have many custom context menus you could use to transfer the queried rows directly to analyzed graphs, one of which is the Cp/Cpk display that you've indicated.
If you're interested, give me a buzz at brad.turpin@ni.com,
Brad Turpin
DIAdem Product Support Engineer
National Instruments