LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save Report to Fil.vi crashes when built as executable

I have a sub-vi that runs fine on my dev system, but crashes on the target when built as an executable. I tried the fix below, to no avail.

 

https://forums.ni.com/t5/LabVIEW/Save-Report-to-File-vi-does-not-work-when-built-into-executable/td-...

 

I have attached the code, error msg, and log file.

Download All
0 Kudos
Message 1 of 15
(2,914 Views)

You haven't attached the code.  You attached a picture of the code that has been saved as a PDF. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 15
(2,899 Views)

You need to attach sufficient code that we can test and try to reproduce your error.  If you have more than a few VIs, put them all in a folder, compress the folder, and attach the resulting .zip file (be sure to tell us which is the Top Level VI, if it isn't obvious).  One of the picture (why did you embed it in a Word document?) shows some Excel data -- it would be helpful if you included either a sample Data Set or if you told us how to use your program to generate "representative" data.

 

It might also be helpful to know more about your environment.  What OS?  How many bits in the OS?  How many bits in LabVIEW (if you attach your code, you don't have to tell us the LabVIEW Version -- we can figure it out).  What version (and what "bittedness") of Office are you using?  Not all of these things matter, but the more we know, the more helpful we can be.

 

Incidentally, I've had no problem creating multi-sheet Excel Workbooks, complete with tables and graphs, using LabVIEW and running as an Executable, so the problem isn't LabVIEW ...

 

Bob Schor

0 Kudos
Message 3 of 15
(2,890 Views)

Please zip up your whole project (with build specifications) and upload.  I'm not sure why you would get a "Disk not in Drive" error unless your project is referencing something on a removable drive that is no longer connected.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 4 of 15
(2,882 Views)

Here is the zip file

0 Kudos
Message 5 of 15
(2,874 Views)

Thank you, and Congratulations, you Found a Bug (and I know how to fix it).  Well, maybe a "partial" bug -- saving your code for LabVIEW 2016 yields an Executable that builds without a problem.

 

Here's what happens when you build with LabVIEW 2018 -- you get an error saying a VI broke during the Build process from being saved without a block diagram.  This isn't quite right -- what is really happening is that a VI in LabVIEW's vi.lib has a broken "Run" error, meaning it has a bug that needs to be fixed.  

 

If you scroll to the bottom of the Error Message, it points to a VI in the National Instruments folder in Program Files:  vi.lib\addons\_office\excel.llb\Excel Sort Data.vi.  If you open this file, you will see that it has a broken Run arrow.  Warning -- we are about to modify part of LabVIEW.  Be sure you are running the appropriate version of LabVIEW, i.e. use LabVIEW 2018 to modify files in National Instruments\LabVIEW 2018 (and only do this in the rarest of circumstances!.

 

Right click the broken run arrow -- it should pop up an Error List -- click the button "Show Error".  It will high-light an ActiveX Range Invoke Node.

Excel Sort Data errorExcel Sort Data error

I recommend dragging down the lower edges of the two Case structures (leave enough space for another Property entry) so you can see what happens.  Now right-click the Range node (up where it says "Range") and choose "Relink Invoke Node".  A new property, "SubField1", will be added, and the Run Arrow will show no errors.  Now save the VI, rebuild, and you should be Good to Go.

 

Bob Schor

 

0 Kudos
Message 6 of 15
(2,855 Views)

I already fixed the Excel Sort Data problem last month.

0 Kudos
Message 7 of 15
(2,848 Views)

And is your code still failing to build or to run as an executable?  What I described what what I saw when I attempted to run your code using LabVIEW 2018 -- I got what I thought was the error you were describing, analyzed the error, fixed it, and then was able to successfully build and run the executable.  So it "works for me" -- does it still not work for you?

 

Bob Schor

0 Kudos
Message 8 of 15
(2,842 Views)

Which Excel version is running on your dev. machine and which on your target computer?

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 9 of 15
(2,835 Views)

The code builds fine, it opens the Excel file, but then tries to write the file to some crazy location.

 

I have Excel 2016 on both the dev and target computers.

0 Kudos
Message 10 of 15
(2,831 Views)