09-05-2019 11:08 AM
Hello folks --
Just wanted to give a solution to an issue I've been dealing with past couple days, regarding Application Builder and VISA functions.
Problem: My VISA application works fine in LabVIEW's IDE, but gives Error -1073807346 The Given Session or Object Reference Is Invalid in NI VISA when attempting to do VISA Read.
Solution: When you click on "Build Application (EXE) from VI.." you'll be presented with a properties dialog. Ensure ALL VI's associated with your project are added to the "Always Included" box, in the properties dialog, under the "Source" category.
Hope somebody finds this information useful, as I was led down several different incorrect paths before I found this particular solution.
09-06-2019 10:31 AM
@khall_enmet wrote:
Ensure ALL VI's associated with your project are added to the "Always Included" box, in the properties dialog, under the "Source" category.
That should only be required if you are dynamically calling a VI. Any static VI references (subVIs, Strict VI References) to the main VI (and any "Always Included" VIs) will be captured automatically.
09-06-2019 10:36 AM
You know what, it looks like I did mistakenly make one of the VI's "Dynamic Dispatch," when I meant to make them all static.
Thanks for pointing that out.