LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unexpected result when running VI

Solved!
Go to solution

Hi Ni community 

I build a supervision VI using labview 2019 but when i move frome the front panel to the block diagrame  it shows me a weird result as the shown it picture below .  

thank you .

 

Download All
0 Kudos
Message 1 of 5
(977 Views)

It looks to me the diagram was corrupted. Probably because the diagram got too large, or because objects where moved\resized out of the size of the diagram...

 

It might not be recoverable... Sometimes scripting can save things, maybe even the automatic diagram cleanup can fix things.

0 Kudos
Message 2 of 5
(952 Views)

first of thank you sir for your response ,but that VI it works well and the automatic "clean up " doesn't solve the problem . 

Can this issue caused  because of the big size of the VI !?  

0 Kudos
Message 3 of 5
(946 Views)
Solution
Accepted by topic author Haythem96

This looks like a serious case of "block diagram hypertrophy", where the block diagram has grown way larger than it should have.

 

Do you have any experience programming in any other language?  I ask this not to deride, but because I want to make a comparison, and previous programming experience would help you understand it better.

 

When programming in a text-based language, it is best practice to break your program up into functions which you call in the main() function.  For some reason or other, even people with prior programming experience think it's okay to dump all their code into one "uberVI".  The concept is actually the same in LabVIEW as any other programming language; call functions in your "main" VI - which I usually do name "main.vi".  Instead of calling functions which may (or may not be) included in the same file, you call them as subVIs in the main.vi.

 

Now this is where the discussion veers away from the language paradigm.  LabVIEW is actually NOT the language, it's the IDE for programming in "G".  it's commonly referred to as a programming language, but it's no more the programming language than Visual Studio is the language for coding in C++.  This is an important concept, because when the block diagram gets too big, sometimes the LabVIEW IDE gets confused and doesn't know how to display - and in some bad cases - how to compile a block diagram.  I do see a broken arrow, so it might be too late to recover it without damage.

 

Good luck - and hopefully you can learn a lesson without having to pay for it.  🙂

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 4 of 5
(935 Views)
Solution
Accepted by topic author Haythem96

@Haythem96 wrote:

Can this issue caused  because of the big size of the VI !?  


Yes. Start reading here.

0 Kudos
Message 5 of 5
(926 Views)