LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HOW to create a source code in NI like c language

Instead of creating a subvi( which has many controls and indicators ) and i make the code as a source code and add in the main code like in the case structure.

 

please if possible explain with help of a example 

0 Kudos
Message 1 of 6
(3,464 Views)

Ummm.... what? I'm sorry, but your question is not clear at all. Are you asking if it's possible to generate C code from LabVIEW? Are you asking if it's possible to use C code in LabVIEW? Are you asking how to use the formula node, which has a C-like syntax?

0 Kudos
Message 2 of 6
(3,459 Views)

Scratching my head.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 3 of 6
(3,428 Views)

LabVIEW Windows/CVI may be a choice if you are customed to C.

0 Kudos
Message 4 of 6
(3,404 Views)

@9703282993 wrote:

Instead of creating a subvi( which has many controls and indicators ) and i make the code as a source code and add in the main code like in the case structure.

 

please if possible explain with help of a example 



The front panel of a sub-vi are optimized away when compiled, so they dont affect the result. If you dont want to see the sub-vi you can select "Inline subvi" in LV2010 which'll place the sub vi's content instead.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 6
(3,377 Views)

Maybe you don't understand.  In Labview, the block diagram is the source code.  Its graphical, not text.  You cannot create text source code in Labview.  I don't see how a mere subvi icon in your main VI would not be acceptable.  It's like making a function call in C.  It takes a line of code to make a function call in C.  It takes a little space on the block diagram for an icon to make a subvi call.  You need to get used to the graphical concept and forget about text.  This may be why you have lots of control and indicators.  Unlike in text code, you don't need to create variables to hold the values of each and every operation.  Wires take care of passing the output of one function directly to the next funtion without the need for controls or indicators or local variables.  Maybe you should post your vi here so we can give you some pointers.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 6 of 6
(3,342 Views)