BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code


@VinnyAstro wrote:

 


Yet the OP should know about autoindexing, since a FOR loop automatically creates one when you input an array... So that means that they've disabled it on purpose 🤔


Or they started with a While loop and r-clicked and changed it to For. 🙂

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2571 of 2,598
(1,087 Views)

In a nutshell, we basically have a 2D boolean array to be turned into a single boolean according to some rules.

 

I have that nagging feeling that this could be simplified somewhat. 😄 (seen here)

 

 

altenbach_0-1717609209654.png

 

 

 

0 Kudos
Message 2572 of 2,598
(939 Views)

@altenbach wrote:

In a nutshell, we basically have a 2D boolean array to be turned into a single boolean according to some rules.

 

I have that nagging feeling that this could be simplified somewhat. 😄 (seen here)

 

 

altenbach_0-1717609209654.png

 

 

 


shiftregisters and one OR 🙂   just keep the boolean information (edit: first SR init to false 😉 )

 

or concentrate the arrays followed by OR-array , boolean array to number is max 64 bit  (more will be truncated, so I assume each loop run 64 times max). Who cares for 16k memory nowadays 😄

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2573 of 2,598
(901 Views)

@Henrik_Volkers wrote:

@altenbach wrote:

In a nutshell, we basically have a 2D boolean array to be turned into a single boolean according to some rules.

 

I have that nagging feeling that this could be simplified somewhat. 😄 (seen here)

 

 

altenbach_0-1717609209654.png

 

 

 


shiftregisters and one OR 🙂   just keep the boolean information (edit: first SR init to false 😉 )


Put the indexing on Last Value, and make it conditional:

 

wiebeCARYA_0-1717681449044.png

Message 2574 of 2,598
(875 Views)

@Broken_Arrow wrote:

Saw this today:

 

If an outer while loop contains an event and another inner while loop and  both the event and inner while loop are separate, then is there any possibilty that the execution comes out of the inner while loop when the event occurs and after executing the event it comes back to the inner while loop where it was previously executing,


just for the sake of curiosity

Spoiler
event.gif

 

 

Message 2575 of 2,598
(776 Views)

@alexderjuengere wrote:

@Broken_Arrow wrote:

Saw this today:

 

If an outer while loop contains an event and another inner while loop and  both the event and inner while loop are separate, then is there any possibilty that the execution comes out of the inner while loop when the event occurs and after executing the event it comes back to the inner while loop where it was previously executing,


just for the sake of curiosity

Spoiler
event.gif

 

 


Did you turn off the "Lock Front Panel Until Event Is Handled" for both of those controls?  It looks like an extra button press is locking the front panel since the Event Structure is not being handled due to the extra loop inside of the loop.


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 2576 of 2,598
(793 Views)

@crossrulz wrote:

 


Did you turn off the "Lock Front Panel Until Event Is Handled" for both of those controls?  It looks like an extra button press is locking the front panel since the Event Structure is not being handled due to the extra loop inside of the loop.


no, I didn't uncheck Lock Panel, which is checked by default (scenario 1)

 

Spoiler

alexderjuengere_0-1718976656926.png

when unchecking that flag AND saving the .vi (scenario 2)

alexderjuengere_2-1718978085822.png

 

 

 

 

0 Kudos
Message 2577 of 2,598
(782 Views)

Why aren't the buttons latch action?

Why is the an timeout case that can never happen?

Why is the inner loop greedy?

Why is there a sequence structure?

0 Kudos
Message 2578 of 2,598
(754 Views)

 

Why aren't the buttons latch action?

- because you can't use local variabels with that mechanical action

Why is the an timeout case that can never happen?

- because, I don't want any timeout effects, can it be removed?

Why is the inner loop greedy?

- because it was suggested by the OP

Why is there a sequence structure?

- because I use local variabels, and want them to be executed first

 

 

0 Kudos
Message 2579 of 2,598
(740 Views)

back  to topic 😛

 

0 Kudos
Message 2580 of 2,598
(738 Views)