LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to convert labview g code to c language

is there anyway to convert labview g code to c/c++ language ,include block diagram and front panel , use some labview code to convert , not an .exe toolkit
0 Kudos
Message 1 of 14
(2,616 Views)
Message 2 of 14
(2,601 Views)

The obvious response on a LabVIEW forum is of course:

 

WHY convert LabVIEW g code to c language?

 

There are several ways to call LabVIEW code from C code...

0 Kudos
Message 3 of 14
(2,568 Views)

@8259 wrote:
is there anyway to convert labview g code to c/c++ language ,include block diagram and front panel , use some labview code to convert , not an .exe toolkit

1. Yes you can convert it. Manually.

2. No ready made one that functions good. Maybe a Project for you?

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 14
(2,540 Views)

@Yamaeda wrote:

@8259 wrote:
is there anyway to convert labview g code to c/c++ language ,include block diagram and front panel , use some labview code to convert , not an .exe toolkit

1. Yes you can convert it. Manually.


I dismissed that option, as OP stated: "use some labview code to convert".

 

It will need a hole lot of LabVIEW code to convert!

 


@Yamaeda wrote:

2. No ready made one that functions good. Maybe a Project for you?


Started that a few times, over the years. It's the pot of gold at the end of the rainbow, but very educational.

 

Last time with OO, it got quite serious. C++11 triggered that, as it got native threading.

 

Sadly, implementing the easy 40% of the functionality is 1% of the workload...  In other words, you'll hit a wall at some point.

 

I got polymorphism working, which was quite exciting.

I got loops working, incl. shift registers and feedback nodes (not timed loops though, hate them).

I got threading working, on VI level.

I got the most common functions working (math, some strings, clusters, arrays).

I could even cross compile to RPi, which was pretty cool.

 

Scaling up to subVIs, and implementing rest of the functions is a year's work, for 40 people...

 

GUIs will easily triple that workload.

Message 5 of 14
(2,529 Views)

wiebe@CARYA wrote:

@Yamaeda wrote:

@8259 wrote:
is there anyway to convert labview g code to c/c++ language ,include block diagram and front panel , use some labview code to convert , not an .exe toolkit

1. Yes you can convert it. Manually.


I dismissed that option, as OP stated: "use some labview code to convert".

 

It will need a hole lot of LabVIEW code to convert!

 


@Yamaeda wrote:

2. No ready made one that functions good. Maybe a Project for you?



Yeah i suspect it'll be a black hole of a Project. 🙂

I saw the question as a two parter: can you convert? and is there some automated feature? Thus my answer. Also, it's friday. 😛

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

Qestit Systems
Certified-LabVIEW-Developer
Message 6 of 14
(2,525 Views)

NI has LabVIEW C Generator Module.  Saw it a few years ago during NIWeek.

Anyone tried that module?

https://www.ni.com/en-us/support/downloads/software-products/download.labview-c-generator-module.htm...

 

 

George Zou
0 Kudos
Message 7 of 14
(2,503 Views)

@zou wrote:

NI has LabVIEW C Generator Module.  Saw it a few years ago during NIWeek.

Anyone tried that module?

https://www.ni.com/en-us/support/downloads/software-products/download.labview-c-generator-module.htm...

 


I was thinking of mentioning that but decided not to. 😉 It is just for embedded targets (thus no conversion of the UI) and has other limitations, including no support for modern versions and a high price(?). For more information, also read Rolf's comments here.

Message 8 of 14
(2,498 Views)

Related (but offtopic!), the NXG web module will generate "text code" that browsers understand. 🙂

Message 9 of 14
(2,485 Views)
@ wiebe@CARYA@Yamaeda i want to convert g code to c/c++ , and then cross compile it to binary file and run on my arm linux board, including front panel display on LCD . or is there labview runtime could let labview vi directly run on arm linux board ?
0 Kudos
Message 10 of 14
(2,437 Views)