LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Log data into excel

Dear sir,

 

I have a case structure consists of 6 cases and each case having 4 different outputs. All six cases will execute for single run i.e. 6*4=24 outputs are available after execution of case.

 

I have to log this output data into excel in below shown fashion.

 

                First case outputs will start from (0, 0) to (0, 3)

                Second case outputs will start from (1, 4) to (1, 7)…….

                …….

                Sixth case output will start from (5, 21) to (5, 24)

 

This case is for one loop. If I have more than one loop the data should append with previous data in same fashion.

 

Kindly help me to implement this scenario.

 

Thanks & Regards,

S Nagaraju

0 Kudos
Message 1 of 12
(3,557 Views)

Hi Sonti_11532,

 

Could you give more precision about the file shape? it's pretty blurred.

 

regards.

Sabri JATLAOUI - Certified LabVIEW Architect - Certified LabVIEW Developer
0 Kudos
Message 2 of 12
(3,530 Views)

You are describing an array of 6 rows and 4 columns (do you know anything about programming, data structures, LabVIEW?).  So on one level, your question is "How can I write out an Array?".  Have you taken the LabVIEW Tutorials?  Are you familiar with the functions on the File Palette?

 

It is not clear what action you wish to take if you run your loop more than once.  Do you want to write two arrays?  Do you want to write them "vertically" (that is, 12 rows of 4 columns) or "horizontally" (6 rows, 8 columns)?  Do you want to write them "one-at-a-time" or "all-at-once"?

 

You speak of writing into Excel.  Do you mean that you want to create a .xlsx file?  Is there a reason for Excel (rather than just a text file, or some other format)?  Are you aware of the difference between what LabVIEW calls "Spreadsheet" (see the File Palette) and Excel files?

 

Show us some of your code so that we can better understand your requirement.  Attach code (this is most easily done by attaching the VI) -- among other things, it will allow us to know which version of LabVIEW you are using so we can post helpful suggestions using the correct Version.

 

Bob Schor

0 Kudos
Message 3 of 12
(3,509 Views)

Dear sir,

 

Answer for most of the questions is Yes.

 

Initially I developed the logic for my requirements but that is lengthy and huge process, after that I optimized my design and attaching here. 

 

Please find the enclosed VI and help me to reduce the logic (Optimize) if possible.

 

 

Regards,

S Nagaraju

 

 

0 Kudos
Message 4 of 12
(3,479 Views)

I am now more confused than before!  I asked "Is it A, or B?", and you answered "Yes".  Not helpful.

 

I think we have established that you are writing an array of 24 "somethings" (it is not clear if the data are numeric, string, Booleans, or what), and that you want to write them to an Excel Workbook.  Why don't you provide an example of two arrays (if they are numeric, I'd suggest the first consist of numbers 1-24, the second 25-48, just to make it perfectly clear, with you showing the "shape" of these arrays) and a Result.xlsx file showing what you want the Excel file to look like after the second array has been written, thus answering the question "Write Horizontally or Vertically", as your "Yes" answer wasn't helpful.

 

Something else that may help you -- in the Search box in the upper right corner of the Forum, type "Revised " (the word "Revised", followed by a space) which should take you to a two-year-old post of mine that may be useful for you.

 

Bob Schor

 

 

0 Kudos
Message 5 of 12
(3,463 Views)

Dear sir,

 

I got some idea after seeing your code.

 

In my application, There are 24 perameters and the outputs are in String format (Hex data) and i have to write Horizontally in Excel.

 

If you run the earlier attached code it will write the data into excel and I want to write the data in that fassion only.

 

Still I want to reduce the code. Is there any other way to achive that kind of data log file?

 

I am using LabVIEW 2014 version.

 

Regards,

S Nagaraju 

 

 

0 Kudos
Message 6 of 12
(3,435 Views)

Attach your code (no pictures, please, VIs only) and some sample data so we can see what you are doing.  It will also tell us which version of LabVIEW you are using.

 

Bob Schor

0 Kudos
Message 7 of 12
(3,389 Views)

Dear Sir,

 

Sorry for the delay I was on festival leave.

 

Instead of attach here, can you provide your provide your E-mail ID to send my code or ping to my mail "nagaraju.s@astramwp.com".

 

Because the code I developed for confidential applications. Please understand.

 

Thanks & Regards,

S Nagaraju

0 Kudos
Message 8 of 12
(3,331 Views)

Never mind posting your code (I can't believe that writing a series of values to Excel would be "confidential" -- there are numerous examples of this already posted).

 

Instead, please post (in a Zip file, as there are multiple things to post) (a) sample data file(s), (b) an Excel file that would be built from those data, and (c) in your Reply, describe how the File(s) are to be used to create the Excel file.  By that, I mean write something like this:

"Files Line1, Line2, ... Line 6 show the data to go into the six lines of the Spreadsheet.  Top Header are the Header names for the Excel columns (B through ...), while Left Header are the Header names in Column 1 for the Rows (2 .. 7)."

 

Be sure that you provide enough information that someone looking at the Data Files and the desired Excel Workbook would be able to understand what to read and what to put where.

 

Bob Schor

0 Kudos
Message 9 of 12
(3,305 Views)

Dear Sir,

 

I replaced dummy parameters names instead of actual parameters and attaching my entire code here.

 

Please go through it and revert back with some comments.

 

 

Regards,

S Nagaraju

0 Kudos
Message 10 of 12
(3,283 Views)