07-02-2017 11:40 PM
I am just trying to generate .xls file daily @ 12:00 AM using write to spreadsheet.
I am attaching my code . Please help me to have a solution.
Thank you in advance.
Solved! Go to Solution.
07-03-2017 01:32 AM - edited 07-03-2017 01:32 AM
Hi sridhar,
there are two (main) problems with your VI:
1. With WriteToSpreadsheetFile you DON'T create XLS files - you are writing a text file with a common formatting. Please name those files *.txt or *.csv!
2. There is no comparison in your VI! How do you want to determine this "12:00 AM"? I suggest something like
IF 11:59 < Time(current) < 12:01 THEN save(data)
Please try this and ask again for specific problems…
07-03-2017 02:43 AM
Thank you for your support.
This code is working for me.
is there any other way to simplify it.
07-03-2017 02:52 AM
Hi sridhar,
is there any other way to simplify it.
- There is a "=0" comparison available…
- I would put a delay into the upper loop. No need to check the timestamp each microsecond…
- Cleaning up your VI is always a good idea…
(These are just some, but not all improvements I see!)
07-03-2017 02:58 AM
Hi,
There is a "=0" comparison available-- i had not understood this....
I would put a delay into the upper loop. No need to check the time stamp each microsecond…Thank you, i did it.
- Cleaning up your VI is always a good idea…I did it.
Thanks for your support.
07-03-2017 03:25 AM
Hi sridhar,
07-03-2017 04:09 AM
@sridhar..reddy wrote:
This code is working for me.
How come?! ![]()
Your VI will keep running forever, with a False wired to the (top) While loop Stop terminal!
So, what are you trying to achieve by running the VI infinitely??
07-03-2017 04:12 AM
hi,
I am going to use this vi as a sub vi with some conditions.
07-03-2017 04:13 AM
hi,
I am going to use this vi as a sub vi with some conditions.
My vi should run for 20 days continuously with some conditional operations.
07-03-2017 04:28 AM
No need to use format the Timestamp into String, and then compare it with 12:00:00 AM! Simply compare it with a constant Timestamp, because String operation would be slower than simple TImestamp comparison.