LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graphic

Hello,

 

 

                   I have done that VI to simulate a simple tank. It is works, but i would like to do the graphic slowly. I would like to do the graphic according to theupswing of the tank. What do i have to change on my vi. thanks

0 Kudos
Message 1 of 9
(3,354 Views)

Put a longer wait in your For Loop?

Message Edited by Ravens Fan on 09-14-2009 11:04 AM
0 Kudos
Message 2 of 9
(3,348 Views)

I don't quite understand why all of that code is in the for-loop, since none of it depends on the loop iteration. You are calculating the same exact thing 10 times.

 

If you are trying to do something interactive, such as being able to change the input parameters while the code is running, then you need a while loop, not a fixed-length for-loop. 

0 Kudos
Message 3 of 9
(3,333 Views)

hello smercurio_fc

 

                             I´ve put in a for-loop because i was trying to put a delay. But it didn´t work. Do you know how i can do what i want?

0 Kudos
Message 4 of 9
(3,302 Views)

no need to have it all in the for-loop to feel the delay

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 5 of 9
(3,295 Views)

You have a for loop that has the i terminal going to the tank indicator.  That makes it look like the tank is filling.

 

You have other code completely unrelated in that For Loop as well which will calculate the same information 10 times and send it to an XY graph indicator (though when I run it, I don't see anything on the graph.)

 

What do the two bits of code have to do with each other?

0 Kudos
Message 6 of 9
(3,288 Views)

You can have a wait in a while loop as well.

Just wire the condition terminal to the tanks level.


For example, if the tank holds 100 L,

have a boolean check:
if Level >= 100: stop

Cory K
0 Kudos
Message 7 of 9
(3,286 Views)

 

 i would like that each interation of euler vi, should step up my tank. But i don´t know where to connect my tank. I would like to see my tank increasing the level and the graphic converging in the same time

0 Kudos
Message 8 of 9
(3,264 Views)

Somewhere along the way my Euler's Method example stopped working so well.  I reverted to it and modified it as well.  Some points to consider:

 

The Euler Method VI returns all of the values, if you want each individual iteration you'll have to modify the code.

Please set current values to default before saving and posting VIs.

 

This modified example (saved for LV8.5) calculates all of the values, then slowly graphs them and updates the tank.

 

Edit:  Plot style doing weird things for me, make sure Plot 1 is a point plot for proper appearance.

Message Edited by Darin.K on 09-14-2009 02:25 PM
Message Edited by Darin.K on 09-14-2009 02:26 PM
Message Edited by Darin.K on 09-14-2009 02:31 PM
0 Kudos
Message 9 of 9
(3,248 Views)