LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BUG Block diagram cleanup fails completely? Generates very bad results


@sth wrote:

@billko wrote:

I can only guess that he doesn't mean that they literally break, but that they make some funny turns even when they apparently don't need to.


No, they break.  I have had cases where BDC will leave dangling bits of wires.  It was a really ugly diagram (not mine).  I have been getting used to BDC as a quick way to make reasonably readable code.   It has its oddities but it does save a lot of moving things 1 pixel at a time.


You can speed that up by a factor of 8 with Shift+ArrowsSmiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 21 of 52
(1,228 Views)

@JÞB wrote:

@sth wrote:

 It has its oddities but it does save a lot of moving things 1 pixel at a time.


You can speed that up by a factor of 8 with Shift+ArrowsSmiley Wink


Yes.  I use the shift-arrows a lot!

 

But to get the final alignment is the slow part to remove every last kink in the wires.  That is the slow part with a lot of key strokes.  I tend to be a little OCD on the diagram layout that I am trying to focus my time on working code and convince myself that BDC is "good enough".  

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 22 of 52
(1,222 Views)

@mikeporter wrote:

Well, if you find this is a problem you encounter regularly with code you are writing, there is definitely a problem -- and its not with the BDC.

 

Mike...


Does the BD diagram I showed in the first post really look that complicated? It's not me who filled in all the blank space in every case of a case structure. BDC is very inconsistent. The result for a complete diagram cleanup (no structure selected) alsmost always tends to accumulate horizontal empty space in structures, except for the simplest ones. But if select the too-wide structures, clean them up manually and then exclude them from cleanup, the BD is much more compact, meaning all the horizontal empty space is removed. That does not help with case structures though... if they fill up with empty space, the only solution is to include everything in them in another structure.

 

I'm pretty sure I had BDC break wires, too. I got working code from someone containing a timed while loop with 3 or 4 frames. I don't know how it happened, but one of the wires from one of the frame terminals went to the left and vanished under the frame border. Somewhere hidden there was a math function (I think it was an expression node; I knew it was there because it did its job). The wire came back into the frame a few pixels above. Moving the frame border to the left didn't help, because it moved whatever was hidden further to the left, too. I tried hitting BDC and without changing anything else the VI was no longer executeable.

0 Kudos
Message 23 of 52
(1,215 Views)

If you are working on inherited code that is one thing, but if you shouldn't be depending on the BDC function to work on code you are writing. You need to be writing better code.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 24 of 52
(1,203 Views)

It seems with every New Release of LV, the BDCT gets worse.  I subscribe to LV Updates and keep updated with the latest version of LV.  LV versions earlier than 2013 seemed to work without any problems.  2013 had a few problems, but, was manageable, 2014, and 2015 went off the charts and has literally BLOWN UP my code.

 

I like how many people say "write better code".  They must not live in the real world, where date/time/projects must be met quickly.  I mean if I take a simple block of code, that fits on one screen, and when I use the BDCT it folds wires under its self, and breaks other wires...where's the usefulness?  Most of the time I plop code down grabbing parts and pieces...you know how it goes...then a simple BDCT should clean it up.  BDCT worked before, but, now it's getting worse, and not better.

 

I've opened CARS and sent sample code to NI.  I've been told it's complicated and they have no idea when it will be fixed.  Great answer.  I see people reporting this problem since 2010 and here it is 2016...SIX YEARS later and still no answers.

 

I really like how NI will demonstrate code that has 6 wires with 1 structure and say look how good the BDCT works!  Unfortunately, there are more than 6 wires, and 1 structure in most BD.  


I use two monitors to code and if there are LIMITS that NI must implement, then they should be implemented so the BDCT works.  Don't give me an unlimited canvas to paint on, then tell me sorry it's your code.

 

THE BDCT IS LONG OVER DUE FOR AN UPGRADE.  When BDCT works, it's a great time saver!  When BDCT doesn't work, it wastes more of my valuable time.

 

Apparently NI doesn't feel BDCT is important to its customers.  I guess I'm the only one that feels the BDCT should be a priority and it shouldn't take over 6 years to fix.

 

 

0 Kudos
Message 25 of 52
(1,075 Views)

In my opinion, the only good use for block diagram cleanup is on smaller SubVIs. I don't have a hard and fast rule, but if I'm making a SubVI with 4-5 functional blocks, a couple of controls/indicators, and a loop or other structures, I enjoy wiring it up quickly and then running the cleanup.

 

