Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Feedback system for servo valve

Hi all,

I'm new to Labview and I'm struggling a lot. I have been to Labview beginner courses and also talked to Labview hotline a lot of times. All in all I have put a lot of effort in trying programming Labview for the past months, but I'm unfortunately not succeeding. This is very frustrating and I would be thankful if one could spent some time helping me out. I have searched for other posts and looked through documentation already, but I need a little more guidance. If you have relevant links, you are most welcome to post them in this thread and I will look into it. Also if this thread is posted in the wrong subforum please feel free to move it.


I have a system with a servo valve. This servo valve controls the flow direction of pressurized hydraulic oil going to a piston. I want to send a sine wave signal to the servo valve resulting in the oil changing direction periodically. This will in effect send the piston up and down periodically. On the piston rod I have mounted a strain-gage measuring the corresponding force transmitted. I would like to built a Labview program, there is;
     1) Generating a sine wave signal to the servo valve.
     2) Acquiring a corresponding force signal from the strain-gauge on the piston rod.

Take these two enqueued arrays of data and do two things;
     a) Save them on the computer in a specified folder in an Excel spread sheet, with corresponding time stamps for each measurement.
     b) Plot the data live in Labview.  

It's important for me, that there is no lag between the data generated and the data acquired. Elseway I can't use it for analysis.
I would like to keep it simple, thereby the generated signal can start of as a constant value, then later on be altered to a sine wave and then finally be modified to the proper frequency.

When this is all set, I would like to expand the system to cope with the feedback requirement. Hereby implementing a way to control the signal generated from the information gained from the acquried force. This is done in order to gain a precise signal and minimize overshooting and the like, like in a PID setup.        

So what i want is, continuous measurement and data logging.

Hardware setup:
I'm using a NI cDAQ-9178 (Compact DAQ) with 8 bays. Connected to the computer with a USB cable.

The module for the servo valve, generating a signal is a: NI 9265
The servo valve is a Direct Operated Proportional DC valve from Parker called DF plus, series D1FP with ID number: D1FPE50FB9N500. It's controlled by a current signal from 4 to 20 mA where 12mA is closed.

The module for the strain-gage, acquring a signal is a: NI 9237.
The strain-gage is a HBM U9C 20 kN (=kilo Newton) which has been calibrated from factory and comes with a test certificate with values to set the input quantities (load) and corresponding output quantities (mV/V)
A screw terminal adaptor NI 9949 is connected between the strain-gage and module with a ethernet cable.

Software:
I'm using Labview 2012 SP1 (32-bit)


My approach
I started setting up a minor Labview program for generating the sine wave signal using the built in DAQ assistant. I then made another program likewise for acquring the force signal. I then tried to put the two programs together, but it found it hard. Also I found there were some limits using the DAQ assistant. Making it a good choice for fast testing, but not for using in the final program. I had issues getting the data from the two signals in sync. I.e. there was some lag, also I found they did not produce data at the same rate.

Now I'm looking into the template: "Continuous Measurement and Logging (NI-DAQmx)". This template is built on the Queued Message Handler and uses the producer consumer loop approach. Here queues are used to control data from different sources can be handled. I have altered this slightly by adding the right physical channel for my strain-gage. It is however a very large program with a lot of sub VI's making it difficult for me to grasp it all. As a start I would like to change the units for the signal I'm receiving to Newton. Also I would like to use the calibrated data from my certificate to get the gain and offset right.

The VI template can be found in Labview please let me know if I should attach it. Also I have a figure of the hydraulics circuit if needed just let me know.

 

Best regards

Anders

0 Kudos
Message 1 of 4
(4,279 Views)

How I changed the DAQmx and the physical channel:

 

I went to the documentation of the VI: "Continuous Measurement and Logging (NI-DAQmx)", here I found how to change DAQmx and the physical channel. I opened the folder "Acquisition" and then the sub VI "Configure Hardware", here I opened the block diagram and changed the DAQmx to "DAQmx create channel (AI-Force-Bridge-Two-Point-Linear).vi" -see picture in attachment. Also in the front panel of the sub VI "Configure Hardware" I could change the physical channel to mine: "cDAQ1Mod1 (NI 9237) ai0", this change however seems to dissappear. Every time I open up the sub VI that setting is gone.

 

Is it the right DAQmx I have chosen? Or should it have been: "DAQmx Read (Analog 1D Wfm NChan NSamp).vi"? -see picture in attachment. Or maybe something entirely different.

Now it does recognize the channel and receives data, I just can't figure out how to change the unit to Newton and set the offset and gain from my calibrated test data as stated earlier.

 

Kind regards

Anders

Download All
0 Kudos
Message 2 of 4
(4,268 Views)

Adding task:

I'm now trying to add the second task by following the documentation from the Queued Meassage Handler. Under the section "Creating a Message Handling Loop"
See the online documentation.

I can't find the little box bundling two errors into one. See picture. Can anyone please help me out?

Is this the right way to proceed?

best regards
Anders

0 Kudos
Message 3 of 4
(4,256 Views)

Hi,

 

Since those questions were posted quite a long time ago, I'm coming to you to know if between this time you were able to find some information by yourself.

 

If not, then let's respond to your question step by step. To be honest I'm quickly confused on what you were able to do and what not. 

 

As a first step, I will respond to your last question :

I can't find the little box bundling two errors into one. See picture. Can anyone please help me out?

Is this the right way to proceed?

 

This function is called Merge Errors Function, the following link gives you more details : http://zone.ni.com/reference/en-XX/help/371361H-01/glang/merge_errors_function/

If you can not find it in your Function Palette, please use the Quick Drop (CTRL+SPACE) and type the function "Merge Errors". 

After giving me more information step by step, I will guide you slowly and surely on each programmation/configuration process in order to build your application.

Thank you for your understanding.

 

Lirat.

 

 

 

0 Kudos
Message 4 of 4
(4,060 Views)