LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange Block Diagram behavior

Solved!
Go to solution

[deleted]

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

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

@billko wrote:

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


I also hate auto tool selection.  It's like I'm trying to work on a car and a monkey keeps changing the tool in my hand.

0 Kudos
Message 12 of 20
(263 Views)

That looks like you actually have a group of boolean constants and a group of local variables. You could post the VI so we could tell if they are grouped or nor... Can't tell from a picture.


Generally, you could get away with 1 boolean constant and a Negate. I honestly don't recall the last time I used a local (I have used them but it isn't often.)  This suggests that you have bad habits that you hide to make the bd prettier without really "getting" best practices.


"Should be" isn't "Is" -Jay
0 Kudos
Message 13 of 20
(251 Views)

Yeah, I'm sure I have plenty of bad habits!  One of them is not explaining myself well enough!  That image was simply an example to show how the local variables moved relative to the boolean constants.  For the record, it looks like other components also move (as they should).  The following is another example.  I put together an illustrative circuit with some constantsm controls, indicators, property nodes and a few other elements:

MarkTTHSAS_0-1729621083800.png

By changing case to the false case:

MarkTTHSAS_1-1729621196669.png

and then doing a control drag (in the other case as shown) as the arrow indicates:

MarkTTHSAS_3-1729621316877.png

 

 

It is clear the constants (crudely circled here) have remained in the same place, while the rest of the components have moved as expected.

MarkTTHSAS_4-1729621413098.png

Apologies for my poor explanation previously.

 

Anyway, I'm curious to learn how to avoid using local variables?  Do you use references? 

 

Also not sure what you mean by 'negate'.

 

Any help to improve my programming is much appreciated.

 

Mark

 

0 Kudos
Message 14 of 20
(239 Views)

@MarkTTHSAS wrote:

 

Anyway, I'm curious to learn how to avoid using local variables?  Do you use references? 


I typically just use a wire. 😄 (and maybe a shift register or feedback node)

 

I am not sure if you are just messing with us, but an "=true" is the same as a wire and just returns the control input unchanged.

altenbach_0-1729631898132.png

 

0 Kudos
Message 15 of 20
(224 Views)

@MarkTTHSAS wrote:

Yeah, I'm sure I have plenty of bad habits!  One of them is not explaining myself well enough!  That image was simply an example to show how the local variables moved relative to the boolean constants.  For the record, it looks like other components also move (as they should).  The following is another example.  I put together an illustrative circuit with some constantsm controls, indicators, property nodes and a few other elements:

MarkTTHSAS_0-1729621083800.png

By changing case to the false case:

MarkTTHSAS_1-1729621196669.png

and then doing a control drag (in the other case as shown) as the arrow indicates:

MarkTTHSAS_3-1729621316877.png

 

 

It is clear the constants (crudely circled here) have remained in the same place, while the rest of the components have moved as expected.

MarkTTHSAS_4-1729621413098.png

Apologies for my poor explanation previously.

 

Anyway, I'm curious to learn how to avoid using local variables?  Do you use references? 

 

Also not sure what you mean by 'negate'.

 

Any help to improve my programming is much appreciated.

 

Mark

 


This is exactly what I described in my first post.

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 16 of 20
(215 Views)

@billko wrote:


This is exactly what I described in my first post.


Though it behaves the same with and without Autogrow enabled on the structure

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 17 of 20
(196 Views)

I've had this happen fairly often when expanding code. Effed up some VIs something horrible, but i only noticed it later when i couldn't undo the changes anymore.

0 Kudos
Message 18 of 20
(180 Views)

That's just a thrown together fragment to demonstrate that the constants remain in place and the other circuit elements move during the ctrl-drag we were discussing.  

0 Kudos
Message 19 of 20
(176 Views)

Yeah, I just missed the point that it had to be in another case.

0 Kudos
Message 20 of 20
(174 Views)