5
\$\begingroup\$

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?

\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

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.

\$\endgroup\$
4
  • \$\begingroup\$ Ah, I never saw that one, probably because its only active in that menu under certain conditions. I just tried it, but unfortunately it is only half way of what I need (nevertheless useful in a lot of cases). It pops up a window with the results, which are saved in a .mout file. While on the standard .meas commands you can plot them when stepped, this is not possible with the postprocess version. Since the output is automatically put into a file I can probably write me a script that extracts the information and gnuplots it though. \$\endgroup\$
    – PlasmaHH
    Commented Feb 9, 2015 at 15:10
  • \$\begingroup\$ @PlasmaHH I don't know how the .mout file is saved, but if it is a simple CSV like file, I'd recommend KST2 to plot the data. It's quite powerful and supports automatic refresh on changed source files, which might be useful in that scenario. \$\endgroup\$
    – Arsenal
    Commented Feb 9, 2015 at 15:16
  • \$\begingroup\$ It is the same weird not-nice-to-parse format that the measure command output go into the error log. Especially the relation of the parameter steps to the run number is lost and oyu have to manually do this. But at least it isnt a showstopper, with that feature my analysis will be much faster. \$\endgroup\$
    – PlasmaHH
    Commented Feb 9, 2015 at 15:18
  • \$\begingroup\$ That's too bad, well glad I could be of some help at least. \$\endgroup\$
    – Arsenal
    Commented Feb 9, 2015 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.