From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-11-2013 10:15 AM - edited 12-11-2013 10:25 AM
Many years ago, LabVIEW user Tomi Malia created an amusing game in LabVIEW: Items from the palettes falling like snowflakes that you had to catch in a box (a LabVIEW class constant). The trick was that the whole thing was done using scripting -- live movement of nodes on the block diagram of a not-running VI. It was a fun demonstration of scripting.
Tomi posted this VI in his ExpressionFlow blog. The blog is still a good read, but his earliest posts were lost. You can read an archived copy of Tomi's original blog post archived in the WaybackMachine: http://web.archive.org/web/20130907112901/http://expressionflow.com/2007/12/. But that archive copy doesn't include the VI. Even if it did, the VI was written at a time when scripting was not a public feature, so the block diagram was password protected.
Tomi, now a Senior Engineer at JKI, has given me a copy of the VI with the password removed and given me permission to re-post it. The whole game is just a single standalone VI -- and it *almost* fits on a single screen. 😉 The VI is saved in LabVIEW 2009. In light of the winter weather across the USA recently, I thought people might be looking for a bit of LabVIEW cheer to keep them warm. Use the left & right arrow keys to play. You can post your high scores here. Enjoy!
-- Aristos Queue
PS: If you have never heard of the WaybackMachine, it is a marvelous organization that archives our digital history, recording websites that go dark so that information is not lost. They are a non-profit supported by donations. Please consider financially supporting their effort.
12-11-2013 12:12 PM
Modal VIs + Run When Opened = Hang + cursing + using Win7 taskbar to try to save VIs + this
12-11-2013 01:03 PM
12-11-2013 01:51 PM
Tried a similar VI, no luck opening it though. As usual I nuke LV with task manager and hope for recovery to clean up most of the mess.
12-11-2013 03:45 PM
Really? I tested this in every version of LabVIEW from 2010 to 2013. Works fine for me -- no hang, and exits gracefully when you close the window.
12-11-2013 04:29 PM
Not quite as well behaved if:
The event case doesn't handle FP Close too well but, Unless you've queued up a bajilion Key repeats the FP should respond.
Unchecking the Defer FP updates on th key down key repeat event makes the game much more playable (at least the class object is now controlable) but It slows down and behaves oddly at >200 pts By 230 pts you learn to watch the score since the redraw rates don't clear the objects you caught in a timely manner (once the score registers just ignore that object) @ 300 pts the game crashed LabVIEW died
12-11-2013 05:33 PM
I used to joke that the forums are effective at stopping VIs from being posted and not so good at stopping spam. This VI managed to cost me more time and code then all of the spam messages put together....
I believe the common courtesy is to not post VIs which are set to run when opened. At least distribute a project, or at the very least make a note of it. I was curious to see the code, but I would not have touched the run button with a ten foot pole had I seen it.
12-11-2013 06:20 PM - edited 12-11-2013 06:22 PM
Is the hang caused by the greedy loop at the beginning? The loop polling the start button has no wait.
12-11-2013 08:25 PM - edited 12-11-2013 08:38 PM
Essentially the object spawning loop outPaces the object destruction by a geometric ratio. eventually there are so many object motions to calculate and move that the ui thr ead locks up bad. it could probably be saved by limiting the spawned objects to a reasonable number and reusing expired objects rather than leaking them . a undo stack of old default 9 would probably help too.