Donald Posted November 22, 2008 Report Share Posted November 22, 2008 QUOTE (Michael_Aivaliotis @ Nov 20 2008, 10:45 PM) I'd like to continue this thread as I think the diagram cleanup tool has a lot of potential and I'm hoping NI will improve it in the future. It's already saving me a lot of development time. One thing I haven't been able to figure out is how to compress horizontal spacing and remove a lot of white space. In the example below, I don't think it's necessary to expand the above structures. Should be like this: It seems like the tool tries to balance things out. If I delete the code below the structures then they become small when cleaned up again. It seems to expand the case structures to the width of the code below them. A fast solution for NI could be: The choice between "CleanUp All" and "CleanUp Selection". Selecting the 2 problems cases and clicking Cleanup will produce a better result with existing clean up algorythm. Often only a part of the diagram needs cleanup. Quote Link to comment
LAVA 1.0 Content Posted November 22, 2008 Report Share Posted November 22, 2008 QUOTE (Michael_Aivaliotis @ Nov 20 2008, 09:45 PM) It seems like the tool tries to balance things out. If I delete the code below the structures then they become small when cleaned up again. It seems to expand the case structures to the width of the code below them. It likes vertical alignment a little to much, the VIs are aligned with the for loop and the enum and unbundle are aligned with the bundle function. QUOTE (Donald @ Nov 21 2008, 12:50 PM) A fast solution for NI could be: The choice between "CleanUp All" and "CleanUp Selection". Selecting the 2 problems cases and clicking Cleanup will produce a better result with existing clean up algorythm. Often only a part of the diagram needs cleanup. Ditto that. Another point, don't quote full messages (esp. with images). Ton Quote Link to comment
Mark Yedinak Posted November 25, 2008 Report Share Posted November 25, 2008 QUOTE (Aristos Queue @ Sep 12 2008, 10:31 AM) Regarding the CAR that the wire routed under the string constant... I got an update from one of the developers who works on Diag. Clean Up:This is the expected behavior, with the default settings for auto Horizontal-Compactness. If the user moves the setting for Horizontal compactness to lowest, then the Diagram Clean Up will ensure that the wires will not go under the blocks. Quoting from the Tools>>Options dialog documentation: "Horizontal compactness—Determines how compact to make the block diagram. Higher compactness causes LabVIEW to take longer to clean up the block diagram and can cause LabVIEW to reroute wires under objects. This control is grayed out unless you select Manual tuning. LabVIEW considers labels as part of a block diagram object. " Even though this is a known issue, I am keeping this bug open because I could see that wire-routing in general is pretty bad in the given VI. The excessive bends in wires appear to be related to another known issue caused by shift registers, which we are currently working on. I guess what is needed is the concept of anchoring labels. If we could anchor a label to string or a free floating label to a section of code then the cleanup tool could do a better job of keeping things together in the first place. Quote Link to comment
horatius Posted December 5, 2008 Report Share Posted December 5, 2008 Does anyone know the mathematical backgrounds of this tool? It must be a topological optimization problem like travelling-salesman-problem. It's interesting to know if there is a "best solution" or if such an algorithm only finds local minima. I'd like to know how one can optimize between minimize of total wirelength minimize number of crossings minimize number of wire edges another point: this tool should simultaneously work during creation of a block diagramm and automatically snap the objects to optimum positions like a dynamically intelligent grid Quote Link to comment
Aristos Queue Posted December 5, 2008 Report Share Posted December 5, 2008 QUOTE (horatius @ Dec 4 2008, 06:48 PM) It's interesting to know if there is a "best solution" or if such an algorithm only finds local minima. It occurs to me that this might make a good advanced track NI Week presentation. I'll mention it to folks and see if it gets any traction. Quote Link to comment
Val Brown Posted December 6, 2008 Report Share Posted December 6, 2008 QUOTE (Aristos Queue @ Dec 4 2008, 05:06 PM) It occurs to me that this might make a good advanced track NI Week presentation. I'll mention it to folks and see if it gets any traction. FWIW I'd definitely be interested in it. Quote Link to comment
gb119 Posted December 6, 2008 Report Share Posted December 6, 2008 QUOTE (horatius @ Dec 5 2008, 12:48 AM) another point: this tool should simultaneously work during creation of a block diagramm and automatically snap the objects to optimum positions like a dynamically intelligent grid Ugghh, no ! Please no ! Surely I can't be the only one who drops things in places which I think will be near where they need to be when I've finished the diagram. The thought that LabVIEW might decide to out guess me and move things around before I'd finished makes even some of Word's 'intelligent' features look good. Unless of course LabVIEW code automatically write the rest of the vi based on my half-formed mental plan of the vi... Quote Link to comment
orko Posted December 6, 2008 Report Share Posted December 6, 2008 QUOTE (Gavin Burnell @ Dec 5 2008, 02:21 PM) Ugghh, no ! Please no ! I agree. The last thing I need is to have my dev environment try to outwit me... Quote Link to comment
Francois Normandin Posted December 7, 2008 Report Share Posted December 7, 2008 QUOTE (orko @ Dec 5 2008, 05:57 PM) I agree. The last thing I need is to have my dev environment try to outwit me... We sure don't want to have monkeys do our job, don't we? Could they? Quote Link to comment
Yair Posted December 7, 2008 Report Share Posted December 7, 2008 The snap to grid option already exists. I'm not sure if it works in the BD as well, but you can check that in the options menu. P.S. I agree this might make an interesting NIWeek session. Quote Link to comment
Michael Aivaliotis Posted December 7, 2008 Report Share Posted December 7, 2008 QUOTE (Aristos Queue @ Dec 4 2008, 05:06 PM) It occurs to me that this might make a good advanced track NI Week presentation. I'll mention it to folks and see if it gets any traction. Knowing how the tool was built would be interesting form an academic point of view, but kinda useless for helping me develop better code I think.The diagram cleanup tool works great for low node count VIs. It seems that if you go above a certain node count it goes crazy and makes the diagram worse than better. Also it seems to start cleaning up from the top left and works it's way down and across. Can't confirm but it feels that way. Another observation is I don't think it tries hard enough to reduce bends in wires. Or perhaps this is in conflict with some other parameter. It should try to keep wires straight instead of doing this (this is in auto mode): http://lavag.org/old_files/monthly_12_2008/post-2-1228603538.png' target="_blank"> Quote Link to comment
anandk Posted December 9, 2008 Report Share Posted December 9, 2008 QUOTE (Michael_Aivaliotis @ Dec 7 2008, 04:15 AM) Another observation is I don't think it tries hard enough to reduce bends in wires. Or perhaps this is in conflict with some other parameter. It should try to keep wires straight instead of doing this (this is in auto mode): http://lavag.org/old_files/monthly_12_2008/post-2-1228603538.png' target="_blank"> Shift-registers adds extra constraints to the layout algorithm. Perhaps this may be leading to wires bending all around. But, again, this could just be one of the many possible reasons ( including glitches in the algorithm.) Two things worth checking are : 1. Try with Manual Tuning with LayoutQuality set to max and keep the horizontal compactness to 2nd or 3rd position. 2. (Just for confirmation,) remove the shift register (or replace with tunnel) and see if that's any better. -Regards, Anand Quote Link to comment
Michael Aivaliotis Posted December 14, 2008 Report Share Posted December 14, 2008 QUOTE (anandk @ Dec 8 2008, 04:23 AM) Two things worth checking are : 1. Try with Manual Tuning with LayoutQuality set to max and keep the horizontal compactness to 2nd or 3rd position. 2. (Just for confirmation,) remove the shift register (or replace with tunnel) and see if that's any better. Settings Result: Same settings and Shift registers changed to tunnels: It's better but I still see a lot of unnecessary bends in the wires. I think priority must be placed on keeping wires straight above other factors. I was working on another VI cleanup and something bad happened. There were several for loops that suddenly became overlapped with other structures. Also some structures resized beneath other objects. Settings: Result: When I switched automatic mode off (into manual) it didn't do this. Thank god for undo! Quote Link to comment
horatius Posted December 15, 2008 Report Share Posted December 15, 2008 When does this NIWeekSession take place? What is this? How to attend? I think the basic principles of arranging points under restrictions and connect them is already solved and discussed in mathematical journals. NI just has to applay this knowledge. Is anyone a scientist in this field and can give some literature as I don't think that NI (as a monopole) will make it public? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.