04-01-2018 04:05 AM
Hello there. Please need your help!. I need to build plots in waveform graph with using excel file. The excel file looks like that. 1 time colomn and 8 signal (don't pay attention that these same).I try, but all my attempts to do that is unsuccessful. Help pls!
Time | Untitled | Untitled 1 | Untitled 2 | Untitled 3 | Untitled 4 | Untitled 5 | Untitled 6 | Untitled 7 |
01.04.2018 18:57:13,094 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:13,342 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:14,204 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:15,169 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:16,201 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:17,201 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:18,198 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:19,200 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:20,222 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:21,205 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:22,238 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:23,199 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:24,213 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:25,270 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:26,231 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:27,224 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:28,222 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:29,246 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:30,257 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:31,274 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:32,221 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:33,198 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:34,215 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
01.04.2018 18:57:35,229 | 56,56859 | 56,5686 | 56,56856 | 56,56858 | 56,56858 | 56,56858 | 56,56857 | 56,56859 |
04-01-2018 09:21 AM
Hi Teslo,
Can you share a VI of what you tried ?
Thanks,
04-01-2018 02:58 PM
When you say "Excel file", do you mean a file written in Excel's proprietary .xls or .xlsx format, or a Comma-Separated Values (.csv) file, which Excel can also open (though it has nothing, per se, to do with Excel)? The code is entirely different for these two situations.
Attaching what you've tried (as Maxime suggested) would have been a big help. Not only would it (probably) have answered my question, but it would also give us some indication of your level of expertise and comfort with LabVIEW. Plus it is polite ...
Bob Schor
04-01-2018 07:34 PM
File has .xlsx format. This file i got with help from this part of my programm (pict.1)
I can't send full vi and i think that it is not important for this. I tried to use Read From Measurement File Express VI function, but how i understand, this function can't read my format. And then i tried to use Read Delimited spreedsheet function but nothing succeeded. Maybe i don't know how to use this function. I need you wiil help me. Thanks.
04-01-2018 09:28 PM
To read a native Excel file in LabVIEW (without a third-party add-on), you need to use the Report Generation Toolkit (or RGT). The "Delimited Spreadsheet" functions are for .CSV files, which are not Excel.
Look in your main Block Diagram Palette. Do you see "Report Generation"? Does it include an "Excel Specific" sub-Palette? If so, you are in luck. There are examples (also search the Forum) that will let you read your Excel file into LabVIEW Variables of your choosing.
Give it a try. If you need help, attach your VI. Do not attach a picture of a piece of your VI. Best would be to write a small VI that does nothing else but read your Excel File and create a set of Variables. This small VI you should be able to post, and if so, we can help you get it to work.
Bob Schor
04-02-2018 12:04 AM
Thank you. It is help me but there are some problems.
Ferstly its data format ( in table it is 01.04.2018 18:57:35 format), but program change this one.
Second its i dont know how build plots in waveform whith this result. Please can you help me? its important for me.
04-02-2018 06:18 AM
Now there is only one problem - it is data format. It is chan when i read table in labview.
04-02-2018 07:43 AM
@teslo wrote:
Thank you. It is help me but there are some problems.
Ferstly its data format ( in table it is 01.04.2018 18:57:35 format), but program change this one.
Second its i dont know how build plots in waveform whith this result. Please can you help me? its important for me.
The Time column needs to be read as a String, and then passed through Scan from String (which I recommend as the simplest String Parser routine in LabVIEW), converted to D, M, Y, H, M, S parts, and then a TimeStamp built up from those values. The other columns can be read as Floats, but make sure you set the "decimal" delimiter to "," (I'm "on the road" so I can't look it up right now).
You can read Column 1 as a String and the rest of the WorkSheet as Floats. You can also read everything as a String and parse Column 1 with one Format and the other columns with a Float format, your choice.
As for building Waveforms, the key assumption of a Waveform is that the samples are strictly periodic, that is, the difference between the sample times is a fixed "dt". It looks like your data are not that way, probably because you used "software" rather than "hardware" timing. So you have a choice -- analyze the sampling times and decide if it is "good enough" to compute a "mean dt" and use that to build a Waveform using the Data values, or build "X, Y" pairs of data (t, Data) and plot them on an X,Y graph (you can't use a Chart in this case).
Bob Schor