Electronic – How to run new .meas commands without having to rerun the whole ltspice simulation

ltspicesimulation

I am trying to analyze a circuits properties over a certain range of component values, e.g. a PWM circuit for various settings of the control pot. For this I create a bunch of .meas statements, and graph them.

Now it happens that I am either making mistakes in the .meas commands or am interested in different properties. What I am currently doing is to add more .meas commands and then rerunning the simulation. For multiple stepped parameters in circuits that run at speeds of a few µs/s over many ms, this takes awfully lots of time.

After running a sim, the data is already there, so in theory it should be possible to just run another .meas on the already existing data. But I can not find any way to do so.

Is there none? Or did I just not find it?

Best Answer

I've never used it, so I cannot give more details.

After the run, if your plot window is active, there is a point available:

File -> Execute .MEAS script

From the LTSpice help:

.MEAS statements are done in post processing after the simulation is completed. This allows you to write a script of .MEAS statements and execute them on a dataset. To do this, make the waveform window the active window and execute menu command File=>Execute .MEAS Script. Another consequence of .MEAS statements being done in post processing after the simulation is that the accuracy of the .MEAS statement output is limited by the accuracy of the waveform data after compression. You may want to adjust the compression settings for more precise .MEAS statement output.

So you are correct, the data is all there and the statement is just performed on the available data set and nothing special happens during the simulation.