Some courses and learning paths on NI Learning Center may not appear on learner dashboards. Our team is actively investigating.

If you encounter access issues, please contact services@ni.com and include the learner’s name, email, service ID or EA number, and the list of required courses.

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
(5,074 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
(5,073 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
(5,066 Views)

The code interface node was indeed deprecated after 2010.

 

Code Interface Node.PNG

Cory K
0 Kudos
Message 4 of 8
(5,059 Views)

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

0 Kudos
Message 5 of 8
(5,055 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
(5,045 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
(5,029 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
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 8 of 8
(4,966 Views)