LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I'm trying to create a filled tank auto / Manual one tank

Solved!
Go to solution

how do I add/create so that the manual mode is linked to the value of the tank at the time and not the value from manual to tank and increases smoothly as it does in automatic mode.

0 Kudos
Message 11 of 25
(314 Views)

Two very important points:

 

  • Never (never ever!!!) attach a modified VI with the same name as what I attached earlier.
  • You need to use "save for previous" (2020 or below), else I cannot look at your VI.

 

0 Kudos
Message 12 of 25
(308 Views)

now if the version is correct?

0 Kudos
Message 13 of 25
(292 Views)
  • Why is there so much convoluted code?
  • A select with a F wired to the top and a T wired to the bottom is the same as a "not".
  • I showed you how to do all comparisons at once by using an array of levels.
  • Why are there so many local variables?
  • You have glaring race conditions, for example the "Tank 2" local variable will get read way before the terminal gets updated. 
  • Why is there so much duplicate code?
  • Why are there so many coercion dots?
  • Why are there so many inner loops, sequences, and long delays?
  • A state machine only has an outer loop for everything and a singe case structure with sufficient cases to cover all scenarios.

 

Can you take a step back and explain the program requirements in simple terms.

 

  • A list of all possible states
  • The conditions that cause a change in state (user interaction, certain tank values, etc.)

I am sure my simple program could do it all with just a little bit more code.

0 Kudos
Message 14 of 25
(286 Views)

See if this can give you some ideas. (I got rid of that silly pipe animation, but if you really want that you need a simple state machine with just a little bit more code)

0 Kudos
Message 15 of 25
(279 Views)

What would you change/modify so that instead of the tank adapting to the manual level, the manual level adapts to the tank level when switching from automatic to manual?

0 Kudos
Message 16 of 25
(267 Views)

Do you want to retain the current level as manual setpoint whenever the mode goes from auto to man?

That should only require some very small changes to the existing code. What have you tried? Shouldn't take more than 10 seconds to modify! Do you fully understand the current code?

 

0 Kudos
Message 17 of 25
(260 Views)

All you really need to do is update the manual control to the current level when in automatic mode. A local variable is OK for that.

(As I said, a 10 second modification  😄 )

 

altenbach_0-1750255716313.png

 

Do you fully understand the rest of the code?

 

0 Kudos
Message 18 of 25
(249 Views)

I have been trying to create a stop option, which is responsible for stopping the filling of the tank does not stop everything completely, and a recet option that serves me so that when quadno is activated is restarted if it is in stop starts to run from zero, if in automatic starts to fill from zero and if in manual starts to fill the manual from zero.
the problem lies that I could not make the stop because I can not design a logic that keeps frozen automatic filling with the last value recorded.
Any ideas?

0 Kudos
Message 19 of 25
(153 Views)

@DonRoonin wrote:

I have been trying to create a stop option, which is responsible for stopping the filling of the tank does not stop everything completely, and a recet option that serves me so that when quadno is activated is restarted if it is in stop starts to run from zero, if in automatic starts to fill from zero and if in manual starts to fill the manual from zero.


None of this makes any sense to me. Can you repeat that in better words? Maybe write it in your native language and then use google translate before posting?

 

I don't se a quadno (square)?

 

Do you want a "pause" option maybe?

 

Please make a list of all possible states and how they depend on the user control.

 

 You should not have controls with almost identical labels (stop vs. Stop) to avoid mistakes.

Also try to avoid silly things such as the following:

 

altenbach_0-1751211717864.png

 

0 Kudos
Message 20 of 25
(143 Views)