LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Block diagram Too wide / Diagramme trop large

Hello everyone,

 

As part of the development of a VI under LabVIEW 2018, my program began to hide parts of code, and to extend my VI (to the point of reaching the limits displayable by LabVIEW).

 

I don't know how to fix this VI display problem to continue finishing my programming. I tried to copy paste the program, to clean the wiring, but nothing helped..

 

Here is attached the concerned VI.

 

Thanks by advance!

 

//

 

Bonjour à tous,

 

Dans le cadre du développement d'un VI sous LabVIEW 2018, du jour au lendemain mon programme s'est mis à masquer des parties de code, et à étendre mon VI (au point d'en arriver au limites affichable par LabVIEW).

 

Je ne sais pas comment faire pour réparer ce soucis d'affichage du VI pour continuer à terminer ma programmation.. J'ai tenter de copier coller le programme, de nettoyer le cablâge, mais rien n'y fait..

 

Ci-joint le VI en question. 

 

Merci par avance!

0 Kudos
Message 1 of 9
(1,251 Views)
0 Kudos
Message 2 of 9
(1,241 Views)

Hi loan,

 


@loanjojo wrote:

As part of the development of a VI under LabVIEW 2018, my program began to hide parts of code, and to extend my VI (to the point of reaching the limits displayable by LabVIEW).


Your Vi is way too large:

For comparison: on a FullHD monitor the recommended diagram size is 1900×1000 pixels.

 

Recommendation: pull an older (still editable) version of your VI from your SCC tool (or backup) and start over while applying recommended LabVIEW practices and obeying LabVIEW Style guide…

Best regards,
GerdW


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

Yes, I know that my block diagram is way too large..

 

Unfortunately, LabVIEW can't backup my last VI.

 

I tried with 2 screen on 1920 x 1080, to see if the limitation size change, but it doesn't work..

 

I just need in absolute to recover my main sequential diagram, but it don't want to appear in this VI.. 

 

Here is an older version of the same VI, if you need to see the size before the last version which crashed.

 

Best regards,

Loan  

0 Kudos
Message 4 of 9
(1,208 Views)

I don't know if you can fix the corruption but a few ideas for going forward:

- try to keep your wires short and straight, currently they are all over the place

- initialize things at the start of program and possibly use for loop with case structure to do it, considering your large amount of variables

- you have a lot of empty space between your structures, keep em close

- use subVIs instead of just throwing everything into main VI

- try to use wires directly instead of property nodes or local variables

0 Kudos
Message 5 of 9
(1,201 Views)

You went from about 4000 to 62000 in width between those versions. Is it really possible that you made the VI that insanely wide? It must be some kind of record.

Certified LabVIEW Architect
0 Kudos
Message 6 of 9
(1,190 Views)

Hi loan,

 


@loanjojo wrote:

Here is an older version of the same VI, if you need to see the size before the last version which crashed.


Start over with this older VI!

 

Recommendations:

  • Implement some SCC tool (or a proper backup system) before doing any changes!
  • Create a code documentation before doing any changes!
  • Cleanup the code before implementing changes to the algorithm!
  • Avoid using so many local variables when all the terminals are unused!
  • Try to avoid so many stacked sequences, instead start to THINK DATAFLOW!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(1,172 Views)

... and to put my two cents in, it is very easy in LabVIEW to modularize the logic of your block diagram. You can select a part of your code, which completes a specific task, then select in menu "Edit / Create SubVI" and all selected code is moved into a newly created VI. Don't select local variables or property nodes, LabVIEW will create references of the controls/indicators and place additional property nodes inside the SubVI. This is not advisable.

Bundle your data to locically belonging together clusters.

Greets, Dave
0 Kudos
Message 8 of 9
(1,139 Views)

I have done a partial "manual compression" of your VI.  The main problem was/is the Block Diagram, which somehow spans about 35 screens wide by 35 screens tall (the actual size is larger, as I've been slowly finding and moving far-flung pieces, mainly local variables, in towards the main code in the Block Diagram).

 

I did manage to copy/paste (much faster than click/drag, but it will break wires!) pieces of the Front Panel together, of course not realizing until I just wrote this sentence that I was "breaking wires", so you might want to redo all that I've done (and you really should -- it will be a lesson in "what not to do in the future").

 

Here's the trick.  If you open the "View" Menu option (top of the screen), you'll see, near the bottom, "Navigation Windows" (Ctrl+Shift+N).  This gives you a view of everything on the Front Panel and Block Diagram.  Notice (on your original VI) how much "empty" grey space there is, with little dots where your code and Front Panel object lie.  There should be a window (tiny!) showing you the part of the FP or BD that is currently "visible" on your screen -- it may be hard to find the Block Diagram (it is way too big), but, in principle, you can "navigate" using the Navigation Window, then on the "real" Block Diagram (or Front Panel), grab what you see and start to drag them to where they belong.  It will probably take many minutes to move them, which is why Cut and Paste is much faster, at the expense of broken wires.

 

Anyway, I'm attaching my second pass (with broken wires, my apologies) to show what I was able to do in about 45 minutes of effort.

 

Some future advice:

  • Avoid Local Variables!  Use Wires.
  • Avoid sequence structures (I don't know if you have any, didn't look at the code).  Use the Error Line.
  • Use Sub-VIs to "hide unnecessary details.
  • All VIs should have a Block Diagram that fits on a single Screen.  A screen should be around 2000 x 1000 pixels -- a sub-VI is 32 x 32 pixels, call it 1000 pixels, while the screen is 2000 times larger (though you need some space for wires).  [Note -- most of my code obeys this principle].

Bob Schor

0 Kudos
Message 9 of 9
(1,123 Views)