09-23-2008 11:44 PM
hi nero tech
try this....
09-24-2008 11:28 AM
Cory K:
The idea seems great! I found the property node, and wired the minimum to a constant equal to zero, and a maximum equal to ten (just to try it). The display window now extends from 0 to 10 which is great, but the data only fills a tiny portion of the window. (see below- note to dennis)
I also like your idea about setting the maximum to "If time < 10 sec, then max= 10 sec, but if time >10 sec, then max= current time." How do you set to current time (where is that function)?
Dennis:
I think you have just figured out what the problem may be! I want the program to keep taking new data, and not re-writing (and re-displaying) the same values over and over again. And I want the displayed data to continue to running, even when not being saved, such that the window will extend beyond 1 sec. I have opened the text file created when saving data, and there are well over 60000+ points, so data is still being taken, even though it is not being displayed. Or is my file taking and saving the same data over and over and over again in the text file? The is also an option in my program to read the previously saved files, and this graph also only displays a certain amount of data (the same amount on the graph that is taking the current data). This is probably a good link to figuring out the issue.
How do I make the program continue taking new data?
-----
And a side note, once I have this issue fixed. How will I make the graph reset to zero, when I reset the data, instead of just continuing on from where is it was?
Thanks so much!
Indrajit:
I think you need to use the same version of LabVIEW that I am, because when I downloaded the new code it didn't properly take the data. Yes, a time stamp was placed on the bottom of the graph, but the window was still the same size, it just has the data stamp added. But thanks for you suggestions. Could you possibly tell me some of the changes that you made, that I might be able to try and implement into my code on my version LabVIEW.
09-24-2008 02:00 PM
There is a function under timing called "Elapsed Time".
Wire the output of this function called "Elapsed Time (s)" to the maximum property.
This will update the maximum once every second.
For example, if the test was running for 30 seconds, the range will be 0-30 seconds.
If the test was running for 10 minutes, the range will be 0-10 minutes
09-24-2008 02:05 PM
Answering your question on how to clear the graph programmatically:
Rigth before any of your code begins (ie outside of all loops),
do the following.
(Assuming you are using a waveform chart, correct me if I am wrong)
- Right click the chart
- Create >> Property node >> History Data (all the way at the bottom)
- Change this property to write
- wire a constant array of 0 to this node
This way, it will show the graph until you begin your next test.
At the beginning of the test, it will clear the graph.
09-24-2008 02:18 PM
By the way, let me answer a question you are going to ask in a while before you ask it.
Once you get the displaying of your data working, you are going to notice that even if your x-scale is from 0 - 24 hours or more,
only about 5 or 10 minutes of data is displayed, older data is erased as newer data is displayed.
You are then going to say, "what just happened to all my old data? this is all Cory K's fault!"
By default, only about 1000 or so points are displayed at any given time, so
To fix that,
- right click your graph
- click "chart history length"
- then make that number larger (however many point you think you will need to display)
09-24-2008 02:19 PM
09-24-2008 02:23 PM
Using the elapsed time will force the chart to show ever increasing time spans. If you want to keep a fixed time span, then place your x.scale properties outside the loop and only run it once. Because the chart has a fixed history, the ever increasing time span will eventually show empty data at the beginning as that data is removed from the history.
09-24-2008 02:24 PM
09-24-2008 03:16 PM
09-24-2008 03:32 PM