LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

H/W Windows NT API

Hi everybody!

I would like to know, if someone has tried to call API linkage library
from LabVIEW (*.lib and its *.dll)?

We have a PCI board that came with that API lib/dll to be used on
Visual C++. And we would like to handle the interface (call board's
functions) and data ingest from LabVIEW instead.


Many Thanks,
Javi


Sent via Deja.com
http://www.deja.com/
0 Kudos
Message 1 of 3
(2,382 Views)
Javi,

You can call the dll's from LabVIEW. It is easy, if you know what your
doing. If not, get used to save all your VI's before running, because LV
will crash frequentlly. Actually this is not LV's fault, same can happen in
C++, e.g. if you pass a pointer to a integer, when a cluster is expected.

In VC++ the calling conventions of the dll are defined in a .h file. This
will tell the compiler you've made an error. E.g. you cannot call a function
with a integer, if the function expects something else. In LabVIEW, you have
to check this yourself.

Sometimes it can be very difficult to call a function e.g. when you have to
pass several a string pointer in a bundle, bundle in a bundle, or other more
complicated data structures.

Sometimes I find it useful to crea
te a VI with an enumerated as input and a
value as output. With some creativety you can build a VI to create the
enumerated and corresponding output strings (string array) automatically
from the .h file.

Once you know the trick, it is easy to call dll's from within LV. On the
other hand, someone might allready done the work, and might be willing to
share their work.

Regards,

Wiebe Walstra

--
AIR technical Automation
www.air.nl

wrote in message news:9604jh$9o9$1@nnrp1.deja.com...
Hi everybody!

I would like to know, if someone has tried to call API linkage library
from LabVIEW (*.lib and its *.dll)?

We have a PCI board that came with that API lib/dll to be used on
Visual C++. And we would like to handle the interface (call board's
functions) and data ingest from LabVIEW instead.


Many Thanks,
Javi


Sent via Deja.com
http://www.deja.com/
0 Kudos
Message 2 of 3
(2,382 Views)
I once wrote a driver to call DAQ boards dll. I just followed example
either in manual or in some app note on NI site. I would disect some VI's
for which call dlls. It is pretty easy as long as you have a good
documentation for the dll. I ended up creating bunch of VI's each
implementing particular dll call, e.g "initialize board.vi", "start
acquisition.vi", etc., it made it easier to debug.

Reinis Kanders
wrote in message news:9604jh$9o9$1@nnrp1.deja.com...
> Hi everybody!
>
> I would like to know, if someone has tried to call API linkage library
> from LabVIEW (*.lib and its *.dll)?
>
> We have a PCI board that came with that API lib/dll to be used on
> Visual C++. And we would like to handle the interface (call board's
> functions)
and data ingest from LabVIEW instead.
>
>
> Many Thanks,
> Javi
>
>
> Sent via Deja.com
> http://www.deja.com/
0 Kudos
Message 3 of 3
(2,382 Views)