From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to fill and empty a tank automatically can this be achieved without the use of local variables?

Solved!
Go to solution

Gurus of Labview,

 

I have a Project to complete and i am new to labview, I have student version 2009. and want to build an initial vi of a Municipal water trteatment plant TO FILL AND EMPTY TANKS. I am using the DSC module to help and I can get my tanks to complete a sequence, however it uses local variables. They cannot be shared on the network when I create my libraries.  Need help urgently..

 

Casey74

0 Kudos
Message 1 of 12
(10,703 Views)
That should be easy to do.

Simply make the tank an indicator and use a state machine architecture.
Can you show us what you made so far ?

You could keep the tank level in a shift register or action engine.

(Sorry I'm a bit brief, posted via smart phone from the middle of nowhere)
0 Kudos
Message 2 of 12
(10,688 Views)

Thx altenbach,

 

Will have to wait till later to show what i have achieved as i am at work presently, vi is on my home PC. 

 

I have used a flat sequence with a tank on a for loop of 100 adding very crude I know but it worked, so my tank will always go to a hundred, then in the next frame use the local variable of the tank to count down from hundred. I have tried to create the project but as you know feedback nodes, local variables etc will not publish correctly or at all. I have several tanks in the vi all performing the same type of function all in the flat sequence. Booleans switch on/off in relation to the fill/empty sequence.

 

New to this type of programming all help welcome......

 

Casey74

 

0 Kudos
Message 3 of 12
(10,671 Views)
Here is the block diagram for your enjoyment.......
0 Kudos
Message 4 of 12
(10,642 Views)

Casey74 wrote: 
Here is the block diagram for your enjoyment.......

 

 

Sorry, I cannot "enjoy" an image. It would help much more to see the actual VI.

 

 

0 Kudos
Message 5 of 12
(10,630 Views)

here's a simple example. See, no locals. 😉

 

 

0 Kudos
Message 6 of 12
(10,623 Views)

Hi Altenbach,

I appreciate your patience, here is the original vi.

My problem is to have tanks emptying and feeding into each other without the use of local variables.

From the vi design you can see that as one tank is emptying another is filling. I have used local variables to help all within a flat sequence. 

Your help has been appreciated.

 

Casey74

0 Kudos
Message 7 of 12
(10,598 Views)
Solution
Accepted by topic author Casey74

Here's a quick attempt at a state machine. See if it makes sense.

 

(It can be simplified quite a bit more!) 

 

 

Message 8 of 12
(10,503 Views)

Thx again Altenbach,

 

You have hit it more or less hit it on the head, time has run out for me though and I have to use what i have. Your previous tank fill/empty sequence has given me so many possiblities, however i couldnt figure how to make my boolean pipework switch off during the empty sequence. I am currently rebuilding the VI and creating several other HMI for my project report due in 3 day, 2 of which i am at work......

 

Expect to hear more from me in the future until i get to grips with this package

Message 9 of 12
(10,467 Views)

Casey74 wrote:

Thx again Altenbach,

 

You have hit it more or less hit it on the head, time has run out for me though and I have to use what i have. Your previous tank fill/empty sequence has given me so many possiblities, however i couldnt figure how to make my boolean pipework switch off during the empty sequence. I am currently rebuilding the VI and creating several other HMI for my project report due in 3 day, 2 of which i am at work......

 

Expect to hear more from me in the future until i get to grips with this package


So WHY have you marked your post as the solution not Altenbach's? You may have not been able to use his due to time constraints, but you've just said that he provided you with exactly what you wanted!!

 

Mark his post as the solution please.

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Message 10 of 12
(4,272 Views)