11-07-2024 11:14 AM
Hey! I.m new to LabView , I want to know how can i display these signals for long duration. Like for 5 sec .
I'm using a while loop and simulate signal express vi . Later, I want to replace express vi with DAQ.
Thanks !!
11-07-2024 12:44 PM
You can use a chart and calculate the required chart history length based on the acquisition timing and number of points to show data for the last five seconds.
We cannot debug videos, so to get better help, start with attaching your VI.
11-12-2024 02:18 AM - edited 11-12-2024 02:19 AM
here it is. I have done some tweaking with the "multiplier" and I Have achieved the desired behavior but the scale have been messed up.
11-12-2024 04:24 AM
It's not giving continuous data , actually I'm trying to mimic a oscilloscope.
11-12-2024 08:18 AM
Hi Ashi,
@Ashi1078 wrote:
I Have achieved the desired behavior but the scale have been messed up.
So it is "desired behavior" when the scales are "messed up"?
@Ashi1078 wrote:
It's not giving continuous data , actually I'm trying to mimic a oscilloscope.
You still use graphs even though you got the suggestion to use charts instead…
11-12-2024 09:26 AM
I tried using charts but that didn't give desired result or may be i didn't know how to use it.
11-12-2024 12:09 PM
I'm currently using a Graph to make an "oscilloscope-like" Sweep Display, which is possibly what you are trying to do. You need to take into effect the sampling rate, the plot update rate, and the plot width (in seconds).
Based on your Video and description, you are sampling (maybe) at 1 kHz (looks like about 100 points in 0.1"), and want to show (continuous?) data (sweeping across the screen) with a plot width of 5" (so the first screen is 0" to 5", the plot after that starts at 5" and gradually overwrites the old plot until 10", then 10" to 15", etc.).
I'll assume a plot update rate of 1 kHz (though if the data are as "noisy" as shown in the video, it will just be a "white blur" across the screen). You ideally want to be looking at a signal where the "mean" level changes on-the-order of the plot width (i.e. the "signal" (without noise) is clearly visible in your 5" plot window -- you may need to filter (pt-by-pt) the incoming signal using a low-pass filter of, say, 50 Hz). So I'm going to revise the first sentence of this paragraph -- your Plot Update rate should be, say, a few time (5?) the low-pass filter, or 200 Hz, which we can approximate by plotting the average of every 5 points. Note that this reduces the number of points to plot from 5 *1000 to 5 * 200 = 1000 points.
Here's the basic idea.
About a decade ago, I came across a description of something I called a "Flexi-Graph" that expanded on this technique to keep multiple graphs with different time bases running simultaneously. I can probably dig this up if you are interested.
Bob Schor
11-13-2024 01:15 AM
hey! First of all thanks for your response.
I'm not able to get few things
why are we averaging out the data? My goal is to record EEG and EMG signals.
I want to show the data for 5 sec on the screen and then make then the 6th second should be the end point(1 being the starting point) and then 7th(2 being the starting point) and so on ... this is what I meant by continous data.
And also number of samples and sample rate will vary according to the frequency.
Thanks
11-13-2024 03:20 PM
You ask why I was "averaging out the data". It goes back to "what is the frequency range of your input signal?" You are sampling at 1 KHz, so you should be low-pass filtering your signal at 500 Hz or lower (why? Suppose I sample a pure sinusoid of 1 KHz at exactly 1 KHz -- what do I get? Hint -- the letters D and C are prominent in the answer). What is the highest frequency of interest in the data your are acquiring? If you sample with a 5-point moving Box Car (which you could do), it would effectively lower the highest signal frequency from 500 Hz down to 500/5 = 100 Hz. Doing a "jumping Box Car" (as I suggested) does more-or-less the same thing -- the differences are subtle. I used to do the former ("moving Box Car") and now largely do the latter ("jumping Box Car").
But how do you make a Moving Box Car? You need a Ring Buffer, something of length 5 that ypu put numbers in, it stores it in a "ring" of 5 (with the sixth replacing the first, the seventh the second, etc.). LabVIEW provides this to you -- a Queue of fixed length (5). You create such a Queue. Each time you get a number to "filter", you add it to the Queue using "Lossy Enqueue Element" (which puts the New on the Queue and discards the Old). Now you Obtain Queue Status, which (among other things) gives you an Array that has the elements (all 5 of them) in the Queue. Average it, and you have a Moving Box Car Averager. Neat?
Bob Schor