01-27-2007 07:49 PM
01-29-2007 01:28 AM
It´s absolutely no problem to get the average, min, max, counts or sum. But i'm sorry, not yet the standard deviation (@NI "may be a good idea").
The key is "ChnClassXRedXY" (in German: reduzierende Klassierung). This function was designed many years ago for angle-based measuring.
With DIAdem 10.1 the function "CClassXRedXY" was added, for the use with 2 X-channels (i.e. engine characteristics).
CU
Martin
01-29-2007 12:33 PM
Hi Martin,
You have a couple of options. You could indeed use the FormulaCalc() command to split out various rows from your data channel that all have the same index into a new data channel and do this for each index. Alternatively, you could determine which rows contain a certain index, then use the StatBlockCalc() function to determine statistics from only these rows of your data channel:
Dim Channel, Msg
Channel = "[1]/Time"
For i = 1 To 22
StatSel(i) = "No"
Next
StatSel(4) = "Yes" ' Minimum
StatSel(5) = "Yes" ' Maximum
StatSel(6) = "Yes" ' Arith. mean
StatSel(14) = "Yes" ' Standard Deviation
Call StatBlockCalc("Channel", "1-13", Channel)
Msg = Msg & "Min = " & StatMin & vbCRLF
Msg = Msg & "Ave = " & StatArithMean & vbCRLF
Msg = Msg & "Max = " & StatMax & vbCRLF
Msg = Msg & "Dev = " & StatDeviation
MsgBox Msg
Note that if you have DIAdem 10.1 you should loop up to 23,
Brad Turpin
DIAdem Product Support Engineer
National Instruments