LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView project issues

Hey ! I'm strugling a bit with my Labview project right now. I have to read excel files from a folder and make some analyses from the datas into those files. Does anyone know how to do that ?

0 Kudos
Message 1 of 11
(2,227 Views)

@Skratshi wrote:

Does anyone know how to do that ?


Yes.

 

What part is giving you problems? (Getting all excel files from a folder? reading the excel files? Analyzing the data? Saving the results? etc.)

Message 2 of 11
(2,224 Views)

An important question is what you mean by "Excel file".  Is this a file with the extension .xls or .xlsx, an extension signifying an extension specific to the proprietary Microsoft Excel™ program, or a plain Text file, dividing into rows of text, with columns defined either by a comma character or by a <tab> character, sometimes with the extension ".csv" (which stands for "Comma-separated Values"?

 

LabVIEW provides the "Read Delimited Spreadsheet" function for .csv files, which (as they are ordinary Text files) can be also read with other LabVIEW File I/O functions and parsed using the LabVIEW String functions (including Spreadsheet to Array).

 

If the file is a native Excel file (.xls, .xlsx), it can be read and parsed by functions in the Report Generation Toolkit.  There are also third-party tools that can handle the proprietary .xls/.xlsx format.

 

Bob Schor

0 Kudos
Message 3 of 11
(2,161 Views)

The main problem is we have to take some excel files to create a bigger one to read the data in this one to use them in the next part of the code 

 

 

0 Kudos
Message 4 of 11
(2,121 Views)

@Skratshi wrote:

The main problem is we have to take some excel files to create a bigger one to read the data in this one to use them in the next part of the code 

 

 


Command window:

Copy [File1] [File2] ... [FileN] [DestinationFile]

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 11
(2,111 Views)

@Skratshi wrote:

The main problem is we have to take some excel files to create a bigger one to read the data in this one to use them in the next part of the code 

 

 


I am going to assume that English is not your native language.   That's OK your English is almost certainly better than my Russian.   You do have to help us out though.  Post attached examples of the files.  ICO, input, conversion, output.  


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 11
(2,104 Views)

No english isn't ùy native language lmao!

I attached the excel file that we want to read and analyse. We would like to make measurements of the delta t of pressing buttons. After that plot some graph to see a normal curve.

 

0 Kudos
Message 7 of 11
(2,092 Views)

Hi Skratchi,

 


@Skratshi wrote:

I attached the excel file that we want to read and analyse.


That is no "Excel file", it's a simple (delimited) text file!

 


@Skratshi wrote:

We would like to make measurements of the delta t of pressing buttons. After that plot some graph to see a normal curve.


Which buttons are to be pressed?

Your VI is overly complicated! You really need to cleanup before implementing serious improvements!

Example:

The FOR loop at the bottom of the second frame can be simplified to this little code snippet:

Yes, that's all that is needed here!

 

The same applies to all that duplicated code to calculate all those histogram graph: use an autoindexing FOR loop to repeat the same code.

And what's the point of that FOR loop in the 1st frame, which iterates 2359 times?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 11
(2,080 Views)

@GerdW wrote:

The FOR loop at the bottom of the second frame can be simplified to this little code snippet:

Yes, that's all that is needed here!


Not quite. Since they hammer the memory manager by prepending the new element to the existing array (instead of appending), You would need to insert a "reverse array" at the end..

0 Kudos
Message 9 of 11
(2,045 Views)

Hi Christian,

 


@altenbach wrote:

@GerdW wrote:

The FOR loop at the bottom of the second frame can be simplified to this little code snippet:

Yes, that's all that is needed here!


Not quite. Since they hammer the memory manager by prepending the new element to the existing array (instead of appending), You would need to insert a "reverse array" at the end..


Well, right now they calculate a histogram and the min/max: no need for array reversal…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 11
(2,036 Views)