LabVIEW Development Best Practices Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Should everything **really** fit on one screen?

I should probably make a slight amendment to my earlier style declaration... that would be, "If you're a beginner, new to LabVIEW, yes, everything should fit on one screen." It is very much like writing English papers. You should never use a sentence fragment. That's the rule, but many writers make good use of sentence fragments. Essentially, once you have the feel for the language, you can stretch it in ways that are plausible but not necessarily definable in explicit rules. What makes this larger-than-screen VI ok and this other one a disaster? It comes down to readability and editability: how easy is it for someone else to read the diagram and how much contortion is required to fit the "one screen" principle.

0 Kudos
Message 11 of 26
(2,075 Views)

Aristos wrote "It is very much like writing English papers. You should never use a sentence fragment. That's the rule, but many writers make good use of sentence fragments. "

AGREED! Hermin Melville (sp?) excepted*.

Ben

* I have never read Moby Dick but I have been told that there is a single sentance that runs on for a page and a half.

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 26
(2,075 Views)

Thanks all for your great suggestions. I definitely like the Cluster with message name / variant data. Message name could even be an enum to avoid silly mistakes like typos.

0 Kudos
Message 13 of 26
(2,075 Views)

Please be aware that the variant data type could invoke additional data copies so keep that in mind if the data be passed is large.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 26
(2,075 Views)

Replied to wrong post.

0 Kudos
Message 15 of 26
(2,075 Views)

A run-on sentence is not a sentence fragment. Duh. The aforementioned "duh" is a fragment. A run-on sentence is properly a sentence but one that continually appends more and more and more text generally through the use of extensions known to English majors as clauses, which may be joined using any number of conjunctions (including but not limited to "and," "or," and "yet") or nesting of parenthetical expressions (such as the one earlier in this sentence (or the one you are reading now)), but which some how never manage to actually lead to a grammatically incorrect sentence construction.

Mellville is good. But no one beats James Joyce in Ulysses: one sentence... between 40 and 62 pages depending upon typesetting.

0 Kudos
Message 16 of 26
(2,075 Views)

Also be aware that any place that you are using variants you can generally achieve significantly better performance using a hierarchy of LabVIEW classes. Variants should be used only when you truly have no idea what type of data you'll be handling.

0 Kudos
Message 17 of 26
(2,075 Views)

So do you prefer your clauses by-value, or by-reference?

0 Kudos
Message 18 of 26
(2,075 Views)

Re: "A run-on sentence ... incorrect sentence construction."

So do we agree that if your VI diagrams reads like the graphic version of Ulysses, then you should concider using sub-VIs?

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 19 of 26
(2,075 Views)

Either consider subVIs or consider sending it to a museum as art. It still has value without subVIs, but perhaps not *engineering* value. 😉

0 Kudos
Message 20 of 26
(2,075 Views)