LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

indicator control



Ben wrote:
 
Its easy if you do not look at good as the opposite of evil but rather define good as the absence of evil.
 


In that case, if locals aren't evil, and good is the absence of evil, then locals must be good.Smiley Surprised
Message 21 of 52
(1,673 Views)


[...]
but rather define good as the absence of evil.
[...]
Ben




Thats quite optimistic. I doubt that everything is "good" (even in LV) 😉

Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 22 of 52
(1,672 Views)


@Ravens Fan wrote:


@Ben wrote:
 
Its easy if you do not look at good as the opposite of evil but rather define good as the absence of evil.
 


In that case, if locals aren't evil, and good is the absence of evil, then locals must be good.Smiley Surprised


Or Ben knows something about the upcoming LV Version: ALL KIND OF VARIABLES WILL BE REMOVED FOR GOOD!!!!
Old VIs containing any kinds of variables and/or property nodes "value" will not be updateable with the message "Evil has no place in this heavens edition!"

Smiley Very Happy Smiley Very Happy Smiley Very Happy Smiley Very Happy

Should have posted that on april 1st.....

Norbert

Smiley Very Happy
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 23 of 52
(1,671 Views)

LOL!  Ben is right.  I do read posts newest to oldest.

Wow..  Such opposition about Locals.  Well..  <I decided not to post what I was about to post>

I think all consultants who end up fixing the mess people create with Locals and Stacked Sequences should charge by the number of Locals and Sequence frames are in the code.  And charge a premium hourly rate on top of that. 

😄

 

And TWG, I will read further and provide you the star-ry thanks deserved for mentioning that Locals are evil 😉



Message Edited by JoeLabView on 05-13-2008 12:11 PM
Message 24 of 52
(1,651 Views)

[Insert tongue in cheek]

Hang on Ray!

Let's not get carried away.

You and I know they are evil (introduce chaos according to my wife) BUT....

I make a living off of people who use locals and globals and then don't understand why their code doesn't work properly. Are you trying to put me out of work? Smiley Surprised

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 25 of 52
(1,647 Views)
no.. just trying to avoid having a patch on both eyes...  😞
Message 26 of 52
(1,659 Views)

Two stars Smiley Mad for just saying , locals are not evil ?!

...........................................................

Message 27 of 52
(1,635 Views)
Locals have a use. I doubt that you can get rid of them in all cases or that one should. One of my first posts to info-labview was a very complicated method for a control to be auto updated. Local variables (or value property nodes) fix that. They are powerful tools and very useful if you want to take a free from input and format it and put it back as the input. Or an auto incrementing file name for example.

But like any powerful tool, it can be misused. Just because a drill can go through a wall it is not a good idea to keep poking it in your office wall. Sooner or later you will hit a hot wire! Just because you can make a diagram with locals that works once or some finite number of times does not mean that this is a good program or even one that would survive a edit/recompile, version upgrade, or transfer to another system.

Local variables have the ability to "Heisenberg" your code. Then you will have to hire a good quantum mechanic like Ben to eliminate the uncertainty.

LabVIEW ChampionLabVIEW Channel Wires

Message 28 of 52
(1,617 Views)
Locals are also a highly efficient way to terminate multiple loops if one loops is in control.  Wire an indicator to the stop of the control loop, set up a couple read locals to control the stops of the slave loops, and presto!  Code that ends properly.
Message 29 of 52
(1,614 Views)
Thanks for making that point, Scott. The problem with people saying "locals are evil!" is that anyone with a bit of sense in their head (and some experience) will say "wait a minute, in this case I have right here a local is the most practical solution, which means these people don't know what they're talking about". Such a person might stop listening to the "expert advice" altogether because of this.

___________________
Try to take over the world!
Message 30 of 52
(1,592 Views)