I need to know the exact time (+/- 1 mS) that the relay takes to switch from open to close or vice versa. That means that I need to monitor bouncing time and be able to determine when relay stops bouncing and the time that it takes to stabilizes at its close or open position (switching time). Do you have any sample code, even if it is for other scopes; I am just looking for the technique to do this measurement right. Thanks again,
Here's the basics of what I was thinking. It uses the Get Waveform Subset function inside a loop. It keeps changing the start index of the waveform subset, gets the Y array, gets the max value, and checks the value using the In Range & Coerce. You could just as easily use the Less Than or Equal. This is of course, assuming that you are looking for a 5V to Gnd transition. The loop will terminate when the condition is met. You would then use the index value (the i value) to determine the time at which this condition was met. You would want to add some more code to terminate the while loop if the condition is never met. If you could do an actual acquisition of a relay closure and post the waveform of that, I or someone else could experiment with some real data.
Message Edited by Dennis Knutson on 10-08-2007 11:13 AM
Thank you Dennis!
This is a good starting point; I will try and advice results later on. I will post more info as you have suggested above. Thanks again!