Can someone help me solve the problem of data refreshing?
I have to continuously acquire the temperature data till I click the stop button.
But my data is refreshing after every 7.5 seconds(Rate=20hz, No.of samples per channel=150).
How to add or collect the previous data continuously without refreshing for say complete graph for 2 minutes but not only for 7.5 seconds.
1. Use a chart instead of a graph for display
2. Write results to a file for future use.
If you open the file before the loop and write to it inside the loop using a file refnum (not a path), you can read something more like 5 samples per loop to keep your UI more responsive to your Stop button clicks.
Thanks for the response, but still I'm collecting the data only for 7.5 sec as mentioned,
Also while using the waveform chart I'm not getting X-axis in seconds as in the waveform graph.
If possible can you please share the code?
Is it possible to get the output continously as shown below?
You are using finite samples and depending on auto start to retrigger the next acquisition.
Better practice would be to use continuous samples, set samples to read at "-1" and throttle the loop with a 200msec wait for next ms multiple. Your users will thank you.
And as Kevin mentioned, enable TDMS LOGGING! with concurrent read to save the data you worked so hard to collect.
Do you know about the shipping examples and how to use the example finder?
Getting charts to display "time since start of acquisition" in seconds starting from 0 is a very-commonly-wanted but still-not-natively-supported feature.
Here's one imperfect example.
And here's another.
1. The first one isn't careful enough about identifying the true acquisition start time. It's likely pretty close though.
2. The second one isn't careful enough about identifying the *actual* sample rate used rather than the one requested. It could be substantially wrong, depending on the specific DAQ device and requested rate.
@jay I have implemented as you suggested to use continuous samples, set samples to read at "-1" and throttle the loop with a 200msec wait for the next ms multiple, but it is just refreshing at from 0 to 0.15 and also i can just save only three vales
@kevin,I have also followed the suggestion you made but still, there is not much change, also i have implemented the second example you sent, after everything it is still refreshing the data.(For N samples and Continous samples).
Can someone send me a screenshot of your code if possible to acquire the continuously without refreshing.
Looks like you're still using a *graph* when it sounds like you'd want to be using a *chart*. As previously mentioned in my initial response, msg #2 in this thread.