10-10-2008 06:04 AM
Hello UliB![]()
thanks a lot for the helpful vi you have sent for me ,but can you help me more to solve it all?pls?
in the vi
the ith element is continuously running ,,i want to calculation for each element separately,
i want to have the 1st element as x ,and subtract it from 2nd,3rd,4th,...And so on ,by this i want to see after how many sample(element),element are repeating,
to make it more clear :
the array elements are the signal samples,i want to determine the period for the signal via labview,
i thought if i can see after how many sample the cycle is repeating ,i can calculate the frequency
please have a look at vi below:
10-10-2008 06:31 AM
Tinamoli,
i just have to step in here to clarify your question:
There is no other purpose in your application than determining the frequency?
Norbert
10-10-2008 06:53 AM
To UliB,and everybody
i am doing a project, which i measure the ECG(electrocardiograph) from a patient and transmit it to the cardiologist(physician) via the internet by webpublishing in labview,
i want to send the parameter as well as the waveform ,like(P wave.QRS complex,....)period and amplitude,.....etc.
for this as a test i determined the sine samples in an array as shown in vi below ,then i thought if i know that after how many sample(array element),the samples are repeating ,i can calculate the period for one cycle,,
10-10-2008 09:12 AM
tinamoli,
sadly you did not answer my question.
tinamoli wrote:[...]i can calculate the period for one cycle[...]
I take this part i quoted as "Yes, the only thing i want to know is the frequency, at least for now".
And whatever you try to achive by your array-question, it is not the way to get to the frequency.
In order to find out the frequency of a periodic signal of any type, the Fourier-analysis is the way to go in general. There are modification for certain areas, but Fourier is still the reference.
LabVIEW gives you many functions at hand to do a frequency-analysis. Most of them can be found in the waveform measurements palette.
hope this helps,
Norbert
10-10-2008 11:56 AM
timamoli,
I don't know why you keep asking the same question over and over again about an incorrect technique to determine frequency or period. You were give the correct answer here.
Since you are doing biomed, you should look at what is already written and stop trying to reinvent the wheel. You should also spend some time with the tutorials since a lot of your questions are really basic LabVIEW fundamentals.
10-12-2008 07:27 AM
Hello UliB,
You are the only one ,who understood my question,and solved my problem.The vi you have sent to me is really what i want ,but i need to add one more stage to it.
How to access the ith element,for example to keep array[0] (first element ) in a variable,and then array[1] and so on......
please,what i found you know how to do this ,and you can help me ??![]()
10-12-2008 10:34 AM
tinamoli wrote:How to access the ith element,for example to keep array[0] (first element ) in a variable,and then array[1] and so on......
To acceess the i'th element of an array, you use still use "index array", but wire the desired index to the index terminal.
If this is in a FOR loop, you can autoindex the array at the loop boundary, and you will get one element with each iteration automatically. First iteration gives array[0], second iteration gives array[1], etc.
The output wire will contain array[i], so there is no need for "variables", whatever you mean by that.
(Since UliB already showed you all this above, it is not clear what else you need. Still, none of this allows you to easily measure frequency.) 😉
10-12-2008 02:49 PM
Hello tinamoli,
I have nothing to add to altenbach's reply, but I give you another sample VI.
And... I want to underline altenbach's statement: the wire is the variable.
Hope this helps.
Uli
10-12-2008 05:18 PM
Thank you UliB,
I really appreciate you for the real help,,,i wish you the best10-12-2008 05:40 PM - edited 10-12-2008 05:41 PM
You always operate on arrays, not on single values. For example, you can do your entire "algorithm" on the array directly and then use search array to find the position of the first TRUE.

Also your use af a cluster is very misguided. Why is it there???
Still, this is NOT how to measure the cycle lenght. trust me. 😉