I would not dream of running it on one of my top level VIs, which I have often meticulously played with to get as few bends as possible. When there is a lot going on, there is just no way for the cleanup tool to know what is important to you. For me, I like having the error wire as straight as possible, and comments usually (but not always) go slightly above what they are describing. It would be great if we could tell it our preferences and it could come up with something that looks like our style of code, but that is far too ambitious. I think developing my own style has been an important part in helping me "think LabVIEW", so I am kind of glad that the cleanup tool is not a "catch-all" for writing clean code.

 

 

 

 

Message 26 of 52
(1,086 Views)

@Dhubbell wrote:

It seems with every New Release of LV, the BDCT gets worse.  I subscribe to LV Updates and keep updated with the latest version of LV.  LV versions earlier than 2013 seemed to work without any problems.  2013 had a few problems, but, was manageable, 2014, and 2015 went off the charts and has literally BLOWN UP my code.

 

I like how many people say "write better code".  They must not live in the real world, where date/time/projects must be met quickly.  I mean if I take a simple block of code, that fits on one screen, and when I use the BDCT it folds wires under its self, and breaks other wires...where's the usefulness?  Most of the time I plop code down grabbing parts and pieces...you know how it goes...then a simple BDCT should clean it up.  BDCT worked before, but, now it's getting worse, and not better.

 

I've opened CARS and sent sample code to NI.  I've been told it's complicated and they have no idea when it will be fixed.  Great answer.  I see people reporting this problem since 2010 and here it is 2016...SIX YEARS later and still no answers.

 

I really like how NI will demonstrate code that has 6 wires with 1 structure and say look how good the BDCT works!  Unfortunately, there are more than 6 wires, and 1 structure in most BD.  


I use two monitors to code and if there are LIMITS that NI must implement, then they should be implemented so the BDCT works.  Don't give me an unlimited canvas to paint on, then tell me sorry it's your code.

 

THE BDCT IS LONG OVER DUE FOR AN UPGRADE.  When BDCT works, it's a great time saver!  When BDCT doesn't work, it wastes more of my valuable time.

 

Apparently NI doesn't feel BDCT is important to its customers.  I guess I'm the only one that feels the BDCT should be a priority and it shouldn't take over 6 years to fix.

 

 


People always say "write better code" because that's just what you should do.  "Quick and dirty" leads to a mess I'm probably going to have to untangle when they hire me to clean up your mess.  (And believe, me, that's a big part being a LabVIEW contractor - cleaning up ohter people's messes.)

 

You can code both quickly AND cleanly.  You have to stick with it, though, because you start out slowly, but you regain all you lost - and them some - when coding the "big app" consists of simply stringing together stuff you took the time to do correctly.

 

And of course, this leads to less "plopping down of code".

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 27 of 52
(1,073 Views)

@Dhubbell wrote:

...

Apparently NI doesn't feel BDCT is important to its customers.  I guess I'm the only one that feels the BDCT should be a priority and it shouldn't take over 6 years to fix.

 

 


NI has a feduciary responsiblity their investors to make a profit. If the failure of the BDCT on large diagrams impacted the bottom line, it would be a bigger priority. I took NI years to implement the BDCT becuase (I am now sepcualting) there simply was not a NEED. I BELIEVE the BDCT was only implemented after th NI Idea Exchange pushed for it.

 

Now to help you...

 

Can you make a case for NI being able to make more profit if they invested more in the BDCT ?

 

A good case would go a long way toward escalating the fix.

 

That is all I can offer to help.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 28 of 52
(1,059 Views)

"If the failure of the BDCT on large diagrams impacted the bottom line, it would be a bigger priority. "

 

This is the problem...it's NOT just LARGE Diagrams, it's smaller "one screen" diagrams that aren't working now.  I'm so heavily invested into LV now that I really don't have a choice.  It's frustrating to see a great program deteriorate getting progressively worse and worse each year.  I don't understand why NI is ignoring this major problem.  If I told my customers wait 6 years...well you get the idea...this is unacceptable, and NI needs to wake up.

0 Kudos
Message 29 of 52
(1,045 Views)

The next time you hear of LV Beta testing opening up, sign up. While there is no guarentee that will make all of the difference, it will give you a more diect line to the developers to let them fix things BEFORE they get released.

 

But be aware that if you do go the Beta route I think you will never be able to mention that you reported it during beta testing (smiley-wink).

 

Not trying to shoot you down, just making an attempt at pragmatisim.

 

Spoiler
That is coming from a guy that spend most he free time prepparing for the end of the world as we know it. Go figure!

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 30 of 52
(1,042 Views)