LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview with C?

Hi,
I'm a new user of labview. I wonder whether
I can use a piece of C program in the Labview's
program. Any information would be appreciated.

Thanks a lot.



Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 1 of 3
(3,845 Views)
> I'm a new user of labview. I wonder whether
> I can use a piece of C program in the Labview's
> program. Any information would be appreciated.
>

You should look at using either the Call Library
Function Node or the CIN node. The Call Library
node calls into a DLL or shared library; so if you
can compile the C code into a DLL, then you can
call it from LV. The CIN is a similar mechanism
that allows you to call into C code. The CLF
node is considerably easier to use and typically
powerful enough for the most jobs.

If the C code can't be made into a DLL, but can
be made into an executable, then you can use the
System Exec node to call an EXE. You can pass an
entire command line to pass arguments for whatever
you need. If you need to pass information back
from an
EXE, its easiest to use file I/O. In
otherwords, write the information from the C
EXE into a temporary file and then read if from LV
after the EXE finishes.

Again, the DLL is the easiest and pretty powerful.

Greg McKaskle
0 Kudos
Message 2 of 3
(3,845 Views)
You can through several different methods. For standard LabVIEW users
you can either write a CIN (code interface node) in C which LabVIEW
then uses as a function. Or you can write a DLL in C which LabVIEW can
call via a CLF (code library function?).


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