LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW block diagram strange behaviour

I have encountered a very strange problem with LabVIEW diagram,

System configuration: Windows 10 + LabVIEW 2020 community version

 

I have a LabVIEW project developed on a different computer, when I open the project/VI on my computer, if I move any control/indicator/constant on the block diagram, a lot of other things on the block diagram move with it, causing the block diagram to expand uncontrollably.

 

If I create a new VI, it works fine, the strange behaviour is not observed.

 

The LabVIEW project (on an USB drive) is fine because it works perfectly on another computer.

 

I have removed and reinstalled LabVIEW 2020 community on my computer, but the problem is not resolved.

 

Can anyone suggest what I should do next?

 

XL 

 

0 Kudos
Message 1 of 17
(1,293 Views)

Check each structure to see if "Auto Grow" is enabled.

 

Edit:

Oops, I didn't realize you said it worked fine on the other computer.  How big is this block diagram?

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 2 of 17
(1,286 Views)

@billko wrote:

Check each structure to see if "Auto Grow" is enabled.

 

Edit:

Oops, I didn't realize you said it worked fine on the other computer.  How big is this block diagram?


Auto Grow is a system setting so it can be turned off on one computer and enabled on others. It would be helpful to see th eVI that you are having issues with.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 17
(1,233 Views)

@XLEagle wrote:

I have encountered a very strange problem with LabVIEW diagram,

System configuration: Windows 10 + LabVIEW 2020 community version

 

I have a LabVIEW project developed on a different computer, when I open the project/VI on my computer, if I move any control/indicator/constant on the block diagram, a lot of other things on the block diagram move with it, causing the block diagram to expand uncontrollably.

 

If I create a new VI, it works fine, the strange behaviour is not observed.

 

The LabVIEW project (on an USB drive) is fine because it works perfectly on another computer.

 

I have removed and reinstalled LabVIEW 2020 community on my computer, but the problem is not resolved.

 

Can anyone suggest what I should do next?

 

XL 

 


As the others have suggested, it sounds like a different LabVIEW setting causing this (i.e. why it works one way on this and another way on the other computer). Copy the following file from the computer it is working correctly on over to the computer where it doesn't:

 

C:\Program Files (x86)\National Instruments\LabVIEW 20XX\LabVIEW.ini

 

Make a backup of the file you will overwrite anyway, as a matter of principle.

"Good judgment comes from experience; experience comes from bad judgment." Frederick Brooks
0 Kudos
Message 4 of 17
(1,228 Views)

@XLEagle wrote:

The LabVIEW project (on an USB drive) is fine because it works perfectly on another computer.


The fact you are running off of USB is a little concerning to me.  I have seen a wide variety of USB performance from computer to computer.  I don't think that is causing your issue.  I would really like to see this block diagram.  I'm guessing it is large.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 17
(1,218 Views)

@XLEagle wrote:

 

I have a LabVIEW project developed on a different computer, when I open the project/VI on my computer, if I move any control/indicator/constant on the block diagram, a lot of other things on the block diagram move with it, causing the block diagram to expand uncontrollably.

 

If I create a new VI, it works fine, the strange behaviour is not observed.

 

 

 


I have seen similar behavior before in the commercial LabVIEW, probably LV 2019 as it was a while ago.

  

Lucky in my case it was not a huge project as I don't have a solution beyond recreating the VI in question from scratch, as I had to do to solve it.

 

Something was corrupt in that VI is all I could come up with because it never happened again

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 6 of 17
(1,190 Views)

@Mark_Yedinak wrote:

@billko wrote:

Check each structure to see if "Auto Grow" is enabled.


Auto Grow is a system setting so it can be turned off on one computer and enabled on others. It would be helpful to see th eVI that you are having issues with.


As far as I know, auto grow is a per-structure setting, exactly as Bill said, and there is no other way to control it. Can you point to something different (other than writing scripting code which will iterate through structures and modify the setting for each one)?

 

In the OP, it's not clear whether this happens with each move of an object, or just with the first one. Since this is different between computers, my guess would be that this is just the first move and this is caused by font or DPI issues, meaning that the bigger font combined with autogrow causes things to move. In theory, you would expect the resizing to happen when the VI is opened, but I have seen cases where this only happens when a control is moved.

 

I have also seen a case with a very large VI that got out of control where moving anything on the BD (and I think maybe also switching between the many cases the structures there had) would repeatedly cause some of the code to move, making the VI bigger and bigger over time. I believe it was around 30k x 10k pixels by the time I got it. I had to build some tools to help with compacting and cleaning it (wasn't allowed to rewrite) and it took quite a while before I managed to get it to a state where things stopped moving. In that case, though, I saw the same behavior on multiple PCs, so I don't think this is the issue here.


___________________
Try to take over the world!
0 Kudos
Message 7 of 17
(1,150 Views)

XLEagle_0-1633582480776.png

Thanks all for help.

I got the project from someone else, and want to modify it.  Just to add something which may not be relevant.

 

1. The VI uses OpenCV dll for video capturing and image processing

2. I copied the whole block diagram and paste to a new VI (Ctrl-A, Ctrl-C, then Ctrl-V), the same behavor persists in the new VI.

3. I copied the whole project to my C: drive, and run from there, it makes no difference either.

4. The project was originally created in a Chinese language environment, I am running on an English one. But I do not think this is the issue, as I try it on another laptop with English Windows/LabVIEW, everything works fine.

5. I have turned off "auto grow" of all cases, loops, events... that I can find

6. the block diagram keep expanding as I move a control/indicator using an arrow key.

7. The direction of block diagram expanding is not always to same as the direction a control/indicator moves, i.e., if I move a control vertically, the block diagram expands horizontally.

8. Recreating the project from scratch probably will require more time than I am willing to spend.

 

I am still looking for a solution, luckily, I do not have a hard deadline for this project.

 

Thanks all, again.

 

XL

0 Kudos
Message 8 of 17
(1,116 Views)

"the block diagram keep expanding as I move a control/indicator using an arrow key"

So this doesn't happen if you use the mouse to move the controls? If so, is that not a feasible workaround? Just trying to be practical here...

Certified LabVIEW Architect
0 Kudos
Message 9 of 17
(1,112 Views)

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.


___________________
Try to take over the world!
0 Kudos
Message 10 of 17
(1,104 Views)