LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving chart data into a spreadsheet and also displaying it onto a table

I am having a few different problems with this VI.
My intentions are to display incoming data from the serial port, and view it on a chart as well as the table, then I want to save the data and the time values into a text or excel file.

Receiving data and charting it is fine but when it comes to displaying it in real time on the table it looks like the Express table seems to be duplicating some of the entries as noted in the block diagram and the regular table keeps updating the values (date/time and value) on the first entry.

Saving the data using write to spreadsheet file. vi poses some other problems when importing the History files from the Chart. It brings in the values except the date is the default NI date which I correct before going into the loop in order to accurately plot it on the display.

If I use the Export waveform to spreadsheet file.vi it saves the data in the text file just fine, but if I save it into an excel file the Y values and the time values are all in one column.

PLEASE Help 🙂
0 Kudos
Message 1 of 21
(6,858 Views)
I've modifief your code a little so it should work a little better now, although it's by no means complete. The data table should now display correctly on the front panel.
Sorry I can't help with exporting the results to an excel spreadsheet as I've no experience of doing this. Best thing to do is probably just play around with the format of the data you wish to write to the file, the result you are wanting should be easily achieveable.
 
Regards,
Andy
0 Kudos
Message 2 of 21
(6,845 Views)
Thank you for the response, but I have a favor to ask you. I only have version 8 and I believe you have a newere release and it will not open it, do you think you can save it for the older version so that I may be able to run it?

0 Kudos
Message 3 of 21
(6,813 Views)
Sorry, your front panel is way to big for my monitor. I cannot help you. 😞
Message 4 of 21
(6,805 Views)
I think if you go to VI properties then go under Windows Size and uncheck the "Maintain proportions of window for different monitor resolutions" you can get it to work.

Here is the version saved with that option unchecked.
0 Kudos
Message 5 of 21
(6,801 Views)

Its not a matter of monitor resolution. It's a matter that you've made the block diagram much too large and difficult to view.

You have some basic misconceptions about how LabVIEW works. You are confused why one part updates the same line. In this code, you are creating a brand new array each time. If you want to append new data to the old, use a shift register and the Build Array function.

If you are getting two lines with the same time, then the table is being updated more than once a second.

The Export to Waveform Function does not appear correct in Excel when you use an .xls extension because you are using the incorrect delimiter. Your delimiter is two spaces. Excel assumes a tab. If you had just left the input unwired, it would have worked.

You also need to clean up the style of wiring. The convention is data flows from left to right and in some places you have wires going from right to left. Also try to keep wires straight where possible. Having wires that look like staircases does not enhance readability.

0 Kudos
Message 6 of 21
(6,788 Views)


@Mrjazzitup wrote:
I think if you go to VI properties then go under Windows Size and uncheck the "Maintain proportions of window for different monitor resolutions" you can get it to work.

If I open your VI in LabVIEW 8.5 or 8.2, the window title bar and menu bar, widow border, and scrollbar are all outside the visible region of my monitor, so I don't have access to anything. The FP even fully covers the task bar (set to autohide) so I cannot even get to the start menu. Even if I move the mouse to the lower screen border, it remains at the LabVIEW cursor. (This might actually be something that needs to be fixed in LabVIEW so it cannot happen!)
 
All I can do is ctrl+e to go to the diagram (which looked like a huge mess without a clear indication where I am supposed to look), and thus I quit the program. At least it's nice that you gave my a shiny star, even though I could not help you. 😄 Thanks!
 
As Dennis said, you need to familiarize yourself with the basics of dataflow. Building a 1D array with two elements and making this into a 1x2 2D array does not magically insert history data. You need to built the 2D array in a shift register or feedback node.

 
0 Kudos
Message 7 of 21
(6,772 Views)
Alt-<SPACE>, X will maximize the window so you can get to the title bar, etc.


0 Kudos
Message 8 of 21
(6,766 Views)
I know. 😉
 
This is one of those situations where maximizing something actually makes it smaller. 😉 Similar to the need to press start to shutdown windows. 😄
 
Posting code should just follow some basic decency rules. (Same as showering and using clean underwear before going to the doctors :o).
 
In this case, the OP could have spend 2 minutes to create a stamp-sized example that still demonstrates the problem instead of throwing 10 screens full of unintelligible code at us.
0 Kudos
Message 9 of 21
(6,759 Views)
It's something people don't necessarily realize.  It looks like it was written in 1600x1280, which happens to be my resolution, so it looked fine for me.  I actually lost points on my CLD exam because I changed the monitor resolution to something reasonable for me, and the NI tester obviously had their monitor at a lower resolution, so my Vis didn't fit on the screen.
0 Kudos
Message 10 of 21
(6,763 Views)