DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Repeating group calculations for all groups script

Hey all,

 

I have the attached script to perform calculations on channels in a Diadem group.  I have tried to make it so it will repeat the exact same calculations for every group loaded (each group will have same channels in the same order).  The way I have it now, my code will create i'th number of channels but will perform the calculations always on the first group channels.  Any ideas on how to remedy this?  I tried putting "i" in place of the 1 in the channel group specifications but it seems that location will not accept a varriable ("Ch(""[i]/Supply Pressure (psi)"").

0 Kudos
Message 1 of 3
(5,476 Views)

Hi,

you can use something like this:

("Ch(""[" & i & "]/Supply Pressure (psi)"")

 

You have to concatenate text (channel name) and variable (i). Use & (ALT+038) symbol for concatenate.

 

Did it help?

 

Simyfren

0 Kudos
Message 2 of 3
(5,464 Views)

Hi crockengineer,

 

If you'll post your code as text I can copy and paste, I'll help you make it work on N different Groups.  A data set would also be nice.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 3 of 3
(5,446 Views)