LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView boolean input to output tutorial/help

For a class project we have been asked to create a water tank which has input and output triggered by 3 sensors  as the water level decreases below each sensor an event is triggered represented by an LED the tank goes up in increments from 0 to 4  . when a sensor is submerged in water it has an output of 1 when it is above water it has an output of 0. I am able to adjust the water level up and down with the slide controller however I am not allowed to use the analogue value for the water level in the control system design so I am now stuck and seeking tutorials on this or I'm not sure I'm going about it the right way. 

 

sensor 1 = 1 

sensor 2 = 2  can i represent the sensors this way on water tank 2 being where the level of water is in tank ?

sensor 3 =3 

water tank photo.PNG

So I have the tank level controlled by the analogue slider set to full this will result in all sensors having an output of 1,1,1 if correct i need something that will process various results and trigger necessary event/LED.

 

As I said not sure if my approach is correct so any help on correct method of links to tutorials is appreciated.

 

Thanks.

 

0 Kudos
Message 1 of 6
(1,074 Views)
  • Start with a top-level while loop containing a small wait and all needed terminals.
  • Add your comparisons. Test.
  • If unsure, look at your course notes and tutorials.
  • If you get stuck, attach your vi and explain your problem.
0 Kudos
Message 2 of 6
(1,060 Views)

I have limited resources on this which is why I'm seeking tutorials , I've gathered that I need to create a system that generates 3 digital outputs to represent the 3 sensors from the analogue controller for the water tank that is one value.

0 Kudos
Message 3 of 6
(1,040 Views)

Hi crypto,

 


@crypto212 wrote:

I have limited resources on this which is why I'm seeking tutorials , I've gathered that I need to create a system that generates 3 digital outputs to represent the 3 sensors from the analogue controller for the water tank that is one value.


So these "sensors" should detect/measure the fill level of the tank?

What about using a comparison like ">=" to "measure" if the is a certain level reached?

Hint: when there should be 3 "sensors" then you would need 3 comparisons!

Hint2: when you need to do the same operation multiple times you should use a loop or employ polymorphism and use an array...

 

Btw. never compare floats for equality like you sketched in your initial message...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(1,016 Views)

@crypto212 wrote:

I have limited resources on this which is why I'm seeking tutorials 


Since this is a class project, I assume that the teacher provided you with a sufficient foundation to solve this within minutes. For additional help, there are the learning resources listed at the top of the forum.

 

The word "sensors" is typically reserved for external hardware. A "sensor" is an input (data source) while a LED is an output (data sink). You seem to look at a simple simulation where three front panel LEDs show a tank level approximation proportional to the number of LEDs lit up. So it is just a comparison operation (Hint: LabVIEW has a comparison palette!). I would recommend to use an array of three LEDs to simplify wiring, you can get their value by comparing the tank level with an array of levels and a single "equal or greater" comparison. The rest should fall into place.

 

See how far you get and show us your progress so we can point you in the right direction if you get stuck.

0 Kudos
Message 5 of 6
(962 Views)

Start with something like the following. You can convert the Boolean array or an integer array of 0 or 1 to be sent to your control systems, whatever format that expects.

 

You really haven't explained the details of the hardware and such.

 

altenbach_0-1670603125774.png

 

0 Kudos
Message 6 of 6
(953 Views)