LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW block diagram strange behaviour

If I drag an control/indicator, the block diagram expands too 😞

0 Kudos
Message 11 of 17
(477 Views)

tst,

I did not start this project. The program does what it is designed to when I got it, but on the block diagram, the event structure needs 4 screens to fit in, and there are 4 parallel loops in a single event :).

 

Actually, my goal was exactly to clean up this VI. But with this strange block diagram issue, cleaning up is almost impossible. 

 

I guess since there appears no easy way out,  I just have to use another computer which does not exhibits the problem for initial clean-up work, (and luckily I do have possession of such a computer for now). 

 

Thanks all for help.

XL

0 Kudos
Message 12 of 17
(474 Views)

@tst wrote:

Based on the width of the event structure and case structure in that image, I'm going to guess that the VI is fairly large and that you're seeing something similar to what I was seeing. You can see some details about the VI by opening Tools>>Profile>>VI Metrics (although that might not exist in the community version). If you share that information here, then we can know how complex the VI is.

 

If this is really your case, then I don't have any good suggestion other than cleaning up the VI until it stops happening. The easiest tool for that would be Edit>>Create SubVI and create as many subVIs as needed from sections of the code. If you can make them make sense, then that would be best, but even just getting the code out of the VI can be useful. In those cases case, just make sure you have some kind of naming scheme which makes it easier to create the VI names (for example, you could name them based on the case the code comes from). Once you do that and the VI is stable, you can decide whether to refactor those VIs into code that makes sense or leave them.

 

In the example image you posted, I think you can make the code inside while loop into two VIs which make sense - one of them will take the image cluster and do all of the red plane splitting (so it will have 3 inputs and 2 outputs) and the other will do the code inside the internal case structure and save the image to a jpg file (so it will have 2 inputs). You could then also add some error handling, which doesn't currently exist. If this code happens to repeat in other places in the code, you can even reuse the same subVI.


One potential issue here is that, by making a subVI, you enforce some kind of unintended dataflow, making the VI work "differently".  I think the possibility of this happening increases exponentially as the size of the block diagram increases.

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 13 of 17
(465 Views)

@XLEagle wrote:

If I drag an control/indicator, the block diagram expands too 😞


It sounds like Control key is stuck as that's how it'd behave if you hold it down. 

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 14 of 17
(463 Views)

@Yamaeda wrote:

@XLEagle wrote:

If I drag an control/indicator, the block diagram expands too 😞


It sounds like Control key is stuck as that's how it'd behave if you hold it down. 


That reminds me of the time a user was puzzled why the cursor kept scrolling to the bottom of the text he was trying to edit, and I told him, "Here, let me try something," and I gave the down arrow a solid smack with my finger, such that he jumped out of his skin!  It stopped scrolling.  I told him he needed to get a new keyboard.  😄

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 15 of 17
(461 Views)

@Yamaeda wrote:

@XLEagle wrote:

If I drag an control/indicator, the block diagram expands too 😞


It sounds like Control key is stuck as that's how it'd behave if you hold it down. 


But holding the Control Key and dragging an object on the block diagram creates copy of the object.

 

Also if that were the case then the OP would see the "Expanding Diagram Arrow" following their cursor whenever they were moving around on the block diagram.

 

DragCapture.PNG

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 16 of 17
(447 Views)

Thanks all who responded earlier.

I cleaned up the code (block diagram) on a different comupter, and I was able to create many sub-vis without changing the data-flow. The program functions the same way. 

 

And when I move back to my computer, everything works perfectly. It appears LabVIEW on my laptop just cannot keep track of where all the wires are on the block diagram. It is fine on a more powerful computer.

 

Now this gives me a good case to tease my friend who wrote the spaghetti code in the first place😄. Coding is fun....

 

Thanks all, again.

 

XL

0 Kudos
Message 17 of 17
(411 Views)