LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster basic help

Solved!
Go to solution

 Hi All,

In my process of learnig labVIEW ,I am currently working through the German Course material section Clusters,

Which is fine for me however the Professor's who wrote the book  labVIEW 2 Bernd vom Berg & Peter Groppe

shows that a person can improve the viability of a Vi by removing the datastream between the input and out put clusters by using a local variable .

My concern is by the help of the forum members on my fisrt application it was mentioned  that local variable should be used with care ,

My question what is the experienced peoples view on the use of a local variable and clusters ?

 

Input /Output Cluster

2.jpg

Block Diagram with local variable used 

1.jpg

All comments are appreciated 

 Regards

QMESAR

---------------------------------------------------------------------------------------
Learning is an endless process but needs to start some where
0 Kudos
Message 1 of 10
(2,985 Views)
Solution
Accepted by topic author QMESAR

If you need too much local variables, you need a redesign.

 

They are often unavoidable however (although you can use a value property node, but that could be even worse).

 

Use locals to update controls\indicators at multiple places. Not for other things, like data communication, data synchronization, data storage or data buffering.

 

And realize that each local keeps a copy of the data in memory. Not that bad for clusters, but can be bad for large arrays.

0 Kudos
Message 2 of 10
(2,950 Views)
Solution
Accepted by topic author QMESAR

Hi QMESAR,

 

In my personal experience, I wouldn't recommend usage of the local variables as it causes Race Condition. Anyway if you want to know more about Local Variables, Refer it here where someone already asked the similar question....

 

https://forums.ni.com/t5/LabVIEW/How-do-you-use-local-variables/td-p/3305477

0 Kudos
Message 3 of 10
(2,940 Views)

Hi All,

Thank you for the information and your comments,Smiley Happy

and the link !

 

Regards 

QMESAR

---------------------------------------------------------------------------------------
Learning is an endless process but needs to start some where
0 Kudos
Message 4 of 10
(2,935 Views)

BTW Not sure, but if that book is about LabVIEW 2, it might be a bit out of date (20 years or so)!

 

The language got soo much richer since. The basics of data flow will still hold, but there are new solutions available that won't be in the book.

0 Kudos
Message 5 of 10
(2,929 Views)

Hi.

Thank you the book is called labVIEW 2 it is number 2 of a 3 series book set  ,written for labVIEW 2014,

I guess there is a few new things in 2015 and higher however the series give a good understanding of the basics 

 

Regards 

QMESAR

---------------------------------------------------------------------------------------
Learning is an endless process but needs to start some where
0 Kudos
Message 6 of 10
(2,924 Views)
Solution
Accepted by topic author QMESAR

There are situations when that can be used, e.g.in a dialog with Cancel button. If Cancel, wire the original through, else read out a Local variable. In your example the chance is big that you'll get the previous value.
Local variables is a tool that can be used, but more often than not, it's abused.
Local Usage.png

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 7 of 10
(2,908 Views)

@QMESAR wrote:

Thank you the book is called labVIEW 2 it is number 2 of a 3 series book set  ,written for labVIEW 2014,


That sounds far better then a book about LabVIEW 2 (not sure if there are books about LV2).

 


@QMESAR wrote:

I guess there is a few new things in 2015 and higher however the series give a good understanding of the basics 


Indeed, not that much new. Guess malleable VI's (>2017sp1) will be quite a game changer. But nothing new that will invalidate the 2014 stuff.

0 Kudos
Message 8 of 10
(2,901 Views)

The best book I can think of to learn LabVIEW best practices is Peter Blume's LabVIEW Style Book.  Although it shows its age here and there, all of what it talks about is still extremely relevant.

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.
Message 9 of 10
(2,895 Views)

Thank you very much for all the help and info much appreciated Smiley Happy

 

Regards 

QMESAR

---------------------------------------------------------------------------------------
Learning is an endless process but needs to start some where
0 Kudos
Message 10 of 10
(2,885 Views)