Guest Submeg Posted April 26, 2007 Report Share Posted April 26, 2007 Ok, I have just completed a 3 day course at Uni that introduced us to LabVIEW. We now have a project to complete. I'm trying to get started but am already stuck What I am trying to do is: I wish to have three buttons on the main VI. When one of these is clicked, It takes you to a subVI. I want to be able to return from this subVI back to the main. I have been trying to use cases, but is this the best way to go about it? The course was quite quick and I'm a bit lost at the moment. Any help would be appreciated. Regards, Submeg Quote Link to comment
Ton Plomp Posted April 26, 2007 Report Share Posted April 26, 2007 Hello Submeg, welcome here! What you want has been asked numeral times here and on the NI forum. Please notice that this board is targeted toward Advanced LV'ers. I'll give you a starter: Event structure! and please use the examples of LabVIEW they are quite good. I think what you want is covered by these examples. Ton Quote Link to comment
LAVA 1.0 Content Posted April 26, 2007 Report Share Posted April 26, 2007 QUOTE(Submeg @ Apr 25 2007, 07:34 AM) Ok, I have just completed a 3 day course at Uni that introduced us to LabVIEW. We now have a project to complete. I'm trying to get started but am already stuck What I am trying to do is: I wish to have three buttons on the main VI. When one of these is clicked, It takes you to a subVI. I want to be able to return from this subVI back to the main. I have been trying to use cases, but is this the best way to go about it? The course was quite quick and I'm a bit lost at the moment. Any help would be appreciated. Regards, Submeg you can try it with the event structure... have a look at LabVIEW examples... Quote Link to comment
Guest Submeg Posted April 26, 2007 Report Share Posted April 26, 2007 Yea I know its aimed at Advanced....do you know of a beginners site by any chance? This was the first thing that came up on the old google. Cheers for the link. When I get better (actually if) I will return. Hehe. Submeg Quote Link to comment
Aristos Queue Posted April 26, 2007 Report Share Posted April 26, 2007 QUOTE(Submeg @ Apr 25 2007, 12:34 AM) I wish to have three buttons on the main VI. When one of these is clicked, It takes you to a subVI. I want to be able to return from this subVI back to the main. When you say "takes you to" do you mean "opens the front panel for display, let's the user interact with it a bit and then when the user closes the panel he/she is back at the main VI" or do you mean "invokes a subVI to do some calculation" ? The phrase "takes you to" is used in other programming languages to mean simply "invoking a function" but gets a bit ambiguous when the UI is integrated the way it is in LV. Assuming that you mean the former -- which is what it sounds like but I want to be sure -- do this: 1) Launch LV and choose Help>>Find Examples... 2) Go to the Search tab and search for the keyword "buttons". 3) Double click on the keyword "buttons" in the list of keywords... this will pull up a list of examples. One of these is "Using Buttons to Initiate Actions.vi". May be helpful to you. 4) After you've digested that one, use the Search tab again and search for "events". In the results list, look for two examples. a) Old Event Handler.vi b) New Event Handler.vi Both of these show how to handle button clicks to launch subVIs. The Example Finder is your friend. Good luck. Quote Link to comment
Aristos Queue Posted April 26, 2007 Report Share Posted April 26, 2007 PS: A couple of the other posts are right -- you may have more luck finding introductory material over on http://forums.ni.com . Quote Link to comment
Guest Submeg Posted April 26, 2007 Report Share Posted April 26, 2007 Yep, I'm checking it out now. Thanks for the direction. edit: cheers for those example Aristos, exactly what I needed! :thumbup: Quote Link to comment
Guest Submeg Posted April 26, 2007 Report Share Posted April 26, 2007 Ok, so I understand these examples on their own...but I wish to combine the two ideas together....it will only do one thing at a time... Quote Link to comment
jhoskins Posted April 26, 2007 Report Share Posted April 26, 2007 QUOTE(Submeg @ Apr 25 2007, 04:04 AM) Ok, so I understand these examples on their own...but I wish to combine the two ideas together....it will only do one thing at a time... Look in the example finder under events and you will see a VI called analyze and present. this will get you started. Quote Link to comment
Guest Submeg Posted April 27, 2007 Report Share Posted April 27, 2007 QUOTE(jhoskins @ Apr 25 2007, 05:41 PM) Look in the example finder under events and you will see a VI called analyze and present. this will get you started. Cheers, I gave up after a while and started on one of the subVIs....I have one subVI working as I want it, but the other.... Trying to replace an element in a 2D array...I have found "How to Replace array Elements.vi" and I have followed the wiring exactly....I was wondering, how do you update a single array...not having to use two arrays? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.