LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Function Libraries/Instruments

Hello,

I am trying to take a bunch of my commonly used code and create a library from it using the function tree. I was able to generate the function tree and the source code but Im not sure how to compile the object code. When I add the library to my ide the tree comes up properly, I can add functions and setup the paramaters using the function pannels, but when I compile the project the linker can not resolve the symbols to the function calls in my function tree source. I can right click on the  Is there some way I have to generate the object code for the function tree, and do I have to add a path to the folder where I have the code stored?

I can't much info in the CVI help, is there a tutorial somewhere anyone knows of?

Thanks
Tyler
0 Kudos
Message 1 of 5
(3,647 Views)
I think I must have mis-communicated my problem, Im not trying to create a DLL library, but instead just the .fp, .c and .h files that are used with a Instrument driver. From looking at the ones in the 'National Instruments\CVI71\toolslib\' folder, I see there is a .c, fp, .fpc, .h, .obj, .sub. I'm assuming the .obj is the object code file but I don't know what the .fpc and .sub are, nor do I know how to properly generate any of these. I created the .fp, .c, and .h files based on the ones in the toolslib folder.
I see there is a menu under the options menu in CVI 7.1 that is generate object code, but when I tired that the linker was unable to find and link the object code (undefined symbol errors). Is there a search path for the linker I have to change so it searches in my insturment driver folder for the object code?

Hope this helps clarify what I am trying to accomplish.
Tyler

Message Edited by RadioAct on 06-06-2006 10:47 AM

0 Kudos
Message 3 of 5
(3,620 Views)
For the meaning of various file types in a instrument driver you can search in the online help by "Instrument Driver Files": it gives you an explanation of the file needed to use an instrument driver given the instrument type (there is no description for .fpc files, though...)
 
When you execute the Create object file menu item the system is basically compiling the file and generating the .obj file related to your source code: the undefined identifier error usually refers to a missing include file and normally the compiler stops on the line that caused the error, so you can detect which function is involved and look for the specific #include to add to the .c file. No linking process is involved in this (it is equivalent to using Build >> Compile xxxx.c menu item).
 
Keep in mind that an instrument driver can be used at source level in your applications and you should be able to completely debug it this way before creating the function tree and object code which are necessary to re-use this piece of code in other projects without need to include the corresponding source.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 5
(3,598 Views)
As an FYI, .fpc files are not really a standard part of an instrument driver, at least as defined by the IVI Foundation, or the VXIpnp specifications. However, they're used sometimes with CVI function panels nevertheless, mainly in the standard CVI libraries, although they can also be used by anyone who creates an .fp.

The .fpc file contains the information for customizing the input for some of the parameter controls in a function panel. I'm referring to the small buttons with three dots that appear sometimes next to a control. Some of these are built in, such as those that appear in SetCtrlAttribute, for example. But others are created by the user. You get these customizations by selecting Tools>>Customize Function Panels when you're editing a function panel. When you're done, the .fpc file is automatically created for you by CVI.

Luis
0 Kudos
Message 5 of 5
(3,581 Views)