Real-Time Measurement and Control

Showing results for 
Search instead for 
Did you mean: 

Proportional and Servo Valve Control by using NI 9264 and cRIO 9014

Hi all,


As every beginner says, I am new to LabVIEW and NI products.


I want to control a hydraulic proportional valve and a servo hydraulic valve. I found some examples but I couldn't get the idea. Let's say valves are at beginning position at 0 V and are at end position at 10 V. I want servo valve to operate at 10 Hz and -+10 mm stroke. I don't know how to create a block diagram which includes the motion that I need. I know the stroke and the frequency depends on something else too (like cylinder, hydraulic pressure of the tank, etc.) but I can't find the proper block diagram for this motion in VI.


In other words, I need to find the voltage value which lets the servo valve move like I wanted. I mean will -+5 V input value make that movement? If so, what is needed for that motion to be 5 Hz?


Also I need to apply that algorithm in my VI. How should I proceed?


Any help is appreciated.


Thanks in advance,

0 Kudos
Message 1 of 13

Hydraulic valves are typically velocity based actuators - that is if you apply 1V it will generate a certain flow rate, and hence speed of a cylinder or rotary actuator. Double the voltage and it will move approx. twice as fast.


So if you know the gain from volts to speed you can calculate the volts needed to produce a certain trajectory (10Hz, +/-10mm travel).


However, this form of open loop control wont be so repeatable, so is more often done with a feedback controller, where you define a setpoint to match the desired trajectory and compare that to the a measurement of the actual position and the error is fed into a controller (e.g. PID), the output of the controller is connected to the volts of the servovalve. If the controller is tuned correctly then the cylinder length with follow the desired trajectory closely.


You can combine this feedback control with the open loop control (feedforward) so that they both help each other.


Hope this is a useful start.



Consultant Control Engineer
Message 2 of 13



0 Kudos
Message 3 of 13

Hi did u get a solution on how to control a proportional solenoid valve? I also have a challenge. I'm trying to design a block diagram to control this valve using compact rio9074. 

0 Kudos
Message 4 of 13

What part of the system don't you understand - the concept of feedback control, the interfacing to the valve, how to realise in realt-ime LabVIEW?

There are plenty of application examples to show you the fundamentals.

Consultant Control Engineer
0 Kudos
Message 5 of 13

Thanks for the reply.


Actually I'm doing my internship  in a company. They gave me a compact rio 9074 and Labview software They showed me an airbrake system of a locomotive. their main objective is for me to :

1. Design a labview program to monitor and read the Pressures of the air reservoirs in the airbrake.

2. Send an output to open the valves for dumping the air

3. And setup a multi-client Server system so all the computers in the network can be able to access the airbrake unit


At this point in time, I have been able to designed the multiclient server system using the STM in NI website.. I'm able to read the pressures from all the reservoirs. and send them over the entire network.

The challenge I'm having now is to control those valves from my host computers. I wanted to use the PWM option in Crio, but the Crio 9074 they gave me doesn't have that option activated. It only have the counter and the quadrature options for digital signal.


The airbrake has two proportional valves, digital and analog valves.  I was thinking of using a PID Controller since this valves are proportional but don't really know how to do it or maybe some other way.


I have a copy of the data sheets for the valves




0 Kudos
Message 6 of 13



By "dumping air" do you mean continually adjust the valve to keep the pressure(s) at a target value ? Just to make sure we are talking about a feedback control and not some tiype of logic / automation system.


If you need a PWM to adjust how fast air is dumped, then it should be fairly easy to program one from first principles - but even easier to get the required components activated. Especially as if thar is not there then other useful blocks you will need might also not be present. The PWM only allows you to drive the valve with a variable signal, to make a feedback controller you will also need

  1. a PID control block - a PI is probably sufficient and simplest to start with
  2. a setpoint / target value (SP) for your pressures - do you have multplie pressures controlled by the same valve ? If you have one valve per pressure you'll need a separate control loop for each
  3. a suitably sampled pressure measurement (PV)- probably only need it sampled every 50-100ms but depends on your system speed of respones. Same sample rate applies to PI control calculation and writing of signal to PWM (PWM would typically operate at a much faster rate than control loop)
  4. form an error as either SP-PV or PV-SP depending on direction of actuator - assuming increaing vlave opening decreases pressure it will be the second one
  5. tuning settings for P and I terms - plenty of methods to do that, but need to be meticulous in how you use them. You could try som simple numbers to start with initially just to make sure control loop is at least wporking working - Kp=0.1, Ti = 10secs? But actual numbers depends on many things in your implementation - scalings, etc
  6. if you want a reliable system you should include things like anti-windup, bumpless transfer and initialisation when starting up - all in standard LV PID block, but can be programmed if you really have to.

hope this helps - and not too basic



Consultant Control Engineer
0 Kudos
Message 7 of 13

Hi Andyclegg,


 By dumping air l simply mean opening at a desired voltages. The valve can be controlled with an input of 0- 10v. this opens the flow rate at the particular voltage and allows air to be release from the unit. Yes a PWM code is kind of easy to design but the challenge here is, the compact rio 9074 module won't support the PWM. It only supports counters and and quadratures.  but from the data sheet of the valve, it is clearly stated that only the PWM can be used to control the valve. The valve is a Burkert Type 6223 and the controller used to control it is Burkert Type 8065

0 Kudos
Message 8 of 13

sorry type 8605

0 Kudos
Message 9 of 13

OK so you have an external elecronics module (the 8605) which converts an analogue voltage or current into a PWM signal that can drive the valve.

Why do you think you need a PWM in the cRIO ?

Consultant Control Engineer
0 Kudos
Message 10 of 13