From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I fix graph refreshing problem?

Solved!
Go to solution

Hi,

 

I'm having some trouble with a waveform chart. I am running a DAQ assistant in a while loop and have several waveform indicators on different tabs. When I tried the VI using a signal generator instead of the DAQ assistant, the signal was displayed perfectly (with the x-axis set to display relative time, the update mode set to strip chart, and scale from 0 to 10 secs). Now I placed the DAQ assistant instead of the signal generator and the chart stopped displaying properly.

 

When I run the vi, the signal is acquired and you see it on the chart on the right hand side. However, every several cycles of my main while loop, the chart is cleared and the signal starts again from the right hand side of the chart. Normally it should keep on displaying the previously acquired data.

 

Anyone have a clue why this is happening?

 

I have a very complicated VI, that I think is not that easy to attach here, otherwise I would have 🙂

 

Thx

Giovanni Vleminckx
---------------------------------------------------------------------------------------
Using LabVIEW 8.5 on Windows7
0 Kudos
Message 1 of 8
(3,141 Views)

Hi Giovanni,

 

This is usual happen, when you updating inside the loop updating with the recent data ,

 

use shift register to avoid this...

0 Kudos
Message 2 of 8
(3,131 Views)

Hi,

 

thx for the fast reply! How do you mean? What should I put into the shift register?

Giovanni Vleminckx
---------------------------------------------------------------------------------------
Using LabVIEW 8.5 on Windows7
0 Kudos
Message 3 of 8
(3,129 Views)

@GiovanniV wrote:

Hi,

 

I'm having some trouble with a waveform chart. I am running a DAQ assistant in a while loop and have several waveform indicators on different tabs. When I tried the VI using a signal generator instead of the DAQ assistant, the signal was displayed perfectly (with the x-axis set to display relative time, the update mode set to strip chart, and scale from 0 to 10 secs). Now I placed the DAQ assistant instead of the signal generator and the chart stopped displaying properly.

 

When I run the vi, the signal is acquired and you see it on the chart on the right hand side. However, every several cycles of my main while loop, the chart is cleared and the signal starts again from the right hand side of the chart. Normally it should keep on displaying the previously acquired data.

 

Anyone have a clue why this is happening?

 

I have a very complicated VI, that I think is not that easy to attach here, otherwise I would have 🙂

 

Thx


Every time I saw that issue, I was able to track it back to either;

 

1) The timestamps are bogus (causing the chart to start over sinc ethe new timestamps don't make sense in context of what is already in the chart).

 

2) The channel names change (again telling the chart the new data does not belong with what is already in the chart).

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 8
(3,117 Views)

 


Ben wrote:

Every time I saw that issue, I was able to track it back to either;

 

1) The timestamps are bogus (causing the chart to start over sinc ethe new timestamps don't make sense in context of what is already in the chart).

 

2) The channel names change (again telling the chart the new data does not belong with what is already in the chart).

 

Ben


Thx for your reply Ben. How do I solve it then? How can I correct the timestamps?

 

Giovanni Vleminckx
---------------------------------------------------------------------------------------
Using LabVIEW 8.5 on Windows7
0 Kudos
Message 5 of 8
(3,101 Views)

The first step in correcting a problem is to identify the problem.

 

What I suggest you do is start putting indiators in your code and catch the issue to ID where the problem starts. Once you have figured out

 

1) the issue as I described is indeed teh case (trust but verify).

 

2) locate the conditions that lead to the issue.

 

If you need help after you figure that out, post back for more sugestions.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 8
(3,098 Views)

Well I tried to figure it out. I can make it a bit easier. I have a while loop that contains everything. Inside there is the DAQ assistant and a case structure (controlled by a tab control). There are two tabs. 1 tab that has charts displaying the raw acquired voltage. This works perfectly. Another tab has charts displaying the corresponding displacement. This displacement is calculated with a subvi that contains the Scale & Map vi (to convert it from volts to micrometers) and a subtraction to offset the signal. This tab however, has the problem I described earlier.

 

So this is the only difference between the two charts. However, I still don't have a clue of how to solve this 🙂

Giovanni Vleminckx
---------------------------------------------------------------------------------------
Using LabVIEW 8.5 on Windows7
0 Kudos
Message 7 of 8
(3,095 Views)
Solution
Accepted by topic author GiovanniV

As Ben said, this is probably a timestamp issue. From your description, it sounds like you are using timestamps to change the axis of your graph, but are not properly propagating them in your analysis.  This is very easy to do if you are using Dynamic Data Type, since the DDT hides whether or not you have a timestamp from you.  If you are using DDTs, convert everything to waveforms, if you can.  Make sure that the timestamp on your analysis data matches that of your raw data.  You may need to explicitly set it.  My guess is that you analysis is returning a zero timestamp, which is causing the issue.

 

Good luck.

Message 8 of 8
(3,042 Views)