07-30-2015 10:02 PM
Hi all,
I am writing a simple program in LabVIEW using DAQ assistant reading 4 signals from 4 AI channels. I have samples to read at 125 and freq at 250.
I am trying to display this data on mixed signal graph. However, the x-axis cannot be scaled! I scale it to say show 5 s of data, but I still get ~ 0.5 s of plots. They don't stretch out to 5 s. If I change samples to read to 1000, then the graph stretches out to 2 s but then the system gets slow.
Please see attached. Any help would be much appreciated!
Saif
07-31-2015 05:52 AM
Hi Vhha,
I have samples to read at 125 and freq at 250.
Ok, this makes for 125 Samples / 250 Samples/s = 0.5 s. Getting data for 0.5s sounds familiar, or?
If I change samples to read to 1000, then the graph stretches out to 2 s
Same calculation: 1000 / 250/s = 2s…
I scale it to say show 5 s of data, but I still get ~ 0.5 s of plots.
The x axis scaling of the graph has nothing to do with your DAQ part. And a graph only displays the data you provide it in your wire!
Solution: when you want to show more data in your graph you need to provide more data to the graph! Or in other words: collect the data in a buffer (aka array)!
08-02-2015 07:59 AM
Thank you so much for your guidence GerdW 🙂
I did somehow manage to get the 5 seconds of data (from all 4 signal) displayed on the mixed signal graph. Alhough I must confess that I may not have used the most optimized method. Did use stacked registers.
Pls. see VI attached.
I also added radio buttons - to choose between various breathing stages (0 to 😎 and to annotate the text file (last column) accordingly.
Now I am looking for a countdown timer on the UI for each stage. But the countdown time for each stage is different. So, when user clicks on say stage 1, I want the timer to show 20 s, 19 s, ... 0 s. Here 0 s shows this stage is over (20 s duration). Next, when I click on stage 2, I want timer to show 45 s, 44 s, ... 0 s (45 s duration).
Is there an easy way to do it?
Thanks a lot!
Saif