LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Proportional Valve using DAQ

Solved!
Go to solution

Hello, 

 

I have successfully managed to connect the Festo vppm proportional regulator valve(0-10V analog output) with the help of NI-DAQ card and LabView. My next task is to make a fluidic muscle,which is connected to the valve, perform oscillations(like tremor). To be more clear, I generate a pulse signal and by modifying its frequency and amplitude(in my case amplitude translates to voltage of the valve) I turn on and off the valve in any frequency and pressure (voltage-->bars or psi). I want to achieve frequencies up to 20Hz. But it doesn't seem very possible. 

I would like to know if it is possible by changing something on my program I can achieve grater frequencies or It only depends on the valve I am using.

 

Thank your for your time

0 Kudos
Message 1 of 10
(3,270 Views)
Solution
Accepted by topic author canye23

Hi billskar23,

 

The rate that you can clock samples will be dependent on your DAQ device, but I think there may be a disconnect between loop timing and sample timing based on your code. 

 

I modified your code to replace a loop rate subVI that I didn't have, added a graph display for your generated signal and broke that signal down into components to help illustrate what is going on here.

 

Your Simulate Signal VI is configured to generate a square wave of a given frequency. It's also set to output that waveform at a rate of 1kHz, 100 samples at a time. This is essentially resampling the square wave up to 1kHz. You have the DAQmx task set to use the waveform timing, so I broke the waveform into its constituents so you can see how this is configuring the DAQ card. Because your waveform is resampled, you will want the DAQ card to generate samples at that resample rate (in this case 1kHz) in order to get the intended waveform frequency. You're giving the DAQmx task 100 samples at a time, so the loop has no need to run at 1 loop per sample, rather 1 loop per 100 samples. Furthermore, these samples are being clocked on hardware, not software, so the output sample rate and loop rate aren't directly connected. You just have to make sure your loop is running fast enough to put samples in the DAQ buffer such that it has a sample to output on every tick of its sample clock. So, you can change the square wave frequency using the Frequency input you have, and you can change how many points you get per waveform period (and by virtue of the fact that your DAQ task is set to use the waveform timing, your DAQ card output sample rate) by adjusting the "Samples per second (Hz)" property. 

 

By setting the frequency to 20Hz, and the samples per second to 1000, you get a waveform out that oscillates at a frequency of 20Hz, but which is sampled at 1k. 

Regards,
0 Kudos
Message 2 of 10
(3,258 Views)

Thank you very much for your time and useful information. Unfortunately I cannot open the vi because I have an older version (LabView 16.0). 

0 Kudos
Message 3 of 10
(3,223 Views)

Sorry, canye23!

 

I was working in 2017 and had saved for previous version (2016) to upload it here but ended up attaching the 2017 version anyway. Sorry for the inconvenience. You can find the 2016 version attached.

Regards,
Message 4 of 10
(3,208 Views)

Hi Bill,

 

while you can output new samples faster than 20Hz the Festo VPPM most probably doesn't react this fast...

In my testbenches we need to have a certain air flow through those valves: the volume of the needed pressured air determines how fast the VPPM can reach a new setpoint. Did you analyze your control system?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 10
(3,199 Views)

Yes, My air flow can go up to 6 bars. I have tested an other valve (an on off one) and I went up to 17hz. So the best choice is to by a compressor up to 10bars for example... 

0 Kudos
Message 6 of 10
(3,193 Views)

Hello there, 

 

I am doing literally the same project as you using the Festo VPPM valve and trying to make it work from the myRIO 1900. However, I am very new to the myRIO platform and i needed some advice on how to connect the valve to the myRIO bearing in mind it needs a 24v power supply to work. As well as the graphical code behind for the system to work and valves to open and close constantly. 

 

Thank you in advance

0 Kudos
Message 7 of 10
(2,918 Views)

Hi ahydayat,

 

However, I am very new to the myRIO platform

Learn LabVIEW.

Take the offers made in the "Training resources" mentioned in the header of the LabVIEW board!

 

and i needed some advice on how to connect the valve to the myRIO

I use the VPPM with voltage i/o signals. Easy to connect to simple DAQ devices…

 

bearing in mind it needs a 24v power supply to work.

I don't know how this is relevant to LabVIEW programming…

 

As well as the graphical code behind for the system to work and valves to open and close constantly.

Yes, you need to create that graphical code…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 10
(2,895 Views)

Hello, 

 

The 24V have nothing to do with myRIO. You must connect each valve with a voltage generator at 24V ( it’s blue and brown cable from your whole valve cable]. 

0 Kudos
Message 9 of 10
(2,874 Views)

Thanks for your code sharing, but I couldn't open it. Could you please save it as Labview 2015???

Best Regards

0 Kudos
Message 10 of 10
(1,832 Views)