BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

Christian,

 

Your code is not an exact representation of the original code because it lacks the race condition with Real Matrix (or what gets displayed on the Intensity Graph)

 

😉

0 Kudos
Message 871 of 2,635
(11,743 Views)

 


Ray.R wrote:

Your code is not an exact representation of the original code because it lacks the race condition with Real Matrix (or what gets displayed on the Intensity Graph)


 

Yes, it is difficult to retain all bugs when fixing code ;).

 

Since the original loop had no wait and all code was limited to one loop, the race condition simply delayed the indicator update by one iteration or (in other units) by a few nanoseconds. 😮

 

If you think about it, a much larger "functional" difference was cause by the introduction of the wait statement....

Message 872 of 2,635
(11,735 Views)

@altenbach wrote:

 

 

Since the original loop had no wait and all code was limited to one loop, the race condition simply delayed the indicator update by one iteration or (in other units) by a few nanoseconds. 😮

 

 


not necessarily..

 

Imagine one iteration that runs the Intensity Graph display before the rest of the code, meaning it displays that of the last iteration.  Then in the next iteration, it runs the Intensity Graph AFTER the rest of the code, that would skip over one iteration of data.

 

It might be less likely to be the case, but not impossible.  😉

0 Kudos
Message 873 of 2,635
(11,717 Views)

Well, the intensity graph is updated asynchronously anyway. 😄

Message 874 of 2,635
(11,712 Views)

Good point - kudos -

🙂

0 Kudos
Message 875 of 2,635
(11,677 Views)
Message 876 of 2,635
(11,643 Views)

I don't know if this particular Rube has been posted. With hundreds and hundreds of replies there will be duplicates.

 

But this is a simple one and is very special to me:

 

Capture.PNG

 

Why?

 

I should know the answer because I wrote that code! But I honestly have no idea what I was thinking.

 

I have this folder called LabVIEW Historic (I have a habit of never deleting anything) which contains some of my very first code. I decided to dig around in there to see how far I have come. I found the oldest vi which was from 4/17/2002 - almost nine years to the day! This particular Rube jumped right out at me. And yes that is the actual control name!

 

=====================
LabVIEW 2012


Message 877 of 2,635
(11,596 Views)

If you only have "LabVIEW extralite" you might be missing the NaN diagram constant and the "+1" primitive. Don't despair, there are ways around this limitation!!! 😄

 

 

(spotted here)

Message 878 of 2,635
(11,592 Views)

@SteveChandler wrote:

I don't know if this particular Rube has been posted. With hundreds and hundreds of replies there will be duplicates.

 

But this is a simple one and is very special to me:

 

Capture.PNG

 

Why?

 

I should know the answer because I wrote that code! But I honestly have no idea what I was thinking.

 

I have this folder called LabVIEW Historic (I have a habit of never deleting anything) which contains some of my very first code. I decided to dig around in there to see how far I have come. I found the oldest vi which was from 4/17/2002 - almost nine years to the day! This particular Rube jumped right out at me. And yes that is the actual control name!

 


Imagine yourself in a peacful palce with gentle breezes blowing. YOu can hear to gentle chirping on birds and you can see yourslef traveling back in time to the very moment you created that local. Could you have been trying to fix a broken arrow due to an un-wired local?

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 879 of 2,635
(11,556 Views)

Ben wrote: Imagine yourself in a peacful palce with gentle breezes blowing. YOu can hear to gentle chirping on birds and you can see yourslef traveling back in time to the very moment you created that local. Could you have been trying to fix a broken arrow due to an un-wired local?

 

 

Ben

I think that the arrow should be broken if you wire a control to itself using a local variable. Or instead of a broken arrow the button should look like this Smiley Very Happy

 

But thanks. The little birdies and gentle breeze did the trick. It is all coming back to me now and my confusion about LabVIEW is as clear as the day we met. I am somewhere deep inside a nested structure. It is dark and scary here. I need to read the value of Numeric but it is already connected to some other stuff at the top level.

 

What to do?

 

I know! I need a local variable. Any fool knows you can not read from a variable until you set the value.

 

Hey Ben can you snap your fingers or something and bring me back?

=====================
LabVIEW 2012


Message 880 of 2,635
(11,539 Views)