BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

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...

Message 1881 of 2,616
(11,057 Views)

@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...

Message 1882 of 2,616
(11,041 Views)

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.

0 Kudos
Message 1883 of 2,616
(10,998 Views)

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?! Smiley Indifferent

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 1884 of 2,616
(10,985 Views)

@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?! Smiley Indifferent


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.

 

0 Kudos
Message 1885 of 2,616
(10,973 Views)

This might be my favorite of the day

Capture.PNG

You really want to see the Enabled case? 🙂


"Should be" isn't "Is" -Jay
0 Kudos
Message 1886 of 2,616
(10,883 Views)

@JÞB wrote:

 

 

You really want to see the Enabled case? 🙂


Yes!

0 Kudos
Message 1887 of 2,616
(10,881 Views)

@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


"Should be" isn't "Is" -Jay
0 Kudos
Message 1888 of 2,616
(10,874 Views)

@Gregory wrote:

@JÞB wrote:

  

You really want to see the Enabled case? 🙂


Yes!


I don't understand the need for the display style property. That's already set, no need to set it again.

Message 1889 of 2,616
(10,854 Views)

Reading display text with a property node can be terribly slow though...

0 Kudos
Message 1890 of 2,616
(10,831 Views)