Jump to content

Treshold 1d Array


CamilloN

Recommended Posts

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

post-9290-1193142180.jpg?width=400

Link to comment

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.

Link to comment

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.

Link to comment

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.

post-9290-1193211175.jpg?width=400

It shoul look like this. i measure the time between the two shown points

post-9290-1193211198.jpg?width=400

but here i got a problem.

Link to comment

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.

Link to comment

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.

Link to comment

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.

Link to comment

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.

post-9290-1193289663.jpg?width=400

and i made it like this

post-9290-1193289689.jpg?width=400

I think that was the easiest way.

Thank you all.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.