DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

diadem select time cells in time channel with given time increment (cell index)

Try this, is still a loop, but build in Functions work better.

 

Dim

counter, Chlen,Chn_time,Chn_time_cut, Grp1,j

ChLen =

Data.Root.ChannelGroups("data").Channels("time").Properties("length").Value

Chn_time =

Data.Root.ChannelGroups("data").Channels("time").Properties("numBer").ValueCallChnAlloc("t_cut", ChLen,1,,,1)

 

Chn_time_cut =

Data.Root.ChannelGroups("data").Channels("t_cut").?Properties("number").Value

counter=

For j = 2to ChLen Step n 'loop over cells of channel

counter=counter+1

 

CallDataBlInsertVal(Chn_time_cut,counter,1,CHD(j,Chn_time) ,False)

 

Next

0 Kudos
Message 11 of 13
(2,535 Views)

Thank you! You are truly helping me now 🙂

This is faster clearly.

 

The version of the code is:

 

Dim counter, Chlen,Chn_time,Chn_time_cut,j,n

ChLen =Data.Root.ChannelGroups("data").Channels("time").Properties("length").Value
Chn_time =Data.Root.ChannelGroups("data").Channels("time").Properties("number").Value
Call ChnAlloc("t_cut", ChLen,1,,,1)
Call interactionon
Chn_time_cut =Data.Root.ChannelGroups("data").Channels("t_cut").Properties("number").Value

counter=0
n=10

For j = 2 to ChLen Step n 'loop over cells of channel
  counter=counter+1
  Call DataBlInsertVal(Chn_time_cut,counter,1,CHD(j,Chn_time) ,False)
Next

Louval

 

 

0 Kudos
Message 12 of 13
(2,530 Views)

Hi louval,

 

It sounds like you should check out a couple of ANALYSIS functions:

 

Curve Fitting >> Linear Mapping

Statistics >> Reducing Classification

 

For the Linear Mapping you will also need to create the desired time channel that has Time_orig/N values.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 13 of 13
(2,523 Views)