NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Active Participant
JeffOverton
Posts: 536
0 Kudos

Re: Why some people say Local Variables are bad...

Ah nuts, and here I thought I was so clever :smileywink:
 
Guess the moral of the story is read the link before you correct people:smileyhappy:
=============
XP SP2, LV 8.2
CLAD
Knight of NI
Ray.R
Posts: 10,165

Re: Why some people say Local Variables are bad...

Thanks to Altenbach for posting the rest of the "bad aspects" in the Rube Goldberg section :smileywink:
 
 
.
(starting to) See Life in a brand new way...

b* ^ )
Knight of NI
Ray.R
Posts: 10,165
0 Kudos

Re: Why some people say Local Variables are bad...

[ Edited ]

From: http://forums.ni.com/ni/board/message?board.id=170&thread.id=331929



Message Edited by JoeLabView on 06-17-2008 08:44 AM
.
(starting to) See Life in a brand new way...

b* ^ )
Knight of NI
Knight of NI
Ben
Posts: 16,091

Re: Why some people say Local Variables are bad...

That one hurts to look at.
 
If the heater bit is equal to the old value of the heater bit then the the old heater value is set equal to the value of the heater bit, else set it equal to the heater bit.
 
Ben
Ben Rayner
Who is NOT John Galt... yet... just building Rayner's Ridge

Knight of NI
Ray.R
Posts: 10,165

Re: Why some people say Local Variables are bad...

My head is spinning...  :smileywink:
.
(starting to) See Life in a brand new way...

b* ^ )
Knight of NI
altenbach
Posts: 22,829
0 Kudos

Re: Why some people say Local Variables are bad...



Ben wrote:
If the heater bit is equal to the old value of the heater bit then the the old heater value is set equal to the value of the heater bit, else set it equal to the heater bit.

I think you need to specify which heater bit you are talking about. I could not even figure out which terminal the "heater local" local belongs to. :smileywink:
 
For the "output word", we again have the problem of using an indicator as a control...
 

 

LabVIEW Champion . Oh, by the way, I work for peanutsKudos .

Active Participant
JeffOverton
Posts: 536
0 Kudos

Re: Why some people say Local Variables are bad...

[ Edited ]
Which option would you prefer?
 


Message Edited by JeffOverton on 06-17-2008 11:50 AM
=============
XP SP2, LV 8.2
CLAD
Knight of NI
altenbach
Posts: 22,829
0 Kudos

Re: Why some people say Local Variables are bad...

LOL, yes. but don't forget to generate an error condition if the two options differ. There might be a government requirement for code redundancy in case of cosmic events. :smileyvery-happy:

LabVIEW Champion . Oh, by the way, I work for peanutsKudos .

Knight of NI
Ray.R
Posts: 10,165
0 Kudos

Re: Why some people say Local Variables are bad...

[ Edited ]

The Locals are back in town...

from: http://forums.ni.com/ni/board/message?board.id=170&message.id=332466



Message Edited by JoeLabView on 06-17-2008 01:09 PM
.
(starting to) See Life in a brand new way...

b* ^ )
Active Participant
JeffOverton
Posts: 536
0 Kudos

Re: Why some people say Local Variables are bad...

In that person's defense, that was just a silly example program to demonstrate the subvi-event setup they had.
=============
XP SP2, LV 8.2
CLAD
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page