ra3xdh / qucs_s

Qucs-S is a circuit simulation program with Qt-based GUI
https://ra3xdh.github.io/
GNU General Public License v2.0
886 stars 115 forks source link

Library with User selectable parameters #1101

Closed tomhajjar closed 4 days ago

tomhajjar commented 4 days ago

I'm trying to make a Library but I'm having issues adding User selectable parameters to a "Spice netlist" device. I searched but can't find any example of doing this. Adding User selectable parameters to a "Spice library" device works BUT they can't be made into a Qucs Library.

First device is a PBRS 7 generator. Long term goal is to add "Systems Analysis" capabilities to Qucs-S. This will also add value to Ideal.lib and Xanalogue.lib which I doubt many use.

2024-11-27_204129 2024-11-27_204322 2024-11-27_213542 2024-11-27_213522

PBRS7_subcircuit.zip

ra3xdh commented 4 days ago

I am aware about this limitation. SpiceFile device doesn't support parameters. The .PARAM will have no effect in this case. Wait until the SpiceLibComp extensions #944 will be implemented. There is no workaround.

tomhajjar commented 4 days ago

AFAIK under the "Qucs way" of making sub-circuits, for sub-circuits "calling" external Spice models, User definable parameters MUST be on BOTH the schematic sub-circuit and symbol sections. On the schematic, param=param and on symbol param=value.

For sub-circuits not "calling" external Spice models, only the Symbol section must have the parameter info.

Will this be the "new" method as well?

2024-11-28_104834 2024-11-28_104855 2024-11-28_104914

Parameter_Passing_prj.zip