Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

JNI and LabVIEW

Hi all,
please I need some help since I'm new to this whole stuff:
I read som general JNI-Tutorials but they weren't helpful cause I already have a dll created in LabVIEW and I want to call this one. So now I'm not free to choose the function names. What should I do?
Thank you
G.
0 Kudos
Message 1 of 7
(4,110 Views)
Hi gouvi,

can you please add your VI, so I may have a look into.

Regards
TomBaum
0 Kudos
Message 2 of 7
(4,089 Views)
Why is the vi needed, shouldn't it be that you can call the dll you want? Do I have to prepare it somehow?
Sorry this may seem awfully dumb, but I'm really a total newbie.
Of course I'll add the vi. It's a DAQ-VI which just gets data from one virtual channel that represents an anlogue input and displays them in a graph.

Message Edited by gouvi on 01-23-2007 03:42 AM

0 Kudos
Message 3 of 7
(4,080 Views)
Hi,

to have a look into a VI is often faster and more detailed then asking you questions in the forum about details.

TomBaum

0 Kudos
Message 4 of 7
(4,072 Views)
Hi gouvi,

the easiesst way to open a dll-file is to use the Call Library Function Node. Use the search function to find this node in your function panel. With a right click in this function you can open the LV help for this node and with a double click on the node you can open the menu for editing this node. There you can enter the path of the dll file. Use also the context-help for more  information, press 'ctrl+h'.

Regards
TomBaum

0 Kudos
Message 5 of 7
(4,064 Views)
 
Hi gouvi,
 
You're right - when you use Java Native Interface, you don't have any flexibility to choose the "C" function name.  Since there is no way to get this JNI name to match the LV DLL function name, you will need to compile a small wrapper DLL that exports the "JNI-style" names and calls the names exported from the LV-built DLL.  In other words, a "thunking" DLL. 

Jonathan
0 Kudos
Message 6 of 7
(4,048 Views)

Thank you all for your nice answers, I now managed to do it (partly) but I'm confident to get the rest working, too.

Sincerely, Gouvi Smiley Wink

0 Kudos
Message 7 of 7
(4,031 Views)