BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code


wiebe@CARYA wrote:

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.


Not really. 😄

 

You could use an array of color boxes, where "disabled" is just another color (Greyish). 😉 You can have many states (TRUE, FALSE, UNKNOWN, DISABLED, BROKEN, OFFLINE, etc.).

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2241 of 2,276
(2,479 Views)

@altenbach wrote:

wiebe@CARYA wrote:

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.


Not really. 😄

 

You could use an array of color boxes, where "disabled" is just another color (Greyish). 😉 You can have many states (TRUE, FALSE, UNKNOWN, DISABLED, BROKEN, OFFLINE, etc.).

 


Not just Booleans... I need disabled strings and numerics as well.

 

Also, I use system controls, and a ring can't be populated with images at run time.

 

A trick to show\hide controls\indicators is to make one boolean state transparent, the other background color. Switching to transparent actually allows using the controls behind it, switching to background hides everything behind it. 

 

It can get difficult when you want to show\hide and enable\disable an array of controls... The only solution is to do lots of subpanel and\or picture control magic, or to make enough controls\indicators and handle their state and position individually.

0 Kudos
Message 2242 of 2,276
(2,439 Views)

Synchronizing a few booleans in a cluster might require

 

  • two local variables, 12 shift registers, and a page full of code (picture)
  • one local variable and less than a quarter postcard worth of code (picture insert). 😄

 

Seen here.

 

 

 

altenbach_0-1613678576112.png

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 2243 of 2,276
(2,356 Views)

So we receive a short well formatted space delimited text string containing four numeric values. Apparently, we need to use a postcard worth of code to get these numbers.

 

(seen here)

 

altenbach_0-1614705550111.png

 

We can probably guess how the string looks like and how to parse it on one single step, independent of localization.


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 2244 of 2,276
(2,292 Views)

Count how many of four booleans are TRUE  (Seen here)

 

(negating the inverted output is a classic double-negative...)

 

 

altenbach_0-1615306988229.png

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 2245 of 2,276
(2,212 Views)

That indexing technique gets a +1 for creativity.

Message 2246 of 2,276
(2,145 Views)

If you want to present a truly mysterious error to the user, it is best to create an error with code=0 and no explanation. 😄

 

(seen here)

 

 

altenbach_0-1615832288438.png

 


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 2247 of 2,276
(2,014 Views)

mb1jxrc806141.png

I mean not quite that, more like: There was an error and nothing is wrong.

Message 2248 of 2,276
(1,998 Views)

@altenbach wrote:

If you want to present a truly mysterious error to the user, it is best to create an error with code=0 and no explanation. 😄

 

(seen here)

 

 

altenbach_0-1615832288438.png

 


I would bet a kudos here and wherever AQ responds that , that right there is a default error ring backsaved for previous version;)

 

 The rube rube goldberg is actually in the migration.   


"Should be" isn't "Is" -Jay
0 Kudos
Message 2249 of 2,276
(1,981 Views)

@JÞB wrote:
I would bet a kudos here and wherever AQ responds that , that right there is a default error ring backsaved for previous version;)   

 

Really? There is a more proper error constant in the other case structure to the right. Back-saving would have affected both. I also have never seen a default error constant where the error is TRUE.


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 2250 of 2,276
(1,969 Views)