From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use C code in LabVIEW?

Hi all,

 

I'd like to know that if I have a C code with some input and output, how can I embed my C code into LabVIEW?

I did some research and find out there's a CIN (code interface node), however it's no longer supported at least from LabVIEW 2010?

I'm using LabVIEW 2012 on Windows 7, so anyone has ideas on this?

 

Thanks for pointing me to the right directions!

 

 

0 Kudos
Message 1 of 8
(3,403 Views)

Is it compiled into a DLL? There is a "Call Library Function Node" that you can use to input and output to a DLL.

 

See this KB article http://digital.ni.com/public.nsf/allkb/DCB90714981A1F148625731E00797C33

Cory K
Message 2 of 8
(3,402 Views)

I know how to play with .dll with the call library node, however I'm interested to know how a C file can be used in Labview

0 Kudos
Message 3 of 8
(3,395 Views)

The code interface node was indeed deprecated after 2010.

 

Code Interface Node.PNG

Cory K
0 Kudos
Message 4 of 8
(3,388 Views)

Thanks for pointing that out. So how can I use a C file in LabVIEW?

0 Kudos
Message 5 of 8
(3,384 Views)

@Z.Wei wrote:

Thanks for pointing that out. So how can I use a C file in LabVIEW?


You can't. You can call a .dll.  The "formula node" has some "C like" syntax for calculations and logic, but those are your options.

0 Kudos
Message 6 of 8
(3,374 Views)

@BowenM wrote:

@Z.Wei wrote:

Thanks for pointing that out. So how can I use a C file in LabVIEW?


You can't. You can call a .dll.  The "formula node" has some "C like" syntax for calculations and logic, but those are your options.


Thanks. Probably I need to compile it to a dll before using it. 🙂

0 Kudos
Message 7 of 8
(3,358 Views)

@Z.Wei wrote:

@BowenM wrote:

@Z.Wei wrote:

Thanks for pointing that out. So how can I use a C file in LabVIEW?


You can't. You can call a .dll.  The "formula node" has some "C like" syntax for calculations and logic, but those are your options.


Thanks. Probably I need to compile it to a dll before using it. 🙂


Not just probably! Smiley Very Happy It's the most straigtforth and simple possibility.

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 8
(3,295 Views)