LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get Waveform Subset is slow %21%21

Hi

 

I  have  the amplitude of a signal to measure.

 

I cant  measure the  amplitude of the whole waveform  as the error margin is high.

so I divide  the  waveform   in 100 parts(get Waveform Subset ) &  then  measure  with labview  measurement vi's very part.

 

 

The " get Waveform Subset"  is not reentrant  so It takes quite some time  so that it processes all 100 times in a loop

 

How to speed up  is there a workaroud for this!

 

I see the measurement vi is least time consuming its th  get subset that  makes problem

 

 

a image of the vi is attached!

 

0 Kudos
Message 1 of 7
(3,438 Views)

Hi aparab,

 

get the Y array component of your waveform before the loop and use ArraySubset in the loop. Should be pretty fast…

 

What array size do we talk about?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(3,426 Views)

not simple as that

 

the waveform is divided  so that every quotient  can be measured

 

so the time of the waveform( x values) along with Y values are imp

 

the function waveformSubset  does that good except that for this req. its slow

0 Kudos
Message 3 of 7
(3,412 Views)

Hi aparab,

 

so the time of the waveform( x values) along with Y values are imp

What means "imp"?  GoogleTranslate doesn't know a (relevant) word like that!

Maybe I should mention this thread

 

the function waveformSubset  does that good except that for this req. its slow

That's why I suggested ArraySubset. What's wrong with? Can't you use some basic math to get the same parts of your waveform like GetWaveformSubset does?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(3,407 Views)

What is the size of the waveforms (number of data points)?  100 points? 10000 points 1E9 points?

 

What is the size of the subset?

 

What is slow? Milliseconds or weeks?  Please supply some numbers.  How fast would you like it to be?

 

Often the best way to get help with something like this is to post your VI with some typical data saved as default. Tell us what results you get and what you want the results to be.

 

Lynn

0 Kudos
Message 5 of 7
(3,392 Views)

thanks Gerd & Lynn I  will  put some data (numerics)

0 Kudos
Message 6 of 7
(3,384 Views)

Possibly sorry for necro but this was the result searching the board.

 

Turns out that GerdW's suggestion is massively faster than GetWaveformSubset.

 

For my application, which sounds similar to the OP's, I want to measure the period of the waveform.

LabVIEW has a convenient (and fast) 'Pulse Measurements' VI, but this only accepts a waveform input.

Even splitting the waveform to array, passing to a 'For' loop containing 'Array Subset', and then reconstructing the waveform using dt*index + t0 (from outside loop), then passing this to the 'Pulse Measurements' VI was massively faster. (Splitting a 1M element waveform into 4000 element blocks, then bundling to an auto-indexed array of points goes from average 519 to average 5.9 on profiling tool)

 

Thanks, and I recommend this approach if you need a waveform subset (even if it takes a few more VI calls and some curious roundabout logic).

 

 An example is attached


GCentral
0 Kudos
Message 7 of 7
(3,262 Views)