LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Memory is full error using To .NET Object.vi

Solved!
Go to solution

Rolf:  You get a Kudo!!!  Thank you all for your kind responses.

Below is the new block diagram and it allowed To .NET Object.vi to run 7,852,302 times according to the LabVIEW Profile tool.

Of course used error clusters for data flow control to make sure the reference doesn't close before it should.  We manufacture UL Recognized hazardous gas sensors and do not want any large changes in how we handle testing and assignment of nA/ppm to each and every sensor we make.  Idea is for the people in Mfg. to scan a sheet of 60 printed sensors and press a go button.  Gas flows are automated with LabVIEW (*.exe from App Builder) based on the PN scanned etc.  Then, the Excel file automatically goes to QA/QC records and a csv file to a bar code printer.  I think changing to TDM(S) would confuse manufacturing staff and the UL Inspectors who make random unscheduled visits do not like changes to an established process.

Thank you all again.

.NET Write to Sheet CloseRefnum r5.png

 

0 Kudos
Message 11 of 13
(1,218 Views)
Solution
Accepted by Saturn233207

Rolf and fellow LabVIEW development colleagues:

While modifying the way I write cell by cell to an Excel template is certainly a good and accepted solution, in this case we have:

  1. A *.csv file with all of the run data
  2. An Excel *.xltx template file that contains no cell formulas, just conditional formatting.  So, we do not need to update any cell references.  All values are calculated by LabVIEW and written to the *xltx which is then saved as*.xlsx in QA/QC archives.
  3. Writing a large number of cells, even RxR or CxC takes a lot of time.

So, what I decided to do was use the Microsoft.Office.Interop.Excel (v15.0.0.0) assembly to simply copy the *.csv and place it as the first sheet in the *.xltx.  The *.csv is also opened as a template because we do not need to save it and will later delete it.

How do I copy a *.csv file to an Excel *.xltx template?  A clean and very well commented vi is attached and shown in snippet below.  I do have a few questions there if you wish to respond.

CopyCSVtoXLTX REV_5.png

Message 12 of 13
(1,203 Views)

This was the most helpful post at this forum so far. Thank you. I have just cracked six months lasting mystery.

0 Kudos
Message 13 of 13
(879 Views)