03-18-2015 03:54 PM
Change it to a waveform graph.
The chart takes the data you give it each time and adds it to then end.
The graph takes all the data at once each time.
You are currently taking all the data and and adding it to the end of the chart each time!
Also, the structure of the data for a chart and a graph are different. It should work if you change to a waveform graph 🙂
03-18-2015 04:00 PM
it works!... thank you so much!
03-19-2015 02:43 PM - edited 03-19-2015 02:43 PM
Hi Stuart..
I hope you can help me with this...
I was told to use the Waveform Graph for my application, but since I need to plot Power vs Frequency that seemed a little odd.. still your approach solved my issue with the waveform graph, but I was told today that the graph has to be XY (which now makes more sense!) .. However, it does not have the Sweep Mode update (like the Waveform Graph), any idea how to adapt your solution to a XY Graph instead of Waveform Graph? I'm sure it will be quite different since now I'll be plotting X and Y... Hope I made myself clear.. and thanks!
03-19-2015 02:49 PM - edited 03-19-2015 02:50 PM
03-19-2015 02:55 PM
GerdW, I know, I tried with the chart as well.. but Stuart came up with a way of recreating the effect and it worked with a Waveform GRAPH... now I want to find a way to do the same but using the XY... it is possible because the graph I am trying to recreate is from a software from Kaelus, I asked for their assitance since the Sweep mode issue had me confused, they gave me the wrong information and now the confirmed they use XY Graph (and believe me, the graph updates like a sweep)
03-19-2015 02:59 PM - edited 03-19-2015 03:05 PM
Hi edu,
you can have the same effect with a XY graph - once you provide the correct data in the X and Y arrays:
Set the first plot to show points and the 2nd one to show just the line…
(You only need to handle the "backfold" line. Well, you need to do atleast some part of your job on your own… 🙂 )
03-19-2015 03:32 PM
"...but I was told today that the graph has to be XY..."
Why does it have to be XY? Who told you, and did they explain? If they told you that, they can probably tell you how to do it too!
But anyway, if you look back to page 2 of this thread I posted an example vi using an XY graph already. It updated like a chart rather than a sweep, but I said how to update like a sweep instead.
03-19-2015 08:15 PM
For a chart mode, using a buffer that adds points to the end of an array and deleting the oldest from the front is correct.
For a sweep mode, maintain an array, but use replace array subset to put elements into the array. Every iteration update the index value where that point is placed and roll around when it reaches the end.
03-20-2015 09:34 AM
Hi, I finally succeded with the XY graph, now I am just working on speed.. Thanks to all of you!
06-18-2020 02:33 PM
Right now I am also working on speed because update minimun and maximun on every iteration seems a lot of Work! And The frequency just decreases 2/5 times!
Is there any solution for control XY graph like a chart and keep speed?
I have to ignore dx fluctiations, build a waveform and use charts?
Thanks!