12-17-2008 12:28 AM
Hi All,
I was just thinking. Since on the front panel, we can use tab control to create as many pages. Is there anyway to apply it in block diagram? I would like to have 'pages' in my block diagram as well. Thank You.
Regards,
Isa
12-17-2008 12:34 AM
12-17-2008 11:48 AM
This has been brought up before, but was rejected.
The only use I could think of is a situation where we have multiple, totally independent, parallel running code parts. You would eliminate scrolling if you could e.g. place the following code segements on individual "pages" (just as an example):
It would be more an organizational layout tool, allowing multiple "code pages" on the diagram. To the right you would do the common code (e.g. open queues). To the left we would have a big tab structure, each tab freely labeled, e.g. according to the list above.
I am not sure if I would really use it, though. 🙂
12-18-2008 09:33 PM
The real issue is that if you need tabs or something like it on your block diagram, you have a basic design problem that you need to fix. The idea with good programming (regardless of language) is to functionally decompose a proposed application's functionality into smaller reusable pieces. In the LV world these reusable modules are called "subVIs". Design your code properly and you don't need things like tabs or stacked sequences.
Mike... (who last used a stacked sequence in deliverable code sometime in early '87).
02-10-2009 04:04 AM
I strongly support the question of the topic starter. A tab control or a kind of stacked parallel structure on the block diagram would be very helpfull.
I wrote a large program where measured data needs to be processed using a lot of parameters. The data processing is pipelined. All code for each stage in the pipeline is already put in a subVI. But local variables, controls and indicators to connect to the VI need so much space, that even on a 1920*1200 screen I need more space. If all stages of the pipeline could be put in a stacked parallel structure, it would make the program much more readable.
In parallel to this data processing I need a while loop:
- to receive UDP message to remotely control my program
- to send all kind of messages on the network
- to listen to TCP/IP to detect a new client for the network messages
- to handle menu or control events
It just doesn't fit on the screen anymore.
So, Labview developers, please implement a tab control or a stacked parallel structure for the block diagram in the next version of Labview.
Chris
02-10-2009 04:22 AM
I tried using the tab control a couple of times, but ending up removing it. I'm not saying it's bad or poor programming practice to use it, but it just doesn't work very nicely.
I think the "tab control" might be a good candidate for a state machine, if you design your program well. When you go from one tab to the next, the state changes. That being said, I never tried this and I'm not sure it's practical. Might give it a try some time.
02-10-2009 04:28 AM
Hi Chris,
if you really have only one vi (for me it sounds like that) with all your functions in it, then i also think you have to think about your design. I'm confident that a block diagram tab control will nothing change about the readability of your vi.
I recommend to see some of the design patterns.
Mike
02-10-2009 04:29 AM
02-10-2009 04:43 AM
Hi,
i also think a block diagram tab control would be a design break, because it has few to nothing to do with the dataflow. If you really need something like this, you can use different vi's and call them dynamically.
Mike
02-10-2009 06:13 AM
A stacked parallel structure would have no advantage beyond making it easier to write bad code. If you think you need such a thing you need to redesign your application - that is what's broken, not LabVIEW.
Mike...