03-05-2018 09:54 AM
@altenbach wrote:
Here's one way to determine if the current code is run as executable (seen here).
Also that uninitialized shift register would be problematic if run more than once during a session.
I am pretty sure there is a better way!
Also this property node might come in handy http://zone.ni.com/reference/en-XX/help/371361H-01/lvprop/app_appkind/
03-05-2018 06:37 PM
So we hav a handful different files in the same folder ("1.lvm" ... "5.lvm") and would like to append rows according to the value in the first column.
Apparently we need five basically identical cases, differing in a single character (!!) in some path diagram constant (top image).
... or we could just eliminate the case structure entirely (bottom).
03-12-2018 11:45 PM
Carnac the magnificient says: "TRUE & TRUE"
... and the question was: "Is it possible to predict the value of the LED without even running the VI, and if so, what is its value?"
In fact an easier solution would be to just paste a picture of a lit LED on the front panel. No code needed. 😄
03-13-2018 07:59 AM
@altenbach wrote:
Carnac the magnificient says: "TRUE & TRUE"
... and the question was: "Is it possible to predict the value of the LED without even running the VI, and if so, what is its value?"
In fact an easier solution would be to just paste a picture of a lit LED on the front panel. No code needed. 😄
But we can not be sure. What if there are two controls labeled "TT section" ?
Echoing a common theme these days, "show us the rest of the code".
Ben
03-13-2018 09:55 AM - edited 03-13-2018 10:00 AM
@Ben wrote:
@altenbachBut we can not be sure. What if there are two controls labeled "TT section" ?
True in a vacuum, but I checked that before posting. The link has the code and there is only one control with that name. Both equally named locals point to the same control.
Of course if the control changes right between reading the first and second instance of the local variable, we could get unusual results due to race conditions, but my gut feeling is that this is very unlikely. 😄
Maybe we could give these kind of algorithms the name "Hamlet code". 😮
03-13-2018 09:28 PM
03-14-2018 04:56 AM
I know this is the Rube Goldberg Code forum, but doesn't this prove it as well?
Clicking once or twice stops the loop.
In a realistic loop it won't happen that fast obviously. Adding a 1 ms wait makes it almost (I did not succeed, but gave up after 20 times) impossible to stop the loop.
So it's not RGC at all! It is in fact a (unintentional) "you have to click often and fast" detection...
03-14-2018 08:38 AM
03-14-2018 10:02 AM
@cbutcher wrote:
Now you make it seem like the original was completely reasonable, and mine is the REAL Rube Goldberg code... You reproduced it in much less code!
Ah, you picked up on that...
03-14-2018 10:43 AM
@cbutcher wrote:
Now you make it seem like the original was completely reasonable, and mine is the REAL Rube Goldberg code... You reproduced it in much less code!
Face Palm moments happen