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 20
(1,035 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 20
(1,032 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 20
(1,023 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 20
(1,021 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 20
(1,019 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 20
(1,008 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 20
(972 Views)

I also encountered this problem and found a solution. Although I see that you have already resolved it, I wanted to share this in case someone else encounters the same issue later and wants to understand what happened.

 

In my case, my LV (LabVIEW) program is relatively large. Because I wanted to see more things on the same screen, I placed many blocks very tightly within structures.

 

This turned out to be the issue. Sometimes, during the programming process, these blocks might overlap with each other unintentionally (as shown in the picture).

 

Screenshot 2024-06-26 143749.jpg

This can cause LabVIEW to try to adjust the space when you move blocks, attempting to bring the overlapped blocks back into view. I discovered this by deleting structures one by one to see which area caused the problem. I hope this helps others in the future.

0 Kudos
Message 18 of 20
(536 Views)

@ykchaumac wrote:

I also encountered this problem and found a solution. Although I see that you have already resolved it, I wanted to share this in case someone else encounters the same issue later and wants to understand what happened.

 

In my case, my LV (LabVIEW) program is relatively large. Because I wanted to see more things on the same screen, I placed many blocks very tightly within structures.

 

This turned out to be the issue. Sometimes, during the programming process, these blocks might overlap with each other unintentionally (as shown in the picture).

 

Screenshot 2024-06-26 143749.jpg

This can cause LabVIEW to try to adjust the space when you move blocks, attempting to bring the overlapped blocks back into view. I discovered this by deleting structures one by one to see which area caused the problem. I hope this helps others in the future.


I just turn off "auto-groan" (auto grow) so I don't have to put up with that.  Although some people have taken the time to learn it and use it to their advantage, I just can't seem to dedicate myself to deep learning of the auto grow algorithm.

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 19 of 20
(508 Views)

@ykchaumac wrote:

Screenshot 2024-06-26 143749.jpg

 That shadow means the block is Floating and not actually in the structure. That can trick people when reading the code.

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

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