Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Hydraulic Servo Control

I am working on a project where I am trying to tear a fabric over a relatively long lentgh.  I have a small 60" hydraulic cylinder hooked up  with a 15gpm servo valve.  I have a string potentiometer which I am using for a feedback signal.  The feedback signal and the servo valve are hooked into a PCI 6221 card.  I am getting a good signal from the string pot and I can currently control the cylinder simply by adjusting the voltage to the servo valve.  I am looking to build a vi for closed loop pid displacement control with a ramp generator.  I basically need to move the cylinder at a constant rate for the majority of its stroke.  I am hoping to run the control loop at about 100Hz.  Has anybody developed something similar to help me get started?  I am relatively new to LabView.  The closest example to what I need is the "setpoint profile example.vi" but I need to change the process variable to my analog input and the output to my analog output.  Any help would be greatly appreciated.
 
Thanks,
 
Lee
0 Kudos
Message 1 of 4
(3,603 Views)
Lee,
 
Using the Setpoint Profile Example VI for your application should be fairly easy.  Basically, you would need to replace the Plant Simulator VI with DAQmx Write and DAQmx Read VIs.  If you are new to DAQmx, there are some really good examples on how to input and output data in the Example Finder:  Hardware Input and Output >> DAQmx >> Analog Generation / Analog Measurements.  From there, you would need to combine one of these examples with the Setpoint Profile Example.  I don't know of any existing examples that do exactly what you want to do, but let me know if you have any trouble incorporating the DAQmx VIs into the existing example.
 
-Chris
0 Kudos
Message 2 of 4
(3,565 Views)
Chris,

I was able to get this running by doing exactly what you said (I worked it out over the phone with tech support).  I'm hoping to eventually emulate most of the functionality of our MTS controllers by adding:

- the ability to control using engineering units rather than voltages

- the ability to manually adjust the setpoint before starting a ramp (with some type of manual control like a slider or a dial - used to lower the actuator to contact the specimen )

- the ability to automatically "zero" or offset the feedback signals (so that the test starts at zero load and zero deflection no matter what the feedback signals are)

- the ability to specify relative displacement or load rates (i.e. starting from the current position - move continuously at a rate of 0.05 in/min)

- the ability to switch between control modes (i.e. load in stroke control to 0.5in deflection and then hold the load in load control and then switch back to stroke control to unload).

- displacement and load limits (for safety)

It seems like this type of functionality should be fairly common but it is probably beyond my current skills.  Do you have any suggestions on how to get started with such a project?  I'm having trouble figuring out how to structure the project in LabView (each little part doesn't seem so bad but it seems like the final project would be a huge mess of wires which would be impossible to keep track of).  I've worked with some object oriented programming languages and I think LabView must require a different way of thinking and designing that I just haven't caught onto yet.

Lee
0 Kudos
Message 3 of 4
(3,560 Views)

Hi Lee,

I hope you're doing so well.  Your project shouldn't be as difficult as you've made it sound, but just as in any development environment, it will take some work Smiley Happy.  Similar to object-oriented programming languages, you can create subVIs that can be used to modularize your code into "black boxes" and organize things a bit, and this may lessen the "mess of wires."  In fact, in LabVIEW 8.20, a new feature is the ability to do Graphical Object-Oriented Programming (GOOP).  There is a nice article here in case you want to learn about what this adds to LabVIEW, but if you are just starting out in LabVIEW, I would recommend picking up on the fundamentals first.  The following page has some good resources to check out if you are just getting your bearings in the LabVIEW environment.  The LabVIEW Introduction Course (either the 3 hour or 6 hour versions) are great places to start, and are available as free training.  Beyond that, if you would like a training class with an instructor, there are often regional LabVIEW courses you can attend as well.  Take a look at these resources and see if they help you with understanding how you can architect your application.  If you still need help on any specifics, feel free to let us know, and we will be glad to help!

Thaison V
Applications Engineer
National Instruments

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