10-16-2015 08:19 AM
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.
10-16-2015 08:24 AM
@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.
10-16-2015 09:46 AM - edited 10-16-2015 09:48 AM
10-16-2015 09:59 AM
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.
10-16-2015 10:48 AM - edited 10-16-2015 10:49 AM
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…
10-19-2015 07:01 AM
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.
Secondly, do you still prefer this to the resample waveform that I posted?
10-19-2015 07:23 AM
This is one way to decimate a waveform.
/Y
10-19-2015 08:20 AM
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
10-19-2015 11:02 AM
@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
10-19-2015 11:54 AM
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?