CamilloN Posted October 24, 2007 Report Share Posted October 24, 2007 Hello there, I got a problem to find a x-point of a signal with de Vi "Treshold 1d Array". The signal i got is a normal Sin-wave. I read the signal from a spreadsheet. The signal starts with a zero-line with a little interferences, so it is not exactly zero And i need the x-point when the Signal is changed. Since now i used the Treshold VI an set the searching point to 0,2 for example. If the signal starts in the positiv half-wave i got no problem, but this chance is also 50:50 that it starts in the negative half-wave. When i start the measurement i don't know how it would look like. Is there a possibility to make a "not equal" with a hysteresis? A possible is that i take the signal the signal reverse it once and use the Treshold to both (reversed and normal) then i look which x-point is lower?? or??? Thanks for your help kind regards Vincenzo EDIT: My signal is looking like this Quote Link to comment
Yair Posted October 24, 2007 Report Share Posted October 24, 2007 I tried reading what you wrote twice, but I'm still not sure I understand what you want. If I did understand correctly, you want to know at which point the signal first changes from "around 0" to the sine wave. Since you have seem to have known absolute limits, I think the easiest thing is to use In Range and Coerce and give it values of 2 and -2. If this doesn't help, you'll need to explain what you want to do better. Quote Link to comment
Neville D Posted October 24, 2007 Report Share Posted October 24, 2007 Vincenzo, threshold 1d array ONLY works for non-descending data i.e., the data set must be increasing. Split the waveform into increasing and decreasing sections. For the decreasing sections, use "reverse 1d array" so that the decreasing sections of your waveform are increasing as well. Note that this will affect the solution index. Apply the threshold to each section, find the x value, adjust the x value if required (if it is from a reversed section of data). Neville. Quote Link to comment
CamilloN Posted October 25, 2007 Author Report Share Posted October 25, 2007 Sorry for my bad english, it is a long time ago since the last time i used it. @ Neville This solution looks really difficult for me to solve. I have made pictures of my signal, perhaps you will understand my problem better. It shoul look like this. i measure the time between the two shown points but here i got a problem. Quote Link to comment
Justin Goeres Posted October 25, 2007 Report Share Posted October 25, 2007 QUOTE(CamilloN @ Oct 24 2007, 12:34 AM) I have made pictures of my signal, perhaps you will understand my problem better. It sounds like you're looking for some single built-in LabVIEW function that just doesn't exist. You can certainly write code to do what you want, but you'll have to build it from the functions you have available. Yen's suggestion to take a look at In Range & Coerce sounds like a good one to me. Note, also, that as NevilleD pointed out, Threshold 1D Array only works with increasing data. If you've got noise in your signal (which it looks like you do) that might prevent the threshold function from doing anything useful. Quote Link to comment
crelf Posted October 25, 2007 Report Share Posted October 25, 2007 QUOTE(Yen @ Oct 24 2007, 03:40 AM) If I did understand correctly, you want to know at which point the signal first changes from "around 0" to the sine wave. Since you have seem to have known absolute limits, I think the easiest thing is to use In Range and Coerce and give it values of 2 and -2. I totally agree with Yen - you need In Range and Coerce: as soon as your signal goes out of range, the Boolean output will flip letting you know that your signal has "started". Although Yen's suggested -2 and 2 range might work, I suggest you make it as small as possible without including the noise on your signal. Quote Link to comment
Neville D Posted October 25, 2007 Report Share Posted October 25, 2007 Vincenzo, you will HAVE to write code for some parts of your application. Try searching for the following two VI's, they may be of some help in locating the pts of interest. Transition Measurements 1 chan.vi Trigger Detection for 1 chan.vi They may not be on the pallets directly, but I have found them probably from the examples or by deconstructing an ExpressVI. No matter, just search the pallets for these two VI's. Neville. Quote Link to comment
CamilloN Posted October 26, 2007 Author Report Share Posted October 26, 2007 Hallo, thanks you all for your help. I think the way you told is right, but i solved the Problem in a other way. I rectifi my signal so i have every time it starts a increasing data and i can use the treshold VI. So my signal looks like this. and i made it like this I think that was the easiest way. Thank you all. Quote Link to comment
Ton Plomp Posted October 26, 2007 Report Share Posted October 26, 2007 QUOTE(CamilloN @ Oct 25 2007, 07:22 AM) Hallo, http://lavag.org/old_files/monthly_10_2007/post-9290-1193289689.jpg' target="_blank"> Or like this: Ton Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.