Hi Pramod,
Here is a slightly modified method. It retains the time base for the readings by keeping the data in the waveform data type. If you want to use the reading for any math you will need to extract the array of values from the waveform.
The shift registers are the boxes located on the while loop that contain up and down arrows. They are used to retain the value you put in them, for use in the next loop iteration.
Use shift registers on <a href="http://zone.ni.com/reference/en-XX/help/371361D-01/glang/for_loop/" target="_blank">For Loops</a>, <a href="http://zone.ni.com/reference/en-XX/help/371361D-01/glang/while_loop/" target="_blank">While Loops</a>, or <a href="http://zone.ni.com/reference/en-XX/help/371361D-01/glang/timed_loop/" target="_blank">Timed Loops</a> to transfer values from one loop iteration to the next.
Complete the following steps to create a shift register.
- Place a <a href="http://zone.ni.com/reference/en-XX/help/371361D-01/lvconcepts/loops_and_structures/" target="_blank">structure</a> on the block diagram. For example, place a <a href="http://zone.ni.com/reference/en-XX/help/371361D-01/glang/while_loop/" target="_blank">While Loop</a> on the block diagram.
- Right-click the left or right border of the loop and select Add Shift Register from the shortcut menu.
You can use multiple shift registers to <a href="http://zone.ni.com/reference/en-XX/help/371361D-01/lvhowto/using_shift_registers_to_r/" target="_blank">remember iteration values</a> and you can use an initialized shift register to <a href="http://zone.ni.com/reference/en-XX/help/371361D-01/lvhowto/initializing_shift_registe/" target="_blank">reset the initial value</a> of a shift register.
Let me know if I can help with anything else.Message Edited by Sappster on 06-05-2008 03:23 PM
pramod.vi:
http://forums.ni.com/attachments/ni/170/329313/1/pramod.vi