LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

wierd waveform chart behavior

I have a waveform chart which I put all my aquired data into and then take whatever scale it gives me and do run time/divided by the maximum x scale that was on the chart and then make this the X multiplier to give the look of time on my x axis. My waveform chart is in a tabbed GUI. when I have the tab open and run it, it works fine, i get the right scale. when i am on another tab and run it, I dont get the right scale...i have no idea whats wrong. any suggesetions? Thanks.
Intern NSWCCD Carderock.
0 Kudos
Message 1 of 6
(2,770 Views)
Are you setting the scale after the fact every time you run it? Or is that just the way that you obtained a scale for your chart? It'd be easier to help if we could see your vi.
0 Kudos
Message 2 of 6
(2,768 Views)
Hi,

I figured it would be easier with the Vi but the problem is it is on a computer w/o internet access so I can't get it off at the minute. Here is a rough estimation of what I am doing:

1. Setting the X multiplier to 1.
2. Taking an array and plotting it on a waveform chart.
3. The chart now has some scaling which labview gave it when it read in points from the array. It seems to just be one point for every 1, x value.
4. Then I am taking the X maximum of the chart.
5. Now I am taking the run time and dividing it by the x max and making this my x multiplier so it will look as if
the x axis max is now the running time.

I am doing all this inside a flat sequence structure in that order.


Thanks for the help.
Intern NSWCCD Carderock.
0 Kudos
Message 3 of 6
(2,765 Views)
The thing that I think it probably is (someone will probably come on here and prove me wrong however), at least from what you've described, is that you need to have that scaling set prior to plotting.

Do you have the array ahead of time? As in, entirely filled before you plot? What is the "run time" (how long the loop that is plotting has been running?)? Do you not know how long it takes for each loop iteration, or is there a wait in the loop?

Sorry for all the questions... I hope I can help in the end!
Message 4 of 6
(2,757 Views)
Hi,

So to make it simpler to understand... I have the array beforehand.

I take it and plot it.

Labview puts it on the graph with some scale.

I take the X max value on the graph labview has made lets say its 10 for example.

What I want to do it for it to read some number say 5.

So I take the 5 and divide it by 10.

I set that as my X multiplier.

So now my graph should be scaled down to end at 5 instead of 10.

There's no loop involved, its really straightforward. Thanks for all your help!
Intern NSWCCD Carderock.
0 Kudos
Message 5 of 6
(2,751 Views)
Okay... Since you've got everything beforehand, you should set the X-Scale Multiplier before you plot the array to the chart. If it's a 1D array, just use the array size to get the number of elements. If it's a 2D array, when you wire it to the Array Size, it will give you a 1D array, where the first element is the number of rows, and the second the number of columns, and then index that array to obtain whichever one you're interested in. Then do the division and wire that to the X-Scale Multiplier before plotting, and you're good to go!

You were right earlier when you said it appears that there's one X point per element. That's just a property of the waveform chart.

Hope this helps you out!
Message 6 of 6
(2,743 Views)