From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code

So we acquire dynamic data but ultimately are only interested in a single scalar. I pointed this out, so the OP "fixed" it as follows (seen here😞

 

altenbach_0-1604870181712.png

 

 

0 Kudos
Message 2231 of 2,571
(10,757 Views)

Here's a small section of non-scalable code (see the navigation windows for the full size, seen here)

 

altenbach_0-1604875703486.png

 

 

... and yes, it can be simplified and made more scalable with code that would fit half of a postcard. (took me just a few minutes once I got to my desktop with a bigger screen).

 

altenbach_0-1604875341950.png

 

 

0 Kudos
Message 2232 of 2,571
(10,752 Views)

If someone sees the point of doing this, please explain me...

False case is empty; Sending false in the subvi just send an empty path to a file.

VinnyLaTaupe_0-1604919925901.png

 

0 Kudos
Message 2233 of 2,571
(10,721 Views)

@VinnyAstro wrote:

If someone sees the point of doing this, please explain me...

False case is empty; Sending false in the subvi just send an empty path to a file.

VinnyLaTaupe_0-1604919925901.png

 


Certainly a bit convoluted, but we don't really have enough information to judge because you left out what the subVI does if it receives a TRUE. I don't even know what "sending a path to a file" really means.

The true case executes whenever the control changes and that's a valid scenario. So far we don't even know the mechanical action. 😉

0 Kudos
Message 2234 of 2,571
(10,717 Views)

@VinnyAstro wrote:

If someone sees the point of doing this, please explain me...

False case is empty; Sending false in the subvi just send an empty path to a file.

VinnyLaTaupe_0-1604919925901.png

 


The Feedback Node and the Not Equal are detecting if the value changed.  Seems valid to me.  I would need to know a lot more on what the rest of the code is doing before making any comments about the empty path to a file.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2235 of 2,571
(10,714 Views)

Yep fair enough, sorry.

 

The mechanical action is Switch when Released, and a false action sends an empty string to a shared variable that is read and  "somewhere else" in the code.

The compilation of Monday+tiredness+this code is just making me grumpy ^^

Have to admit, I'm kinda off-topic here sorry.

VinnyLaTaupe_0-1604924130839.png

VinnyLaTaupe_1-1604924162029.png

 

 

0 Kudos
Message 2236 of 2,571
(10,719 Views)

@altenbach wrote:

Here's a small section of non-scalable code (see the navigation windows for the full size, seen here)

 

altenbach_0-1604875703486.png

 

 

... and yes, it can be simplified and made more scalable with code that would fit half of a postcard. (took me just a few minutes once I got to my desktop with a bigger screen).

 

altenbach_0-1604875341950.png

 

 


At least it's neat...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2237 of 2,571
(10,674 Views)

Meaningless array operations (seen here)

 

altenbach_0-1608056231453.png

 

0 Kudos
Message 2238 of 2,571
(10,502 Views)

To show progress using a variable length (max=9) row of LED apparently needs two case structures, 81 visible properties, 72 local variables, and 9 separate LEDs and terminals. Herding cats!

 

(Seen here)

 

All we really need is one array of LEDs, one property node, and a little bit of code. Right?

 

altenbach_0-1611950796212.png

0 Kudos
Message 2239 of 2,571
(10,359 Views)

For your patient, an array seems spot on!

 

There are situations where an array (or cluster) isn't possible.

 

On plant P&IDs the controls and indicators can be scattered all around. As we can't have clusters with controls and indicators, a cluster of controls will block the cluster of indicators.

 

I'd do this, and all handling of controls and indicators, by reference and label. It's not ideal though.

 

I also tend to get customers that not only want to have Boolean values, but also want my code to enable\disable them. That also rules out arrays.

 

 

0 Kudos
Message 2240 of 2,571
(10,327 Views)