08-25-2010 10:07 AM
Possible reason(s):
VISA: (Hex 0xBFFF000E) The given session or object reference is invalid.
I'm using a USB to GPIB connection to a Rohde Schwarz FSV30 Spectrum Analizer from Windows 7.
My program works 100% in LabView but the problem comes in when I've compiled the program into an executable.
I have already installed the NI VISA Run Time Engine 5.0.1 and it still does not work.
I've also installed the NI-488.2 2.73 drivers for the GPIB unit.
Any ideas?
Solved! Go to Solution.
08-25-2010 10:25 AM
Does the instrument show up in MAX?
08-25-2010 10:40 AM
Hey,
the problem when building executables with LabVIEW is, that the driver core of the attribute based instrument drivers (esp.. the VIs which are creating this error) is linked while runtime dynamically to the VIs. The application builder which follows all dependencies and include them into the package fails in this case.
To get a running executable please add manually all VIs for the folder <inst lib>\rzspecan\_utility\rsspecan_core\callbacks\ to the LabVIEW project and everything should work fine.
For more details of this driver refer to http://www.rohde-schwarz.com/appnote/1ma170
So long, juergen
08-27-2010 05:07 AM
Hi Juergen,
I'm sorry to say, but it did not work. I've manually included every VI in <inst lib>\rzspecan\_utility\rsspecan_core\callbacks\ from \_utility to \callbacks and it still gives me the same error after compiling and running the executable.
08-27-2010 05:19 AM
Hi,
maybe my explanations was missleading. You have to inlcude/add all VIs from <inst lib>\rzspecan\_utility\rsspecan_core\callbacks\ to you LabVIEW project. You must not move these VIs with inside the driver.
The situation is, that the LV application builder ist not able to figure out that these VIs are needed while runtime. For that reason you have to tell LV manually, "please include this VI in my executable" by adding this to the LV project.
I hope this helps.
So long, juergen
08-27-2010 05:40 AM
I did understand you the first time and I did include the VIs to the project, but I still get the same error.
08-27-2010 08:23 AM
Please double check whether you added all of these VIs to you project:
rsspecan_core_write.vi
rsspecan_core_attribute_write_int.vi
subrsspecan_core_attribute_express.vi
(all VIs which appearing in the error message)
juergen
08-27-2010 08:47 AM
All VIs which appear in the error message except subrsspecan_core_attribute_express.vi was added.
But the same error still occured when I added subrsspecan_core_attribute_express.vi to the project.
Am I missing something here?
08-27-2010 08:56 AM
Strange. The situation is, that I'm not able to reproduce your configuration due to the fact that I do not have this AppBuilder license.
I know this problem and the described procedure does the trick, ...normally. Please contact someone from NI to get this worked out. Sorry.
08-27-2010 09:45 AM
I've figured it out (eventually), it works now!
After adding the necessary VIs to the project you should also go to the executable properties -> Source Files and then select all files to be "Always Included" to the right side.
Thanks for you help Juergen