LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to clean Up complicated block diagram

i have complicated block diagram cannot be cleaned with button clean up and even some wires and blocks looks like hidden or missed , please help how can i clean it up , see attached 

Ahmed99_0-1744017169209.png

 

CLA
0 Kudos
Message 1 of 10
(282 Views)

If that's how it looks, the diagram is corrupted.

 

Probably because the diagram coordinates are 16 bit, and the limits where exceeded.

 

I don't know if it can be fixed, but I do know there's no quick fix. It will require the VI for sure.

 

I'd try to use scripting to get all nodes and wires (recursively) and set all object coordinates to 0,0. Then try if diagram cleanup can fix it. Alternatively, try to fix node coordinates of objects that have invalid coordinates, but it will be fiddly for sure.

0 Kudos
Message 2 of 10
(279 Views)

Hi Ahmed,

 


@Ahmed99 wrote:

please help how can i clean it up


Pull an older and non-corrupted revision of your VI from your SCC tool (or some other backup).

Cleanup that older revision before attempting to add "new enhancements"…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 10
(274 Views)

Looks more like a graphic issue. 

Are your display driver up to date? 

If you scroll on the block diagram does it fix the view?

0 Kudos
Message 4 of 10
(264 Views)

when scroll not fixed , i think my graphic driver is uodated

 

CLA
0 Kudos
Message 5 of 10
(255 Views)

I agree with Wiebe that you most likely exceeded the valid range for the block diagram. You can read more about it here.

 

(It is even possible that the diagram cleanup action itself pushed it over the edge)

0 Kudos
Message 6 of 10
(193 Views)

You can press Ctrl+i to bring up the properties of the VI and one of the pages says the diagram size. If it's >15k you're probably in trouble. (Some old design guide said "No more than a screen large", and that's a good rule of thumb to strive for)

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

Qestit Systems
Certified-LabVIEW-Developer
Message 7 of 10
(108 Views)

This might not be a "giant block diagram" issue, though it's certainly likely. I have had weird graphical glitches that make my BD's look weird when they first load, and this is for small VI's/one screen/etc. It seems that minimizing and reopening the screen "resets" it somehow. Other fixes include maximizing/restoring windows, switching which external display it's on, etc.

 

In my case the issue never persisted across close/reopen, so it's not a corrupted diagram or anything. Just graphics being weird.

 

OP, if this persists while scrolling, rebooting, etc., then your VI is almost certainly corrupted. You can try using Ctrl A->Copy, opening a new window, then Pasting everything. Sometimes that can clear up a glitch, but it's not guaranteed.

 

Is your VI quite large? In other words, how many "screens" worth of space is it taking up?

0 Kudos
Message 8 of 10
(87 Views)

"Large" is certainly a contributing factor, but I guess even a small diagram might be problematic if it sits near the boundaries.

 

One would think all this could be prevented if LabVIEW could incorporate some cheap bounds checking when things are moved or during diagram cleanup calls. As mentioned, cleanup is a bit messy. I have seen occasions where a diagram cleanup would make me stare at a blank diagram afterwards because everything got moved outside the visible area. 😮

 

0 Kudos
Message 9 of 10
(75 Views)

I think it would even help if LabVIEW 'normalized' the node coordinates.

 

Sadly, it is not the size, although you won't see this often with proper sized diagrams.

 

If you keep using CTRL+ Drag, things will simply shift. If that's a habit to do, at some point the coordinates will grow too large...

 

It doesn't even take that long: CTRL+Drag, moving your mouse just outside the VI, you'll see the corruption happen after ~20 sec..

 

Quick Drop, CTRL + O actually normalizes the origin, but it hangs* LabVIEW even for the simplest example (a constant and wire to an indicator. So if CTRL+ Drag is your habit, add regular QD, CTRL + O to the habit.

 

Of course a revert from SCC would be the first thing we would do.

 

I don't think there's much else we can do without the VI.

 

Even with a VI, things are looking bad. Simply changing the position to something valid with scripting doesn't fix the corruption. Because the coordinates are screwed up, the bounds are off too. And the bounds can't be simply set for any object (e.g. for a ControlTerminal)...

 

* LabVIEW actually stops after minutes with an out of memory, but doesn't crash.

0 Kudos
Message 10 of 10
(44 Views)