Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-DAQ and tcl/tk?

Highlighted
Has anyone had any luck using tcl/tk as the GUI of an
application that uses the NI-DAQ libraries? I'd like to
know what you did to bring the two together (the basics).

Thanks
Patrick Cevasco
0 Kudos
Message 1 of 2
(1,317 Views)
Patrick Cevasco wrote:
>
>Has anyone had any luck using tcl/tk as the GUI of an
>application that uses the NI-DAQ libraries? I'd like to
>know what you did to bring the two together (the basics).

Hi Patrick,

Not in Tcl/Tk, in Java. The idea will probably be the same,
however:

The C part:
Once you have Ni-Daq installed (verify this by using the NiDaq
test panel)), there is a header file, \include\nidaq.h,
which gives access to all NiDaq functions. Include this file.
When compiling, also use the library \lib\nidaq32.lib

Now you only need to access C from Tcl. As far as I know,
that's quite easy. In Java, I had to make an intermediate DLL,
which can be accessed by the java-native interface, and which
passes all
calls to the NiDaq functions.

To make the required DLL, I used the following line: (MSVC,
compiled from the command line)

"cl -Ic:\ni-daq\include -Ic:\java\jdk\include -Ic:\java\jdk\include\win32
c:\ni-daq\lib\nidaq32.lib -LD ptt_util_NiDaqLib.c -FeNiDaqLib.dll"

Hope it helps,
Walter van Iterson
0 Kudos
Message 2 of 2
(1,317 Views)