LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

valve control to match a level in a feed tank (mesured by differential pressure)

Solved!
Go to solution

Hi everyone, 

 

I'm trying to regulate the level in a feed tank, by opening or closing the valve of the pure solvent tank above it. 

To control the level I have a differential pressure transmitter connected to the computer. 

So when then level is under a certain value, I'd like to open the valve to top up with pure solvent, and when the level goes over this value, I'd like to close the valve (the level will go down as the system is running and have a permeate outlet. 

The valve and the DP transmitter are connected to the computer via USB. Valve: Omega PSV-3, signal 0 .. 20mA

I tried different ways but it's not working. 

 

I'm a beginner with labview...

 

Thank you very much for your help 

 

Cheers

 

Florian

0 Kudos
Message 1 of 11
(4,118 Views)

What ways have you tried? Can you show us some code? Your statement is very generic and can definitely be done with LabVIEW in many ways so give us something to work with so we can help you!

 

If you're new to LabVIEW - I suggest you spend some time learning the basics - there are lots of free tutorials available (search "getting started with LabVIEW") and there are hundreds of examples built into LabVIEW.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 11
(4,102 Views)

Actually I have already used labview to display, collect and save data, but never to control. 

I tried to use a slider to set the level I want to keep in the tank, and then I found a PID controler on internet. But with that I can only set one value, and not a upper and lower boundary as I wanted to do. 

I also tried using comparison between the measured level (the value is collected using the DAQ assistant) and a control (set with the upper value, or the lower), but then I don't manage to connect the resultant boolean to my second DAQ assistant (to control the valve).

 

I hope I'm clear... 

 

0 Kudos
Message 3 of 11
(4,095 Views)

@floriano64 wrote:

\I hope I'm clear... 


No, not at all. We need to see some code.

While there are dozens of ways to do it right, there are billions of ways to do it wrong. You are doing it wrong.

0 Kudos
Message 4 of 11
(4,081 Views)

This is my code.

But I think it's not the good way for what I want to do.

If there is so many ways to do it right, maybe you can try to describe one of them...

Thank you again for trying to help me! 

0 Kudos
Message 5 of 11
(4,067 Views)

Hello Florian,

 

Could you be more specific in the description of your problematic. What is exactly the problem you meet?

"This is not working" or "I don't do it the right way" does not tell about your issue, and there is no way we build your whole application for your. I understand you want to control an instrument, which is a valve. If you don't know how to do that with labVIEW, start with a tutorial : https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YFtOCAW&l=en-US

 

 

Pierre-Emmanuel BELLES
Certified LabVIEW Developper
Certified TestStand Architect

0 Kudos
Message 6 of 11
(4,033 Views)

Hi Florian,

 

This is my code.

It's missing the SimplePID subVI…

 

All your PID settings (PID, min, max) are zero. The PID algorithm will not work this way: you need to apply correct settings. Read Wikipedia to learn general rules for determining those parameters!

 

General hint: try to stay away from DAQAssistent. It neither helps to understand what's going on nor does it improve performance.

Best regards,
GerdW


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

Hi guys, 

 

I understand I wasn't clear, but I finally managed to control my valve using a bit of code in a formula node.

 

Thank you anyway for your responses

 

Cheers! 

0 Kudos
Message 8 of 11
(4,016 Views)

Hi Florian,

 

it is common agreement in forums like these to post the solution - others may have the same problem and will be able to adapt your solution…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 11
(4,009 Views)
Solution
Accepted by topic author floriano64

A screenshop, of the part of my program I was speaking about!

 

Hope this will help other users!

0 Kudos
Message 10 of 11
(3,995 Views)