05-15-2022 09:40 AM
I can write to excel successfully (see attached VI). When you run the code, it will prompt you to "create .xls file to save data before proceeding". This is completely fine with me. Then you'll create your filename.xls. Then the code will keep running.
All I want to do is to save file of data programmatically every 10 minutes or whatever time I choose.
So when I open file explorer, I would like to see a bunch of files saved every 10 minutes.
I can't figure this out. Can someone please help?
I have attached my code.
05-15-2022 10:13 AM
Ignoring the Excel, can do you even know how to create a unique filename every 10 minutes for a text file?
05-15-2022 12:17 PM
Hi GRCK,
@GRCK5000 wrote:
I can write to excel successfully (see attached VI).
You don't "write to excel", you create a spreadsheet file in the common CSV format (comma separated values). These are plain text files…
Why do you ask your users to use the "XLS" file suffix? They should use "CSV" instead!
@GRCK5000 wrote:
All I want to do is to save file of data programmatically every 10 minutes or whatever time I choose.
So when I open file explorer, I would like to see a bunch of files saved every 10 minutes.
For this you need:
That really is done in some minutes: try to solve that on your own!
(After all your questions you should have the LabVIEW practice to be able to solve it…)
05-15-2022 02:19 PM
Hi GerdW,
thanks for the answer. That’s very helpful. I’ll give it a try and learn from it. We need more people like you in this forum.
05-16-2022 09:33 AM
Almost there. Wow. I just have to get that Time elapsed local variable in the first while loop going. Then I will be all set. I have been working hard for this. See my attached VI
05-16-2022 09:47 AM - edited 05-16-2022 09:53 AM
Hi GRCK,
@GRCK5000 wrote:
Almost there. Wow. I just have to get that Time elapsed local variable in the first while loop going.
Nope…
As long as you use "local variable" and "first/other loop" in the same paragraph as "almost there" you are NOT almost there!
Why do you need a sequence? Ever heard of "THINK DATAFLOW!"?
Why do you need more than one while loop in this little VI?
Why do you need local variables in this VI?
Why do you toggle between "elapsed time" and "write spreadsheet file" states in you your statemachine WITHOUT any other condition to decide which state to call?
Suggestions:
By now you should have learned (or heard of) the first step of starting to program: draw a flowchart on a sheet of paper to actually develop your algorithm!