LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Load instrument error

Hi,
 
I am having problems loading an instrument. When I create a new file and try to load an instrument that works on another project I keep on getting Project not linked or Project link errors. Does anyone know what is going on? This instrument can be unloaded and loaded in other projects but when I create a brand new one I am having this issue.
 
Also, when I try to load a new instrument in an existing project, I get the exact same error. If I can get one of the fixed then the other will fix itself.
 
Thanks
 
Sebastian
0 Kudos
Message 1 of 7
(3,765 Views)

What type of instrument driver is it (VISA?, IVI?, Other?)?

Do you have Instrument->Search Directories... set to include the path to the driver?

Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 2 of 7
(3,757 Views)

Hi Martin,

I am not sure on the driver what type it is but it has a .fp like we use on all of our other instruments. I included that path but it did not work either. The instrument is an Agilent 4395a spectrum analyser. I'm thinking that maybe it is too old as the readme file references Win 95. Maybe if you could give it a try to see if it works for you than that would be greatly appreciated.

Thanks

Sebastian

0 Kudos
Message 3 of 7
(3,737 Views)
The .fp file is simply a means for easy access to the driver functions in the IDE and has nothing to do with actual code generation.
 
What you have sounds like a pre-VISA style driver. It is definitely not an IVI driver. At a minimum, there should be an .fp file, a c source file and a header file. These files should all be in the same directory and that directory should be in the instrument search path.
 
It sounds to me that the source file for the instrument is not located where CVI is expecting it. If that is the case, it does not get compiled and there is nothing for the linker to resolve because there is no object code derived from the driver.
 
What happens if you try "Attach and Edit Source" for that driver?
 
It is also possible it is a pre-compiled driver in DLL form. If so, there should be an .fp file, a DLL, a header file and a .lib file. If it is this type of driver, you will need to add the .lib file to your project so the linker knows how to use it. You will also have to include the DLL with the distributed program.
 
Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
Message 4 of 7
(3,729 Views)

Hi Martin,

The driver is a dll and it only has the lib, fp, dll and header file. I added the whole folder with all of those files to the path where it searched for the fp file and it did not seem to fix the problem. If the lib file is in the folder, do i still have to add it into Labwindows? If so, could you give me a quick run through as I have not done this before.

Thanks for the help

Sebastian

0 Kudos
Message 5 of 7
(3,725 Views)

You add a .lib file to a project in a similar way to how you added the .fp file: Menu Edit->Add Files to Project->Library...  and navigate to wherever the file is.

JR

0 Kudos
Message 6 of 7
(3,717 Views)

Yes, you have to add the lib file to the project, that way the linker will know how to resolve the links to the functions.

You add a lib file to the project the same way you do any other file, go to Edit->Add Files to Project, select .lib files and then add it using the dialog box.

Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 7 of 7
(3,715 Views)