04-09-2022 12:51 AM
I want to generate a HTML code from the LabVIEW VI code, such that I can be able to implement rest of the development using HTML.
Is there any possibility to achieve it ?
04-09-2022 01:21 AM - edited 04-09-2022 01:22 AM
Yes. It's called a "manual port". Sorry, I don't think there is any way to do this automatically.
04-09-2022
12:05 PM
- last edited on
09-05-2025
11:04 AM
by
Content Cleaner
There is no equivalence between a full featured graphical programming language and a markup language.
That's like asking how to paint the Mona Lisa with a typewriter! (the result will not be the same!).
There is of course the LabVIEW G web development software.
Could you explain in more details what you are trying to do instead of how you are trying to do it?
04-09-2022
12:08 PM
- last edited on
09-05-2025
11:04 AM
by
Content Cleaner
I'm not sure exactly what you're looking for (in terms of implementing the VI's functionality, I guess you'll need something other than HTML, like Node/JS/TS/whatever else as a backend), but for generating an HTML version of the front panel you might get somewhere with the G Web Development tool.
It's intended (as I understand it) for creating an HTML frontend for existing LabVIEW code, but whether it can be made to generate something useful to move away from LabVIEW, I don't know. For sure, you'd need to change the data sources for the indicators, and their source was unclear to me regarding how it worked when I looked at the output using e.g. Chrome Web Dev tooling.
Maybe if I was more aware of common ways to channel data with HTML frontends, it would be clear though?
04-09-2022 09:14 PM
Listen to Mr. Altenbach. He is the person you want to take advice from.
04-15-2022 06:18 AM
Hi,
I am developing an application using LabVIEW software, I want to convert entire LabVIEW source code to another language (HTML/ JavaScript). So that, another developer can modify the code in his known language (HTML/ JavaScript).
Example:
I had an addition code in LabVIEW and I converted it into some another language (JavaScript) and gave it to another developer. Now, he should be able to add some other functionality to the converted code.
04-15-2022 07:17 AM
LabVIEW uses features that are not available in JavaScript and HTML, such as access to the file system and hardware ports. You cannot convert these features. These features are not available in HTML/JavaScript for very good reasons and will probably be never available.
Automatically converting LabVIEW Programs (or, to be specific, G-Code) into other languages is extremely tricky. You could say: What happens in LabVIEW stays in LabVIEW.
04-15-2022 08:58 AM
No, literally NO (may be possible with among some text languages but not for G Code)
04-17-2022 10:33 AM - edited 04-17-2022 10:35 AM
I would argue that if you ask to convert a program written in a real programming language into HTML that you probably haven't really understood the difference between what is programming and what is creating a web page.
HTML is a markup language meant to describe the layout and contents of a document, usually a webpage, not a programming language to write a program. You could argue that with the help of embedded Java Script a HTML page could also contain programming elements. But my admittedly biased opinion about Java Script is that if you try to solve a programming problem with it you end up having two problems, one is your programming problem and the other is the use of Java Script.
And while there has been a C Generator Toolkit for LabVIEW in the past (it has been discontinued since and had a price tag that made it definitely unattractive even for rich corporate clients and absolutely and completely unreachable for normal people like you and me, the resulting code was not something you could have given to an average C++ programmer to make any sense of. LabVIEW is in many ways a unique programming language where parallelism and multithreading are a natural part of the data flow programming model. And exactly these two things are VERY tricky to do right in a traditional programming languages. The LabVIEW developers have to deal with that as LabVIEW itself is written in C++, but the average LabVIEW user simply gets that for free without even being aware of it.
But to translate that LabVIEW code into a traditional, sequential text program flow that is not only sometimes doing the right thing and still maintains the full features of the LabVIEW code is VERY complex and the resulting code is anything but trivial to read. If you would give that code to someone else as a base to work with, he would first ask you how many armadillos you let walk over your keyboard and then, who in his sane mind came up with this type of complex programming.
Even automated translation between different traditional text based languages is a rather complex and never fully seamless process. Doing the same for a fundamentally different programming approach is not really impossible, but pretty much beyond anyone's tolerance level for complex, expensive and still almost useless fidgetry.