Jump to content

What's wrong with this VI?


jpdrolet

Recommended Posts

Well that's a neat trick! :worship:

This normally generates an error in LV (broken wire). You can't have the output of the array feeding into the equal function. Object is member of a cycle.

"These wires form a cycle, making two parts of the diagram interdependent, so each must wait for an input from the other and neither can execute."

I assume there is something else you're not showing us... :nono:

Link to comment
Well that's a neat trick! :worship:

This normally generates an error in LV (broken wire). You can't have the output of the array feeding into the equal function. Object is member of a cycle.

"These wires form a cycle, making two parts of the diagram interdependent, so each must wait for an input from the other and neither can execute."

I assume there is something else you're not showing us... :nono:

1811[/snapback]

I see the same thing!?

post-17-1095488069.png?width=400

Link to comment
I assume there is something else you're not showing us... :nono:

1811[/snapback]

Look closely, there is nothing hidden. Check for data sources and wire directions. I found the trick with the lightbulb, I was sure LabVIEW would choke trying to run that.... Since the VI was converted from LV4, I thought there was some error, but it's legit code.

Link to comment
Look closely, there is nothing hidden.  Check for data sources and wire directions.  I found the trick with the lightbulb, I was sure LabVIEW would choke trying to run that.... Since the VI was converted from LV4, I thought there was some error, but it's legit code.

1816[/snapback]

Ok I think I got it

The way I understand it, it does the following:

In any "case", whether the control boolean is true or false, an array is build and wired to the shift register.

So, initially, my guess is that the boolean control is set to true, and the array is build independantly form the subvi. Also my other guess is that once the boolean control become set to false, it will be reset to true quickly after.

Then when the boolean control is false and if previous value from the shift register is not equal to the one generated when the boolean control was true, then call the subvi with 2048 as input then again (and here lies another problem) if the boolean control is still false collect all the values from the subvi and display then to the following locals (Barrier A, Barrier B, Dipper, Spare A, Spare B and Relay) then rebuild the array with this value and wire it to the shift register.

This seem indeed to be legit code...

It a nightmare to understand that what's wrong with it! :)

PJM

Note: Now that I am re reading this, I am not so sure that I understand what's going on ... :unsure:

Link to comment
I've found this remarkable counter intuitive piece of code today...

What's wrong with it :question:

Thanks for the lightbulb mode :lightbulb:

1810[/snapback]

After thinking about it, I thought that you had hidden a feedback node:

post-17-1095533311.png?width=400

But, after reading your hint about data sources, I realized that the code "makes sense":

post-17-1095533322.png?width=400

  • Like 1
Link to comment
But, after reading your hint about data sources, I realized that the code "makes sense":

post-17-1095533322.png?width=400

1820[/snapback]

Ah, yes. It reminds me of those visual optical tricks you read in puzzle books. The optical illusion here is the idea that data always exits a VI on the right-hand side. This forces your eye to follow the data from left to right. What you don't notice is that the constant "2048" is wired to ALL locals...

I hope you shot the programmer... :shifty:

  • Like 1
Link to comment
  • 3 weeks later...
  • 8 years later...

I thought I was pretty clever in overcoming the "wire is a member of a cycle" error. I had the desired continued count with sucessive presses of the run and stop buttons. Please see attached VI. Trouble is, after building in strings and arrays to try to make it into something useful, (see second attachment) the count is skipped occasionally. I assumed I had a timing error so I played with "wait until next mS multiple" without success. I also put a condtional loop on the stop button with "wait X mS" and experimented by varying X. To date, my problem persists. Comments and suggestions are welcomed.

continued count A.vi

Log File misses a count .vi

Link to comment

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.