05-22-2008 08:26 PM - edited 05-22-2008 08:28 PM
A bit more complicated than needed to be.. Locals are used to turn boolean indicator ON/OFF (green/dark)
There's actually no need to refresh the boolean with every iteration of the loops nor use a Local where there is a perfectly unused indicator nearby.
PM
05-22-2008 08:42 PM - edited 05-22-2008 08:43 PM
05-23-2008 12:28 AM - edited 05-23-2008 12:29 AM

05-23-2008 10:44 AM
Sorry, forgot to quote the source: http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=325844#M325844
altenbach wrote:
Here's the twisted version:
05-29-2008 07:26 AM

05-29-2008 08:20 AM - edited 05-29-2008 08:23 AM
So where's the Rube Goldberg? I don't see it...
Apart from the really bad wiring, I don't see much wrong anyway...
He's using locals for wiring status indicators... I wonder, is that really that much worse than using property nodes? Locals do improve on readibility.
That you have initiation code before a loop doesn't seem weird to me...
edit: Oh ok... That error line for stopping the loop... Oh Boy.... ![]()
05-29-2008 09:26 AM
That's a good point, and one that I've brought up before in this thread. Even though you pointed out the method used with stopping the loop, which admittedly is "Rube Goldberg-ish", I don't see the rest of the code being in that category. Let's remember the point of this thread. I would hate to see this thread simply become an extension of the one trying to stomp on local variables.
@Anthony de Vries wrote:
So where's the Rube Goldberg? I don't see it...
05-29-2008 09:36 AM - edited 05-29-2008 09:36 AM
I do know this was mentionned in the Locals thread..
The Rube Goldberish code is the fact that the same functions are repeated, circled in red. It is possible to use the ones in the loop instead of the "before" and "after".
Or maybe it's my eyesight ... 😞
05-29-2008 09:46 AM
I know, since I was the one who posted the bit about the way the loop was being stopped.
@JoeLabView wrote:
I do know this was mentionned in the Locals thread..
Based on what? You don't really know what the intent of the code is, and the "before" could be used to establish a "baseline", while the use inside the code is the "operation" part of it. Just because the same function/VI is being used does not make it "Rube Goldberg". There are many times when I've done this myself, and for good reason.
@JoeLabView wrote:
The Rube Goldberish code is the fact that the same functions are repeated, circled in red. It is possible to use the ones in the loop instead of the "before" and "after".
05-29-2008 10:59 AM
Ok.. Mia-Culpa.
Delete from Rube Goldberg. 😉