Site Info:
Home
Pronunciation
About-Contact
FAQ


Photos:
NIWeek 2002
Film Exchange
My Gallery

LabVIEW:
LabVIEWBlog
Downloads

External Links


Greece:
The Flag
National Anthem
Maps
Music
Food Recipes
External Links


Hangouts:

Sphaera Ephemeris
Photojunkie
OpenG
LAVA
LabVIEW Zone
mindsketches
CBC
mmWave Integ. Solutions
William Gibson
digital photo review
the mirror project
Mike Spanakis

Powered By:
Movabletype
Mojo Mail!
phpBB
Dreamweaver MX
Feature Price

LabVIEWBlog - Individual Entry


January 19, 2003
How to know if you're an executable

Eventually when you build an EXE from your VI's, you require the ability to enable, disable or switch certain sections of your code so that it behaves differently as an executable. In order to do this however you need to somehow determine if you're in executable mode. The following method describes the creation of a VI that will give you this information.

The mode that LabVIEW is running in is available from the application property node as shown below:

Is_EXE_propnode.gif

This property node however should not be access repeatedly since it will introduce some overhead. A better way to cache this or any other information is via a shift-register global. This can be created using a while loop with a shift register.

Is_EXE_diag.gif

We only need to read the information from the property note when this VI runs for the first time. We use the First Run? node available from the advanced pallete. We then take the output of the property node, which is an enumerated, and decode it to a boolean. The other case is shown below. We can safely ignore the other enumerated options in this example as we do not require them.

Is_EXE_diag3.gif

The boolean is then fed to a shift-register and in turn to the output. For all subsequent runs of this VI, the First Run? node will be false and so will execute the false case shown below which is just a pass through.

Is_EXE_diag2.gif

The front panel is very simple and contains only one boolean as seen below:

Is_EXE_front.gif

One thing to note about the First Run? node. If you run this VI stand-alone, the First Run? output will always show as true. This is because the VI is not reserved for execution by any other VI above it in the hierachy.

LV Version 6.0 VI's
Is_EXE.zip

Support or questions on this code should be done via the forums.

Posted by Michael Aivaliotis at January 19, 2003 12:46 AM


Archives by Category
Archives By Date
February 2003
January 2003
October 2002


check out my neighbors...
The Weather Here:
The WeatherPixie