10-26-2012 02:33 PM
Hi Greg,
It seems you have done everything correctly to me. Are you trying to run the sample code in CVI? If you wouldnt mind could you describe your setup and the steps you take to run the code. If you are not using CVI, try adding the code there and see if that works for you.
11-04-2012 06:39 PM
Hi Patrick,
All i'm doing to run the code is opening it on dev-c++ and executing from there. I've tried it with both the visa header file in the same folder as the example code and also by including the pathway to the visa header file in the IVI foundation folder. Power was knocked out here so i'll try to run it on cvi and get back to you.
Greg
11-06-2012 09:13 AM
Ran it on the CVI and received this error
NON-FATAL RUN-TIME ERROR: "InstrumentExample.c", line 81, col 13, thread id 0x00001558: Function viOpen: (return value == -1073807202 [0xbfff009e]). A code library required by VISA could not be located or loaded.
visa32.dll in system32 exists and i checked that the visa 5.2 runtime driver is being included in the installer.
11-07-2012 05:08 PM
Hi Greg,
From everything you have told me so far this seems like it should be working. Are you able to open VISA test panels in Measurement and Automation Explorer? From there you should be able to Query the device with *IDN?. If you can do that we can at least remove the drivers and visa32.dll from the reasons causing this problem.
11-07-2012 05:15 PM
Hi Greg,
I don’t know how I didn’t notice this before but you will also need the GPIB drivers (488.2). This was a remedy for a customer on the forum listed below. Searching 488.2 from ni.com/drivers should give you the list of all the versions to download.
11-12-2012 08:29 AM
Hi Patrick,
Thanks, that did it.
10-25-2017 08:32 AM
Hello! I had the same problem, but the solutions presented on this forum didn't help. Here is my solution.
I checked my code with code generated by Keysight Command Expert. The problem was that I installed 2 version of VISA, one from the Keysight one from the National Instruments. I used the library from NI that is located here C:\Program Files (x86)\IVI Foundation\VISA\WinNT, but I had to use this C:\Program Files (x86)\IVI Foundation\VISA\WinNT\ktvisa.