LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measurment of water lever in a tank.

Solved!
Go to solution

As I said before, thanks for all the help. This a preparation for a laboratory task.

I can't really figure out what you mean by define dx for the chart, have been searching a lot for it but can't seem to find it. I've done some changes to it so I will attach the new code.

0 Kudos
Message 11 of 18
(669 Views)

Right click the chart and pick Create Property Node.   Select XScale then Multiplier.

 

0 Kudos
Message 12 of 18
(666 Views)
Solution
Accepted by topic author kalwet

@kalwet wrote:

I can't really figure out what you mean by define dx for the chart, .


 

We are talking about the multiplier that correlates the point spacing with actual time. With 200ms, the spacing is.0.2, giving you five points for each second.

altenbach_1-1612635006643.png

 

0 Kudos
Message 13 of 18
(659 Views)

 

 

Some more comments:

With unusual limit settings, it is possible that both comparisons returns TRUE and you'll sends two commands in parallel (We cannot tell which occurs first).

 

A safer way is to use the sorted values for limit testing.

 

altenbach_0-1612635564982.png

 

Message 14 of 18
(656 Views)

So more like this then? I still get a red dot for the "Wait". Also if i plug in max and min in the chart as I have done they should display as straight lines, right?

0 Kudos
Message 15 of 18
(649 Views)
Solution
Accepted by topic author kalwet

You get a red dot at the wait because your constant is I32 while it should be U32.

 

(Posting by phone, cannot look at your code)

0 Kudos
Message 16 of 18
(633 Views)
Solution
Accepted by topic author kalwet

@kalwet wrote:

So more like this then?


Still a bit too much code. You only need one case structure and one "power supply" write.

 

Here is a draft:

 

altenbach_0-1612664011341.png

 

0 Kudos
Message 17 of 18
(617 Views)

Thank you! So if im understanding it correctly the selector decides what to do with the power supply? So for example, if the tank is not full then its false and the selector chooses to start the power supply wich starts the pump?

0 Kudos
Message 18 of 18
(602 Views)