hi 678,
The Roff value of 1meg means that the 'switch' is equivalent to a 1meg resistor, so if use a high impedance voltmeter you will measure close to the input voltage to the switch.
Try a Roff = 100meg.
As V2=0, Interrupteur2 is OFF. However, as V5 = 1V, this 1V will be fed via 1Meg (the OFF resistance of the switch) to Output2. Try putting a load resistor (say 10k) from Output2 to ground.
It makes no sense to use a switch that way. In the real world, the output node would be tied to some sort of load, the other end of which would be tied to a voltage source, or ground... Only if there is a load on the switch will you see a voltage change at the node as the switch opens and closes... For example:
You will understand the Spice switch component only when you can explain why it switches when V(s) changes sign, and why V(out) is only half of V(in) when the switch is closed...
With the load missing, can you see why V(out) is identical to V(in), regardless of the switch state?
hint: you don't even need to know what the default Ron and Roff are.
I have a similar problem to solve. May you help me how to connect switch/es to control Capacitor's charge and discharge to the upper and lower limits? lets say I need to charge the cap to 8V, then connect to ground for discharging to 4V and then again connect a switch to charge up to 8V and so on. Should be a loop between 8V and 4V using its own voltage for monitoring.
I have a similar problem to solve. May you help me how to connect switch/es to control Capacitor's charge and discharge to the upper and lower limits? lets say I need to charge the cap to 8V, then connect to ground for discharging to 4V and then again connect a switch to charge up to 8V and so on. Should be a loop between 8V and 4V using its own voltage for monitoring.