Jump to content

How do you run LabVIEW as an Application?


Recommended Posts

Can LabVIEW be run without the menu and toolbar at the top of the page?

Do you have to display the LabVIEW splash page on startup?

Is there a way to start an application without the "Run" arrow in the toolbar?

I want to be able to create an icon on the desktop that runs my application without becoming a LabVIEW advertisement. I don't necessarily want to hide the fact that it's LabVIEW. I'd just prefer it to be a little less conspicuous.

Link to comment

QUOTE (km4hr @ Oct 21 2008, 07:57 AM)

km4hr,

As for running without the run arrow, take a look in VI Properties in the Execution category and set Run When Opened. Don't set this until you have you VI working pretty much the way you want it to. If you get stuck in a situation where you cannot get into the VI to edit it, simply drop your VI onto the block diagram of a new VI and you will be able to get into it for editing.

Since you admit to being a beginner, I thought I'd volunteer my advice - take it for what it's worth. I would highly recommend getting yourself a good http://wiki.lavag.org/LabVIEW_Books' rel='nofollow' target="_blank">book on LabVIEW and spending a couple of days with it. I was a beginner not that long ago. I chose LabVIEW for Everyone and I learned more in the first two hours with that book than I had in the previous two weeks. It's a bit pricey, but definitely worth every penny in the time and trouble it will save you going forward.

In the meantime, please don't hesitate to keep the questions coming. That's why we all hang out here :)

-Toby

Link to comment

Thanks for the tip on accessing VI properties. For some reason the book I'm using (LabVIEW 8 Student Edition) doesn't seem to cover this topic.

Using your tip, I discovered a VI property to put the front panel "Top-Level Application" mode. This mode claims to remove the tool bar. What it actually does is remove some icons from the tool bar. The RUN arrow remains. When the RUN arrow is clicked the toolbar goes away. The application then looks just like I want. But this raises the question, how do you start a VI without using the RUN arrow? Is there a way to start LabVIEW in run mode? Is there a way to create a START button in a VI? Is there a command line option to start LabVIEW in run mode?

BTW, I have searched for these answers. But as usual, what phrase(es) do you search for? Perhaps I'm using the wrong ones.

QUOTE (normandinf @ Oct 21 2008, 11:27 AM)

Configure the Window Appearance in the VI Properties. (Right-click on icon) This can be set in the Application Builder too.

To get rid of splash screen... look at this topic. (You can search the forums to check if your questions have already been answered... :yes: )

Icon: It's an option in the Application builder.

Link to comment

QUOTE (km4hr @ Oct 21 2008, 11:44 AM)

Thanks for the tip on accessing VI properties. For some reason the book I'm using (LabVIEW 8 Student Edition) doesn't seem to cover this topic.

Using your tip, I discovered a VI property to put the front panel "Top-Level Application" mode. This mode claims to remove the tool bar. What it actually does is remove some icons from the tool bar. The RUN arrow remains. When the RUN arrow is clicked the toolbar goes away. The application then looks just like I want. But this raises the question, how do you start a VI without using the RUN arrow? Is there a way to start LabVIEW in run mode? Is there a way to create a START button in a VI? Is there a command line option to start LabVIEW in run mode?

BTW, I have searched for these answers. But as usual, what phrase(es) do you search for? Perhaps I'm using the wrong ones.

km4hr,

Toby's reply had the answer for how to make your vi run automatically:

"km4hr,

As for running without the run arrow, take a look in VI Properties in the Execution category and set Run When Opened. Don't set this until you have you VI working pretty much the way you want it to. If you get stuck in a situation where you cannot get into the VI to edit it, simply drop your VI onto the block diagram of a new VI and you will be able to get into it for editing."

Do you know if your version of LabVIEW includes the application builder? If it does this can create a stand-alone executable that is much easier to deploy.

Charles

Link to comment

QUOTE (km4hr @ Oct 21 2008, 12:44 PM)

BTW, I have searched for these answers. But as usual, what phrase(es) do you search for? Perhaps I'm using the wrong ones.

To tell the truth, I've searched it in Google... and sure enough, LAVA was one of the first sites for my question.

The LAVA search tool is not as good for sorting based on relevance of question.

Link to comment

QUOTE (TobyD @ Oct 21 2008, 11:49 AM)

km4hr,

As for running without the run arrow, take a look in VI Properties in the Execution category and set Run When Opened. Don't set this until you have you VI working pretty much the way you want it to. If you get stuck in a situation where you cannot get into the VI to edit it, simply drop your VI onto the block diagram of a new VI and you will be able to get into it for editing.

Since you admit to being a beginner, I thought I'd volunteer my advice - take it for what it's worth. I would highly recommend getting yourself a good http://wiki.lavag.org/LabVIEW_Books' rel='nofollow' target="_blank">book on LabVIEW and spending a couple of days with it. I was a beginner not that long ago. I chose LabVIEW for Everyone and I learned more in the first two hours with that book than I had in the previous two weeks. It's a bit pricey, but definitely worth every penny in the time and trouble it will save you going forward.

