06-07-2019 10:25 AM
Hi all,
I am using the USB-6001 DAQ device to collect readings from a pressure sensor. The end goal is to run pressure sweeps, and I would like each pressure sweep to be a different color. I can't seem to figure out how to change the color of the graph mid-data collection. I intend to pressure sweep hundreds of times in one run, so using multiple plots will most likely slow down my program too much. I also need the color to change while the DAQ device is still collecting data. Does Labview have the functionality to change the color of specific sections of the same plot?
Thanks
06-07-2019 10:49 AM - edited 06-07-2019 10:51 AM
Right click on the terminal and in the properties you can preset the colors for each plot.
Or you always can use a Property Node to set the color of the active trace
06-07-2019 10:52 AM
You need to have multiple plots. There is one color property for each plot. If you need multiple colors, then you need to have multiple plots. There really shouldn't be any slow down in your program whether you were dealing with 1 long plot, more several shorter plots.
06-07-2019 01:26 PM
Any advice on how to change what plot the data goes to during data collection? I need to write the measurements onto a new plot after every pressure sweep .
Thanks in advance
06-07-2019 02:09 PM
Well I am guessing your measurements that you chart are going to be in an array, so write that array to a file and clear after each pressure sweep before start your next pressure sweep.
06-07-2019 02:20 PM
If I write the data to a file and then clear it, then I won't be able to see the side-by-side comparison of each sweep, no? The perfect result right now would be to run a pressure sweep, then have the next pressure sweep write to a different plot on the same graph in a different color. How would that be possible?
Thanks so much
06-07-2019 02:26 PM - edited 06-07-2019 02:27 PM
@studentguy12 wrote:
If I write the data to a file and then clear it, then I won't be able to see the side-by-side comparison of each sweep, no? The perfect result right now would be to run a pressure sweep, then have the next pressure sweep write to a different plot on the same graph in a different color. How would that be possible?
Thanks so much
I explained one way to do that above, and just save each pressure sweep to one column of a spreadsheet file not to a new file every time.
It's time to start coding, try a few things and show us where you are having trouble
06-07-2019 02:48 PM
Right, I understand that, however I'm looking for a way to visually see the graph comparisons on the Labview front panel. The DAQ device I am using already records the data to a spreadsheet so I have the capability to view these trends out of Labview if I want to. I'm implementing this less as a necessity and more of a user-friendly feature, it would be nice to see the trends without always changing to a spreadsheet, on the LabVIEW front panel, preferably during data collection and not after.
I attached the part of my code that I'm looking to alter. The x and y values are continuously appended to arrays then put into the graph so I can see the data collection in real-time. I would like to be able to switch this data inflow to a new plot with each new pressure sweep. Let me know what you think, and thanks again.
06-07-2019 03:03 PM
Okay here is a picture of what I do with a couple notes. Notice there is NOTHING in my code to change the color of the plot because I preset the plot colors as shown above.