LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

If click white arrow to run vi, is vi compiled first?

Solved!
Go to solution

I have this fuzzy idea that compile in Labview means something like compile in c; compilation only happens when you want to build the exe. 

 

And when you click the run white arrow button in a Labview vi. The vi will run sorta like visual basic in interpreted mode. 

 

But however in CLAD sample exam, I saw this question about Labview knowing the data type of strict type definition during compile time. This seems to suggest that every time you run the vi, Labview compiles the vi first. Compilation doesn't only happen when you want to compile the vi to exe. 

 

So which one is true? 

 

  

0 Kudos
Message 1 of 4
(3,595 Views)

Are you shure the CLAD exam don't mention "at run time" ?

Message 2 of 4
(3,590 Views)
Solution
Accepted by topic author sunflower2772

A normal compiler does various steps during compilation. Preprocessing, syntax check, compilation and actual linking is more or less done in one go after you tell it to do so.

 

LabVIEW splits this up. Syntax check is an ongoing process while you edit the VIs. Anything LabVIEW consideres invalid causes errors such as broken wires right during edit time. Once you hit the run button LabVIEW can simply take the diagram and compile it into machine code, which is normally such a quick operation that you do not even notice it. When you save a VI to disk LabVIEW takes the compiled machine code or creates it if it hasn't been done so far and saves it along with the VI to disk. So when loading the VI next time the machine code is already there, at least if you load the VI on the same platform and LabVIEW version.

 

So LabVIEW ALWAYS executes the compiled code, independant if you run the VI in the development environment or in an executable.

 

Application building is really mostly just taking all the already compiled parts and putting them into one place, stripping anything unneccessary such as diagrams and also front panels that will be never visible. This is of course a very strong simplification but for the purpose of this discussion a valid one.

Message Edited by rolfk on 04-16-2010 08:49 AM
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 3 of 4
(3,586 Views)
Thanks a lot RolfK for such nice information. Smiley Happy
0 Kudos
Message 4 of 4
(3,554 Views)