Jump to content

Challenge: figure out why this loop doesn't stop


Recommended Posts

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.vi

Link to comment

+ 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
Link to comment

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 :(

Link to comment

I'm guessing h

 

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
Link to comment

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.

 

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
Link to comment
  • 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.