BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Why some people say Local Variables are bad...

Have a look at this example and read on to Gerd's reply where he found race conditions.

http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=344148#M344148

Message 61 of 396
(14,070 Views)

Writing to the indicator and it's Local variable at the same time..

I guess it is to make sure that the value was actually written to it 😉 

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

Message 62 of 396
(14,032 Views)

Hi Ray,

 

That Vi had my head spinning because its almost readable. So silly me I wander away and run right into this!

 

 

 

I did not spot any locals but I thought it should be offered as contrast to what you found.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 64 of 396
(13,853 Views)

You missed the locals on the right hand side of the image you posted:  Error & Mono Position & Mono Position (nm)

 

I'm sure if you keep looking you'll find more Locals..  😉

Message 65 of 396
(13,843 Views)

LOL Ray. One common theme in "chronic localitis" such as this is always a neat row of disconnected terminals. 😄

 

Message Edited by altenbach on 09-29-2008 09:20 AM
Message 66 of 396
(13,830 Views)
Yes, I often see that.  This one is not so bad... It is when you have several frames of a Stacked Sequence that it get a bit annoying.  Now why do people not bring a wire directly to a terminal??  Oh yeah... they want to update its value are many different location in the software..  yeah....  hummm...  using Locals...  hummm..
Message 67 of 396
(13,825 Views)

Someone has asked me to do a 'simple tweak' on this monstrosity, written by my predecessor.

 

The white area is 1280*1024 pixels.

 

 

Message Edited by yenknip on 10-07-2008 01:16 PM
_____________________________
- Cheers, Ed
Message 68 of 396
(13,744 Views)

yenknip wrote:

Someone has asked me to do a 'simple tweak' on this monstrosity, written by my predecessor.

 

The white area is 1280*1024 pixels.


Where are the local variables? Where's my microscope that I had when I was 10?

 

Hmmmm... Maybe it's a good thing that you can't see the local variables!  Smiley Very Happy

0 Kudos
Message 69 of 396
(13,729 Views)

I just did a search for all instances of a variable, it came up with 537 occurrence :smileysurprised:

 

 


Message Edited by yenknip on 10-07-2008 04:26 PM
_____________________________
- Cheers, Ed
Message 70 of 396
(13,723 Views)