Editor Mode in Spice netlist Deos not work on an iPad (M1 iPad Pro 12.9)
Hi,
I'm using an iPad 12.9 (M1) and CircuitSim works fine. But it is Not possible to use the Editor to introduce .param text in the SPice netlist. There is always the error message "This Netlist is automatically Generator ...". I cannot make any change or additions.
Is this intentional behaviour? How can I add a .param or other spice directives?
Stephan
Hey Stephan,
Thanks for using CircuitSim!
The SPICE netlist is directly editable if you have not created a Schematic, but as you noticed the SPICE netlist generated from a Schematic is read-only. This is because we can't easily sync edits made in both the schematic and the netlist.
We have a couple options here.
1. You should be able to copy and paste the SPICE text from your existing schematic based circuit and paste it into a new circuit and edit it directly. This is kind of clunky but should work right now.
2. We can add a 'custom SPICE' section to the SPICE panel that allows you to add custom SPICE text that will be inserted into the netlist before it is passed to the simulation engine. Would that work for what you're trying to accomplish?
3. When you create a custom component you can define the SPICE model for that component, so you could create a custom component with your custom SPICE directives and place it in on your Schematic. This could be useful if you want something reusable that you can quickly drop in any schematic but it will be a lot of overhead for a simple line or two.
Let me know what you think. I'm going to start work on option 2.
-Sam K
Hey Stephan,
Here is a demo of option 2. Should be live shortly.
Hey Sam,
amazing. Thank you for the real quick solution. Im will check it out and give you some feedback.
Stephan
Hi Sam,
I added the following in the 'custom SPICE' section: .param C_B=5n
In the circuit I want to use this parameter to give several capacitors (e.g. C12) the same capacitance by using {C_B} as value in the properties (Capacitance).
But it seems the circuit does not know or recognize the parameter which I have inserted in the custom SPICE section.
I made the circuit public: EMC Filter DC Full
Any idea?
Stephan
Hey Stephan,
Custom SPICE directives are not accessible from the schematic like that currently. I like the idea of supporting variables and have started working on this. You will be able to create variables in your Circuti and assign values, then use those variables in component parameters.
The screenshots below show how I can create a variable baz, assign it 3M and then set the resistance value for R2 and R3 to {baz} and they are both 3M. Changing the variable value will update both components.
This will not be ready for a few days since it's Thanksgiving Holiday in the US. Please let me know what you think.
I'm also curious to learn more about what you're trying to do. You've already inspired a couple cool features but I want to make sure we are actually helping you achieve your goal :D.


Hi Sam,
having the variables on hand within the circuit is much better than having them in the custom spice file. I'm using circuit sim to simulate circuits which are defined in standards for EMC-testing. To have a result which is near to the values which I can measure in the lab I need to twist the parasitic parameters (which are not in the printed in the circuit and for which no values are given). And since I'm sometimes a bit lazy it's much more convenient to modify one variable value instead of clicking on 5 capacitors, modify the values and then start the simulation again. So it is not a function which is extremely essential(I can always work around by modifying the values of the components directly.), but if it's there, it's good to have the functionality.
And there is absolutely no hurry. So, enjoy your Thanksgiving without any time-pressure. Hope you are not affected by the weather conditions.
BR
Stephan