DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Using StatBlockCalc on seperate channels

Solved!
Go to solution

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?

 

 

0 Kudos
Message 1 of 2
(3,470 Views)
Solution
Accepted by topic author Mr. Spark Plug

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 

 

 

 

0 Kudos
Message 2 of 2
(3,466 Views)