LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-chasis, how to log slower than hardware's minimum sample rate, timing critical

Gerd,

 

What subvis do you need, and how provide them to you? Everything on my vi is right from NI. I didn't grab anything special for subvis. I'm sorry I don't know to resolve this.

0 Kudos
Message 11 of 20
(1,537 Views)

@Bob_Schor wrote:

There are (at least two) ways to take a signal sampled at 1KHz and output a sample at 10Hz:  save every 100th point (sometimes called "decimating") or save the average of those 100 points (sometimes called a "box-car filter").

 

I encountered this with a display -- we were acquiring data at 1KHz, but wanted to display 20 points/second.  I "cleverly" displayed the average of 20 points, and was told "but now we can't tell anything about the noisiness of the channel!".  So I just displayed every 20th point, and everyone was happy (except for me, I suppose).

 

Bob Schor


That's interesting, Bob - isn't this how HP/Agilent/Keysight does their interpolation on their network analyzers?  Or at least something close to it, if I remember correctly.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 12 of 20
(1,535 Views)

Hi NIerrors,

 

your VI from message #6 searches for:

Decimate 2D array.vi

Convert 2D to Waveform array.vi

 

check.png

Do you see those big question marks?

 

You can use the VI hierarchy to look for subVIs…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 20
(1,520 Views)

Gerd,

 

Gotcha, I forgot you were looking at the decimate vi. That one did have some special subvis. I have included them, and thanks for your patience.

Download All
0 Kudos
Message 14 of 20
(1,509 Views)

Hi NIerrors,

 

Gotcha, I forgot you were looking at the decimate vi.

Yes. That's what you started this thread with and what we are talking about the whole time…

 

Example depending on what it is decimating by the time column will have say 0.005 repeated ten samples then jump to another time for ten samples. It is timed, but anything inbetween the repeated time stamp is unknown.

Yes, that observation is correct. It's how your VI is written to work…

 

This "time scale" is generated using the InitArray function with inputs of current time (difference) and decimation factor and yields in an array of same values. You should replace this part by a ramp function: t(i) := t0 + i*dt…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 20
(1,501 Views)

Gerd,

 

First off please be patient, I am attempting to learn it, but I do not know advanced functions. I originally was not talking about decimating, and have posted other possibilities since. This is why I didn't know if you were still talking about decimating.

 

Okay, are you suggesting something like this? I know this picture is not correct as it is broken, but I don't know what i you are suggesting.

decimate.png

Secondly, do you still prefer this to the resample waveform that I posted?

0 Kudos
Message 16 of 20
(1,473 Views)

WaveformDecimation.png

This is one way to decimate a waveform.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 17 of 20
(1,467 Views)

Hello,

 

I have not tested the solution below but it should work. All you have to do is set a task with an single sample output and sample at the interval desired with a timed loop or a regular loop with a wait function. Save the data to your text file and then use for graphing if desired.

 

Hope it helps, God Bless

 

Decimate.png

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Wisdom is the principal thing; therefore get wisdom: and with all thy getting get understanding. Proverbs 4:7
0 Kudos
Message 18 of 20
(1,448 Views)

@hmarcano wrote:

I have not tested the solution below but it should work. All you have to do is set a task with an single sample output and sample at the interval desired with a timed loop or a regular loop with a wait function. Save the data to your text file and then use for graphing if desired.

 


Yes that works well, though you're depending on windows for the precision of the samples. If some milliseconds difference is of no concern (and it shouldn't really be if you're only sampling at 10Hz) it's a good solution.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 19 of 20
(1,423 Views)

Thank you everyone for providing ideas. I'm trying to think of how use them, but I need to understand them first. Nobody has commented on the resample waveform on the first page. This is what an application engineer came up with. This is very simple. What can someone see as a con to useing this?

0 Kudos
Message 20 of 20
(1,409 Views)