1
\$\begingroup\$

I have used .meas expressions to calculate harmonic values in LTSpice. The problem is that these are now in the error log and I cannot export them. Is there a way to export error log values in a .csv file for example? Is there a better automated way to calculate harmonic values?

\$\endgroup\$
  • \$\begingroup\$ If it's about harmonics, may I suggest using .four? The results are also reported in the error log, but cannot be plotted. They can be copy-pasted, though, formatted. \$\endgroup\$ – a concerned citizen Nov 16 '17 at 8:15
0
\$\begingroup\$

The SPICE Error Log actually only shows the contents of the corresponding error log file.

If your project is named X:\Foo\Bar.asc then the error log will be stored in X:\Foo\Bar.log. The location of the output files can be changed globally in the Control Panel.

This file can be parsed using a scripting language of your choice. I do not know if there is a way to automatically export just the relevant measurements in a more convenient way.

You can use the LTspice feature to Plot .step'ed .meas data, which will create a file named X:\Foo\Bar.log.raw, but I do not think that is more helpful. You can opt to use ASCII data files in the control panel, to make these graphs readable, but remember to disable all waveform compression if you take this route.

\$\endgroup\$
0
\$\begingroup\$

I ran into similar issues and wrote a log file parser which outputs a csv file. It is a Python script called ltparse.py and can be found at my GitHub https://github.com/realtime/python-tools

usage:

python ltparse.py results.log

outputs results.csv

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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