LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform chart x values, using waveform chart as XY graph

Solved!
Go to solution

waveform chart.png

 

 

this what the waveform chart looks like, it doesnt move forward it just stays there blinking... I set the offset to 1870 and the multiplier to 1, and used a double IM Power dBm as the chart input

0 Kudos
Message 21 of 46
(1,805 Views)
That image does not explain how you are writing to the chart.
0 Kudos
Message 22 of 46
(1,798 Views)

Okay, first some questions...

How are you supplying data to your chart? Is your chart control inside a loop being fed with one data point at a time, or is it outside the loop being fed an array of values, or a waveform, or what? (If "it doesn't move forward" I can only assume you are only supplying it with one data point).

 

Can you reproduce the errant behaviour in a little 'noddy' vi (a temporary vi that just does one simple little thing so you can try out a concept, like the vi I posted earlier). You will probably find that if you write a little noddy with a chart and some dummy data and use the same update structure as your main vi, you will suddenly see why it isn't working. If you can get the temp one working, you can look and see how it differs from your main vi. If your temp one does the same as your main one, you can post it here and we can take a look and probably help.

 

Stu.

0 Kudos
Message 23 of 46
(1,793 Views)

CHart.png

I am just writing IM Power to the chart using a shift register inside a while loop to keep the data acquisition continous,  the main vi is really extensive and what I am showing is like half of it but you can ignore all of it and  check the black frames

0 Kudos
Message 24 of 46
(1,788 Views)

Edu.

 

This is the actual link, sorry it was my mistake.

 

http://digital.ni.com/public.nsf/allkb/18B56D8556D44BF18625753D006EFF7C?OpenDocument

0 Kudos
Message 25 of 46
(1,786 Views)

Thanks David, I'll give it a try

0 Kudos
Message 26 of 46
(1,780 Views)

Does this loop just run once (ie. one sweep from 1870 to 1900) or does it keep repeating?

 

What is your chart history length set to?

 

The way you have it at the moment, you do not need the shift register. Since it is just a single double you are adding to the chart each time, the chart will keep its own history. All your shift register does is just delay the update until the next loop iteration.

 

The Offset/Multiplier/Max values should be set outside the loop - I just tried this and setting them inside the loop every time screws things up when the chart fills up (not sure why at the mo but it does!)

0 Kudos
Message 27 of 46
(1,771 Views)

Yes I know I do not need the shft register I was trying another approach before and I just forgot to delete it, the loop keeps repeating... and every iteration sets a point on the chart... the history is set to 30, and I just moved the Offset and range values outside the loop... the only problem I have now is that the x axis does not stay in the range (1870 to 1900) it just keeps incrementing.. but the plot is behaving like it should, which is great, almost there...

0 Kudos
Message 28 of 46
(1,768 Views)

Thats because, as far as the chart is concerned, you are just adding more and more points to the end of the trace. If you do your last measurement at 1900 and go back and take another one at 1870, the chart has no concept of that - it just adds the new data point to the end of the buffer (because as a chart it takes only Y values and assumes the X value is just the next data point in the sequence).

 

If you want to keep updating the sweep over and over with the same x values then you will need to handle things differently. Similar to the XY chart example, I would keep an array of the 30 data points and update the array, then feed the entire array to a waveform graph. You don't get the fancy sweeping vertical line that you get with a chart in sweep mode, but otherwise its close enough.

 

This little noddy shows the idea using a waveform graph and two plots.

 

chart1-bd.png

 

chart1-fp.png

0 Kudos
Message 29 of 46
(1,757 Views)

chart2.png

 

Hi, 

the issue with the x axis continues, and now the VI creates 30 plots instead of 2... as you can see both plots are set to display IM Power.. but instead of getting 2 , I am getting 30... which makes no sense cause' I believe it is wired just like your VI ... and the X axis continues to increment.. is it because the chart needs to be inside its own cycle?

0 Kudos
Message 30 of 46
(1,744 Views)