![]() |
Mar 5 2008, 12:35 AM
Post
#1
|
|
|
Very Active Member Posts: 103 Joined: 26-January 07 From: Seattle, WA Member No.: 7603 Using LabVIEW Since:2006 LV:8.20 ,. ,.
|
It would be handy if I could set front-panel like groups on the block diagram. It would make laying out readable code a bit easier. Not a huge deal, but a nice touch.
Tags
This content has not been tagged yet
|
|
|
|
| Ad |
Mar 5 2008, 12:35 AM
Post
#
|
|
|
Tags
This content has not been tagged yet
|
|
|
|
Mar 5 2008, 01:34 PM
Post
#2
|
|
|
Active Member Posts: 15 Joined: 13-February 08 From: Germany Member No.: 10755 Using LabVIEW Since:2005 LV:7.0 ,. ,.
|
Hi,
what about creating sub vis for each "block diagramm group" making the code more readable -timo Tags
This content has not been tagged yet
|
|
|
|
Mar 5 2008, 02:09 PM
Post
#3
|
|
|
Very Active Member Posts: 157 Joined: 26-September 05 From: Zurich Member No.: 3076 Using LabVIEW Since:2006 LV:8.2.1 ,8.20 ,6.1
|
Hi, what about creating sub vis for each "block diagramm group" making the code more readable -timo Yeah, but this would be an extra option. I like the idea (I've never tried it, so I don't know if it's already possible or not)...... Just my 2c Shane. Tags
This content has not been tagged yet
|
|
|
|
Mar 5 2008, 02:50 PM
Post
#4
|
|
![]() I'm a LAVA, not a fighter. V I Engineering, Inc. ![]() Posts: 3643 Joined: 13-October 03 From: Michigan, USA Member No.: 181 Using LabVIEW Since:1993 LV:8.5 ,. ,.
My Blog
|
It would be handy if I could set front-panel like groups on the block diagram. -------------------- ![]() Tags
This content has not been tagged yet
|
|
|
|
Mar 5 2008, 02:55 PM
Post
#5
|
|
|
Certified Kool-Aid Kid Premium Member ![]() Posts: 1141 Joined: 6-December 02 From: Pittsburgh PA USA Member No.: 29 Using LabVIEW Since:1998 LV:7.1 ,. ,.
|
Shane and Chris, My first response is "I don't like ideas that can encourage bad coding style." So I have to ask, "What value do you see in this idea and how would you envision using it?" Curious, Ben Tags
This content has not been tagged yet
|
|
|
|
Mar 5 2008, 03:19 PM
Post
#6
|
|
|
Extremely Active Member Posts: 541 Joined: 13-September 05 From: Cary, NC USA Member No.: 2992 Using LabVIEW Since:1997 LV:8.5 ,8.2.1 ,7.1.1
|
My first response is "I don't like ideas that can encourage bad coding style." So I have to ask, "What value do you see in this idea and how would you envision using it?" I don't think it would encourage bad coding style. I frequently wish for Grouping on the block diagram so I can move bits of code around together without doing a multi-step select-an-area-then-deselect-individual-items-that-I-don't-want-to-move gymnastic. There are plenty of times when I'd use that functionality to improve the layout of code. Besides, if LabVIEW is a graphical dataflow programming environment, and we have standard tools for Grouping on the front panel, why wouldn't we have the same tools on the block diagram? I've often wondered, though, if there's some technical or usability reason why Grouping isn't available on the block diagram. It's reasonable to think that it's been explored at some point by NI. I'd be interested to know if there's an inside story behind it. what about creating sub vis for each "block diagramm group"making the code more readable There are scenarios where that isn't enough. Example 1: Virtually every subVI I create has Error In/Error Out terminals, and an Error Case Structure surrounding the code of the subVI. I would really like to be able to group the Error In/Error Out terminals with their tunnels on the Case Structure, so that I can easily move them up or down. This is a routine I go through for almost every subVI I create. Example 2: I might have a series of LVOOP class VIs that happen one after the other. In this case, I might not want to create a subVI containing methods from all those classes because it would (A) have a ton of terminals, and/or (B) create a subVI with a lot of class dependencies that I don't want. Creating a subVI also won't work if the VIs you want to Group are located both inside and outside some structures, but you don't want the structure to be part of the group. You're right, however, that creating a subVI is a solution some of the time. -------------------- If you don't like this post, you might also not like my widgets!
Tags
This content has not been tagged yet
|
|
|
|
Mar 5 2008, 03:20 PM
Post
#7
|
|
![]() I'm a LAVA, not a fighter. V I Engineering, Inc. ![]() Posts: 3643 Joined: 13-October 03 From: Michigan, USA Member No.: 181 Using LabVIEW Since:1993 LV:8.5 ,. ,.
My Blog
|
My first response is "I don't like ideas that can encourage bad coding style." Almost every feature can encourage bad coding style What value do you see in this idea and how would you envision using it? For exactly the same reason(s) I use it on the front panel - for convenience. I like to group related items, so I don't have to do the multiple-click-select. It'd also be useful to "attach" free text labels (ie: documentation) to code. -------------------- ![]() Tags
This content has not been tagged yet
|
|
|
|
Mar 5 2008, 03:21 PM
Post
#8
|
|
|
Certified Kool-Aid Kid Premium Member ![]() Posts: 1141 Joined: 6-December 02 From: Pittsburgh PA USA Member No.: 29 Using LabVIEW Since:1998 LV:7.1 ,. ,.
|
I don't think it would encourage bad coding style. I frequently wish for Grouping on the block diagram so I can move bits of code around together without doing a multi-step select-an-area-then-deselect-individual-items-that-I-don't-want-to-move gymnastic. There are plenty of times when I'd use that functionality to improve the layout of code. Besides, if LabVIEW is a graphical dataflow programming environment, and we have standard tools for Grouping on the front panel, why wouldn't we have the same tools on the block diagram? I've often wondered, though, if there's some technical or usability reason why Grouping isn't available on the block diagram. It's reasonable to think that it's been explored at some point by NI. I'd be interested to know if there's an inside story behind it. Thanks. I can relate to the selection gymnastics issue. Two technical complications come to mind. 1) If you open a diagram on a mahcine that is using a larger font that what you used at development time, the grouping would add extra work to clean-up since ... 2) Ctrl-shift-drag when performed inside a set of grouped objects would... A) deal with the group as a single object, or B) just blow-up the group? Ben Tags
This content has not been tagged yet
|
|
|
|
Mar 5 2008, 03:23 PM
Post
#9
|
|
|
Very Active Member Posts: 157 Joined: 26-September 05 From: Zurich Member No.: 3076 Using LabVIEW Since:2006 LV:8.2.1 ,8.20 ,6.1
|
I don't think it would encourage bad coding style. I frequently wish for Grouping on the block diagram so I can move bits of code around together without doing a multi-step select-an-area-then-deselect-individual-items-that-I-don't-want-to-move gymnastic. There are plenty of times when I'd use that functionality to improve the layout of code. Besides, if LabVIEW is a graphical dataflow programming environment, and we have standard tools for Grouping on the front panel, why wouldn't we have the same tools on the block diagram? I've often wondered, though, if there's some technical or usability reason why Grouping isn't available on the block diagram. It's reasonable to think that it's been explored at some point by NI. I'd be interested to know if there's an inside story behind it. I agree (obviously judging by my previous response). It's enivitable that, due to either space constraints or pure optical luxury, different "groups" of block diagram objects get to overlap. Moving that "group" is, as Justin says, a multi-step operation. We have a graphical language. The visual representation (orientation of objects) has a lot to do with understanding how the code works. We (I'm not quite sure who "we" are, but either way....) automatically group parts of code with similar functions visually on the BD, so why not lock their positions to each other? This allows us to pull the whole code section somewhere else without either destroying the arrangement or needing to do a multi-step move. Another case I would like to address is inherited code..... I can imagine some cases in which code would have been MUCH easier to clean up if I had this tool available. I also think it's something NI HAS tried. I too would be interested in knowing if this is even probable.... @Ben. I think as per normal usage, a group behaves as a single unit. Shane. This post has been edited by shoneill: Mar 5 2008, 03:25 PM Tags
This content has not been tagged yet
|
|
|
|
Mar 6 2008, 05:23 AM
Post
#10
|
|
![]() Very Active Member Posts: 51 Joined: 4-April 07 From: Andover, CT Member No.: 8297 Using LabVIEW Since:1999 LV:8.2.1 ,7.1.1 ,.
My Blog
|
A little clever application of scripting could solve this issue. Sounds like a good code challenge.
-------------------- LabVIEW. It's not just for breakfast anymore.
Tags
This content has not been tagged yet
|
|
|
|
Mar 6 2008, 11:19 AM
Post
#11
|
|
|
Extremely Active Premium Member ![]() Posts: 675 Joined: 3-November 04 From: Boston, MA Member No.: 949 Using LabVIEW Since:1999 LV:7.0 ,8.20 ,8.0
My Gallery
|
Almost every feature can encourage bad coding style and guns don't kill people, but people do... "Hey punk, put down the mouse, step away from the test station, and no one gets hurt..." -------------------- Tags
This content has not been tagged yet
|
|
|
|
Mar 7 2008, 10:16 PM
Post
#12
|
|
|
Very Active Member Posts: 103 Joined: 26-January 07 From: Seattle, WA Member No.: 7603 Using LabVIEW Since:2006 LV:8.20 ,. ,.
|
Hi,what about creating sub vis for each "block diagramm group"making the code more readable If I'm grouping a large number of components in which it makes logical sense to put in a sub vi that is definitely the way to go. Usually when I'm wishing for it I have a small number of components (~3-5) where adding a sub vi would add to the overall complexity of the project. For instance, in my current project I have a sub vi I use in several places. The output of the sub vi is usually immediately wired to an unbundle by name so I can get the data I need. For readability it makes sense to group the sub vi to the unbundle control to keep them aligned, but it makes no sense to create a series of sub vis for each unbundle combination I might need.A little clever application of scripting could solve this issue. Sounds like a good code challenge. *Ding* You're it! I'm looking forward to seeing what you come up with. QUOTE 2) Ctrl-shift-drag when performed inside a set of grouped objects would... A) deal with the group as a single object, or B) just blow-up the group? Ctrl-shift-drag makes a copy of whatever is selected. Selecting an item in a group selects the entire group. Therefore, ctrl-shift-drag copies the entire group, just like what happens on the front panel. (That's how I would deal with it anyway.)
This post has been edited by Daklu: Mar 7 2008, 10:21 PM Tags
This content has not been tagged yet
|
|
|
|
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
12 | JasonD | 2029 | 1st October 2008 - 10:52 PM Last post by: Minh Pham |
|||
![]() |
3 | DMiller | 2479 | 9th July 2004 - 04:48 AM Last post by: Jim Kring |
|||
![]() |
17 | Michael_Aivaliotis | 3467 | 1st April 2008 - 01:12 PM Last post by: mseb |
|||
![]() |
0 | lewdrake | 3351 | 11th April 2004 - 06:58 PM Last post by: lewdrake |
|||
![]() ![]() |
| Time is now: 10th October 2008 - 11:26 PM |