LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to create my own library

hi!
I've written a couple of procedures which I would like to reuse in CVI
as well as in LabView.
So I need a dll incl functionPanel etc.
I've found lots of informations how to built an instrument driver, but
where can I find informations how to create my own library?
Thanks for any hints
Urs


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 1 of 5
(4,763 Views)
ursb@my-deja.com wrote:
>hi!>I've written a couple of procedures which I would like to reuse in CVI>as
well as in LabView.>So I need a dll incl functionPanel etc.>I've found lots
of informations how to built an instrument driver, but>where can I find informations
how to create my own library?>Thanks for any hints>Urs>>>Sent via Deja.com
http://www.deja.com/>Before you buy.

Urs,

There are a couple of things you can do to use these functions in other applications.
The first and simplest way is to #include the header file where these functions
are defined and add the .c file to the project. You should then be able to
call any of the functions you have written in the .c & .h file. This .c file
should only have your functions and no main as this would be in your actual
applica
tions .c file.

If you wish to use a dll you'll first need to create the dll, this will require
a dllmain function and therefore some changes to your c file. There is a
KnowledgeBase entry on creating DLLS and exporting the functions you want
access to. You can search the Knowledge Base at www.ni.com/support, the Knowledge
Base entry that I'm referring to is "DIRECT-3U6SEL". You may also want to
refer to the Programmer Reference Manual for LabWindows/CVI, page 3-20 for
more information.

Best of luck.
Kamran Shah
National Instruments
0 Kudos
Message 2 of 5
(4,763 Views)
> hi!
> I've written a couple of procedures which I would like to reuse in CVI
> as well as in LabView.
>

Maybe I have to describe my problem(??) more precisely.
I would like to generate function panels (*.fp) to the procedures I've
written already. I've understood how to create and change a fp.
I do not understand (yet) how to bring together *.fp / *.h/ *.c of my
function. I would like it to behave like a library function or at least
as an instrument.
Afterwards another item is how to add this function as VI to LabView
which will be introduced here soon.

Thanks Urs


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 3 of 5
(4,763 Views)
> > I've written a couple of procedures which I would like to reuse in CVI
> > as well as in LabView.
> >
>
> Maybe I have to describe my problem(??) more precisely.
> I would like to generate function panels (*.fp) to the procedures I've
> written already. I've understood how to create and change a fp.
> I do not understand (yet) how to bring together *.fp / *.h/ *.c of my
> function. I would like it to behave like a library function or at least
> as an instrument.
> Afterwards another item is how to add this function as VI to LabView
> which will be introduced here soon.
>

The most general way is to make a DLL from the .c and .h files.
This is quite easy in CVI. If you have a .fp and DLL, then
there is a menu item in LV to import a CVI Function Panel.

Greg
McKaskle
0 Kudos
Message 4 of 5
(4,763 Views)
In article <87bcot$sem$1@nnrp1.deja.com>,
ursb@my-deja.com wrote:
>
>
> > hi!
> > I've written a couple of procedures which I would like to reuse in
> > CVI as well as in LabView.
> >
>
> Maybe I have to describe my problem(??) more precisely.
> I would like to generate function panels (*.fp) to the procedures I've
> written already. I've understood how to create and change a fp.
> I do not understand (yet) how to bring together *.fp / *.h/ *.c of my
> function. I would like it to behave like a library function or at
least
> as an instrument.
> Afterwards another item is how to add this function as VI to LabView
> which will be introduced here soon.

Thanks to the hints i got I'm able now to gebnerate dll and ti add it as
a library to my CVI project.
I' was
able also to design a fp to my function.
I does not know how to "link" the fp with the *.c / *.h /*.dll

Any hints?

Thanks a lot
Urs


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 5 of 5
(4,763 Views)