Taking parameter from external text file

I want to use parameters that resides in a text file that another program can create (such as MATLAB). Can it be done with Qspice? Thank you.

Hi, Daniel.

You can use C-Block components to read data from a text file and convert that to voltages on component output ports.

Information about creating/using C-Block components is available on my QitHub QSpice respository,

Hope that helps.

–robert

SPICE simulation always executes a netlist. A schematic is just a GUI, and when you hit “run schematic” from the Qspice GUI, its first step is to convert it into a netlist. The .inc directive can include a file during netlist creation, allowing you to create a text file to write parameter values from a file.

4 Likes