LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BUG Block diagram cleanup fails completely? Generates very bad results

Seldom have I seen someone so precisely state the cause of their problem:

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

Actually I have been doing this work for 30 years, and no, I don't know how it goes. It's been 3 years and you still haven't learned to take responsibility for the problems that you created yourself. You hack things together and then complain about the tool you are using.

Perhaps you need to find a line of work where the quality of workmanship doesn't matter.

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 31 of 52
(980 Views)

Creating clean block diagrams is a skill - a skill that I consider crucial to my profession.
As such, I have worked to improve this skill over time (and it does take work).

Some things that have gone into this:

Better Design – there were times when I thought, “Man, connecting these 30 wires is such a pain! NI should provide a tool to make this easier”. Then I learned to use better data structures and methods, so the need for a lot of that clumsy wiring went away. Usually, if implementing code in LabVIEW is hard, it’s because you (including myself here) are not doing it right.

Better Methodology – starting clean and never letting a block diagram get out of hand means that there is not a huge mountain to climb, so it is not a burden or a time sink.

Practice – with practice, using the Align/Distribute Tools becomes instinctive. And the tools have improved over the years – which helps.

steve

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Message 32 of 52
(959 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


I know that, but I mean literally 1 pixel since the BDC always leave these little 1 pixel bends in the wires that annoys me.  Actually if you grab a chunk of code and move it with Shift-arrow it can move different items a different amount.  It may move them to a multiple of 8 location which is not always what you want.

 

The fact that it breaks the diagram is more of an issue, but in all cases that I have found this to happen, it is just dangling wire branches that can be corrected with a delete bad wires command.  However I do worry that will delete something important.

 

As to the quality of the BDC, it is not as good as a human optimized chunk of code.   Never will be.  What might be nice is the ability to permanently mark parts of the diagram as "locked" and not available for BDC.  A small blue outline around those items?  Too much visual clutter.  But that can allow for the BDC to optimize just the new sections as you add code and treat some of the regions as fixed blocks.  This is sort of like a word processor to learn the spelling of words that are not in the dictionary like magnetocaloric and other useful terms.  So they don't get flagged by the spell check or don't get reshuffled by BDC.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 33 of 52
(941 Views)

@mikeporter wrote:
Seldom have I seen someone so precisely state the cause of their problem:

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

Actually I have been doing this work for 30 years, and no, I don't know how it goes. It's been 3 years and you still haven't learned to take responsibility for the problems that you created yourself. You hack things together and then complain about the tool you are using.

Perhaps you need to find a line of work where the quality of workmanship doesn't matter.

Mike...

Let's not go down that path trying to belittle another's style of programming.

 

The simple fact of the matter is the BDCT doesn't work. 

 

I've seen some correlation to the problem.

Since you've been in LV for 30 years, then you too have noticed the flat sequence colors change…the older versions of the flat sequence had a DARKER gray, the new versions of the flat sequence are a LIGHTER gray.

The BDCT started failing when the NEW Lighter Gray Flat Sequences started appearing.

 

I too have been around the block a few times with LV.  All I can say is the BDCT used to work brilliantly, but, in the last 4-5 years it's really gone downhill.

 

I'd like to find a solution and bring the BDCT back to its original glory.  It's a powerful tool when it works.

0 Kudos
Message 34 of 52
(912 Views)

@Dhubbell wrote:

@mikeporter wrote:
Seldom have I seen someone so precisely state the cause of their problem:

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

Actually I have been doing this work for 30 years, and no, I don't know how it goes. It's been 3 years and you still haven't learned to take responsibility for the problems that you created yourself. You hack things together and then complain about the tool you are using.

Perhaps you need to find a line of work where the quality of workmanship doesn't matter.

Mike...

Let's not go down that path trying to belittle another's style of programming.

 

The simple fact of the matter is the BDCT doesn't work. 

 

I've seen some correlation to the problem.

Since you've been in LV for 30 years, then you too have noticed the flat sequence colors change…the older versions of the flat sequence had a DARKER gray, the new versions of the flat sequence are a LIGHTER gray.

The BDCT started failing when the NEW Lighter Gray Flat Sequences starting appearing.

 

I too have been around the block a few times with LV.  All I can say is the BDCT used to work brilliantly, but, in the last 4-5 years it's really gone downhill.

 

I'd like to find a solution and bring the BDCT back to its original glory.  It's a powerful tool when it works.


You could always go back to the version of LabVIEW that you feel most comfortable with.

 

Really, you should just stop using the BDCT as a crutch.

 

My mantra always was: "If the BDCT makes your BD look better, you're probably doing it wrong".

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.
Message 35 of 52
(907 Views)

Hi Bill,

I've always kept my LV subscription up to date with NI and I keep updating every year. Going to an older version of LV isn't what I had in mind and I'm sure NI wants to keep its subscribers paying for software year after year. Also, after you've gone one direction up, the code isn't backwards compatible.

 

BDCT is something I enjoy using, it's quick, and efficient when it works well. My concern is the BDCT has recently started failing on smaller VIs.

 

Doug

0 Kudos
Message 36 of 52
(902 Views)

I think I failed to note the "smaller VIs" part of your complaint.  I'm not sure what "smaller" means to you, but to me, smaller means something like "I just created a subVI from selected code and it's a bit jumbled up".  If that's the kind of stuff it's failing on, then that's a problem.

 

Maybe it was affected by all the new ways you can stretch and shrink your BD empty space.  Unfortunately I have no answers there.

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 37 of 52
(895 Views)

Here's a ScreenShot VI I sent to NI with all of the details back in the beginning of the year. NI got all of my code to diagnose and determined it was a BDCT bug. A CAR was issued.

 

I haven't found a reason for the BDCT not working. It's very random...some HUGE VIs will have no problems while smaller VIs will blow up. I thought it could be related to the version of LV in which the code was written, but, I've written brand new vis no larger than a single screen and the BDCT hasn't worked...then other times...massive larger block diagrams (5 or 6 screen widths) will not have any problems. It's not limited to smaller Vis, larger Vis also will run into the BDCT problem.

 

The typical BDCT failure is "folding"/"broken" wires and/or no response to the BDCT.

 

Sometimes the folding wires are broken and other times the folding wires are hidden under the structures.

 

I do a lot of sequential processing. Flat Sequences are common in much of my code. Again... back to the different types of Flat Sequences...

While I don't know for sure that the Flat Sequence color change has anything to do with the BDCT not working...it's coincidental the BDCT started having problems when the new Light Gray Flat Sequences were introduced. Also, if I replace older Dark Gray Flat Sequences, BDCT will "Sometimes" start working again.

Message 38 of 52
(876 Views)

Hi Dhubbell,

It is clear that you have identified problems with the BDCT. Hopefully NI will make improvements.

 

FWIW, I have a suggestion about dealing with sequential operations. I appreciate the ability to see all of the steps involved in the sequence, but it can take up a lot of BD real estate. Obviously, creating subvis would be a pain because of the front panel interactions.

 

A "For Loop Sequencer" with descriptive step names is an option worth considering. Using the Conditional Terminal (not shown) allows you to deal with errors that might occur in the process.

 

For Loop Sequencer_BD.png

--------------------------------------------------------------------------------------------------------------------------
Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
question. Give "Kudos" to replies that help.
--------------------------------------------------------------------------------------------------------------------------
Message 39 of 52
(855 Views)

Hi Steve,


I do like viewing my steps in a sequence and I have been replacing some flat sequences with "stacked" sequences.   What advantage would I gain by using "Case" inside a "For Loop"?  Doesn't a Stacked Sequence Offer the same results?

 

Thank you for making a suggestion, I appreciate it greatly.

 

Doug

0 Kudos
Message 40 of 52
(843 Views)