04-14-2015 02:57 AM
I have a tab panel in my VI. Right now I would like it so that the VI goes to the last tab once a counter reaches zero (having started at 15 seconds). Any idea how I program that into the VI?
04-14-2015 03:00 AM
04-14-2015 04:57 AM
04-14-2015 07:55 AM
@mikeporter wrote:
You can get the same user experience, and your software will be simpler and easier to maintain.
I think what you meant to say is your code is more scalable, more modular, and more reusable using subpanels. But I wouldn't call subpanels "simpler" than a tab control. Users gravitate to tabs because they are so simple. Plop down a single control and put stuff in it that you want. I prefer subpanels, but I'd call tabs simpler to use than subpanels.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-14-2015 08:37 AM
04-14-2015 08:55 AM
I respect you, but I don't fully agree. Beginning developers aren't thinking about scalability when they develop software. They have a single large while loop with all their code running in it. If they want 4 charts they make 4 charts. This work great and each chart takes up 1/4 of the screen. Then they realize they want 5 charts, but they don't want to reduce the size of the charts. The code already runs, and updates all 5 charts, but they want an easy way to show one of the 5 at a time. Step 1: Drop a tab down, Step 2: Put each chart in a tab.
Or a beginner will need to drop a subpanel down, then a way to select what VI goes into that subpanel. Now they need a listbox, or a drop down, which indexes an array of VI references. What's a VI reference they ask? How do they use these references? How do they properly cleanup and close these references? Do they need to make 5 VIs one for each graph? Or just one that is reentrant? Either way there is more files on disk, and more files to keep track of. Wait what is a reentrant VI? And how in the world am I supposed to pass data into my running VIs? They had the data on the wires in the main but now what? Queues? User Event? Native Global? They will likely pick a native global, and then they'll ask: How do I know when there is new data? If I poll a global I have no way of knowing when the data was updated last.
These two scenarios have pros and cons of each. Again I would not call the subpanel method simpler, I would call it better, more reusable, extensible, modulare, etc. But I wouldn't call it simpler.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord