LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My VI doesnot auto-clean

Solved!
Go to solution

I have a VI which doesnot auto-clean.

The VI works fine. The EXE works fine. 

But somehow the Blocks and Wires towards the top right side of the Circuit are not cleanable.

Manual Clean and Auto-Clean, both dont work.

If the VI is corrupted, it shouldnt work. But it does work flawless.

Can anyone please help identify / remove this annoying problem ?

0 Kudos
Message 1 of 16
(3,152 Views)

@Rohit_Chawla wrote:

I have a VI which doesnot auto-clean.


What do you mean by auto-clean? "Auto-clean" is not a thing... In other words, it's normal VIs don't auto-clean, I haven't seen a VI that does auto-clean.

 


@Rohit_Chawla wrote:

The VI works fine. The EXE works fine. 


The VI is broken. Adds are not wired. No way you can make an exe from that.

 


@Rohit_Chawla wrote:

But somehow the Blocks and Wires towards the top right side of the Circuit are not cleanable.

Manual Clean and Auto-Clean, both dont work.


Please be more specific. The Vi is huge...

 


@Rohit_Chawla wrote:

If the VI is corrupted, it shouldnt work. But it does work flawless.


The diagram can be corrupted, while LabVIEW can still compile it. So you won't be able to edit, it can still compile and run just fine.

 


@Rohit_Chawla wrote:

Can anyone please help identify / remove this annoying problem ?


You're probably running into the diagram limit. The diagram is huge.

 

Start by removing the void space, for instance between all the property nodes. This is not the way to make a LabVIEW program, you should consider a few courses and an actual architecture.

0 Kudos
Message 2 of 16
(3,117 Views)

Reattached another VI with the same problem. This time there are no broken lines / components.

By Auto-Clean, I meant the "Clean Up Diagram" button. (Pressing it doesnot do anything.)

 

Rohit_Chawla_0-1575967908422.png

The top right corner of my code which is encased in a while loop has some wires (or hidden portion) which I cant clean up. Its already on "Auto-Grow" mode. If I try to enlarge the Loop, it actually shrinks. I am unable to see the blocks which are presumably hidden. Even the conditional terminal of the loop is missing.

 

I am confused, because if we assume the VI is corrupted, it should not execute. But it does. Somehow.

 

Yes, you are right. I guess I will need to do some courses.

 

But right now I am learning it by experimenting and watching forum posts and online videos. I can understand experts not being comfortable with trivial / newbie posts like mine. But I have no other way out left. Have read through a lot of posts to see if anyone had a similar problem. I have been struggling with this VI and re-writing code is something I am trying to avoid.

 

Will really appreciate if anyone can identify the problem and suggest a way to rectify.

0 Kudos
Message 3 of 16
(2,994 Views)

You've turned off the Run button, i don't know if that affects the ability to using Clean up tool.

(There's also a saying: If Automatic Clean up makes your code look better you have a problem)

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
Message 4 of 16
(3,106 Views)

Here's a "fixed" version.

 

"Fixed" as in slightly better. It will auto-clean, for what that is worth. I had to move a lot of terminals and delete a wire, the end terminals where unknown (run off the diagram). All with scripting, as the development environment gave up...

 

I should make it clear that there is no guarantee that the problem is gone, that nothing got broken, or basically I can't guarantee anything at all...

 

I don't think it will do much good. The diagram is just sooo big and messy, you'll run into new trouble soon.

 

Consider starting over, after doing some courses or gaining advice.

Message 5 of 16
(3,099 Views)

Ha Ha. Thanks a lot for trying.

Unfortunately the VI that you fixed is still not showing the contents of the top right corner of the outermost while loop. The conditional stop terminal block is also missing. I needed to re-wire the same.

 

Indeed the VI is too big and messy and that is the sole reason for the resistance in re-doing the whole thing again.

But if nothing still works out I am let with no option but to re-write from scratch.

 

The only thing that bothers me is, if the VI is truly corrupted, then it shouldnt execute (let alone allow me to build an EXE). And if it isnt really corrupted, then why are the components not really visible.

 

So solving this VI problem is not the challenge here. Why it could have happened, how to prevent it from happening or how to FIX the issue (this and future, mine and others) is the real challenge.

 

Thanks again for the efforts you put in. But if you can understand/explain the cause and effect, it would be more helpful to me and others who end up searching for a similar issue.

0 Kudos
Message 6 of 16
(3,092 Views)

I don'r have LV on this computer so can't open and take a look, but is it very big? There's a limit to how big a VI can be of ~16k pixels.

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 16
(3,078 Views)

@Rohit_Chawla wrote:

The only thing that bothers me is, if the VI is truly corrupted, then it shouldnt execute (let alone allow me to build an EXE). And if it isnt really corrupted, then why are the components not really visible.


That assumption is wrong.

 

The diagram is just the interface to the user. That is broken. The nodes on the diagram are still useful to the compiler.

 

LabVIEW doesn't use vision or something to compile. The nodes are used to compile, the nodes are used to visualize. The information needed to compile is not the same information to visualize. This implies that code can be compiled but not visualized, or can be visualized and not compiled. Both are possible, and both actually occur in the wild.

 

You can (I won't share how) actually deliberately scramble (obfuscate) the diagram by making stuff invisible and by moving things around. Things that can't be moved by the user interface... The compiler can still make out what to compile, but LV can't visualize it properly. You can even mess up things so that viewing the diagram crashes LabVIEW. But the VI will still compile and run.

 


@Rohit_Chawla wrote:

So solving this VI problem is not the challenge here. Why it could have happened, how to prevent it from happening or how to FIX the issue (this and future, mine and others) is the real challenge.


Positions In LabVIEW diagrams are stored as I16. Note that this was designed ~30 years ago...

 

This makes the range of positions -32k to +32k pixels. However, this limit isn't enforced (checked). If objects are moved passed the limit, the positions might wrap (from 32k to -32k) or other evil might happen.

 

So growing the diagram will eventually throw objects off the edge of the diagram. Quite literally.

Message 8 of 16
(3,074 Views)

@Yamaeda wrote:

I don'r have LV on this computer so can't open and take a look, but is it very big? There's a limit to how big a VI can be of ~16k pixels.

/Y


There are objects with positions <-30000 and > 30000. So, yes, it's big. The current range might be the result of an automatic wrap, so the diagram might have been smaller "by design".

 

Restoring the node positions (scripting) fixes some problems, but we'd probably also need to reconnect all wires. And some need diagram reclusiveness will probably pop up.

0 Kudos
Message 9 of 16
(3,070 Views)

wiebe@CARYA wrote:

@Yamaeda wrote:

I don'r have LV on this computer so can't open and take a look, but is it very big? There's a limit to how big a VI can be of ~16k pixels.

/Y


There are objects with positions <-30000 and > 30000. So, yes, it's big. The current range might be the result of an automatic wrap, so the diagram might have been smaller "by design".

 

Restoring the node positions (scripting) fixes some problems, but we'd probably also need to reconnect all wires. And some need diagram reclusiveness will probably pop up.


Right, it's +/- 32k, not 16. Anyhow, maybe the 'hack' of selecting all and Align Top and Left, then move stuff out automatically or painstakingly manually.

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
Message 10 of 16
(3,062 Views)