twstedsurf Posted July 12, 2005 Report Share Posted July 12, 2005 Hey all, Im fairly new to LabView, and am building a program which is using a ring menu to bring up several options, depending on choice. I was wondering if there is any way (without using a subvi) to cut down on the number of property nodes that i need to use to enable/disable the visibility of each control, indicator, etc... Right now it is taking up a massive amount of space :headbang: in the panel, any help would be appreciated. Thanks, Jesse Quote Link to comment
m3nth Posted July 12, 2005 Report Share Posted July 12, 2005 There are a few ways to cut down on space... some recommended, some not. The #1 not recommended way would be to right click the property node and select Name Format > No Names. Besides that though what I would recommend is creating an array or arrays of control references. Then when you need to make those items visible you can just pass the array into a for loop with a single generic property node. Another plus when using references is you can then make subVI's to operate on your controls, since they don't have to be linked to the front panel. Once you've given yourself the ability to use subVIs, you can then make your subVI an LV2 global. So for things where I have an insane amount of controls I need to work with, I create an LV2 global and initialize it with an array of references. Thereafter I can select any other function that I program the global function to do. So the moding enum might contain the values "Init", "Set Visible" and "Set Not Visible", but the only time it would need to be wired to the array of control references would be for the "Init" call, and thereafter the VI could be called anytime to perform the visibility functions. If you are not familiar with LV2 globals (also known as functional globals) I would recommend reading up on them. Quote Link to comment
Mark Balla Posted July 14, 2005 Report Share Posted July 14, 2005 Hey all, Im fairly new to LabView, and am building a program which is using a ring menu to bring up several options, depending on choice. I was wondering if there is any way (without using a subvi) to cut down on the number of property nodes that i need to use to enable/disable the visibility of each control, indicator, etc... Right now it is taking up a massive amount of space :headbang: in the panel, any help would be appreciated. Thanks, Jesse 5293[/snapback] I find I'm using tab controls more and more to do this sort of thing. No property nodes necessary to hide a control and you only have to change the tab control value. Another Idea would be to combine several control references into an array and use a for loop to set the visible property. and if you turn it into a subvi it will take up even less space. SubVi are our friends Quote Link to comment
twstedsurf Posted July 14, 2005 Author Report Share Posted July 14, 2005 and if you turn it into a subvi it will take up even less space. SubVi are our friends 5335[/snapback] Sorry i didnt specifiy aobut the extent of using SubVIs. I merely ment that i wanted to retain a single front panel, rather than create a new panel for each sub portion of my program(the advantage to using tab menus/ring menus, in my opinion). Thanks for you idea. Quote Link to comment
m3nth Posted July 14, 2005 Report Share Posted July 14, 2005 Sorry i didnt specifiy aobut the extent of using SubVIs. I merely ment that i wanted to retain a single front panel, rather than create a new panel for each sub portion of my program(the advantage to using tab menus/ring menus, in my opinion). Thanks for you idea. 5344[/snapback] I think that was understood from your previous post. If you put the for loop shown in the last post into it's own subVI you can manipulate your controls that are all on one front panel by using calls to the subVI. That way the subVI can take the place of some of your current block diagram code and reduce the amount of area dedicated to manipulating the front panel. Quote Link to comment
twstedsurf Posted July 15, 2005 Author Report Share Posted July 15, 2005 So for things where I have an insane amount of controls I need to work with, I create an LV2 global and initialize it with an array of references. Thereafter I can select any other function that I program the global function to do. So the moding enum might contain the values "Init", "Set Visible" and "Set Not Visible", but the only time it would need to be wired to the array of control references would be for the "Init" call, and thereafter the VI could be called anytime to perform the visibility functions. If you are not familiar with LV2 globals (also known as functional globals) I would recommend reading up on them. 5296[/snapback] So i read up a bit on LV2 globals, and i have not idea how to implement what you are suggesting. I understand how to use LV2 globals, but... would i, in the globalVI, use an array/cluster of property nodes? or of variables of the same name as the original program? A couple more pointers would be supremely helpful :worship: . Thanks. Quote Link to comment
m3nth Posted July 15, 2005 Report Share Posted July 15, 2005 So i read up a bit on LV2 globals, and i have not idea how to implement what you are suggesting. 5362[/snapback] Either you didn't read very much or you just didn't try. See attached example. Download File:post-360-1121446792.llb Quote Link to comment
twstedsurf Posted July 15, 2005 Author Report Share Posted July 15, 2005 Either you didn't read very much or you just didn't try.See attached example. 5364[/snapback] Yeah, i read just a bit to get the general idea about LV2's, but did attempt to make it work for quite a while. I couldnt get the download to work, as my version of LV is too old to handle it. After going back and looking over everything again I have gotten to the point to creating an array of the ctrl references, putting into a for loop and setting visible/invisible. However, i am at a loss for the global portion... i dont know what i should connect to the shift registers, and what i should return to the calling vi, and what this return would connect to(if anything at all). Sorry if im just being an idiot about this. thanks Quote Link to comment
m3nth Posted July 15, 2005 Report Share Posted July 15, 2005 Sorry... forgot to look at your version before posting... this should work in v7.0. The example shows how the subVI may be used in a 'global' manner anywhere in your program without having to have anything connected to the reference array terminal. Download File:post-360-1121450651.llb 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.