06-08-2011 09:11 AM
Dear All,
I've created this Html reporting VI as a template for future work. As you can probably see on the VI i'm saving at a set time so that i can save the report once a day. I'm doing this by comparing the current time to the time input it works but it creates 2 folders one for the right set time and one for the second later somehow i've tried various solutions but i still cannot manage to obtain only one folder. Could someone help with this please?
Another issue is when i'm appending front panel images (in sequence 2). Is there a way to insert a space or tab between them because at the moment they are one after the other? I found the tab for reports but it doesnt work for html only for excel by the look of things.
Thank you in advance,
Frederic.
06-08-2011 09:55 AM
For your specific questions:
Other comments:
06-08-2011 10:31 AM
Thanks for having a look at the code I did clean up my diagram following your suggested steps. I removed the while loop which was unecessary and then by removing the sequence i ended up with the VI generating one folder only as intended without modifying the rest of the code. That's great. So thank you very much for that.
As for the space between images nbsp works great i tried it before but didn't put enough space so i couldnt see it.
And to answer your question yes the intend is to save daily at a set time hence the folder name, note on the "real" VI the record time will be put as a constant in the code but it's more practical to have it on the diagram for testing reasons. Could you please explain why you wrote "Do not hard-code paths in your code as you are doing with the directory where the reports will be saved." . Does it create a problem? The idea of this is at a later date it'd be easier to look at the reports and see what was going on a day of specific interest.
Frederic
06-08-2011 10:36 AM
@fredericb wrote:
Thanks for having a look at the code I did clean up my diagram following your suggested steps. I removed the while loop which was unecessary and then by removing the sequence i ended up with the VI generating one folder only as intended without modifying the rest of the code. That's great. So thank you very much for that.
That doesn't really solve the fundamental problem. You basically got lucky due to probably a slightly different compilation optimization. On a fast machine you'd probably still have the issue that I identified.
@fredericb wrote:
Could you please explain why you wrote "Do not hard-code paths in your code as you are doing with the directory where the reports will be saved." . Does it create a problem? The idea of this is at a later date it'd be easier to look at the reports and see what was going on a day of specific interest.
In your specific case you hard-coded to your user folder. What happens when someone else tries to run it? They won't be able to access that folder, unless they are logged in as you. Put a file path control on the front panel to allow the base directory to be specified. You can set the control to have a default value if you wish.