LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform chart Display

Hello

i am try to make my waveform chart as accumlate data which mean that it will not over write the old measurnents but instead will display all

from the begining of time

 

can anyone help me?

thanks in advanceSmiley Very Happy

0 Kudos
Message 1 of 6
(2,561 Views)

That is what a chart does.  You can set the history buffer by right-clicking the chart and setting chart history length.  Unfortunately "from the beginning of time" is not a viable option. Smiley Sad

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 2 of 6
(2,556 Views)

A chart will only drop old data once the number of points exceeds the configured history length.

 

What chart update mode do you have configured?

When was the beginning of time?

What is the sample rate?

How long does the acquisition last?

 

Maybe you should attach a simplified version of your code so we get a better understanding of the problem.

0 Kudos
Message 3 of 6
(2,554 Views)

Thanks you all for the quick response i attached my file all i am trying to do is to display interval fo 500 seconds in the waveform chart

how can i do it?

0 Kudos
Message 4 of 6
(2,543 Views)

You're sending 10000 samples to a chart that has a history buffer of 1024 so you will only see the last 1/10 of your main waveform and then the single samples appended after that.  Set your Before Lock chart to 10000 points and your Waveform Chart to 60000 (to make room for 500 seconds of data at 100Hz plus the original data).  Just right-click > Chart History Length... 

 

EDIT:  Oh wait, I just noticed your DAQ read is always writing to the Waveform Chart on every cycle not just appending single points from the PID.  I'm not clear on what you're trying to accomplish here by looking at your code since I can't run it without hardware.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 5 of 6
(2,532 Views)

Sorry, I don't have DAQ drivers installed, so I cannot really inspect your code.

 

Still, there are some beginner mistakes that should be corrected.

 

  • The loop all the way on the left uses 100% CPU doing nothing but spin millions of times per second. Place a small wait.
  • Instead of a sequence structure, use a state machine architecture. Much more flexible.
  • If the code is sitll in the first frame, pressing start would lock up the VI because the event cannot be handled.
  • If you would make some of your booleans latch action, the local variables would not be needed.
  • Why do you even use the event structure and event loop? Just wire the START button (switch action) to the outer case structure. Wire the ON LED to the same wire.
  • You don't use the timeout event, so why is it there?
  • Explain the purpose of the two charts.
  • Since the while loop could go on forever, you potentially have an unlimited amount of data to retain. Is there an upper limit? No computer has unlimited memory. Maybe you should stream the data to disk and just display the last few thousand points on the charts.
  • LEDs are typically indicators and don't make good controls (Start Lock).

 

0 Kudos
Message 6 of 6
(2,516 Views)