12-19-2009 01:07 PM - edited 12-19-2009 01:08 PM
Broken Arrow wrote:Spaghetti with local balls.
All the terminals are disconnected and nicely lined up in the upper right of the diagram. Clearly a text programmer. 😄
Further down on the diagram, he's hammering 34 individual property nodes with every iteration of the while loop, no matter if the values change or not. The only difference between the two cases is the value of a single diagram constant (I don't know why we need 7 instances of each constant!). Why duplicate everything?
12-22-2009 06:47 AM
12-22-2009 08:26 AM
12-22-2009 10:36 AM
12-22-2009 04:31 PM
altenbach wrote:
JB wrote:Seen here.
Where exactly??? 😮
Based on the link we should ask JB's friend for the correct link.
12-23-2009 01:29 AM
01-20-2010 01:26 PM - edited 01-20-2010 01:28 PM
Another one of those misconceptions that sees a need to write to a terminal and its local variable
at the same time while reading the same local nearby also, either slightly before or after it gets updated. 🙂
Clearly a text programmer 😄
Of course to top it all off, there are sequence frames with no functionality or purpose
and the while loops burn through CPU like its unlimited.
(spotted here)
01-21-2010 11:34 AM - edited 01-21-2010 11:35 AM
This is when Shift Registers are more useful than Locals...
maybe if Local Variables were harder to find within the palettes..
found here:
http://forums.ni.com/ni/board/message?board.id=170&thread.id=469608
02-02-2010 03:56 PM
Here's one I responded to just today.
Note the sheer number of "Wheel circumference" locals, all hanging out together in the same loop. The indicator is located outside the loop...maybe its value is calculated before the loop starts, and maybe it isn't, there's no data dependency.
And might the "Encoder 1 count" local variable be causing a race condition? Hmmm, are we using the previous calculation...or the current one....?
From the same code....
Ah yes, the joy of having a control sitting out there, wired to nothing, with a local variable right next to it! Maybe we could just wire the value in directly from the control, eh?
Maybe?
02-03-2010 09:41 AM
Good catch Diane. I can only imagine what the rest of the code looks like.
The bigger question is: where do you start debugging such code? 😉