PWS formula creates error

Bug Description:

This may not be a bug, but it is reproducible. I have a circuit that has two momentary push-buttons. One to latch on and one to shut off to an unspecified load represented by a lamp. The push-buttons are represented by two voltage controlled switches. The two switches have "PWS" values in the voltage property to close and open over time. When you run a time domain simulation you get the error: "Solve Aborted - Error in Transient Solver non-finite scale". If I go into the V2 voltage controlled switch and change the script from "PWS(0,0,15,5,0,0)" to "PWS(0,0,15,5)" it works fine. The V1 voltage controlled switch works fine with three time settings, but V2 doesn't. The Time Domain stop time is 30 seconds, so I'm not running out of time. Does anyone have any ideas? Am I doing anything wrong? Please see the links for examples.

Reproduce:

Please see the links for examples to reproduce.

Web Browser and Version:

Google Chrome Version 25.0.1364.172 m

Operating System and Version:

Windows 7 Professional Service pack 1

Links:

works: https://www.circuitlab.com/circuit/8k95rr/latching-switch-9v-01/

doesn't work: https://www.circuitlab.com/circuit/hbfygn/latching-switch-9v-02/

Screenshots:

none

by dogulas
March 17, 2013

Your PWS arguments are wrong.

The syntax for PWS() - and PWL() - is

PWS(t1,x1, t2,x2, t3,x3, ... tn,xn)

where; t1 < t2 < t3 < tn

i.e. as described in:

https://www.circuitlab.com/docs/expressions/

"All t1...tn must be in ascending order. "

In your instance t3 < t2.

PWS(0,0,15,5,0,0)

Hence your PWS() throws an error.

:)

by signality
March 17, 2013

Signality, Thanks for your response. Actually, this isn't solved. I misspoke in my description, the failing PWS command is "PWS(0,0,15,5,20,0)" unlike I stated in the original post. The example shows how it really is and if you run a time domain simulation you will see the error.

by dogulas
March 17, 2013

My apologies!

I should have tried running your circuit first ....

This is a tricky one!

I've posted a bug report:

https://www.circuitlab.com/forums/support/topic/mtzh5nsf/bug-report-pws-driving-a-voltage-controlled-switch-throws/

by signality
March 18, 2013

Signality, Thanks again for you quick response. If there is any more info I can give to help the process, please let me know.

by dogulas
March 18, 2013

BTW, may I assume I can follow the status of the bug on the link you provided above?

by dogulas
March 18, 2013

@dogulas,

Yes but any response comes from the guys at CL so it's out of my hands.

:)

by signality
March 18, 2013

Post a Reply

Please sign in or create an account to comment.

Go Ad-Free. Activate your CircuitLab membership. No more ads. Save unlimited circuits. Run unlimited simulations.

About CircuitLab

CircuitLab is an in-browser schematic capture and circuit simulation software tool to help you rapidly design and analyze analog and digital electronics systems.