So this is a somewhat complicated question... I am trying to run a .op simulation (DC operating point), using the .step command to iterate through a bunch of component values. I would like to save the output as a series of text files. Information that must be saved for each run:

  • the component values in each .step instance
  • the corresponding voltage at a specific node

Each run can be output in a separate text file, that's fine, but if it's possible I would like to just have 1 text file with the key info from each run separated by a few lines.

Is this possible?


So I've been trying to use the .meas command to print data to the error log, but it doesn't seem to work as advertised and I don't understand why. Here's an example of a resistor divider where I step one of the resistors and want to print the divider voltage values. For some reason .meas doesn't output the requested data?

R1 Vout 0 {rVariable}
R2 N001 Vout 1k
V1 N001 0 1
.step param rVariable list 1k 3k 9k 12k
.meas V(Vout)


OK, I have just now figured this out. Here's what I did:

  • I ran the stepped simulation for the operating point.
  • I then selected the graph drawn by the .meas command.
  • Going to the File menu, I selected "export" and then V(Vout)
  • This generated a txt file with the data points I wanted.

Unfortunately this doesn't seem to actually output the variable selected by .meas yet, but I'm confident that that can be solved soon.


Well, I've did some more reading and found people claiming that the .meas command doesn't work with the .op command, it has a bug and will only print the last value from a .step sequence. Is this true? Does anyone know of a workaround for this problem?

  • 1
    \$\begingroup\$ Is the .meas command helpful? \$\endgroup\$
    – PlasmaHH
    Commented Oct 25, 2016 at 19:29
  • \$\begingroup\$ @PlasmaHH is correct. You can see the results of the measurement in the Error Log (Ctrl + L from memory). \$\endgroup\$
    – Matthew
    Commented Oct 25, 2016 at 19:39
  • \$\begingroup\$ OK, I am reading up on this command. I will let you know how it goes. Thanks for pointing me in the right direction! \$\endgroup\$ Commented Oct 25, 2016 at 19:52
  • \$\begingroup\$ After the .meas you can read the log file (Ctrl+L), then RClick and select "Plot stepped data". After plotting, if you so desire, you can also export your waveform as data. \$\endgroup\$ Commented Oct 26, 2016 at 7:06


Your Answer

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

Browse other questions tagged or ask your own question.