07-28-2010 02:33 AM
Hello,
For several bench tests that are performed, a common excel file is created and I am developing an excel report using the report generation toolkit. I am using "Excel Easy Table.vi" to create the report. Report has to be accessible any time during the bench tests. Hence, I am saving the report after every test run has completed.
The attached snippet works fine for the first test, but I am having problems with data appending for second test and so on... The data for previous tests is getting wiped off (second image attached has first and second row empty, these rows had data for the first test before the second test was reported and saved). I believe this has to do with the file handle class, but so far I have been unable to figure out a workaround.
Any comments/suggestions are welcome.
Thanks.
07-28-2010 03:42 AM
You are creating a new report every time you append your data. Hence it's not appending it to the old file, its creating a brand new blank file, writing to data and then overwriting your previous save.
Wire your file path to the "template (empty)" terminal on the new report VI.
07-28-2010 11:31 AM
Thanks. I had tried that already, but I got error message at "Save Report to File", since the file could not be opened. Hence, I could not really wire the file path together at New Report.vi and Save Report to File.vi.
If the fie path is not wired to Save Report to File.vi, then the file is not saved after each update.
07-28-2010 01:29 PM
I forgot to mention that I am using TestStand as a sequencer to queue up test steps and create an Array which is then being sent to LabVIEW for reporting after completion of every test. I could not find a way to pass "report out" object class from "New Report.vi" to TestStand.
I was able to prototype report appending completely in LabVIEW where the New Report is created just once followed by Save at the end after all looping is over. But, I was wondering if there was a way where this could work when data rows are being passed from TestStand.
Thanks.
07-29-2010
06:08 PM
- last edited on
10-20-2024
12:09 PM
by
Content Cleaner
Hi Troy,
While TestStand does not support the LabVIEW class data type, you can modify your VI's to be compatible with your sequence by flattening the reference to a string when passing the reference to TestStand, then unflattening it when you pass it back to LabVIEW. See the code snippet below:
If you are using TestStand, you may also want to consider using the built in reporting functionality rather than developing your own report generation code. TestStand can generate reports in many formats, including text, html, and xml. For more information, take a look at these resources:
Best Practices for NI TestStand Report Generation and Customization
Report Options Dialog Box - NI TestStand Help
If you provide a bit more detail on what you are looking to report, I would be happy to help you look at options to implement it using either LabVIEW or TestStand built in reporting functionality.
07-29-2010 06:13 PM
Thanks for the information, Al.