BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Keeping code on one screen passe?

I'm seeing it more and more. Code drifting past the boundaries of a full screen where you have to scroll and/or pan to see all of the block diagram. Guilty of it myself at times but intuition would say we should be more likely to stay on one screen as our screens get bigger. Hmmm.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 1 of 20
(10,200 Views)

I try to keep it on one screen. But depending on the type of application I don't worry about it. If I am doing something with a lot of property and invoke nodes (scripting, xml parsing, ..) I don't worry about it in the horizontal direction but keep all code visible in the vertical direction. If I have several loops on one diagram I don't worry about it in the vertical direction but keep the width down to one screen. The loops do fit the screen horizontally and vertically. The one thing I never do is maximize either the front panel or block diagram.

=====================
LabVIEW 2012


Message 2 of 20
(10,190 Views)

@Steve Chandler wrote:

I try to keep it on one screen. But depending on the type of application I don't worry about it. If I am doing something with a lot of property and invoke nodes (scripting, xml parsing, ..) I don't worry about it in the horizontal direction but keep all code visible in the vertical direction. If I have several loops on one diagram I don't worry about it in the vertical direction but keep the width down to one screen. The loops do fit the screen horizontally and vertically. The one thing I never do is maximize either the front panel or block diagram.



I'm pretty much the same as you Steve. I do try to keep my code to a single screen but will allow for some scrolling. For example, on my top level VIs for the UI I may not fit on one screen. When I need to pan horizontally it generally consists of three areas. The left most portion is the initialization code, the center (which will fit on a single screen) will be the main code and the right most if necessary will be cleanup code. The initialization and cleanup code generally don't require much space but wont fit on the single screen with the main processing code.

 

If I have more than two parallel tasks I try to encapsulate each task as a subVI. This keeps vertical scrolling in check.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 20
(10,171 Views)

I write small diagrams and then have about three dozen VIs open at the same time.

 

Across two screens.

 

Hmmmm.....

Message 4 of 20
(10,167 Views)

For myself, i try to keep both FP and BD smaller than one screen resolution if possible. While it is quite easy for most subVIs, it might get difficult for VIs more to the top of the hierarchy.

But there is one good style guide capturing this:

- If the FP or BD gets bigger than one screen resolution, make it scrollable in a single direction (horizontal OR vertical) only.

 

One thing i observe from time to time:

Developer tend to forget that screen resolution is not equal on all machines. So i quite often happen to recieve VIs with 1900 pixel broad windows or where the FP/BD is off screen on my system because of its position......

 

just my 5 cents,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 20
(10,158 Views)

Norbert, you hit on the other thing that used to bother me about screens. LabVIEW remembers which screen the VI was saved on. So if you have a VI that was saved on the second screen of a two screen system, it is almost off-screen when opened on a one screen system. At least you can grab the edge of it. It wasn't always that way. I remember being unable to edit VIs because they were completely off screen.

 

 Rob

0 Kudos
Message 6 of 20
(10,124 Views)

Virtually all my VIs fit on one screen, except for the toplevel which has lots of parallel UI stuff and many property nodes (UI loop, Key action event loop, consumer loop, initialization, etc.). The individual parts are all sized such that they fit nicely on one screen. Since I typically only work on one of these parts, scrolling is minimized and I know where to scroll to work on something else. 😄

0 Kudos
Message 7 of 20
(10,107 Views)

I usually use one screen and try to keep all FPs and BDs to have a good appearance on 1280 x 1024 resolution because I sometimes have to look at the code on a (not that up-to-date) notebook. FPs and BDs are never maximised but cover each other when many VIs are opened. Then, applying "Window>>All Windows ..." (or its shortcut <Ctrl+Shift+W>) allows me to select the FP/BD of desire. Usually I size this window to a height of about 1000 pixels and sort the titles by name. Works for me.

Two screens would involve too much eye movement Smiley Wink

0 Kudos
Message 8 of 20
(10,082 Views)

When I was teaching myself LabVIEW many years ago I learned the "scroll in one direction only" rule fairly early, and tried to stick to it. To this day I still try to stick to it, but now I'm less concerned. It's all a bit moot, and is presumably about maintaining a certain amount of readability. Certainly, a smaller block diagram will be easier to peruse with a quick glance, but abstracting too much into subVIs can lead to unnecessary digging.

 

Nevertheless, I still aim to keep my block diagrams within a reasonable frame size. With the exception being my FPGA VIs, some of which are often many times the vertical resolution, and twice the horizontal (this is because FPGA Local Variables are safe, nigh recommended, and can't be honoured in subVIs). But if a block diagram starts to become larger than my screen size, and 'subVI'ing' components will be unreasonable then I stop worrying about it. C'est la vie.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 9 of 20
(10,054 Views)

Yes I still try to keep them on one-screen with the option to scroll in one direction.

 

Ancillary question:

 

How about keeping your FP to one screen?

 

Non-LVOOP wires carrying anything non-trivial can quickly require more than one screen to hol dthe terminals of large clusters. matching the FP layout to the icon terminal layout quickly decays into a bad joke (unless you left allign and top allign all opbjects in the cluster, which I will call cheating).

 

So what kind of rules do you apply to yourself for the FP?

 

my rule?

 

I try to keep at least one of the corners on the FP (without maximizing the FP, another thing I don't like since I generally have a pile of VIs open at the same time).

 

Curious,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 20
(10,026 Views)