Error in .meas statement

Hi all,

I was measuring the pulse width (ton), off-time (toff), period, and duty cycle of a waveform on node C1 using the following .meas statements:

.meas tran ton_vc1_top2 trig V(C1)=14.99 rise=4 targ V(C1)=14.99 fall=4
.meas tran toff_vc1_top2 trig V(C1)=14 fall=4 targ V(C1)=14 rise=5
.meas tran period_vc1_top2 trig V(C1)=14 rise=4 targ V(C1)=14 rise=5
.meas tran freq_vc1_top2 param 1/period_vc1_top2
.meas tran duty_vc1_top2 param (ton_vc1_top2 / period_vc1_top2) * 100


Problem: ton and duty cycle are negative, which doesn’t make sense.

Has anyone else encountered this issue? Any additional tips for reliably measuring pulse widths with .meas in Qspice?

fall=4? What about fall=5.

1 Like

Yes, it is showing correct now, I think the reason is first rise is seen after the first fall. If i am not wrong because C1 waveform doesn’t have rising edge at t = 0+.
Thanks @KSKelvin

1 Like