Jump to content

Feedback Node reinitialization


Recommended Posts

Hello everybody !

I am quiet a beginner in LabVIEW and I have a problem with a node.

I must make a program which could control differents valves and recieve data from a manometer. Everything was pretty find before I try to make a kind of animation of what was happening in the system.

I try to use a Feedback Node to see the fluid in the Chambers moves. For that, I use a vi from the library of LabVIEW (Level.vi) and I need a Feedback Node. The problem is that I made my program to works in buckle, during the first buckle, everything works wekk, during de second the Feedback Node seems to have kept in memory its last value... what does not arrange me.

I would like to know how I could reinisialize this value wherever at leqst there is no value in memory.

Here is the style of buckle I integrated into my program:

feedbackproblem.jpg

At first, to calculate the "Breack Time", I had used a Feedback NOde which raised the same problem. I finally find another way to do that without using a Feedack Node but here, I do not see how I could make otherwise...

I take a look on the NI forum, I fell on some English topics but every time they give one particular method to solve the problem but it was not good for my case.

I suppose that I am not the first one to fall on this kind of problem nevertheless.

Anybody would have an idea ? (I also attached a my program, if it can help)

Bests Regards,

Vanrob

(Sorry for my English, I am from Belgium)

Feedback Problem.vi

Link to comment

First of all, get used to data flow. Use wires instead of locals to have the behaviour of 'variables'. You need to wire the output of i/10 to the = function instead of passing it via a local variable. You have no control of the execution order except data flow, so your loop might run 1 more time than you wish.

Please keep posting code on the forums, so we can teach you the 'right way'. Don't feel offended, everyone coming from a programming background is doing these mistakes.

As I can't see the true case, I can't judge if the outer while loop is necessery at all or I tried to solve you problem with it.

Second, there is a primitive called 'First Call'. Wire it to the Select input of a Switch primitive. The true terminal will be your default starting value while the false terminal will be the feedback node.

Felix

Link to comment

First of all, get used to data flow. Use wires instead of locals to have the behaviour of 'variables'. You need to wire the output of i/10 to the = function instead of passing it via a local variable. You have no control of the execution order except data flow, so your loop might run 1 more time than you wish.

Please keep posting code on the forums, so we can teach you the 'right way'. Don't feel offended, everyone coming from a programming background is doing these mistakes.

As I can't see the true case, I can't judge if the outer while loop is necessery at all or I tried to solve you problem with it.

Second, there is a primitive called 'First Call'. Wire it to the Select input of a Switch primitive. The true terminal will be your default starting value while the false terminal will be the feedback node.

Felix

Hello,

Many thanks for your answer.

Thanks for notice the local variable. For the moment, my program is a bit too complicate. I try to simply it today and remove some local variable which weren't very useless as this one.

I don't feel offended at all, as I wasn't sur, I join a picture of the diagram but also the program (maybe you haven't notice it ?)

I am not sur to understand about First Call, but by trying various thing I am arrived to one thing:

Right click on the Feedback Node, "Move Initializer One Loop Out" and one part (the one with a point), will be on the Loop. If I put my value (10 here), out of this Loop, it seems to be good and this value is taken each time that the loop is relaunch. Maybe it was what you say ?

If you are interested, I join the whole program. There is probably some things which could be removed/replaced to make something clear.

Differents time appear = 0 for the moment, do not ask me why, it is my supervisor who ask me to do that... blink.gif

Yours Sincerely,

Vanrob

Vacuum System1.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.