LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help to organise an Excel's file thanks to several data

Solved!
Go to solution

Good morning everyone ! 

 

I'm working on a project which consist in an entire acquisition system. I already finisheda big part of my program and now my tutor is asking me something else. 

 

In thee project i have several datas : Speed, Move, Strenght, Time, ... 

 

And he would like these data in a same file Excel with a preset order. In exemple : column 1 : Time , Column 2 : Speed, etc. 

 

I already tried to work with the block "write on a measure file" and link him with different signal thanks to a simulation and it works. The first signal is the left column. The second signal is the second column. So it's ok about this. But when i try to link a VI contrary to a simulation the file doesn't work. Even if I use 3 or 4 data, i only got one column with strange results. 

 

So that's why i'm asking your help. I would like to know if you got a good way to solve this problem 🙂 I want to specify that I'm a beginner in LabVIEW. 

 

I join my project in order to help you to understand. I hope that I was enough clear 🙂 

 

Regards. 

 

ML 

 

PS : Sorry for my english, I know that i'm not really good in this way ! 

0 Kudos
Message 1 of 38
(3,396 Views)

To start, make an Excel File and name the columns you want them:  Column One, Column Two and Column Three.  Instead of saving the file as an Excel file, save it as a comma delimited file (.csv).  Then to save to the file, use the vi I have attached but instead of the constants that I added, use outcome that you want to save in the file (you could use a global variable.  As you see in the vi, there are commas in the concatenate string after each variable in order to make the data into a csv type file and a return symbol at the end to have the file go to the next line each time you want to add data to the existing file.  

 

Let me know if this explains it well enough 

-ncm
Message 2 of 38
(3,354 Views)
Solution
Accepted by topic author XFly

Thank you for including your Project -- it shows me that you are using LabVIEW 2015, which means that you have the Report Generation Toolkit, with the ability to easily generate Excel "Reports", available.

 

If you really want to generate Excel (.xls, .xlsx) files, the RGT is, by far, the easiest way to do this.  If you go to the Search bar in the LabVIEW Forums and type "Revised Example" -- the first "hit" should be a two-year-old post of mine where I show how to use the RGT to more-or-less do what you described.  Give it a try with some of your data, and come back if you have more questions.

 

Bob Schor

Message 3 of 38
(3,344 Views)

Thank you for these both really interesting answer ! 

 

So I have to try two way to solve my problem now ! 😄 

 

I don't have enough time today to try them but next week I will ! 

 

If I got a problem I'll probably ask for your help, again :3 

 

Thank you again ! 

 

Regards. 

 

ML 

0 Kudos
Message 4 of 38
(3,317 Views)

And yes ncm your explanation is really clear 🙂 As I said, i'll try your solution next week too 🙂 It's clear but maybe that I will fail cause i'm really beginner xD So... If i need some others advice I'll not hesitate and ask you 🙂 

 

Thank you !

 

ML 

0 Kudos
Message 5 of 38
(3,315 Views)

There is something that i don't understand ncm. 

 

I saw your VI as I try to do something. But how can I link to this VI my speed or strenght data ? The VI only accept string and I would like to add in example the VI vitesse to catch immediatly speed data... I don't understand how it is possible here. I probably missundrstood something :s

0 Kudos
Message 6 of 38
(3,281 Views)

I tried your way too like i promised ;D 

 

When I run your VI (according to your old post 2 years ago), this is exactly what i am searching. But it looks complicated really... I'll continue obviously, and If I have any question i'll ask you as soon as possible 🙂 

0 Kudos
Message 7 of 38
(3,274 Views)

It's me again 🙂 

 

It's really too hard for me :s The only thing that i understand is how to change a column name -_- ^^

 

The problem is that your exemple doesn't show how to take different data ? Or I really didn't understand anyway. Just... In your exemple you are writing 3 temperatures, and the number 3 to increase data in the file. If I understand very well, all of last block are mainly to save, load, or close Excel, and disposition in this file (row, column, etc.) 

 

So my work will mainly be about the left side of this VI ? Well, I just don't understand how it is possible to link with my personals VIs. 

 

In exemple my second column have to be the speed. So I got a sub VI which give this data. But If I want to put this data in the column, what have I to do ? :s i don't even understand how you have these fake data in your file. 

 

I saw the While and the for, (your number 3) and I suppose that's thanks to this, but I don't understand how. I tried to capy paste the while and integrate different thing but i don't understand where should I integrate my different VI. 

 

Well... To sum up, i'm totaly lost and my head will explode :'( ahah ^^

 

Please  I need more information if it's possible :3 I'm in for 3 years and I only changed columns name -_- 

 

Thank you in advance,

 

Regards. 

 

ML

0 Kudos
Message 8 of 38
(3,268 Views)

Oh and I will have an other question after ! 🙂 

 

This project is link with a system obviously. And The test with this system is during only 0,6 seconds. And I need every data during this time. I saw the condition in the while (the number 10) but if i run this program, then run the test, will I have the good data at least ? The idea could be integrate a condition to run the VI Excel, And stop him in exemple 1s after, and I don't understand how it's possible too 🙂

 

I know it is really a lot of problem, i'm a real beginner... 

0 Kudos
Message 9 of 38
(3,263 Views)
I am attaching a new file to show how to get your information. In the first part of the sequence is where your data would be collected. On the next part of the sequence is where it saves, I used 3 different examples (String, Boolean, and Numeric) so that the different types of data will be saved. I hope this clarifies a little better.
-ncm
0 Kudos
Message 10 of 38
(3,241 Views)