LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting LabVIEW VI to equivalent HTML code

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 ?

0 Kudos
Message 1 of 9
(2,461 Views)

Yes.  It's called a "manual port".  Sorry, I don't think there is any way to do this automatically.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 9
(2,451 Views)

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?

 

 

Message 3 of 9
(2,402 Views)

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?


GCentral
Message 4 of 9
(2,400 Views)

Listen to Mr. Altenbach. He is the person you want to take advice from.

0 Kudos
Message 5 of 9
(2,381 Views)

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.

 

0 Kudos
Message 6 of 9
(2,303 Views)

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.

0 Kudos
Message 7 of 9
(2,293 Views)

No, literally NO (may be possible with among some text languages but not for G Code)

 

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 8 of 9
(2,286 Views)

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.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 9 of 9
(2,247 Views)