LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data refreshing issue on x axis

Hello,

 

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.

Rawoof_0-1648463972932.png

Rawoof_1-1648464138875.png

 

Thanks,

Rawoof

 

 

0 Kudos
Message 1 of 7
(1,139 Views)

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.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 7
(1,122 Views)

Hello Kevin,

 

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?

Rawoof_0-1648470076279.png

 

Thanks,

Rawoof

0 Kudos
Message 3 of 7
(1,107 Views)

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. 

 

  • Your loop should exit on "STOP or Error!"   
  • The Task and error cluster should be on Shift Registers.
  • You need to add a stop task and a clear task after the loop for Appopriate cleanup.
  • The last function should be a simple error handler.

Do you know about the shipping examples and how to use the example finder?


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 7
(1,099 Views)

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.

 

The imperfections:

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.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 5 of 7
(1,071 Views)

@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

Rawoof_0-1648546778640.png

Rawoof_1-1648546936304.png

 

@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.

 

Thanks,

Rawoof

 

0 Kudos
Message 6 of 7
(1,051 Views)

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.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 7 of 7
(1,039 Views)