BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

The comparison mode is set to compare aggregates in this situation. Which would give a scalar out

0 Kudos
Message 1561 of 2,565
(11,134 Views)

@Todd_Lesher wrote:

Compare elements would have a 2d wire coming out instead of a scalar.


Of course. Doh! My bad. Smiley Happy

PaulG.

LabVIEW versions 5.0 - 2020

“All programmers are optimists”
― Frederick P. Brooks Jr.
Message 1562 of 2,565
(11,068 Views)

(Seen here)

 

Apparently, casting a U8 array to a string requires a FOR loop, shift register, typecast and concatenate operation and at least 9 wire bends.  Why??

 

 

Message 1563 of 2,565
(10,933 Views)

I am teaching a few friends some basic programming in LabVIEW.  Before starting a discussion on standard LabVIEW design patterns, I thought it would be useful for them to try a simple program without proper design.  I had them build a simple calculator that would either add, subtract, multiply, or divide two numbers.  Here was my favorite result:

 

Calc.png

0 Kudos
Message 1564 of 2,565
(10,751 Views)

That Can't be a Rube as a Rube is meant to at least function correctly. The behaviour of the event structure means that that will never execute as the designer hoped, although it is interesing to see how they were thinking!

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 1565 of 2,565
(10,682 Views)

It runs. And it even works. Both ES fire on value change.

0 Kudos
Message 1566 of 2,565
(10,657 Views)

@Todd_Lesher wrote:

It runs. And it even works. Both ES fire on value change.


For now.  But having two event structures in the same loop is a disaster waiting to happen.

0 Kudos
Message 1567 of 2,565
(10,634 Views)

I didn't say it was good design practice; I said it worked.

0 Kudos
Message 1568 of 2,565
(10,609 Views)

The second event structure does almost nothing and really can be removed.  the RB code is how he did the math...

Message 1569 of 2,565
(10,590 Views)

How is it that every other forum in existance has figured out how to prevent double posts...? 😞

0 Kudos
Message 1570 of 2,565
(10,589 Views)