10-28-2005 12:01 PM
10-28-2005 12:02 PM
10-28-2005 12:05 PM - edited 10-28-2005 12:05 PM
Try this:
Right-clik on the leftmost shift register and select "create constant". You have the shift register uninitialized, thus it retains data from previous runs. Now repeat the same with the blue shift registers in the second FOR loop and the last shift register in the last FOR loop.
(Of course a simpler version would be as follows:

You can just built the array at the loop boundary. Other possibilities would be to use autoindexing and a shift register on the input, then subtract the previous from the current value, the use of decimate array, etc.)
Message Edited by altenbach on 10-28-2005 10:13 AM
Message Edited by altenbach on 10-28-2005 10:16 AM
10-30-2005 09:11 AM
10-30-2005 09:16 AM
10-30-2005 12:02 PM
10-30-2005 08:16 PM
hi,altenbach
it very nice to get your reply.thank you
in fact using the same subvi twice but with a different name is because i thought with different name will have different memory management, so the Data repeat will be avoid. so it's a weird thinking![]()
to the formula of normalize a sine, i emplyed a very simple way, firstly, i get the raw data with noise (hi-frequency) via a A2D card.
then i use a low pass filter to make the raw data smooth, in fact the raw data should be a sine wave though they are always not due to all kinds of extrinsic cause. so we need to normalized the unsine signal for the next step to get the phase information through two different sine wave(we call differential phase) acquiring from two different analog channel of A2D.
to normaliz the sine, i just find the max and min points and divide the original array to several zones according to the position of max and min indexs.
then use the x-min/max-min(x is the value of every point in some zone)to normalize the sine wave to vary between 1 and 0. the lase step is to make the two sine normalized wave to have the same length.that's all ![]()
if you have a better way, or any unclear . pls tell me...
thank you very much again.
scott