BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code


@Jacobson-ni wrote:

wiebe@CARYAwiebe@CARAYA wrote:

 

Not bad, not bad at all. It saves a click to see what's in the other case, to make sure or to find out it's empty!


Just hope you don't lose errors down stream by not handling the case of a for loop executing 0 times.


Same can happen in a case. Use default instead of wiring through, and the error is lost. In a For Loop, a shift register. Exactly the same: if you write bad code, you get bad results.

0 Kudos
Message 1991 of 2,571
(11,498 Views)

wiebe@CARYA wrote:

@BertMcMahan wrote:

While this isn't exactly OVERLY complicated, it's something I shamefully admit to doing when I first started teaching myself LV. I didn't know about Case structures, and needed something to execute or not based on a boolean, so here's my janky boolean solution:

 

ghetto bool.png


Not bad, not bad at all. It saves a click to see what's in the other case, to make sure or to find out it's empty!


I have not investigated it recently but NI did have a Patent on a 3-D diagram that provided your perspective of the diagram was right, you would be able get a glimpse of more than one case at a single glance.

 

Ben

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

True greater than a boolean?  I had to run some test code to find out that it gives the same result as a NOT.

 

Seen here.

 

28.6.18_BD

Message 1993 of 2,571
(11,361 Views)

@RavensFan wrote:

True greater than a boolean?  I had to run some test code to find out that it gives the same result as a NOT.


And the NOT can of course be implemented as invert on the compound AND.

 

Message 1994 of 2,571
(11,338 Views)

So we have a case structure (boolean selector) where the contents of the two cases are identical, differing only by a boolean diagram constant that we already have. (See here)

 

I don't think that case structure is needed at all!

 

CodeDuplication.png

 

0 Kudos
Message 1995 of 2,571
(11,202 Views)

Rube Goldberg code often looks complicated, so for something a little easier to look at, here's deceptively simple Rube Goldberg code.

 

(The poster claims 1 year "LabVIEW experience", whatever that means. Maybe in another few years he might stumble across the stop button by accident :o. We just need to be patient! :D)

 

DynamicExpressRube.png

 

(Seen here)

0 Kudos
Message 1996 of 2,571
(11,117 Views)

@altenbach wrote:

Rube Goldberg code often looks complicated, so for something a little easier to look at, here's deceptively simple Rube Goldberg code.

 

(The poster claims 1 year "LabVIEW experience", whatever that means. Maybe in another few years he might stumble across the stop button by accident :o. We just need to be patient! :D)

 

DynamicExpressRube.png

 

(Seen here)


Really Christian,   haven't you ever seen the Abort Button?  😄

 

Damnit it's hard to type in a phone when you're screen is covered in coffee because you forgot to swallow before reading a post


"Should be" isn't "Is" -Jay
Message 1997 of 2,571
(11,103 Views)

@JÞB wrote:

@altenbach wrote:

Rube Goldberg code often looks complicated, so for something a little easier to look at, here's deceptively simple Rube Goldberg code.

 

(The poster claims 1 year "LabVIEW experience", whatever that means. Maybe in another few years he might stumble across the stop button by accident :o. We just need to be patient! :D)

 

DynamicExpressRube.png

 

(Seen here)


Really Christian,   haven't you ever seen the Abort Button?  😄


There's even a button on my computer case that seems to work just fine if I press it long enough. 😄

Message 1998 of 2,571
(11,098 Views)

Seen on a l

LabVIEW thread I recently replied to. 

 

Kudos for a link and picture 

 

I know, let's build all of these scalar values into an array then IMITIATLY wire it directly into an index array to get the scalar values back.  Look no wire branches.


"Should be" isn't "Is" -Jay
0 Kudos
Message 1999 of 2,571
(10,966 Views)

@altenbach wrote:

Rube Goldberg code often looks complicated, so for something a little easier to look at, here's deceptively simple Rube Goldberg code.

 

(The poster claims 1 year "LabVIEW experience", whatever that means. Maybe in another few years he might stumble across the stop button by accident :o. We just need to be patient! :D)

 

DynamicExpressRube.png

 

(Seen here)


What's the matter?

 

Is that "X" in the upper right hand corner of the window not a good enough stop button for you? 😛

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2000 of 2,571
(10,889 Views)