LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple xy plots & write to file headings

I am trying to take several signal and plot them both on the same xy graph real time as the program is running through a while loop while an experiment is running.  I have attached a vi that has random number generators set up to represent the data aquired.  The program allows me to plot one of the combinations but not both and I'm not sure how to combine to achieve this.  Furthermore, something that has bothered me for a while but I have not been able to figure it out is that when I use the write to file vi the column headings are always "untitled".  Is there a way to attach headings since I will be using 20 channels or so (won't be plotting all of those though, don't worry).
 
Any help would be greatly appreciated.
 
Jonathan
0 Kudos
Message 1 of 6
(3,099 Views)
I was able to get the plot to work.  I did so by bundling the when it had previously been split before it was bundled by name.  I did this for both sets of data and combined it into an array to obtain two plots of the the same graph.  I still don't know an easy way to get column headings???  Help!
0 Kudos
Message 2 of 6
(3,084 Views)

I think you need to use the set waveform attribute.vi to name the column heading. Look at the example Acquire waveforms(simulated).vi.

Hope this helps.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 3 of 6
(3,079 Views)
I couldn't get that to work, maybe I'm not doing that right.  It seems like there should be an easier way to do this.
0 Kudos
Message 4 of 6
(3,064 Views)

Your problem is that the Write to Measurement file is designed to work with dynamic data generated by something like the DAQ Assistant. You have DBL arrays that you convert to dynamic data but the DBL array has no information that can be used for column names or for timing. The Write to Measurement File is probably not suited to this use. Since you have no timing information, you can simply use the Write to Spreadsheet File function. You can use it twice - once in string mode to write the headers and in DBL mode to write the data. Or, use Write Text File for the headers and Write to Spreadsheet for the data.

Converting the DBL array to a waveform and then using the waveform attribute will work but I find it a bit tedious. You can post the code you've written so that someone can see what is wrong but I think the procedure above is simpler.

0 Kudos
Message 5 of 6
(3,059 Views)
Thanks for the help, I think I'll go the route of inputting the column headers at the beginning and then just use the write to spreadsheet file VI.  That seems like the easier route.  Thanks for the help!
0 Kudos
Message 6 of 6
(3,036 Views)