11-23-2011 04:48 AM
Hi all.
I have a difficult problem. It is a little hard to explain but I will give it a chance.
I would like to make
1. Each sample goes into a loop.
2. Then the loop must check whether the next sample in the array is within a range of plus / minus 3 y-values of the prevoius samples y-value.
3: If true then check next sample
4: If false (value is higher than plus/minus 3 y-values) it must reshape the sample value as the previous sample value.
Does it make sense? I would like the algorithm to serve as a kind of error detector.
Could anyone help me. I'am not quite familiar with LabVIEW.
Thanks!
Solved! Go to Solution.
11-23-2011 04:52 AM
Use a for loop, auto indexing, and a shift register. This sound like school work. So will not just hand over things. But feel free to post a VI. Showing at least that you have given it a try
11-23-2011 05:13 AM
Hi.
I'am in internship so yeah you can say it is a kind of shool work. But it is not like I haven't given it a try. I have sat for a few days now with this problem and as I mentioned I'am not used to work with LabVIEW and therefore not familiar with the various tools. But I think I'm learning 🙂
I just can't figure this out. You are welcome to see my VI.
Maybe you could give me a hint.
Thanks
11-23-2011 06:04 AM
Hi clausny,
you already got a solution (atleast you marked it so) in your other thread.
What has changed since then (apart from the range limits)?
11-23-2011 06:30 AM
Hi GerdW.
This time a just want to get more precise. The solution you proposed were ok, but in some cases not good enough. So now I got this new idea but I just don't know how to make it.
I would like that every each sample is checked against the last preivous sample. This time not only the samples that exceeds a given threshold.
1. Each sample goes into a loop.
2. Then the loop must check whether the next sample in the array is within a range of plus / minus 3 y-values of the prevoius samples y-value.
3: If true then check next sample
4: If false (value is higher than plus/minus 3 y-values) it must reshape the sample value as the previous sample value.
11-23-2011 06:47 AM
Hi clausny,
so all you need is one more shift register to get the previous sample and some little math (subtract) to get the difference between current and previous sample!
Is this so complicated?
Also step 4 isn't well defined. Should the loop stop at false case or continue with step 2?
11-23-2011 07:02 AM
Well yes I think it's complicated.
I don't think I can use the "In range and coerce" for this. Can I? Because I can't take that last value and then make this plus/minus 3 interval for the given sample.
Step 4: It should continue with step 2.
11-23-2011 07:08 AM
@clausny wrote:
Well yes I think it's complicated.
I don't think I can use the "In range and coerce" for this. Can I? Because I can't take that last value and then make this plus/minus 3 interval for the given sample.
Step 4: It should continue with step 2.
You have made a good descriptions of your problem. Why do you not just follow your own description step by step.
11-23-2011 07:16 AM
Well I'am really trying!
Can you tell me how to make this interval of +/- 3 y-value for each value?
11-23-2011 07:19 AM