03-06-2017 10:25 AM
Charts and graphs are very different animals.
A graph just displays the contents of an array (or other compatible datatypes). A chart accepts scalars or arrays and appends the new data to an internal buffer to be displayed. Once the buffer is filled, the oldest data is discarded.
If you want to use a chart as a graph, you should match the size of the history buffer to your array data or take some other measures to prevent mixing of old and new data and also to prevent truncation if the array is larger than the history buffer.
Do you show the Y axis? If not, you can stack graphs by just offsetting each trace in a single waveform graph.
03-06-2017 10:59 AM
However, if you think that things should behave differently, feel free to formulate a concise proposed "standards document" and post it over in the LabVIEW ideas exchange for comments, votes, and reviews.
Done two days ago
Defining the time axis of a chart is not trivial. Typical chart data has no time information, so the axis needs to be defined with t0 and dt, assuming equal spacing between points. What should t0 be? The time the program is started? The time the first data point is acquired? The time the data point is first sent to the graph? The time the data point is read from an old file? What should happen if the points are not equally spaced? Should the time be absolute (zero is Jan 1 1904, allowing the display of the correct months and year, etc.) or relative (zero is a time value of 0).
Okay, makes sense.
Right now, I'd be happy with just time incrementing on a boolean input ("Scopes On" switch in my program). When the switch is on, increment the time on the Chart, otherwise don't increment the time on the chart. .
We are here to help, so please ask when you get stuck.
Great, because I'm stuck again. I've modified the code to that I now have the time incrementing correctly (well, sort of, read on). Two questions:
1. How do I expand the time span on the X-scale. For now, I'd be happy with just having a 5 second span in there. I've played around with the Min/Max but it's not working. I have "autoscaling" de-selected.
2. I want to stop the time from incrementing from a boolean input, but retain the time. When "Scopes On" input switch is on, the chart should stream data in and time starts (with 5 second span window). When the "Scopes" switch is off, the chart stops populating and time stops incrementing. Currently, once it starts it just keeps incrementing. Is there a property somewhere that I need to set?
Thanks,
D
03-06-2017 11:18 AM
Done two days ago
Correction. I didn't submit an "official standards document" for review. Only an idea proposal.
03-06-2017 11:36 AM
Sorry, I am currently on the bus and cannot see your code. We are in the middle of moving the lab to a new building, but hopefully I can find time later. Stay tuned...
03-06-2017 11:43 AM
No problem. I've found one obvious problem already that I'll work on. I need a one shot type of code to set the time on each switch toggle of the Chart. I found an example and will try to implement that and see how that goes.
03-06-2017 02:19 PM - edited 03-06-2017 02:20 PM
<ignore this>
12-15-2018 01:32 AM
Hi,
Bear in mind, I'm a noob at LabVIEW
I found your post while having the same problem. This migt be a bit late, but then agin useful for others reading the post.
The Time axis on the chart is not really the time, it is simply the index of the datapoint in the dynamically created array. But the axis has a scaling property. In your loop you probably have something controlling the sample rate. Connect this to the 'multiplier'-property of the chart and you should be good to go.
BR
Sereda
12-15-2018 06:03 AM
@SeredaStarseeker wrote:
The Time axis on the chart is not really the time, it is simply the index of the datapoint in the dynamically created array.
That is true when you wire an array (or single point) to a chart. But if you wire up a waveform, the X-axis is based on the T0 and dt in the waveform. You can gleam more of this if you check out this nugget: Sporatic Waveform Chart.