LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Block Diagram tab control?

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

0 Kudos
Message 1 of 11
(5,471 Views)
There is no tab control for the diagram.  The closest thing to it is the Stacked Sequence Structure.  That being said, you should avoid the stacked sequence structure at all costs.  It inevitably makes your code ugly as you try to pass data from one frame to the next, and you have to go through all the frames to have an idea of what the code is doing.  If your block diagram is too big and cluttered, look at using subVIs to cleanup your code and it also helps with the "big picture" of the code, i.e. "What does this VI do?"
0 Kudos
Message 2 of 11
(5,468 Views)

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):

  1. UI loop with event structure.
  2. DAQ loop
  3. Background tasks
  4. etc.

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. 🙂

Message 3 of 11
(5,423 Views)

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).

 


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 11
(5,379 Views)

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

0 Kudos
Message 5 of 11
(5,238 Views)

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.

 

 

0 Kudos
Message 6 of 11
(5,234 Views)

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

0 Kudos
Message 7 of 11
(5,228 Views)
Please note, the topic starter and I request a tab structure (or stacked parallel structure) on the block diagram. That does not exist yet.
0 Kudos
Message 8 of 11
(5,227 Views)

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

0 Kudos
Message 9 of 11
(5,222 Views)

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...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 10 of 11
(5,202 Views)