1

I'm following the example from the top answer of this question.

Here below I exactly do the same thing:

enter image description here

But when I right open Spice Error Log (View -> Spice Error Log), and right click on a place as you see the "Plot Stepped Measured Data" is disabled.

How can I solve this issue?

cm64
  • 2,059
  • 1
  • 16
  • 40
  • Try fixing the warning then moving onto the error if it still occurs. Put a 1M load resistor on output to ground. – Andy aka Nov 28 '18 at 13:44
  • The resistor didn't help:( Does it work in yours? Do you get the same issue? – cm64 Nov 28 '18 at 20:59

1 Answers1

1

Not only your .MEAS is wrong, but I'm used to a different syntax, but you are using undeclared values (n? did you mean t?). Try not to rely on the UI too much and, instead, use the manual, or ltwiki. You would have found out that the proper expression for AVG measurements is (as given in the manual):

.MEAS TRAN res7 AVG V(NS01)
+ TRIG V(NS05) VAL=1.5 TD=1.1u FALL=1
+ TARG V(NS03) VAL=1.5 TD=1.1u FALL=1

Because your directive could not be executed, there were no measured values, and so there's nothing that can be plotted. If you change your .MEAS card to this:

.meas x avg v(x) trig time=t-S/2 targ time=t+S/2

you'll find that it works. Not home right now, but here's the proof:

proof

a concerned citizen
  • 21,167
  • 1
  • 20
  • 40
  • I tried it doesn't work. What is x? I tried ti change x to out and still not working. Still disabled. Could you try this circuit https://i.stack.imgur.com/qp1AW.png and let me see what exactly you write to SPICE directive. – cm64 Nov 29 '18 at 18:12
  • Use your node voltage, `V(out)`, not `V(x)`, you don't have anything like that on your schematic. – a concerned citizen Nov 29 '18 at 18:19
  • In error log it says Measurement "out" FAIL'ed. My directive is now: .meas out AVG v(out) TRIG time=t-S/2 TARG time=t+S/2 – cm64 Nov 29 '18 at 18:22
  • Please if possible try in your LTspice Im curious if it will work for you. – cm64 Nov 29 '18 at 18:23
  • It also says: WARNING: Less than two connections to node OUT. This node is used by V2. .OP point found by inspection. – cm64 Nov 29 '18 at 18:24
  • @cm64 If it didn't work, I wouldn't have posted it. That warning is just a warning, the simulation will work, it's the lac of a terminating resistor for the source, most likely. Can be ignored. Also, your link in the first comment here shows that you are still using `n` as a variable. And the syntax looks ok, it's just I was used to a different one, so it seems to work. `x` is just a name, you have to use it like a variable's name in order for the `.MEAS` to save the result in it. Can be any name you wish. – a concerned citizen Nov 29 '18 at 18:27
  • Yes warning was about the resistor but I still get this Measurement "out" FAIL'ed. Can you write down what exactly your SPICE directive the entire directive not part of it? Im not using n variable I only use this sentence nothing more.: meas out AVG v(out) TRIG time=t-S/2 TARG time=t+S/2 Plot setp meas data still is disabled. – cm64 Nov 29 '18 at 18:31
  • I uploaded my file here http://www.filedropper.com/draft206 – cm64 Nov 29 '18 at 18:34
  • You have no `.STEP` now. At this point you are very careless. If you expect things to work this way, you'll be sorely dissapointed. I've updated my answer. Given my recent edit, all you had to do was to pay more attention when *copying* what the other answer did, and write `t` instead of `n`. – a concerned citizen Nov 29 '18 at 18:40
  • Great it works now. Thaks a lot. Can I use this syntax for moving averages of waveforms from now on ? – cm64 Nov 29 '18 at 18:41
  • @cm64 As the linked answer says, there are more than one way to do it. Whichever one you choose, is up to you. – a concerned citizen Nov 29 '18 at 18:42