07-01-2011 12:46 PM
I'm using StatBlockCalc on multiple channels to give me a new channel of all the minimums of each channel in my data set. The Call looks like this
Dim Dat 'Dat is used to define the channel list when the number of groups is unknown Dat="'[1]/CH1_min' - '[" & GroupCount & "]/CH1_min'" Call StatBlockCalc("Channel", "1-", Dat)
That works when there is only one channel in each group. However, I now have 2 channels in each group, and I need to create the new minimums channel seperately.
Any ideas how I can do a StatBlockCalc on seperate channels in an unknown number of groups?
Solved! Go to Solution.
07-01-2011 01:14 PM
Working with one of the application engineers, we came up with a solution. Basically, I build a string of the CNo() of each of the channels I want, and sent that string to the StatBlockCalc function. Works like a charm.
Dat = "" For j = 1 to groupCount ChNum=CNo("[" & j & "]/Ch1_min") If ChNum > 0 Then Dat = Dat & ChNum & ", " end if next Call StatBlockCalc("Channel","1-",Dat) '... StatDirec,RowNoStr,ChnNoStr Dat = "" For j = 1 to groupCount ChNum=CNo("[" & j & "]/Ch2_min") If ChNum > 0 Then Dat = Dat & ChNum & ", " end if next Call StatBlockCalc("Channel","1-",Dat) '... StatDirec,RowNoStr,ChnNoStr