Failing to find a model for a momentary-contact pushbutton switch, I tried to see if I could use LTspice's voltage-controlled switch. (See attached .asc file.) I failed.
Problems:
1. The VCS seems to be undefined when plopped down in my circuit. When I try to run the simulation LTspice complains that it "Can't find definition of model "SW". Select OK to continue the simulation with the default model or Cancel to quit now." OK, fair enough; I click OK.
It runs, but I get an error message:
Error on line 2 : s1 n003 n001 n002 0 sw
Unable to find definition of model "sw"
WARNING: Node N002 is floating.
Per .tran options, skipping operating point for transient analysis.
I'm puzzled about node 2: why does it say it's "floating"? Because it's got a capacitor connected to the input of a DC device? When I plot the voltage I get a flat line at 12 volts; shouldn't I see an exponentially-decaying voltage through C1?
Color me confused.
Problems:
1. The VCS seems to be undefined when plopped down in my circuit. When I try to run the simulation LTspice complains that it "Can't find definition of model "SW". Select OK to continue the simulation with the default model or Cancel to quit now." OK, fair enough; I click OK.
It runs, but I get an error message:
Error on line 2 : s1 n003 n001 n002 0 sw
Unable to find definition of model "sw"
WARNING: Node N002 is floating.
Per .tran options, skipping operating point for transient analysis.
I'm puzzled about node 2: why does it say it's "floating"? Because it's got a capacitor connected to the input of a DC device? When I plot the voltage I get a flat line at 12 volts; shouldn't I see an exponentially-decaying voltage through C1?
Color me confused.