01-13-2009 10:13 AM
Hello,
How can you put a timestamp on your x-axis of your graph?
I have a 2D array which consist of 8 plots. I must use a graph and not a chart. I have my data continuously scrolling on the chart by using a buffer and updating my offset on my x-axis once my buffer is full, so that it looks like the x-axis is moving along with the new data... scrolling by. I'm doing this on a waveform graph. My data is plotted at 1 point per second.
Here's a couple questions.
1. Can a waveform graph be made to give a true timestamp value on the x-axis that corresponds to when the data is plotted and not just a equally spaced out time increment. From what I understand the waveform graph will plot all it's data with the same spacing. If waveform graph can't do what I need, I'm open to trying xy graph.
2. Is there a way to build a waveform out of a 2D Array and feed that into a waveform graph with timestamp.
I've been trying (2) but can't get it to work.... the build waveform only takes a 1D array... I've tried adding more Y Inputs to the Build Waveform, but it doesn't work
I'm using LV8.5
Thank you!
01-13-2009 10:42 AM
Check the Display Format properties for the waveform graph. You can select absolute or relative time for the x-axis. Using absolute, you will supply the t0 from your waveform and will need to uncheck Ignore timestamp when you right-click on the graph.
01-13-2009 01:53 PM
1. No, a graph can only display evenly spaced data. You will need an XY graph for uneven data. However, since you say the data is plotted at 1 point per second, tht would imply you have evenly spaced data and could use a regular graph.
2. You need to build a 1D waveform array from the 2D array. That means using the Build Waveform function on channel. A simple way is to wire the 2D array to a for loop and place the Build Waveform function inside. You may or may not need to use the Transpose 2D Array before the data enters the loop. It depends on how your data is arranged - channels by rows or columns.