09-24-2007 04:24 AM
I would like some recommendations on how to manage GUI controls and indicators wisely in LabVIEW. The Front Panel in my application is fairly simple:
Depending on which device the user chooses, only certain tests and the corresponding controls and indicators should be enabled. However, my Front Panel to control this got somewhat complicated:
LabVIEW crashes frequently when I edit my VI and sometimes the application terminates right after I start to execute it. I am starting to think that there must be a much better approach (I can't create a sub-VI because it is limited to 28 connector pane connections) and would greatly appreciate any advice on how to make my software development easier and less frustrating.
09-24-2007 06:14 AM
09-24-2007 06:25 AM
GerW,
Just a while before, I ve provided a link in that post pointing to this one for our convinience.
09-24-2007 06:27 AM
@GerdW wrote:
-do you really need to change all those settings in the gui from within a dll-call?
GerdW,
Is that not a CIN he mentioned ?
09-24-2007 06:27 AM
09-24-2007 06:29 AM
09-24-2007 06:35 AM
09-24-2007 06:56 AM
09-24-2007 07:10 AM - edited 09-24-2007 07:10 AM
Message Edited by GerdW on 09-24-2007 02:13 PM
09-24-2007 07:18 AM
It would seem to me that your C background is hurting you in this case, since it looks like you're using controls and indicators as variables, which is possible, but is not particularly good style and increases greatly the danger of race conditions.
In any case, making the GUI code in two separate languages sounds like a bad idea. I suggest you take a step back and consider why you're using LabVIEW.
The answer to that can help determine what you should do. Maybe you should do everything in C. Maybe you should do the GUI in LV and the logic in C or maybe the other way around or maybe you should do everything in LV.
As for your options, as mentioned, you can create arrays of your controls to simplify the diagram and you can bundle references together to pass into subVIs (you can see a simplistic example here).
State machines in LV don't have to be in nested structures if they're done right. There are a lot of examples online.