LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Edge detection of a measured waveform

Solved!
Go to solution

Hello,

 

I am trying to detect the edges of a measured waveform. My ideas using peak detection or a threshold did not work. Attached you will find an example of a waveform. I try to find edges, marked with a cursor.

 

I would be very glad if anybody has a good idea.

 

Thanks a lot.

 

Best regards,

Michael

0 Kudos
Message 1 of 4
(7,623 Views)

Basic Level Trigger Detection is your friend:

 

The grey VI in the middle (BLTD) is found in the Waveform palette under Analog Wfm > Measurements > Wfm Monitoring, and can find the crossing index (or time) past a level (plus hysteresis for noisy signals),

 

cursor.png

---
CLA
0 Kudos
Message 2 of 4
(7,618 Views)

Thank you for your reply,

 

but with your solution I am only able to detect the rising of the signal or do I understand something wrong. My problem is to detect both edges, the lower and the higer one (see the red circles in the attached picture).

 

Best regards,

Michael

0 Kudos
Message 3 of 4
(7,598 Views)
Solution
Accepted by topic author MichaGue_01

You can change the enum for the edge detector VI to detect rising or falling edges. You only have rising edges in your current signal, so you could find the mean low signal and mean high signal and find where the data crosses this in both places. I've moved the thresholds by 0.001, but you'd need to set an arbitrary crossing threshold so that it isn't triggered by noise.

 

cursor2.png

 

Alternatively, you could use the Transition Measurements VI in Waveform > Analogue Wfm > Measurements. This VI allows you to specify the thresholds as percentages of the transition (or absolute values) and find the start time and end time of the transition.

 

cursor3.png

 

Again, be careful with the effect of noise in the high/low states if you're trying to measure transition points near to the high/low levels.

---
CLA
0 Kudos
Message 4 of 4
(7,577 Views)