From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-31-2020 01:12 PM
Hello everyone!
I am seeking for help with the annoying yet, I believe, simple problem. I am trying to create automatic reporting routine, that should add a report instance into the report file after each run of the program, that includes images of some FP-controls and text. In my previous question, I got a help on how to obtain a single .pdf report file. (here is the link https://forums.ni.com/t5/LabVIEW/PDF-reporting/m-p/4009796#M1146344). The problem is, that upon multiple runs file gets overwritten, so no appending. Then, I decided to switch back to the approach of my collegues and use HTML file to do the job. The Untitled1.vi shows a minimal working example with the block diagram here for your convenience:
Now as you can see in the small case structure, this approach requires a reading of the whole previous HTML file as a text and then appending new "current run related" information, following by replacing the file. When we do continious measurements for 2-3 days, we are getting sometimes "Not Enough Memory to complete this operation" error, which stops the execution (this is annoying, especially when it happens in the middle of the night). I assume, it happens when the report file gets very big (hundreds of measurements), and the reading of the file actually uses quite a bit of memory (not sure here).
Is there a way to achieve similar behaviour, through "Appending the Report To a File", rather then replacing the file all the time, as it is possible with a normal text files?
I would prefer to get output into .pdf, not to strugle with a lot of images around HTML file, as described in the link above, but any solution is very welcome. I also attach a VI, with a creation of a single .pdf file (Untitled 3.vi)
Looking forward to your suggestions 🙂
01-31-2020 05:07 PM
How about breaking the problem into two smaller (and simpler) tasks?
Bob Schor
02-01-2020 01:19 AM
@Bob_Schor Might be a good idea, although I do not quite get "concatenating part". Could you please show an example? As I imagine, concateneting would mean reading files into memory and somehow combining, which, I assume, runs into the same problem as original Untitled1. Basically there, we are kind of concatenating files 1 by 1 with large file.
Or am I getting something wrong?