06-10-2010 04:58 PM
I am trying to display data continuously in a pop up chart. When I press a button the chart should pop up and show all the previous values as well as those being continuously generated. If possible I want to do this without using local or global variables. This question was asked before too at http://forums.ni.com/ni/board/message?board.id=170&message.id=315949&query.id=9049787#M315949 but I was unable to understand the proposed solution. I am a civil engineer, meaning it will be difficult for me to understand advanced concepts and at times even simple concepts related to computer programming. I have attached two VIs just to illustrate what I am trying to do.
Thanks
Solved! Go to Solution.
06-10-2010 11:17 PM
Which solution are you referring to?
As for your specific VI, the problem you have is that for the Open VI Reference you've specific a VI with the name "Untitled06". The subVI on the block diagram inside the loop is called "Untitled 06" (note the space). The VI you posted is "Popupgraph_subVI". I would suggest picking one name and sticking with it.
As for what you're actually doing, since you are calling the subVI directly on the block diagram, there is no need to run it dynamically using the "Run VI" invoke node. This actually doesn't really do anything because the subVI has no loop. Thus it will run and then stop. As for using the VI Server to open the front panel you can eliminate this since you can configure the subVI's properties to "Show front panel when called".
As for the data that you're feeding the chart, I'm not sure where you're going with this, but you don't really need to keep changing the t0 at each iteration. The chart moves as you feed data to it, and has a history buffer. Thus, you can just feed it the value you want to plot, and set the start just once. Take a look at the chart examples that ship with LabVIEW.
06-11-2010 09:01 AM
Sorry, those uploaded VIs were just for a demonstration of my problem.
As for the Untitled06, when I was trying them in my computer I had named it "Untitled06" but when uploading to this forum I changed the name. Forgot about the invoke node.
What I was asking is, if it was possible to acquire data using one VI and show any temporary graph/chart in a separate subvi. I did it like attached. Seems like it will work for me.
06-11-2010 09:11 AM
This MAY be a little too advanced but I'll post the link incase others are served.
In that thread I posted code that shows how to create a sepearte window from part of a LV GUI.
Instead of using a random number generator to get the data, you could read it from an Action Engine (see link in my signature about Race Condition).
Ben
06-11-2010 09:40 AM
A few tips:
06-11-2010 11:04 AM
Thanks,
I got what I was looking for.
But regarding subtracting time stamps. When I write waveform to the subtract operator then there are two red dots. I read everywhere in the forum that red dots are bad, that was the reason I used that DBL converter.
So when are red dots not that bad.
06-11-2010 11:13 AM
sharmaa wrote:Thanks,
I got what I was looking for.
But regarding subtracting time stamps. When I write waveform to the subtract operator then there are two red dots. I read everywhere in the forum that red dots are bad, that was the reason I used that DBL converter.
So when are red dots not that bad.
Coercion dots are LV's way of telling you "I am converting this data type for you". So the answer to your quesion is the same as the question;
"when is converting dat type bad?"
Converting data types is bad under at least two conditions.
1) When you loose or corrupt data.
2) When the data type conversion requires duplicating a large data set.
If the data is not corrupted and ther is no danger of of buffer duplication then the coercion dots are OK (Christian, being a purist may have something to add).
In the case of the timstamps, there is no data corruption nor a large data set involved so they are OK or...
"When are Coercion Dots Good?"
I believe (I have not looked at your example) that the case of the time stamps is one of those cases where the coercion dot si actually faster than the same code without an explicit node to convert the dat type and avoid the dot.
I hope that help,
Ben
* If you have not passed the CLAD CLD or CLA exams, please forget what I said above.