exxpkeb Posted March 7, 2006 Report Share Posted March 7, 2006 Hi Everybody, I am new to labviews so to this forum. Here we go, I am building a group of about 20 VIs, all differ from each other, no SubVIs. The customer`s wish is to trigger every single VI seperatly with a button from a "Menu VI". So the startup VI is only a "Menu", and to save hardware and network resources, only the "triggered" VIs should open and run. What I tried so far: I placed a VI in the Backpanel of the "Menu VI", pressing it calls the VI, ok.. cool. But its invisible on the Frontpanel and it is treated as a SubVi. My Qestion, how can I place a button (or similar) on the frontpanel to call and execute another (standalone) VI? thx in advance keb Quote Link to comment
exxpkeb Posted March 7, 2006 Report Share Posted March 7, 2006 Hi Everybody, I am new to labviews so to this forum. Here we go, I am building a group of about 20 VIs, all differ from each other, no SubVIs. The customer`s wish is to trigger every single VI seperatly with a button from a "Menu VI". So the startup VI is only a "Menu", and to save hardware and network resources, only the "triggered" VIs should open and run. What I tried so far: I placed a VI in the Backpanel of the "Menu VI", pressing it calls the VI, ok.. cool. But its invisible on the Frontpanel and it is treated as a SubVi. My Qestion, how can I place a button (or similar) on the frontpanel to call and execute another (standalone) VI? thx in advance keb Quote Link to comment
exxpkeb Posted March 7, 2006 Report Share Posted March 7, 2006 Hi Everybody, I am new to labviews so to this forum. Here we go, I am building a group of about 20 VIs, all differ from each other, no SubVIs. The customer`s wish is to trigger every single VI seperatly with a button from a "Menu VI". So the startup VI is only a "Menu", and to save hardware and network resources, only the "triggered" VIs should open and run. What I tried so far: I placed a VI in the Backpanel of the "Menu VI", pressing it calls the VI, ok.. cool. But its invisible on the Frontpanel and it is treated as a SubVi. My Qestion, how can I place a button (or similar) on the frontpanel to call and execute another (standalone) VI? thx in advance keb Quote Link to comment
Guenther Posted March 7, 2006 Report Share Posted March 7, 2006 Hi keb go to "VI properties" (right click on the icon) -> window appearance -> Customize and activate "show front panel when called" This will open the front panel of your sub VI Hope this helps Guenther Quote Link to comment
Aitor Solar Posted March 7, 2006 Author Report Share Posted March 7, 2006 If you don't want to have all the VIs loaded in memory, you can call them dinamically through Open VI Reference (you'll find it in the Application Control palette). Not really sure if that's you're looking for, though. Could you elaborate? Saludos, Aitor Quote Link to comment
Mike Ashe Posted March 7, 2006 Report Share Posted March 7, 2006 1. If you search the /examples folder (or better use the Find Example VIs tool you will find an example that does exactly what you ask for. You can then modify quickly should take you all of 2 minutes, 10 with mods to call your 20 VIs. 2. Do not cross post your question to multiple topics on LAVAs forum. Very bad form and may incur the wrath of the Vorpul Administrator...l Quote Link to comment
exxpkeb Posted March 7, 2006 Report Share Posted March 7, 2006 Thank you for the fast answers. Sorry about the cross postings, will not happen again. Ok, I tried a few things: - configuration of VI property. Dont really help, either (Sub)VI will be loaded/run on startup or the user has to click it in the Backpanel to have the VI popup. But how can I call it dynamically from the Frontpanel? - Open VI reference. Still working on this one. Seems that it needs the VI server. That would be a restriction. I need to call the VIs one by one without the VI server. All VIs are located on one computer. My "Menu VI" handles all other VIs, I want to select any VI in the frontpanel and call it (action Button?). - Examples like "Menu selection Demo" was my first attempt, but they are too komplex, I think. I am looking for something like "Run URL on Button action (frontpanel) >> execute item, Path://*stringvariable*" Is it so obvious or do I think too Actionscriptish??? Quote Link to comment
Aitor Solar Posted March 7, 2006 Author Report Share Posted March 7, 2006 - configuration of VI property. Dont really help, either (Sub)VI will be loaded/run on startup or the user has to click it in the Backpanel to have the VI popup.But how can I call it dynamically from the Frontpanel? Err, I think we have a misconception here. I don't know what is the Backpanel, but if you are talking about the Diagram Block, keep in mind that's where the code goes. All the user sees is the Front Panel. Now, in the FP you have to put a control for the user to select which VI he wants. You can put several buttons or a ring, or an enum... In the BD you have to check a value change in that control, and launch the selected VI (for example, a case structure and each VI in its case). Be sure the VIs are set to "show front panel when called". And then, of course, you have to run the program ;-) Saludos, Aitor Quote Link to comment
exxpkeb Posted March 7, 2006 Report Share Posted March 7, 2006 Ok, I will try that out tonight and reply tomorrow if it worked out. Whats bugging me is the while loop. The VIs that I design all run onto a C++ Skript (build in as a subVI) that is taking care of the data I/O. I hope the loop will not bug the C skript.... Thanks a lot so far!! Quote Link to comment
didierj Posted March 8, 2006 Report Share Posted March 8, 2006 It is not exactly clear to me, what your problem is, but let me explain 2 cases: 1. If you want to have your sub-vi displayed, then press rmb on the vi-icon and select vi property. from there select category Window Appearance and then check either Top-level application window or dialog. 2. If you want to have different vi's running together pressing 2nd button while first vi still runs), then you will have to use the vi-server method to call your sub-vi's. For infos on this search this site, ni.com, and the lv-examples (check include ni.com examples in the example finder). Didier Quote Link to comment
didierj Posted March 8, 2006 Report Share Posted March 8, 2006 Try to avoid asking the same question in different subforums. How can I call... Quote Link to comment
jdebuhr Posted June 9, 2006 Report Share Posted June 9, 2006 But how can I call it dynamically from the Frontpanel?- Open VI reference. Still working on this one. Seems that it needs the VI server. That would be a restriction. I need to call the VIs one by one without the VI server. All VIs are located on one computer. My "Menu VI" handles all other VIs, I want to select any VI in the frontpanel and call it (action Button?). I have a similar scenario. I have a 'Generic' test Shell that I use, the operator chooses which Assembly needs to be tested and I then call that specific assembly's VI using Open VI Reference. I went a step further where many of the options available are the same with each assembly so the Tester/User controls them though the test shell. It works fairly well, I am in process of improving it since it was first written in 6.0.1 2 years ago. The Open Reference is a nice feature, but to use the same reference for all of your VIs they need to have the same Connector pane and same Control/ Indicator types on the pane from what I have found Quote Link to comment
Mike Ashe Posted June 9, 2006 Report Share Posted June 9, 2006 You don't need VI Server to call a VI Dynamically that I remember. Since when? If you want to run a VI that isn't wired on the diagram of your VI you have to use one of the two VI Server methods to do it, either a "Call By Reference" node (strict typedef) or use the "RunVI" method (not strict). Actually, there is yet another method for some VIs, call LabVIEW using a system exec call and give it the path of the VI in the command line, but that is a hack and you can't get output data. Quote Link to comment
jdebuhr Posted June 9, 2006 Report Share Posted June 9, 2006 Since when? If you want to run a VI that isn't wired on the diagram of your VI you have to use one of the two VI Server methods to do it, either a "Call By Reference" node (strict typedef) or use the "RunVI" method (not strict). Actually, there is yet another method for some VIs, call LabVIEW using a system exec call and give it the path of the VI in the command line, but that is a hack and you can't get output data. Sorry You are right.. I must have been thinking about something else when I typed that.. It has been a rough Friday.. I will correct and edit my prior post.. Aitor, What I don't understand is what is making the VI Server your restriction? I just realized what I was wanting to say before. While you need the VI Server to Dynamically Load the other VIs, they still are allowed to reside on the same machine. Sometimes when I see Server I forget that 'Server' has different meaning. What i had to do when I built my App was be sure I included all of my Dynamically called VIs. this way when you choose them ( in your case with a button) they would then open up. 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.