02-25-2010 10:08 AM
As i understand this was once a C program, yes. The picture is from one sub-vi i have inherited, so it's not my code. I'm sure i do my fair share of GDC and other mistakes, but this one isn't mine. 😉
I've read your nugget on AE's and i've tried it in a connected project. There's been a few connected project where i've been able to start from scratch and done event driven constructions which i'm pretty happy with. There are a couple of ugly solutions here and there, but generally feels like it follows the guidelines from these forums.
/Y
03-11-2010 07:00 AM - edited 03-11-2010 07:03 AM
Found here: http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=481408#M481408
Not only was the code Rube Goldberg (convert to double would have done the trick), it also uses Local Variables instead of wiring directly.
The snippet messed up the diagram.. My guess is that snippets do not like Locals either.. 😉
Wiring directly would have eliminated 2 indicators and 2 Locals plus eliminated the need for a Flat Sequence Structure... An added bonus would have been cleaner code.
03-11-2010 09:09 AM
Ray.R wrote:The snippet messed up the diagram.. My guess is that snippets do not like Locals either.. 😉
Snippets convert locals and static property nodes to strict nodes.
03-11-2010 09:16 AM
Makes sense..
I still like the idea that snippets don't like Locals.. LOL!! 😄
03-11-2010 09:21 AM
Ray.R wrote:Makes sense..
I still like the idea that snippets don't like Locals.. LOL!! 😄
Being from Florida, I like the Locals, but I appreciate the fact that Globals keep me from paying state income tax!
03-11-2010 10:18 AM
Ray.R wrote:Wiring directly would have eliminated 2 indicators and 2 Locals plus eliminated the need for a Flat Sequence Structure...
03-11-2010 11:37 AM
03-17-2010 01:33 PM
Ooo! Ooo! Ooo!
Here we not only wire to both the indicator AND a local variable of itself, we also have ANOTHER local variable sitting right inside the loop!
Spotted here.
03-19-2010 03:34 PM - edited 03-19-2010 03:35 PM
How helpful is this suggestion??? (compare with the actual question!)
03-22-2010 08:23 AM