02-25-2011 11:00 PM
Hello Forum Members
In the attached vi a graph simply plots two values side by side in bar format. What I would like to see happen, and need some assistance with is:
1. Any bars plotted to remain on the graph for historical visualisation
2. When the date changes, another two data points will present themselves to the graph, and I would like to plot these next to the previous plot group (with a space in between the two plot groups)
Thats it. Would anybody be able to show me this? I've looked through the previous posts, but have been unable to find something close enough to my requirement
Thanks and best regards
Ray
ps....does anybody see the red line at the bottom of the second (white) bar (at the 0 x point, and across the width of the plot)......what is this artifact?
02-26-2011 03:30 AM - edited 02-26-2011 03:36 AM
Hi Ray,
look at this:
When you spot the difference (in your older version at the bottom) you will know how to prevent the "red line" glitch... At the top you will find a different solution for your 2-nested-FOR-loops coding
("What is this artefact?": Well you wired a zero - and this zero is plotted as expected. Or did you expect something different when wiring a zero for plotting?)
For your other problem: a graph doesn't has it's own buffer for data. It only shows the data provided at last write access. So you have to make your own buffer (use a 2D array for your two plots)!
02-28-2011 02:48 PM
Hi Rayclout,
I created a sample program for you. It doesn't follow the exact same architecture as your original code. It does however produce what you have laid out in your post.
I used an event structure inside a while loop instead of for loops. This architecture allows the user to record data after every input. The data points are stored as a 2D array which is displayed in a waveform chart. The main difference between a waveform chart and a waveform graph is that the waveform chart stores its data history.
The thin line at the bottom of the bars in your graph is due to the fact that there is still a data at 0. I was able to hide it by assigning a -1 constant to the array and uncheck auto scaling in the y axis chart of the waveform chart properties.
It's not perfect, but this should give you a good start.
I hope it helps.
Josh L.
02-28-2011 11:51 PM
Thanks Josh, however I can't open with my LV version.
I am using LV2009 Version 9.0.1 SP1
Would you mind doing a downconversion for me please.
Regards
03-01-2011 08:18 AM
Hi Rayclout,
Attached is the LabVIEW 2009 version of the code. Hope this works.
Regards.
Josh L.