Electronic – Command line simulation using pspice

simulationspice

I'd like to use OrCAD Pspice's "psp_cmd" to do three simulations using only one .cir file.

The problem is that execution of

psp_cmd mycircuit.cir

creates only one data file named mycircuit.dat containg the data alltogether.

I'd like psp_cmd to export three different simulation runs into three different data files. Is this possible?

Note that each job in the cir file is separated from the others with an .end.

Best Answer

It is possible to automate simulation runs with (p)spice. The magic keyword is "shell scripting". This is easy to do on Linux, but a bit harder with PSpice on Windows. If the PowerShell in Windows is not your cut of tea, you may want to look into Python (windows shell script howto here). If you don't need flow control, you can write a batch file. My advise for tasks to be automated: switch to Linux and use the original spice, ngspice or gnucap.

Related Topic