From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-27-2015 02:36 PM - last edited on 10-26-2015 04:59 PM by LiliMcDonald
Hello,
I have this issue I am having with my plots. Maybe there is a better way to do this.
I have a set of data that I am using inside a loop. I want the loop to keep reusing the same data over and over. The reason I am doing that is because I want to continuously stream data that loop exactly like the one in my data file and plot it and do other different things with it. My problem is the XY graph is not plotting it properly. I wonder if anyone can help me get the plot working and alo get the data moving accross the waveform XY graph.
Files are attached. Test.vi is the main vi
Admin Note - Attachments removed per user's request
Solved! Go to Solution.
08-27-2015 02:43 PM
THe glaring problem that i see is you are trying to read from an XLSX file rather than a CSV. Spreadsheet string to Array reads from a text file. If you want to read from Excel native format, you need to use the Report Generation toolkit to read the values.
08-27-2015 03:50 PM - last edited on 10-26-2015 04:59 PM by LiliMcDonald
Thanks for replying, but I guess I didnt pay attention to that. But nevertheless it reads it and I get the right data out. Here's a copy in .txt format
Admin Note - Attachments removed per user's request
08-27-2015 04:01 PM
An XY graph doesn't have history. If you want the data to "move across the graph" as you add more data, you'll have to use a waveform chart. Am I understanding your question correctly?
08-27-2015 04:27 PM
Well yea, but when I build a waveform and use a waveform chart I have gaps in my data. Since Im streaming the same set of data, each time the loop iterate I get a new same of the same data but in between there's an empty space. Also if i change the channel, then the previous channel has to be gone of the display before seeing a full view of the then selected channel.
08-27-2015 05:09 PM
Replace the XY Graph with a waveform chart and wire as shown. To clear out the previous history, you'll need to detect a change in value of the listbox. When a change occurs, wire in an empty array to the History property node for the chart.
08-28-2015 08:14 AM
Thanks for replying but I am alos trying to use the right time stamp for the data im displaying on the plot. Which I noticed you didnt implement in your snipet
08-28-2015 08:23 AM
Also that technique did not work.
08-28-2015 08:31 AM
@ritch_by_nature wrote:
Also that technique did not work.
You are going to have to explain your requirements better because it works for me (at least my understanding of your requirements).
08-28-2015 08:44 AM
@ritch_by_nature wrote:
Thanks for replying but I am alos trying to use the right time stamp for the data im displaying on the plot. Which I noticed you didnt implement in your snipet
If you want a timestamp on the X-axis, use the build waveform node. However this won't give you what you are looking for with this sample data, if you want the plot to keep "moving across the graph". This is because the waveform is going to have the same x values every time. It's essentially plotting the data on top of the previous plot.