LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange Block Diagram behavior

Solved!
Go to solution

Has anyone seen anything like the following behavior, and furthermore know of a solution.  I've attached a couple of images to help explain.  The first one shows the problem:

MarkTTHSAS_0-1729533689278.png

The 'False' constants and the string constant ('Active') have shifted relative to the other components.  Here's what it did look like:

MarkTTHSAS_1-1729534501117.png

Here's another example from the same project:

MarkTTHSAS_2-1729534617783.png

The array indexing constants have moved, as has the string constant.

 

This seems to happen fairly randomly, i.e. I save the project and then open it later and sometimes things have shifted like this and sometimes not.  It does not seem to be the entire project either, some constants appear to unafected while others nearby are shifted...

 

Is there a setting I'm missing?  I'm at a bit of a loss to understand what is going on.

 

LabVIEW 2021 Base Development System

0 Kudos
Message 1 of 20
(390 Views)

Seems unusual:

 

A few things to check:

 

  • What are the default LabVIEW fonts and OS language setting on the various machines.
  • Is your diagram exceedingly large?
  • What are the auto-grow settings of your various structures?
0 Kudos
Message 2 of 20
(386 Views)
Solution
Accepted by MarkTTHSAS

This looks to me like what happens when you use ctrl + mouse drag to open up room in a case structure.  It moves stuff in the other cases as well.

 

Edit: also, shift + ctrl + mouse drag to remove space.

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 3 of 20
(361 Views)

Thanks for the rapid response!

This is only happening on my development machine, and I don't think the fonts are anything different than default.  however, i think you might be onto something with autogrow.  (I don't know how this works btw).  My default setting is off (I think)

MarkTTHSAS_0-1729541594577.png

 

HOWEVER, when I look at nested structures (right-click to see autogrow status), I see the following:

MarkTTHSAS_1-1729541775936.png

 

This has not been selected deliberately and I'm not sure why some have it turned on and others not.  Can you explain what autogrow does and why some structures have it enabled while others don't?

 

0 Kudos
Message 4 of 20
(344 Views)

A further clue maybe:

 

It looks like Autogrow is enabled for pretty much everything (while loop, for loop, event structure, case) EXCEPT for case structures fed by an enum.

0 Kudos
Message 5 of 20
(342 Views)

I hate autogrow so much I call it "auto-groan".

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 6 of 20
(335 Views)

@MarkTTHSAS wrote:

Can you explain what autogrow does and why some structures have it enabled while others don't?

 


Autogrow prevents you from placing items outside the visible border of a structure by increasing its size (similar to a ctrl+drag) and prevents you from shrinking a structure so it hides code. It's on per default in the settings. Some hate it, i often find it useful but sometimes it messes things up.

 

Try placing e.g. two nested cases and shrink the outer or increase the inner outside the border with it on and off.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 20
(301 Views)

OK.  I see what Auto grow does.  Are we saying that some elements are 'pinned' (for want of a better word) to the block diagram (e.g. constants) while others are free to move with the autogrowing structures?

0 Kudos
Message 8 of 20
(285 Views)

I think I have worked out why I'm getting the behavior I originally posted about.  I don't think it has anything to do with Autogrow (although it has been interesting learning about it!).  I think when one does a resize inside a case structure, variables and constants in other cases show different behavior.  Here's an example.  I just put a grid of Boolean constants with some local variables placed around the grid:

MarkTTHSAS_0-1729600849564.png

I then switched case (to show the false case) and did a 'ctrl-click and drag' to increase the size of the case structure.  The drag started in the area of the boolean grid shown approximately by the arrow.

 

MarkTTHSAS_2-1729601056476.png

 

As you can see, the local variables move, but the constants stay put.

Another example:

MarkTTHSAS_3-1729601225521.png

This is exactly what I am seeing, but the question remains as to how to prevent it...

 

 

Thanks for all your help so far!

 

0 Kudos
Message 9 of 20
(278 Views)

That's a bit strange, all cases should add area from the same point.

Can confirm in LV2019! 

Yamaeda_0-1729605742611.png

Adding space in the middle yields the expected result

Yamaeda_1-1729605777215.png

Adding space in the False case moves the True's Index array as expected, but the constants stay!

 

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 20
(268 Views)