From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

HELP How can i limit the digital writing?

Hello have a nice day :)

      Firstly i have basic knowledge on labview and i am triying to do a project for university but there is an issue and i cant handle it .

     In this block diagram i can read the distance with ultrasonic sensor and open and closes the relay with digital writing but i want to operate the system with between spesific values. for example if the distance in cm was X , i want to do it like this
if x<10 cm starts writing until x=20 then writing stop.but loop has to be continiue because x will drop 20 to below 10 then again and again this project will use liquid level controller system due to distance for example below 10 cm pump starts until 20 cm then drain the tank to 9 cm it has to be fill it up to 20 cm how can i make this function can you help me.Using LINX

0 Kudos
Message 1 of 5
(2,634 Views)

All you really need is a method of keeping track of whether you are filling or not. So a persistent boolean should do it, this can be achieved in a few different ways but in this case is probably going to be done easiest with a shift register or feedback node.

 

Once you know whether you are filling or not you can then compare the reading value against the specific target.

 

FILLING: <20 - Keep Filling

FILLING: >=20 - Stop Filling

NOT FILLING:  >= 10 - Do Nothing

NOT FILLING: < 10 - Start Filling

 

0 Kudos
Message 2 of 5
(2,580 Views)

still cant do it .Should i case structure? and can you give me an example please.I dont understand what to do.

0 Kudos
Message 3 of 5
(2,540 Views)

Open the LabVIEW Forum.  On the first page, there is a link, Learn LabVIEW Basics.  Pay special attention to Execution Structures and Passing Data Between Loop Iterations.  Then think how this applies to the problem you are trying to solve.

 

Bob Schor

0 Kudos
Message 4 of 5
(2,531 Views)

I did it thank you.I used two different case structure and it worked perfectly.I can upload if someone wonders

0 Kudos
Message 5 of 5
(2,510 Views)