04-04-2019 03:46 PM
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.
I have attached the code, error msg, and log file.
04-04-2019 04:18 PM
You haven't attached the code. You attached a picture of the code that has been saved as a PDF.
04-04-2019 04:29 PM
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
04-04-2019 04:47 PM
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.
04-04-2019 07:21 PM
04-05-2019 08:42 AM
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.
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
04-05-2019 11:36 AM
I already fixed the Excel Sort Data problem last month.
04-05-2019 11:49 AM
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
04-05-2019 12:55 PM
Which Excel version is running on your dev. machine and which on your target computer?
Regards, Jens
04-05-2019 12:59 PM
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.