06-30-2017 03:12 AM
Hello,
Why do my block diagram mess up the layout? Objects are moving around on block diagram making some of the code ureadable. It's very annoying, don't know what causing it.
br,
paalbrok
06-30-2017 03:57 AM
You've added space through ctrl+drag? You have Autogrow activated on structures? Those will both cause such behaviours if you're uncareful.
/Y
06-30-2017 04:00 AM - edited 06-30-2017 04:00 AM
Hi paalbrok,
there is a problem in YOUR VI - and all you attach is just a small part of it as simple picture…
Why don't you attach your VI?
Did you try AutoCleanup, atleast for parts of your blockdiagram?
What's the overall size of the blockdiagram? (tools -> profile -> VI metrics)
06-30-2017 04:07 AM
Hi,
Picture is just an example of messed up code. Size of Block diagram is 7261 X 6060 pixels (width X height). I've suspected the size has something to do with it. Do you think this is the issue?
br,
paalbrok
06-30-2017
04:20 AM
- last edited on
04-17-2025
01:33 PM
by
Content Cleaner
Hi paalbrok,
do you know the rule to have the blockdiagram limited to screen size?
Or do you use a monitor (wall) capable to display 8K images?
LabVIEW "should" handle block diagrams of your size - there used to be a rather hard limit of about 16000 pixels. But it isn't recommended to go beyond 2000 pixels…
- clean up the VI
- use (more) subVIs
- clean them up, too…
- read the style guide and use the VIAnalyzer (VI Analyzer is for free with LabVIEW Full or better…)!
06-30-2017 04:40 AM
I'm familiar with the limitation regarding screen size. I'll clean up Block diagram and use more subVI's.
08-22-2018 04:55 PM
Also, your Queue write has no timeout value wired...good luck trying to track that down if the queue fills up and the writes hand forever!.
08-22-2018 05:30 PM
If you were writing C code, you wouldn't dump all your code into main(), so why would you dump all your LabVIEW code into one VI? It may look different, but it's still a programming language and you should follow the same basic guidelines that you would use for any programming languages. SubVIs are analogous to subroutines (or functions, to use the C paradigm). Using the technique of breaking up your code into subVIs, you'll rarely have to remind yourself of the suggestion that block diagrams be limited to one screen size, because they will generally be much smaller than that. One other benefit is that you can then easily reuse your code elsewhere.
08-23-2018 11:19 AM
@billko wrote:
If you were writing C code, you wouldn't dump all your code into main(), so why would you dump all your LabVIEW code into one VI? It may look different, but it's still a programming language and you should follow the same basic guidelines that you would use for any programming languages. SubVIs are analogous to subroutines (or functions, to use the C paradigm). Using the technique of breaking up your code into subVIs, you'll rarely have to remind yourself of the suggestion that block diagrams be limited to one screen size, because they will generally be much smaller than that. One other benefit is that you can then easily reuse your code elsewhere.
THAT is some of the best advice I have read here in ages.
IMHO: NI needs to start very early on stressing people to use sub-vi's and proper program architectures instead of just throwing everything into one big loop (OBL).
08-23-2018 12:19 PM
@RTSLVU wrote:
@billko wrote:
If you were writing C code, you wouldn't dump all your code into main(), so why would you dump all your LabVIEW code into one VI? It may look different, but it's still a programming language and you should follow the same basic guidelines that you would use for any programming languages. SubVIs are analogous to subroutines (or functions, to use the C paradigm). Using the technique of breaking up your code into subVIs, you'll rarely have to remind yourself of the suggestion that block diagrams be limited to one screen size, because they will generally be much smaller than that. One other benefit is that you can then easily reuse your code elsewhere.
THAT is some of the best advice I have read here in ages.
IMHO: NI needs to start very early on stressing people to use sub-vi's and proper program architectures instead of just throwing everything into one big loop (OBL).
But instead, they will continue to advertise LabVIEW as being so easy to use, "even an engineer can use it".