On 06/05/2025 14:39, Andy I via
groups.io wrote:
Comparing a waveform with a precise value can sometimes be
tricky, especially when there is ringing or other noise.? I do
not know if this helps, but you might need to add guard bands
around the signal used to trigger the .MEAS commands.? For
example:
?
... TRIG
I(L_filter_dc)<50m ...
?
or something like that, rather than testing for I(...)=0.? It
might affect the accuracy of the measurement, so choose the
values carefully.? Basically you are trying to tell a computer
to do something that you can "see" by looking at it, except that
the waveforms are not perfect.
This isn't right. You can only test for exactitudes with .MEAS, not
inexactitudes.
The .MEAS trig? targ? syntax may be elegant and efficient, but it is
hard to debug. It's usually simpler, and much easier to debug, to
split the trig and targ conditions into two separate meas tests,
then add a third that uses the results from those, e.g.:
.MEAS StartTime when V(out)=0 rise=1 td=100n
.MEAS StopTime when V(out)=0 rise=2 td=100n
.MEAS Vavg avg V(out) from StartTime to StopTime
Here's 2 cents.
--
Regards,
Tony