07-29-2016 08:40 AM
I'm trying to write some vbscript to automatically adjust the x-axis limits of several waveform channels. They all start out with a few seconds of nothing, and then an event happens, like what is shown here:
So, what I want to do is sense when the y-axis value crosses a threshold (say 4V in the case of this one) and get the time at which it does that. Any help would be greatly appreciated.
07-29-2016 02:19 PM
Edit:
I got it to work using the ChD command like this:
While j < 4 'threshold
j = ChD(k, "ChannelName")
k = k + 1
Wend
which works fine, but obviously take a very long time when you're checking 30 channels which each have nearly 1 million samples. If anyone knows of a command that does this more efficiently, I'd still love to know.
08-02-2016 02:13 AM
Hi gam2498,
Take a look at ChnFind command:
Dim intMyResult intMyResult = ChnFind("Ch(""ChannelName"")>4") ' 4 = threshold
Hope this helps.