From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Piezo Actuator with LabVIEW

Solved!
Go to solution

Hello,

 

I've just recently started learning LabVIEW and I have a few questions concerning a program I am working on.  I need to be able to input a ramp signal to a piezo actuator and measure the resulting signal from the internal sensor of the piezo actuator.

 

I am using the following equipment:

 

1.  NI PCI-6110 DAQ Card

2.  NI BNC-2110 Connector Board

3.  P 845.60 Piezo Actuator (http://www.physikinstrumente.com/en/products/prspecs.php?sortnr=101200

4.  E 509 Signal Conditioner (http://www.physikinstrumente.com/en/products/prdetail.php?sortnr=602500)

5.  E 505 Amplifier (http://www.physikinstrumente.com/en/products/prdetail.php?sortnr=602300)

6.  LabVIEW 8.0

 

I modified a program I found on a different thread (http://forums.ni.com/ni/board/message?board.id=170&message.id=137810&query.id=843435#M137810) to input a ramp signal followed by a constant signal.  The user can designate the amplitude and time duration of the ramp signal as well as the time duration of the constant signal. 

 

I've also attached a screenshot of the front panel after I run the program.  The white plot on the Waveform Graph is the input and the red plot is the output from the sensor.  The Error graph simply plots the absolute value of the difference between the input and output.

 

My questions are:

 

1.  Is there a way to reduce the error between the input and output?

2.  Is there a way to view the waveform graph in real time?  Right now the graph shows the data after the program stops running. 

 

Thank you,

Joel

Download All
0 Kudos
Message 1 of 5
(4,911 Views)

Hi Joel,

 

The error that you are seeing is, more than likely, a result of the compound error of your system.  I think the only way to reduce that is to get components with a smaller relative error.  There are also losses associated with a system like that, so the error may just be a result of the real world variables (wire resistance, electrical losses etc.).

 

As for faster updates, right now you are creating an array and outputting the array to a waveform graph.  The graph doesn't update until you finish the array.  You should use a waveform chart, and wire the individual values to it instead of building an array. The waveform chart has a history, which means it can accept individual points.  That should give you faster updates.

Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
Message 2 of 5
(4,878 Views)

Hi NAKeel,

 

Thanks for the reply.  I used a waveform chart and it works.

 

Regarding the first question, I understand there will always be an error due to the physical setup but is there a way to program a closed loop feedback system so the output will match the input more closely?

0 Kudos
Message 3 of 5
(4,869 Views)
Solution
Accepted by topic author j2park

Hi Joel,

 

You could use PID controls to reduce the error.  Do you have the PID toolkit?  Go to the example finder and do a search for PID to get some useful example VI's that should help you do what you need.  Since you are already calculating error you could do a manual feedback where you multiply your error by a gain factor (you will have to do trial and error to find the right gain factor for your system) and then add it to your output.  It would be easier if you had the PID toolkit though.

Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
0 Kudos
Message 4 of 5
(4,852 Views)

Hi NAKeel,

 

I don't believe I have the PID toolkit but I searched PID in examples and found a couple.  If those don't work I'll just add manual feedback like you said.

 

Thanks for all the help,

Joel

0 Kudos
Message 5 of 5
(4,840 Views)