9
votes

I have a file containing a LabView program and need to understand what it does. Of course it can not be executed without LabView. But is it possible to read a LabView program without Labview?

6

6 Answers

5
votes

The parser I made can read VIs, and convert most of the content to XML (including Block Diagram, Front Panel and type definitions used for connectors): https://github.com/mefistotelis/pylabview

It is open-source, and in no way related to NI.

The XML form you get isn't really easy to read, but with the data exported to XML, it should be possible to write a tool which parses it and displays as a diagram, or at least creates an SVG.

15
votes

But is it possible to read a LabView program without Labview?

I presume you're asking, "Can I open a *.vi file and look at its source code (which is called the "Block Diagram"), without using LabVIEW?"

If that's your question then the answer is "No", not directly. Officially, you need LabVIEW to read, edit, and execute a *.vi file.

Third party support to view VIs without LabIVEW

You can get a third party to convert the VI for you:

  • If you know someone else who has LabVIEW, you can ask them to open the VI for you and save the Block Diagram as a picture file for you (preferable in the form of a Snippet).
  • There are unofficial 3rd-party tools (like the one in @mefistotelis's answer) which can convert VIs without LabVIEW.

Installing LabVIEW without purchasing

(NOTE: In April 2020, LabVIEW Community Edition was released. It is free for home use.)

If you are willing to download and install LabVIEW, you can open the VI file. This link lets you select the Community Edition for home use or the 7-day evaluation for commercial/academic use.

5
votes

As @JKSH already stated the answer is "No".

If you think a Labview Viewer could be useful give a Kudo to this Labview Idea and try to convince National Instruments to provide one.

In the comments to the idea there's a link to a software, VIpreVIEW - Interactive VI preview, making a Flash-enabled HTML page for viewing the code (I've never tried it).

1
votes

Also; LabVIEW home bundle is a thing. Depending on a country it can cost you as little as 60€.

0
votes

No ! You could download the LabVIEW version on the NI site, it's a fully functionnal free demo for 30 days.

0
votes

I have an Yes answer to this question. There is an option to export the block diagram as snippets as said by @JKSH.

I have created a POC - Export VI as images.vi here in github which can help you to export the VI you want to read as images. Then you can easily open the images in any image viewer and read that LabVIEW code. You need to feed it this POC with VI you want to export and image saving locations for the front Panel and the block diagram.

If the person who has given you the code has LabVIEW installed with his PC, s/he can export the code as images easily using this POC.

Ref: https://github.com/digiajay/ExportLabVIEWfilesAsImages/tree/master/POC

Thanks, Ajay.