Jump to content

Challenge: figure out why this loop doesn't stop


Recommended Posts

Posted

I have a challenge for you: looking at this VI snippet, it appears that this loop should stop after 11 iterations. However, when you click Run Once, it doesn't stop. See if you can figure out why it doesn't stop.

 

post-15106-0-98754000-1440213266.png

 

Hint (if it really is much of a hint): it uses a trick I sincerely doubt you've ever seen before! :lol:

 

If you don't have LabVIEW 2015 (or don't feel like loading it from a VI snippet), here's a version that should work on versions as far back as 2009:

 

LV2009.viFetching info...

Posted (edited)

+ and - primitives use the compound arithmetic node, IIRC. I expect you set the first terminal to invert?

 

What do we win if we get it right? :D

Edited by ShaunR
Posted (edited)
  On 8/22/2015 at 6:32 AM, ShaunR said:

+ and - primitives use the compound arithmetic node, IIRC. I expect you set the first terminal to invert?

 

What do we win if we get it right? :D

 

It's clearly not a compound arithmetic node. Is there a way to make one look like a regular subtract node or something?

 

And you don't win anything; I'm just curious if anyone will figure it out. :lol:

Edited by flarn2006
Posted

Did you wire up the minus as 2-(shift reg), then move the wires around to make it look like (shift reg)-2?

 

Then the shift reg would go 10, -8, 10, -8,… and never be less than -10.

  • Like 1
Posted
  On 8/22/2015 at 8:00 AM, drjdpowell said:

Did you wire up the minus as 2-(shift reg), then move the wires around to make it look like (shift reg)-2?

 

Then the shift reg would go 10, -8, 10, -8,… and never be less than -10.

 

I guess you are right, however the wires are not wired around, the Subtract function is actually flipped horizontally :blink::

 

post-17453-0-25199200-1440244674.png

 

I'm still trying to figgure out how you did that, flarn2006...

Please tell me if it is not possible from within LabVIEW or I die before solving this :(

Posted

I'm guessing h

 

  On 8/22/2015 at 12:03 PM, LogMAN said:

I guess you are right, however the wires are not wired around, the Subtract function is actually flipped horizontally :blink::

 

attachicon.gifFlipping Magic.png

 

I'm still trying to figgure out how you did that, flarn2006...

Please tell me if it is not possible from within LabVIEW or I die before solving this :(

 

I'm guessing he used his backdoor VI editor (https://lavag.org/topic/19178-low-level-vi-data-editor-warning-not-for-production-use/) to create a mutant subtract node  :rolleyes:

  • Like 2
Posted

dcoFiller=0x2 apparently swaps mapping of parameters to instruction, and also prevents the top wire from becoming a stomper. 0/10, would not recommend; stick to dcoFiller=0x3

  • Like 1
Posted (edited)
  On 8/22/2015 at 12:35 PM, JKSH said:

I'm guessing he used his backdoor VI editor (https://lavag.org/topic/19178-low-level-vi-data-editor-warning-not-for-production-use/) to create a mutant subtract node  :rolleyes:

 

That is cheating! :nono:

... But I guess you are right.

 

  On 8/22/2015 at 12:49 PM, JackDunaway said:

dcoFiller=0x2 apparently swaps mapping of parameters to instruction, and also prevents the top wire from becoming a stomper. 0/10, would not recommend; stick to dcoFiller=0x3

 

Hehehe... Found a new toy to trouble our trainees with. :rolleyes:

Edited by LogMAN
Posted
  On 8/22/2015 at 6:47 PM, flarn2006 said:

Correct! :D

More specifically, I switched the "bounds" properties of the two input terminals.

 

Please ensure that your genetically-modified nodes don't escape into the wild!  :lol:

Posted (edited)
  On 8/22/2015 at 11:52 PM, JKSH said:

Please ensure that your genetically-modified nodes don't escape into the wild!  :lol:

 

Don't worry; the default palette is 100% organic. 9lchQLR.png

Edited by flarn2006
  • 6 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.