LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMPORTANT PIEZO TUBE QUESTION

For a Piezo tube I need to input 10 volts gradually to x terminal and once 10 v reached, it drops down to 0v. That finishes one cycle. However, sample sizes need to be multiples of 128 and I need 1ms wait times in between each sample, e.g. when x reaches 1/128 volts, wait 1 ms etc. The y graph starts the same time as x, when x finished 1 cycle (reaching 10 v and down to 0), y is a horizontal line at 0v. After x finishes the 1st cycle, the x graph is constant at 0 while y goes up to 1 volt. This process continues until y reaches 10v and x finishes 10 cycles. The entire program should finish at the same time (scan time).

I have labview 6.1 and ni-daq 7.0

THANKS



-Attached is a graph displaying this process

0 Kudos
Message 1 of 10
(3,380 Views)
I miss the IMPORTANT PIEZO TUBE QUESTION Smiley Wink


Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 10
(3,372 Views)
whoops, sorry,
i'm programming a piezo tube (so digital input, analog output) to move according to voltage input. I initially have to input 10 v ino the x terminal (constituting one cycle) and then input 1 volt along the y terminal (My above description is better...the jpeg illustrates this process graphically). I was mainly wondering how to make such a process occur. An even more perplexing issue is how to deal with the small wait times IN BETWEEN SAMPLES (e.g., if i use a signal generator sawtooth wave and set my sample size to 128, I need wait times in between each of those samples to make sure the machine operates smoothly).

Thanks!
0 Kudos
Message 3 of 10
(3,360 Views)
Hey Shummit,

From what I understand, you need a sawtooth waveform with 1ms between each sample. This is easily achieved by setting the sampling rate of your Analog Output. If we set the sampling rate to 1000Hz this will generate 1000 samples/second or 1 sample/millisecond. There is an example in the NI Example Finder that will serve as a great starting point for this application using the Traditional DAQ driver. You can access it in LabVIEW at Help » Find Examples » Browse according to Directory Structure » daq » anlogout » Function Generator.vi.
 
Please let me know if you have additional questions.


Message Edited by Chris_D on 06-25-2008 05:46 PM
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 4 of 10
(3,321 Views)

Chris,

Thanks much for the sample rate info.

But, I don't know if this translates directly into WAIT TIME between samples. So, if we had 128 samples, then we would need 127 places where the graph (volt value) remains constant for a small time interval (e.g., 0.1 ms). Is this achievable?

Thanks

Shummit

0 Kudos
Message 5 of 10
(3,298 Views)
Hey Shummit,

This should directly translate into your "wait time". When you generate one sample, the device will hold the same voltage until you generate a new sample. Setting the sample rate to 1000Hz will hold the value of each sample for 1ms before outputting the value of the next sample.
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 6 of 10
(3,284 Views)

Thanks Chris. appreciate your help.

The next step is I have to do the reverse process. I have to make a grayscale graph that captures all of my data points. I need to read all the incoming analog data, convert the current into readable voltage units, and place it in an array (if that's the best way) or another construct.

After I capture all the data, I need to plot it into a grayscale graph, with the x axis marking the distance the Piezo moved along the x terminal and the y axis marking movement along the y terminal (100 microns max for each). Also, I need to plot all the voltage values that were read (from -10v to +10v, including fractional values). Essentially, the (-10,-10) coordinate should be black and the (10,10) coordinate should be white. I wasn't quite clear how to link the input voltage values with the degree of grayness on an intensity graph.

Can you please direct me with the steps and pointers to the manuals on how to go about this?

Thanks again,

Shummit

0 Kudos
Message 7 of 10
(3,251 Views)
Hey Shummit,

There is another DAQ example that would be a great starting point for this application. You can check it out in LabVIEW at Help » Find Examples » Browse according to Directory Structure » daq » anlogin » Cont Acq&Graph (buffered).vi. This example reads data in on an analog input channel and plots it on a graph. You should be able to replace this graph with an intensity graph. As far as a manual goes you can of course get much more detailed information in the Tradition NI-DAQ User Manual and the LabVIEW Help.

Traditional NI-DAQ User Manual
http://digital.ni.com/manuals.nsf/websearch/74E3CF846234B47E86256CB7005DF156
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 8 of 10
(3,227 Views)
Thanks Chris for all your help.
 
I used the Cont Acq&Graph (buffered).vi and placed an intensity graph in for the waveform graph and managed to wire everything correctly. However i have 2 main problems:

1. New Units - I want to have the x and y axes measure the total distance traveled by the piezo in microns and the z scale to measure the intensity of the voltage. How would i do this?

2. Array - I want to create an array which can read all the incoming voltage values read from the daq, and correlate them to the micron distance moved by the piezo (on either the x and y terminal). the rate for my piezo is 14microns/1volt. Would my array be 100x100 (100-dimensional array) with the elements representing the voltage values and the indices representing the x and y movement?

Again, thank you very much for helping me with this problem
0 Kudos
Message 9 of 10
(3,185 Views)
Hey Shummit,

For new units, you will have to scale your data. The can be done easily by using a custom scale in a Virtual Channel using the Measurement & Automation Explorer (MAX) or also by manually adjusting the data.

What Are Custom Scales, and How Do I Use Them?
http://digital.ni.com/public.nsf/allkb/0464919A11C092E386256D800079C3BB?OpenDocument

What Is a Virtual Channel and How Do I Create One?
http://digital.ni.com/public.nsf/allkb/31c55e253b023189862569850068b8ae

To manual scale the data you will have to extract the data from the waveform data type. This may be better suited for the custom graph you are trying to create. There is a LabVIEW VI called Get Waveform Components which will convert the Waveform to an array of Y data, a t0 value, and a dt value. After extracting the Y data you can multiply it by 14 to get microns and then combine it into a 2d array (100x100) to send to the graph.
Regards,

Chris Delvizis
National Instruments
0 Kudos
Message 10 of 10
(3,109 Views)