Spice - Variable Resistor

I used LT Spice in the past and tried to switch to the KiCAD spice implementation. But I currently struggle to implement a variable resistor that would work that way in LTSpice. I tried two methods:

  1. R=100+10*time fails because it says this statement is invalod
  2. using a variable voltage source also fails:

    As you can see here it also says that no compatibility mode is selected, even though I selected LTSpice as compatibility mode.

Can someone explain me what I’m doing wrong here? Thanks!

You may have a look at the spice netlist sent to ngspice by
Eeschema-->File-->Export-->Netlist...-->Spice-->Export Netlist
You will see that there is no node ‘res’, but a node ‘/res’. So probably v(/res) would be o.k.

The B source does not have parameters dc, ampl, f (see ngspice manual chapter 5.1)

R=100+10*time has to use ', so R='100+10*time' (see ngspice manual chapter 3.3.4). time is available only for transient simulation.

1 Like

thanks a lot! I will give it a try and check out the docs.

But it seems like the compatibility mode is broken

The compatibility mode does not imply that all modes of the other simulator are supported.

1 Like