12-05-2017 09:23 AM
Except it will wait every second time because although the shift register will cause a premature exit on the second call, the third call will again wait because the shift register will then containt he data from this single iteration of the second call.
See, clear as pie...
12-05-2017 09:49 AM
@Intaris wrote:
Except it will wait every second time because although the shift register will cause a premature exit on the second call, the third call will again wait because the shift register will then containt he data from this single iteration of the second call.
Good point.
Just to be clear, it's certainly crappy code. But RGC suggest something simple is do in a complicated way.
This code is either a simple way to do something complicated (time series wait) OR a bug.
The replacement code doing the right think is simply a 500 ms wait. Although probably even the wait is redundant if the TO of the read is simply increased.
BTW: I'm not taking this very seriously. But arguing with an engineer is like wrestling a pig...
12-05-2017 10:02 PM
Don't really know the whole context of this code. Can't tell if there are any further out while loops to cause it to repeat. Don't know if this is run in Development or as a built executable. And if in development, if they ever run it more than once without closing it out (but that almost certainly happens even if it is meant to be a "run once" section of code".
I'd say Rube Goldberg construct with a bug that shows up on 2nd or later run if run in Development without closing and reopening VI. But the wait is total superfluous since the termination character will control the read, and having any kind of wait might be a bug in itself if this bit of code ever repeats and the VISA read is chock full of termination characters that come faster than the wait.
12-06-2017 01:24 AM
wiebe@CARYA wrote:
Is that uninitialized shift register a bug or a feature?
That USR is a feature, and is working perfectly fine in the above code piece.
Or, did you mean something else with a hidden pun in your question?!
12-06-2017 02:08 AM - edited 12-06-2017 02:09 AM
@parthabe wrote:
wiebe@CARYA wrote:
Is that uninitialized shift register a bug or a feature?
That USR is a feature, and is working perfectly fine in the above code piece.
Or, did you mean something else with a hidden pun in your question?!
We might never know what the creator intended (I could read the original thread, but that would spoil the anticipation).
Crazy trumps logic, the questions is who's crazy.
Have to read diskworld someday. Seems to be based on this principle.
12-12-2017 05:26 PM
This might be my favorite of the day
You really want to see the Enabled case? 🙂
12-12-2017 05:43 PM
@JÞB wrote:
You really want to see the Enabled case? 🙂
Yes!
12-12-2017 06:48 PM - edited 12-12-2017 06:51 PM
@Gregory wrote:
@JÞB wrote:
You really want to see the Enabled case? 🙂
Yes!
Well, there is just one property node
One Write, one Read.
Guess the properties in a spoiler.
A CLA laughed at the "Snip of day"
I can't wait to see what bugs my code has...
Clue. The write property has a value of 3
12-13-2017 12:59 AM
12-13-2017 03:08 AM
Reading display text with a property node can be terribly slow though...