12-08-2008 05:52 PM
I get the following error when trying to run a distribution kit I created. Initialization Error: A code library required by VISA could not be located or loaded. Check your connections and make sure you have the right instrument descriptor. I have written a program that communicates to a FSH spectrum analyzer. Any ideas on what is missing from the distribution kit?
brenda.gillcrist@navy.mil
12-09-2008 05:17 PM
Hi Brenda,
Do you get this error while running the distribution kit (ie, installing the CVI application), or while running the actual application (one you've installed it from the distribution kit)?
If it is the latter, the cause is probably that NI-VISA was not included in the distribution kit. You can add this component to your distribution kit from the "Drivers & Components" Tab of the Edit Installer window.
Hope this helps!
12-09-2008 05:21 PM
12-09-2008 05:46 PM
I guess a better question is how do I properly include it in the distribution kit instead of editing the installer?
Brenda
12-09-2008 06:26 PM
Hi Brenda,
The distribution kit is the installer. When you create an installer in CVI, you can choose to include additional components that also get installed along with your application like the CVI Runtime Engine, and any neccessary driver.
To create a new installer/distribution kit, open your project and click Build» Manage Distributions and create a new configuration for a distribution. This will only create the configuration for the distribution, not the actual distribution. When you are done configuring it, you can build the distribution from Build»Build Active.
When I mentioned that you could edit the distribution earlier, I meant that you could edit the configuration of your old distribution and re-build it once you added NI-VISA to it.
This is a good resource on the topic:
Developer Zone Tutorial: Distributing Applications with the LabWindows/CVI 8.x Distribution Kit
12-10-2008 11:14 AM
Jervin,
I have Labwindows/CVI 7.0.0 I have looked at the help documentation and it isn't clear to me how to add NI-VISA to the distribution kit. Do you have any other documentation that I can refer to?
thank you for your assistance
Brenda
12-11-2008 02:42 AM
The ability to package drivers like NI-VISA into the distribution kit is available only in version 8.0 and later. Since you are using 7.0, you'll have to install NI-VISA to your target machine separately from your distribution kit, in the same manner you installed it to your development machine.
Mert A.
National Instruments
12-18-2008 05:05 PM
I developed some NI Labwindows/CVI software to communicate to a Rhode Schwarz spectrum analyzer. The spectrum analyzer cable is an optical to rs232 cable. I serial to usb cable is used to connect the spectrum analyzer cable to a laptop. I inherited this code and have made modifications to it. When I try to install the software via a distribution kit I get errors that NI-VISA has not been installed. Is there any reason why NI_VISA is required for what I am trying to do? I have purchased labwindows cvi, and the drivers from Rhode Schwarz. Drivers are installed for the serial to usb cable as well.
Brenda
12-18-2008 07:29 PM
It depends how which libraries/functions you are using to do the serial communication with the instrument. If the code you inherited/modified makes any calls to NI-VISA functions (e.g. viRead, viWrite, etc.), then you will need to install NI-VISA to the target computer. If your program instead calls the RS-232 library (i.e functions like OpenCom, ComRd, ComWrt, etc.), then you should not need VISA. Can you confirm that your program makes no VISA calls?
Mert A.
National Instruments
12-19-2008 03:41 AM
If you decide to use NI-VISA, you would be for sure better off from my point of view.
1) There is an application note available how to remote control R&S spectrum analyzers via plain SCPI commands: http://www2.rohde-schwarz.com/en/service_and_support/Downloads/Drivers/?rckb=1&type=25&downid=2567
2) even more convenient is to get rid of all the SCPI command and use the R&S instrument drivers for LabWindows/CVI: http://www.rohde-schwarz.com/driver/FSHLabWindows.html (includes an application example) Also an update for this instrument driver for the new FSH4/8 generation on the roadmap
regards juergen