In the meantime, please don't hesitate to keep the questions coming. That's why we all hang out here :)

-Toby

Thanks Toby,

I tried your suggestion. It does in fact run the VI immediately when the program is executed. But when I click the Stop button that I have built into my VI, the toolbar containing the RUN arrow re-appears.

The comments/replies to this thread lead me to conclude that most people run their VI's in "developer" mode. They don't deploy them for others to use. Either that or they have complete trust that their users won't tinker with the program. It seems crude to me to run VI's that way.

I'm going to try the "project" creation method. It looks a little complicated. I don't see any tutorials on it either. This further reinforces my observation that most people just run their VI's in "developer" mode.

Nearly every tutorial I've seen shows how to create a Stop button. Usually by breaking out for a "while loop". But I haven't seen any tutorial on how to create a Start/Re-start button. Apparently there's no way to re-start a VI from inside the "program".

I'm also going to get a copy of the book you mentioned.

Link to comment

QUOTE (km4hr @ Oct 21 2008, 03:19 PM)

No - your observations are incorrect. Many (most?) of us use the application builder (which is not part of the Student edition of LabVIEW) to build compiled applications, thus allowing us to distribute applications to users without any of the issues you're having and without requiring users to have LabVIEW installed. The Student edition is designed to allow students to learn LabVIEW inexpensively, but for real projects you want to be using at least the Full development system.

QUOTE (km4hr @ Oct 21 2008, 03:19 PM)

Nearly every tutorial I've seen shows how to create a Stop button. Usually by breaking out for a "while loop". But I haven't seen any tutorial on how to create a Start/Re-start button. Apparently there's no way to re-start a VI from inside the "program".

Normally you would instead design the "Start/Stop" as part of your overall program, so that there's never any need to have LabVIEW stop running the program at all. Instead if your user clicks a "Stop" button it simply stops whatever action the program was executing, but the program itself continues to run so that it can start again when the user clicks the "Start" button.

Link to comment

You have 2 options (at least) for stopping the vi when you're done running.

1. Use the Quit LabVIEW VI. If you're confident that the user won't be running anything else from LabVIEW, then use this.

2. Use an Invoke node and close the Top-Level vi.

I will include an example for you. Post back if you have the Application Builder and need help getting that setup.

Charles

Link to comment

QUOTE (ned @ Oct 21 2008, 03:38 PM)

No - your observations are incorrect. Many (most?) of us use the application builder (which is not part of the Student edition of LabVIEW) to build compiled applications, thus allowing us to distribute applications to users without any of the issues you're having and without requiring users to have LabVIEW installed. The Student edition is designed to allow students to learn LabVIEW inexpensively, but for real projects you want to be using at least the Full development system.

Normally you would instead design the "Start/Stop" as part of your overall program, so that there's never any need to have LabVIEW stop running the program at all. Instead if your user clicks a "Stop" button it simply stops whatever action the program was executing, but the program itself continues to run so that it can start again when the user clicks the "Start" button.

The version of LabVIEW I have is called the "Professional Development System". It looks like it includes the application builder. I just don't know how to use it yet. The learning curve doesn't appear to be insignificant. I'll get to eventually. I'm learning everything at the moment. It's a little overwhelming.

Here's an interesting http://forums.ni.com/ni/board/message?board.id=170&message.id=190080&query.id=246701#M190080' target="_blank">solution. It's not great because it requires two stop buttons in my case. (That should confuse the users!) Anyway, I'm going to try it out. I found it on NI's forum (I hope it's politically correct to reference another forum) :unsure:

Link to comment

km4hr, If you'd be willing to send me what code you have so far and a description of what you intend to accomplish, I can make some recommendations on how to set up your framework. My email address is charles(dot)labviewguy(at)gmail(dot)com (replace the (dot)'s and (at)'s obviously...) Also, I can add your code to a project and setup application builder for you.

Charles

QUOTE (km4hr @ Oct 21 2008, 04:32 PM)

Link to comment

QUOTE (km4hr @ Oct 21 2008, 02:32 PM)

That's OK. You can make up for it by going to the NI forums and posting a link there to something on LAVA.

QUOTE (km4hr @ Oct 21 2008, 07:57 AM)

Can LabVIEW be run without the menu and toolbar at the top of the page?

Do you have to display the LabVIEW splash page on startup?

Is there a way to start an application without the "Run" arrow in the toolbar?

Actually, these are very good newbie questions and ones I asked as well when I got started in LabVIEW. We should make a LabVIEW Wiki article on this. Someone should update the FAQ page to be more "new user"- friendly so we can just point people there when these topics come up.

Link to comment

QUOTE (Charles Chickering @ Oct 21 2008, 06:50 PM)

km4hr, If you'd be willing to send me what code you have so far and a description of what you intend to accomplish, I can make some recommendations on how to set up your framework. My email address is charles(dot)labviewguy(at)gmail(dot)com (replace the (dot)'s and (at)'s obviously...) Also, I can add your code to a project and setup application builder for you.

Charles

Charles,

Thanks for your generous offer. But what will I learn if you do everything for me? I'll contact you directly.

Link to comment
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.