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.
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.
01-14-2011 07:33 AM
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
Solved! Go to Solution.
01-14-2011 07:59 AM
Hi Giovanni,
This is usual happen, when you updating inside the loop updating with the recent data ,
use shift register to avoid this...
01-14-2011 08:03 AM
Hi,
thx for the fast reply! How do you mean? What should I put into the shift register?
01-14-2011 08:25 AM
@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
01-14-2011 09:23 AM
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?
01-14-2011 09:26 AM
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
01-14-2011 09:34 AM
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 🙂
01-17-2011 08:22 AM
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.