05-01-2013 10:04 PM
Hi,
I attached a picture showing a part of my code. What I'm trying to do is to create the exact waveform chart as "Cell Pressures (kPa)" but in real-time x-axis. I created the "waveform" and it's not quite working. The array going to "Y" in "Build Waveform" contains 8 elements and when I run the program, "Waveform" shows all the elements in one plot rather than in 8 different plots in one chart.
Can somebody pick where I'm doing wrong?
Thanks,
Hoda
Solved! Go to Solution.
05-05-2013 07:54 PM
Please look at the attachement, it's a simplified version of what I want to do and the ways I tried but it didn't work.
The Waveform chart shows all f plots but the chart doesn't show real time.
Waveform 2 and 3 show the real time but they don't show all four plots.
any help would e much appreciated
05-05-2013 08:11 PM
Chart 2.
You are turning all 4 elements into an array. Then putting them into a bundle waveform. But the first 3 get overwritten by the last Y array bundle.
Chart 3.
You are bundling 4 points into a single array, then putting that into the waveform. So all 4 are combined into one plot.
Waveform Chart.
How is that not doing what you want?
I recommend you look at the Example Finder for waveform chart to see all the ways you can combine data for a waveform chart.
05-07-2013 07:25 PM
Waveform chart doesn't have the component of time. I need to show all the plots in a chart and on real-time
05-07-2013 10:11 PM
@Hoda wrote:
Waveform chart doesn't have the component of time. I need to show all the plots in a chart and on real-time
go to graph properties,display format tab,choose time "x axis", absolute time
05-07-2013 10:26 PM - edited 05-07-2013 10:26 PM
@Hoda wrote:
Waveform chart doesn't have the component of time. I need to show all the plots in a chart and on real-time
Since you are converting from scalar data to a cluster to the chart, there is no information that shows the timing. It is lacking the T0 initial time and the dT for the time interval,.
Outside of your loop wire the current time to the Xscale.Offset property node for the chart. Since your loop time is 1 second, you don't need to set the dT. But if it was something else, you'd need to set the XScale.Multiplier property as well.

05-08-2013 12:55 AM
I came up with some sort of solution to show the waveform chart in the way I want ( chart 2)
RavenFan:
Your solution seems easier so I tried that (chart 1) but it's always ahead of real time! any idea what is wrong in this chart?
05-08-2013 08:32 AM
I said to put that bit of code OUTSIDE the loop. As you have it now, you are updating the offset on every iteration with the current time. Only read the time once, and update the offset property once before the loop starts.
(Same thing for you other chart. Read the time only once before the loop starts.)
05-08-2013 05:49 PM
Dear RavensFan,
My mistake ... I put that outside the loop but still it doesn't work the way I want. Look at the picture:
05-08-2013 06:03 PM
It looks like you've stopped and restarted your VI. So that is going to change the XScale.offset because you are rerunning that node again. VI's aren't meant to be stopped and restarted.
Don't stop and restart your VI.