diff options
Diffstat (limited to 'js/Electrical')
-rw-r--r-- | js/Electrical/CCS.js | 18 | ||||
-rw-r--r-- | js/Electrical/CVS.js | 18 | ||||
-rw-r--r-- | js/Electrical/Capacitor.js | 40 | ||||
-rw-r--r-- | js/Electrical/ConstantVoltage.js | 40 | ||||
-rw-r--r-- | js/Electrical/CurrentSensor.js | 10 | ||||
-rw-r--r-- | js/Electrical/Diode.js | 40 | ||||
-rw-r--r-- | js/Electrical/Ground.js | 10 | ||||
-rw-r--r-- | js/Electrical/Gyrator.js | 38 | ||||
-rw-r--r-- | js/Electrical/IdealTransformer.js | 38 | ||||
-rw-r--r-- | js/Electrical/Inductor.js | 40 | ||||
-rw-r--r-- | js/Electrical/MOTOR.js | 10 | ||||
-rw-r--r-- | js/Electrical/NMOS.js | 38 | ||||
-rw-r--r-- | js/Electrical/NPN.js | 38 | ||||
-rw-r--r-- | js/Electrical/OpAmp.js | 38 | ||||
-rw-r--r-- | js/Electrical/PMOS.js | 38 | ||||
-rw-r--r-- | js/Electrical/PNP.js | 38 | ||||
-rw-r--r-- | js/Electrical/PotentialSensor.js | 10 | ||||
-rw-r--r-- | js/Electrical/Resistor.js | 40 | ||||
-rw-r--r-- | js/Electrical/SineVoltage.js | 40 | ||||
-rw-r--r-- | js/Electrical/Switch.js | 38 | ||||
-rw-r--r-- | js/Electrical/VVsourceAC.js | 40 | ||||
-rw-r--r-- | js/Electrical/VariableResistor.js | 10 | ||||
-rw-r--r-- | js/Electrical/VoltageSensor.js | 10 | ||||
-rw-r--r-- | js/Electrical/VsourceAC.js | 40 |
24 files changed, 360 insertions, 360 deletions
diff --git a/js/Electrical/CCS.js b/js/Electrical/CCS.js index b8417224..84ca9326 100644 --- a/js/Electrical/CCS.js +++ b/js/Electrical/CCS.js @@ -1,14 +1,5 @@ /* autogenerated from "macros/Electrical/CCS.sci" */ function CCS() { -CCS.prototype.get = function CCS() { -} -CCS.prototype.set = function CCS() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -x=arg1; -} CCS.prototype.define = function CCS() { ModelName="CCS"; PrametersValue=[]; @@ -59,4 +50,13 @@ x.graphics.out_implicit=Typeout; } CCS.prototype.details = function CCS() { } +CCS.prototype.get = function CCS() { +} +CCS.prototype.set = function CCS() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +x=arg1; +} } diff --git a/js/Electrical/CVS.js b/js/Electrical/CVS.js index 39ebf54d..5b862fbb 100644 --- a/js/Electrical/CVS.js +++ b/js/Electrical/CVS.js @@ -1,14 +1,5 @@ /* autogenerated from "macros/Electrical/CVS.sci" */ function CVS() { -CVS.prototype.get = function CVS() { -} -CVS.prototype.set = function CVS() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -x=arg1; -} CVS.prototype.define = function CVS() { ModelName="CVS"; PrametersValue=[]; @@ -59,4 +50,13 @@ x.graphics.out_implicit=Typeout; } CVS.prototype.details = function CVS() { } +CVS.prototype.get = function CVS() { +} +CVS.prototype.set = function CVS() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +x=arg1; +} } diff --git a/js/Electrical/Capacitor.js b/js/Electrical/Capacitor.js index cf40e97c..0e69d23b 100644 --- a/js/Electrical/Capacitor.js +++ b/js/Electrical/Capacitor.js @@ -1,25 +1,5 @@ /* autogenerated from "macros/Electrical/Capacitor.sci" */ function Capacitor() { -Capacitor.prototype.get = function Capacitor() { -} -Capacitor.prototype.set = function Capacitor() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -while (true) { -[ok,C,v,exprs]=scicos_getvalue("Set Capacitor block parameter",["C (F)","Initial Voltage"],list("vec",1,"vec",1),exprs); -if (!ok) { -break -} -model.rpar=C; -model.equations.parameters[2-1]=list(C,v); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; -break -} -} Capacitor.prototype.define = function Capacitor() { model=scicos_model(); C=0.01; @@ -44,4 +24,24 @@ x.graphics.out_implicit=["I"]; } Capacitor.prototype.details = function Capacitor() { } +Capacitor.prototype.get = function Capacitor() { +} +Capacitor.prototype.set = function Capacitor() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +while (true) { +[ok,C,v,exprs]=scicos_getvalue("Set Capacitor block parameter",["C (F)","Initial Voltage"],list("vec",1,"vec",1),exprs); +if (!ok) { +break +} +model.rpar=C; +model.equations.parameters[2-1]=list(C,v); +graphics.exprs=exprs; +x.graphics=graphics; +x.model=model; +break +} +} } diff --git a/js/Electrical/ConstantVoltage.js b/js/Electrical/ConstantVoltage.js index 9bec7626..f0eef731 100644 --- a/js/Electrical/ConstantVoltage.js +++ b/js/Electrical/ConstantVoltage.js @@ -1,25 +1,5 @@ /* autogenerated from "macros/Electrical/ConstantVoltage.sci" */ function ConstantVoltage() { -ConstantVoltage.prototype.get = function ConstantVoltage() { -} -ConstantVoltage.prototype.set = function ConstantVoltage() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -while (true) { -[ok,V,exprs]=scicos_getvalue("Set ConstantVoltage block parameter","V (volt)",list("vec",1),exprs); -if (!ok) { -break -} -model.rpar=V; -model.equations.parameters[2-1]=list(V); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; -break -} -} ConstantVoltage.prototype.define = function ConstantVoltage() { V=0.01; model=scicos_model(); @@ -43,4 +23,24 @@ x.graphics.out_implicit=["I"]; } ConstantVoltage.prototype.details = function ConstantVoltage() { } +ConstantVoltage.prototype.get = function ConstantVoltage() { +} +ConstantVoltage.prototype.set = function ConstantVoltage() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +while (true) { +[ok,V,exprs]=scicos_getvalue("Set ConstantVoltage block parameter","V (volt)",list("vec",1),exprs); +if (!ok) { +break +} +model.rpar=V; +model.equations.parameters[2-1]=list(V); +graphics.exprs=exprs; +x.graphics=graphics; +x.model=model; +break +} +} } diff --git a/js/Electrical/CurrentSensor.js b/js/Electrical/CurrentSensor.js index ac6ea132..f79a353f 100644 --- a/js/Electrical/CurrentSensor.js +++ b/js/Electrical/CurrentSensor.js @@ -1,10 +1,5 @@ /* autogenerated from "macros/Electrical/CurrentSensor.sci" */ function CurrentSensor() { -CurrentSensor.prototype.get = function CurrentSensor() { -} -CurrentSensor.prototype.set = function CurrentSensor() { -x=arg1; -} CurrentSensor.prototype.define = function CurrentSensor() { model=scicos_model(); model.in1=1; @@ -25,4 +20,9 @@ x.graphics.out_implicit=["I","E"]; } CurrentSensor.prototype.details = function CurrentSensor() { } +CurrentSensor.prototype.get = function CurrentSensor() { +} +CurrentSensor.prototype.set = function CurrentSensor() { +x=arg1; +} } diff --git a/js/Electrical/Diode.js b/js/Electrical/Diode.js index bb024526..1af6fead 100644 --- a/js/Electrical/Diode.js +++ b/js/Electrical/Diode.js @@ -1,25 +1,5 @@ /* autogenerated from "macros/Electrical/Diode.sci" */ function Diode() { -Diode.prototype.get = function Diode() { -} -Diode.prototype.set = function Diode() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -while (true) { -[ok,Ids,Vt,Maxexp,R,exprs]=scicos_getvalue("Set Diode block parameter",["Saturation cuurent (A)","Voltage equivalent to temperature (Volt)","Max exponent for linear continuation","R (ohm)"],list("vec",1,"vec",1,"vec",1,"vec",1),exprs); -if (!ok) { -break -} -model.rpar=[Ids,Vt,Maxexp,R]; -model.equations.parameters=list(["Ids","Vt","Maxexp","R"],list(Ids,Vt,Maxexp,R)); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; -break -} -} Diode.prototype.define = function Diode() { Ids=1.e-6; Vt=0.04; @@ -46,4 +26,24 @@ x.graphics.out_implicit=["I"]; } Diode.prototype.details = function Diode() { } +Diode.prototype.get = function Diode() { +} +Diode.prototype.set = function Diode() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +while (true) { +[ok,Ids,Vt,Maxexp,R,exprs]=scicos_getvalue("Set Diode block parameter",["Saturation cuurent (A)","Voltage equivalent to temperature (Volt)","Max exponent for linear continuation","R (ohm)"],list("vec",1,"vec",1,"vec",1,"vec",1),exprs); +if (!ok) { +break +} +model.rpar=[Ids,Vt,Maxexp,R]; +model.equations.parameters=list(["Ids","Vt","Maxexp","R"],list(Ids,Vt,Maxexp,R)); +graphics.exprs=exprs; +x.graphics=graphics; +x.model=model; +break +} +} } diff --git a/js/Electrical/Ground.js b/js/Electrical/Ground.js index 04d30bda..bde01b03 100644 --- a/js/Electrical/Ground.js +++ b/js/Electrical/Ground.js @@ -1,10 +1,5 @@ /* autogenerated from "macros/Electrical/Ground.sci" */ function Ground() { -Ground.prototype.get = function Ground() { -} -Ground.prototype.set = function Ground() { -x=arg1; -} Ground.prototype.define = function Ground() { model=scicos_model(); model.in1=[1]; @@ -24,4 +19,9 @@ x.graphics.out_implicit=["I"]; } Ground.prototype.details = function Ground() { } +Ground.prototype.get = function Ground() { +} +Ground.prototype.set = function Ground() { +x=arg1; +} } diff --git a/js/Electrical/Gyrator.js b/js/Electrical/Gyrator.js index f7890c6d..7d246e9f 100644 --- a/js/Electrical/Gyrator.js +++ b/js/Electrical/Gyrator.js @@ -1,24 +1,5 @@ /* autogenerated from "macros/Electrical/Gyrator.sci" */ function Gyrator() { -Gyrator.prototype.get = function Gyrator() { -} -Gyrator.prototype.set = function Gyrator() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -x=arg1; -exprs=x.graphics.exprs; -while (true) { -[ok,G1,G2,exprs]=scicos_getvalue(["Set Gyrator block parameters:","","G1: Gyration conductance","G2: Gyration conductance"],["G1","G2"],list("vec",1,"vec",1),exprs); -if (!ok) { -break -} -x.model.equations.parameters[2-1]=list(G1,G2); -x.graphics.exprs=exprs; -break -} -} Gyrator.prototype.define = function Gyrator() { ModelName="Gyrator"; PrametersValue=[1,1]; @@ -69,4 +50,23 @@ x.graphics.out_implicit=Typeout; } Gyrator.prototype.details = function Gyrator() { } +Gyrator.prototype.get = function Gyrator() { +} +Gyrator.prototype.set = function Gyrator() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +x=arg1; +exprs=x.graphics.exprs; +while (true) { +[ok,G1,G2,exprs]=scicos_getvalue(["Set Gyrator block parameters:","","G1: Gyration conductance","G2: Gyration conductance"],["G1","G2"],list("vec",1,"vec",1),exprs); +if (!ok) { +break +} +x.model.equations.parameters[2-1]=list(G1,G2); +x.graphics.exprs=exprs; +break +} +} } diff --git a/js/Electrical/IdealTransformer.js b/js/Electrical/IdealTransformer.js index 3d99588b..75889fc2 100644 --- a/js/Electrical/IdealTransformer.js +++ b/js/Electrical/IdealTransformer.js @@ -1,24 +1,5 @@ /* autogenerated from "macros/Electrical/IdealTransformer.sci" */ function IdealTransformer() { -IdealTransformer.prototype.get = function IdealTransformer() { -} -IdealTransformer.prototype.set = function IdealTransformer() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -x=arg1; -exprs=x.graphics.exprs; -while (true) { -[ok,N,exprs]=scicos_getvalue(["Set Transformer block parameters:","","N:"+" Turn ratio (N1/N2)"],["N"],list("vec",1),exprs); -if (!ok) { -break -} -x.model.equations.parameters[2-1]=list(N); -x.graphics.exprs=exprs; -break -} -} IdealTransformer.prototype.define = function IdealTransformer() { ModelName="IdealTransformer"; PrametersValue=[1]; @@ -69,4 +50,23 @@ x.graphics.out_implicit=Typeout; } IdealTransformer.prototype.details = function IdealTransformer() { } +IdealTransformer.prototype.get = function IdealTransformer() { +} +IdealTransformer.prototype.set = function IdealTransformer() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +x=arg1; +exprs=x.graphics.exprs; +while (true) { +[ok,N,exprs]=scicos_getvalue(["Set Transformer block parameters:","","N:"+" Turn ratio (N1/N2)"],["N"],list("vec",1),exprs); +if (!ok) { +break +} +x.model.equations.parameters[2-1]=list(N); +x.graphics.exprs=exprs; +break +} +} } diff --git a/js/Electrical/Inductor.js b/js/Electrical/Inductor.js index a928c4c9..1c64a032 100644 --- a/js/Electrical/Inductor.js +++ b/js/Electrical/Inductor.js @@ -1,25 +1,5 @@ /* autogenerated from "macros/Electrical/Inductor.sci" */ function Inductor() { -Inductor.prototype.get = function Inductor() { -} -Inductor.prototype.set = function Inductor() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -while (true) { -[ok,L,exprs]=scicos_getvalue("Set Inductor block parameter","L (H)",list("vec",1),exprs); -if (!ok) { -break -} -model.rpar=L; -model.equations.parameters[2-1]=list(L); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; -break -} -} Inductor.prototype.define = function Inductor() { model=scicos_model(); model.in1=[1]; @@ -43,4 +23,24 @@ x.graphics.out_implicit=["I"]; } Inductor.prototype.details = function Inductor() { } +Inductor.prototype.get = function Inductor() { +} +Inductor.prototype.set = function Inductor() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +while (true) { +[ok,L,exprs]=scicos_getvalue("Set Inductor block parameter","L (H)",list("vec",1),exprs); +if (!ok) { +break +} +model.rpar=L; +model.equations.parameters[2-1]=list(L); +graphics.exprs=exprs; +x.graphics=graphics; +x.model=model; +break +} +} } diff --git a/js/Electrical/MOTOR.js b/js/Electrical/MOTOR.js index 794262aa..7ffefd65 100644 --- a/js/Electrical/MOTOR.js +++ b/js/Electrical/MOTOR.js @@ -1,10 +1,5 @@ /* autogenerated from "macros/Electrical/MOTOR.sci" */ function MOTOR() { -MOTOR.prototype.get = function MOTOR() { -} -MOTOR.prototype.set = function MOTOR() { -x=arg1; -} MOTOR.prototype.define = function MOTOR() { model=scicos_model(); model.out=[1,1]; @@ -20,4 +15,9 @@ x.graphics.in_implicit=["I"]; } MOTOR.prototype.details = function MOTOR() { } +MOTOR.prototype.get = function MOTOR() { +} +MOTOR.prototype.set = function MOTOR() { +x=arg1; +} } diff --git a/js/Electrical/NMOS.js b/js/Electrical/NMOS.js index 636cc9d6..f70287c6 100644 --- a/js/Electrical/NMOS.js +++ b/js/Electrical/NMOS.js @@ -1,24 +1,5 @@ /* autogenerated from "macros/Electrical/NMOS.sci" */ function NMOS() { -NMOS.prototype.get = function NMOS() { -} -NMOS.prototype.set = function NMOS() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -while (true) { -[ok,W,L,Beta,Vt,K2,K5,dW,dL,RDS,exprs]=scicos_getvalue("Set NMOS Transistor block parameters",["Width [m]","Length [m]","Transconductance parameter [A/(V*V)]","Zero bias threshold voltage [V]","Bulk threshold parameter","Reduction of pinch-off region","Narrowing of channel [m]","Shortening of channel [m]","Drain-Source-Resistance [Ohm]"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs); -if (!ok) { -break -} -model.equations.parameters[2-1]=list(W,L,Beta,Vt,K2,K5,dW,dL,RDS); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; -break -} -} NMOS.prototype.define = function NMOS() { model=scicos_model(); W=20.e-6; @@ -49,4 +30,23 @@ x.graphics.out_implicit=["I","I","I"]; } NMOS.prototype.details = function NMOS() { } +NMOS.prototype.get = function NMOS() { +} +NMOS.prototype.set = function NMOS() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +while (true) { +[ok,W,L,Beta,Vt,K2,K5,dW,dL,RDS,exprs]=scicos_getvalue("Set NMOS Transistor block parameters",["Width [m]","Length [m]","Transconductance parameter [A/(V*V)]","Zero bias threshold voltage [V]","Bulk threshold parameter","Reduction of pinch-off region","Narrowing of channel [m]","Shortening of channel [m]","Drain-Source-Resistance [Ohm]"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs); +if (!ok) { +break +} +model.equations.parameters[2-1]=list(W,L,Beta,Vt,K2,K5,dW,dL,RDS); +graphics.exprs=exprs; +x.graphics=graphics; +x.model=model; +break +} +} } diff --git a/js/Electrical/NPN.js b/js/Electrical/NPN.js index a7598f46..83ad250d 100644 --- a/js/Electrical/NPN.js +++ b/js/Electrical/NPN.js @@ -1,24 +1,5 @@ /* autogenerated from "macros/Electrical/NPN.sci" */ function NPN() { -NPN.prototype.get = function NPN() { -} -NPN.prototype.set = function NPN() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -x=arg1; -exprs=x.graphics.exprs; -while (true) { -[ok,Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax,exprs]=scicos_getvalue(["Set NPN block parameters:",""],["Bf : Forward beta","Br : Reverse beta","Is : Transport saturation current","Vak : Early voltage (inverse), 1/Volt","Tauf: Ideal forward transit time","Taur: Ideal reverse transit time","Ccs : Collector-substrat(ground) cap.","Cje : Base-emitter zero bias depletion cap.","Cjc : Base-coll. zero bias depletion cap.","Phie: Base-emitter diffusion voltage","Me : Base-emitter gradation exponent","Phic: Base-collector diffusion voltage","Mc : Base-collector gradation exponent","Gbc : Base-collector conductance","Gbe : Base-emitter conductance","Vt : Voltage equivalent of temperature","EMinmax: if x > EMinMax, the exp(x) is linearized"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs); -if (!ok) { -break -} -x.model.equations.parameters[2-1]=list(Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax); -x.graphics.exprs=exprs; -break -} -} NPN.prototype.define = function NPN() { ModelName="NPN"; PrametersValue=[50,0.1,0,0.02,1.200e-10,5.000e-09,1.000e-12,4.000e-13,5.000e-13,0.8,0.4,0.8,0.333,1.000e-15,1.000e-15,0.02585,40]; @@ -69,4 +50,23 @@ x.graphics.out_implicit=Typeout; } NPN.prototype.details = function NPN() { } +NPN.prototype.get = function NPN() { +} +NPN.prototype.set = function NPN() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +x=arg1; +exprs=x.graphics.exprs; +while (true) { +[ok,Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax,exprs]=scicos_getvalue(["Set NPN block parameters:",""],["Bf : Forward beta","Br : Reverse beta","Is : Transport saturation current","Vak : Early voltage (inverse), 1/Volt","Tauf: Ideal forward transit time","Taur: Ideal reverse transit time","Ccs : Collector-substrat(ground) cap.","Cje : Base-emitter zero bias depletion cap.","Cjc : Base-coll. zero bias depletion cap.","Phie: Base-emitter diffusion voltage","Me : Base-emitter gradation exponent","Phic: Base-collector diffusion voltage","Mc : Base-collector gradation exponent","Gbc : Base-collector conductance","Gbe : Base-emitter conductance","Vt : Voltage equivalent of temperature","EMinmax: if x > EMinMax, the exp(x) is linearized"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs); +if (!ok) { +break +} +x.model.equations.parameters[2-1]=list(Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax); +x.graphics.exprs=exprs; +break +} +} } diff --git a/js/Electrical/OpAmp.js b/js/Electrical/OpAmp.js index 4ec8f9dd..09334c4a 100644 --- a/js/Electrical/OpAmp.js +++ b/js/Electrical/OpAmp.js @@ -1,24 +1,5 @@ /* autogenerated from "macros/Electrical/OpAmp.sci" */ function OpAmp() { -OpAmp.prototype.get = function OpAmp() { -} -OpAmp.prototype.set = function OpAmp() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -while (false) { -[ok,OLGain,SatH,SatL,exprs]=scicos_getvalue("Set the Operational Amplifier parameters",["Open Loop Gain","Positive saturation voltage","Negative saturation voltage"],list("vec",1,"vec",1,"vec",1),exprs); -if (!ok) { -break -} -model.equations.parameters[2-1]=list(OLGain,SatH,SatL); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; -break -} -} OpAmp.prototype.define = function OpAmp() { S=[]; Z=[]; @@ -43,4 +24,23 @@ x.graphics.out_implicit=["I"]; } OpAmp.prototype.details = function OpAmp() { } +OpAmp.prototype.get = function OpAmp() { +} +OpAmp.prototype.set = function OpAmp() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +while (false) { +[ok,OLGain,SatH,SatL,exprs]=scicos_getvalue("Set the Operational Amplifier parameters",["Open Loop Gain","Positive saturation voltage","Negative saturation voltage"],list("vec",1,"vec",1,"vec",1),exprs); +if (!ok) { +break +} +model.equations.parameters[2-1]=list(OLGain,SatH,SatL); +graphics.exprs=exprs; +x.graphics=graphics; +x.model=model; +break +} +} } diff --git a/js/Electrical/PMOS.js b/js/Electrical/PMOS.js index 6ebcb4c0..7fcd2b27 100644 --- a/js/Electrical/PMOS.js +++ b/js/Electrical/PMOS.js @@ -1,24 +1,5 @@ /* autogenerated from "macros/Electrical/PMOS.sci" */ function PMOS() { -PMOS.prototype.get = function PMOS() { -} -PMOS.prototype.set = function PMOS() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -while (true) { -[ok,W,L,Beta,Vt,K2,K5,dW,dL,RDS,exprs]=scicos_getvalue("Set PMOS Transistor parameters",["Width [m]","Length [m]","Transconductance parameter [A/(V*V)]","Zero bias threshold voltage [V]","Bulk threshold parameter","Reduction of pinch-off region","Narrowing of channel [m]","Shortening of channel [m]","Drain-Source-Resistance [Ohm]"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs); -if (!ok) { -break -} -model.equations.parameters[2-1]=list(W,L,Beta,Vt,K2,K5,dW,dL,RDS); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; -break -} -} PMOS.prototype.define = function PMOS() { model=scicos_model(); W=50.0e-6; @@ -49,4 +30,23 @@ x.graphics.out_implicit=["I","I","I"]; } PMOS.prototype.details = function PMOS() { } +PMOS.prototype.get = function PMOS() { +} +PMOS.prototype.set = function PMOS() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +while (true) { +[ok,W,L,Beta,Vt,K2,K5,dW,dL,RDS,exprs]=scicos_getvalue("Set PMOS Transistor parameters",["Width [m]","Length [m]","Transconductance parameter [A/(V*V)]","Zero bias threshold voltage [V]","Bulk threshold parameter","Reduction of pinch-off region","Narrowing of channel [m]","Shortening of channel [m]","Drain-Source-Resistance [Ohm]"],list("vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1,"vec",-1),exprs); +if (!ok) { +break +} +model.equations.parameters[2-1]=list(W,L,Beta,Vt,K2,K5,dW,dL,RDS); +graphics.exprs=exprs; +x.graphics=graphics; +x.model=model; +break +} +} } diff --git a/js/Electrical/PNP.js b/js/Electrical/PNP.js index cf26f0e7..5d75504e 100644 --- a/js/Electrical/PNP.js +++ b/js/Electrical/PNP.js @@ -1,24 +1,5 @@ /* autogenerated from "macros/Electrical/PNP.sci" */ function PNP() { -PNP.prototype.get = function PNP() { -} -PNP.prototype.set = function PNP() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -x=arg1; -exprs=x.graphics.exprs; -while (true) { -[ok,Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax,exprs]=scicos_getvalue(["Set PNP block parameters:",""],["Bf : Forward beta","Br : Reverse beta","Is : Transport saturation current","Vak : Early voltage (inverse), 1/Volt","Tauf: Ideal forward transit time","Taur: Ideal reverse transit time","Ccs : Collector-substrat(ground) cap.","Cje : Base-emitter zero bias depletion cap.","Cjc : Base-coll. zero bias depletion cap.","Phie: Base-emitter diffusion voltage","Me : Base-emitter gradation exponent","Phic: Base-collector diffusion voltage","Mc : Base-collector gradation exponent","Gbc : Base-collector conductance","Gbe : Base-emitter conductance","Vt : Voltage equivalent of temperature","EMinMax: if x > EMinMax, the exp(x) function is linearized"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs); -if (!ok) { -break -} -x.model.equations.parameters[2-1]=list(Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax); -x.graphics.exprs=exprs; -break -} -} PNP.prototype.define = function PNP() { ModelName="PNP"; PrametersValue=[50,0.1,0,0.02,1.200e-10,5.000e-09,1.000e-12,4.000e-13,5.000e-13,0.8,0.4,0.8,0.333,1.000e-15,1.000e-15,0.02585,40]; @@ -69,4 +50,23 @@ x.graphics.out_implicit=Typeout; } PNP.prototype.details = function PNP() { } +PNP.prototype.get = function PNP() { +} +PNP.prototype.set = function PNP() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +x=arg1; +exprs=x.graphics.exprs; +while (true) { +[ok,Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax,exprs]=scicos_getvalue(["Set PNP block parameters:",""],["Bf : Forward beta","Br : Reverse beta","Is : Transport saturation current","Vak : Early voltage (inverse), 1/Volt","Tauf: Ideal forward transit time","Taur: Ideal reverse transit time","Ccs : Collector-substrat(ground) cap.","Cje : Base-emitter zero bias depletion cap.","Cjc : Base-coll. zero bias depletion cap.","Phie: Base-emitter diffusion voltage","Me : Base-emitter gradation exponent","Phic: Base-collector diffusion voltage","Mc : Base-collector gradation exponent","Gbc : Base-collector conductance","Gbe : Base-emitter conductance","Vt : Voltage equivalent of temperature","EMinMax: if x > EMinMax, the exp(x) function is linearized"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs); +if (!ok) { +break +} +x.model.equations.parameters[2-1]=list(Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax); +x.graphics.exprs=exprs; +break +} +} } diff --git a/js/Electrical/PotentialSensor.js b/js/Electrical/PotentialSensor.js index 2676d657..b0cbe948 100644 --- a/js/Electrical/PotentialSensor.js +++ b/js/Electrical/PotentialSensor.js @@ -1,10 +1,5 @@ /* autogenerated from "macros/Electrical/PotentialSensor.sci" */ function PotentialSensor() { -PotentialSensor.prototype.get = function PotentialSensor() { -} -PotentialSensor.prototype.set = function PotentialSensor() { -x=arg1; -} PotentialSensor.prototype.define = function PotentialSensor() { model=scicos_model(); model.in1=[1]; @@ -25,4 +20,9 @@ x.graphics.out_implicit=["E"]; } PotentialSensor.prototype.details = function PotentialSensor() { } +PotentialSensor.prototype.get = function PotentialSensor() { +} +PotentialSensor.prototype.set = function PotentialSensor() { +x=arg1; +} } diff --git a/js/Electrical/Resistor.js b/js/Electrical/Resistor.js index 402732ca..ab9bd491 100644 --- a/js/Electrical/Resistor.js +++ b/js/Electrical/Resistor.js @@ -1,25 +1,5 @@ /* autogenerated from "macros/Electrical/Resistor.sci" */ function Resistor() { -Resistor.prototype.get = function Resistor() { -} -Resistor.prototype.set = function Resistor() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -while (true) { -[ok,R,exprs]=scicos_getvalue("Set Resistor block parameter","R (ohm)",list("vec",1),exprs); -if (!ok) { -break -} -model.rpar=R; -model.equations.parameters[2-1]=list(R); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; -break -} -} Resistor.prototype.define = function Resistor() { model=scicos_model(); R=0.01; @@ -43,4 +23,24 @@ x.graphics.out_implicit=["I"]; } Resistor.prototype.details = function Resistor() { } +Resistor.prototype.get = function Resistor() { +} +Resistor.prototype.set = function Resistor() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +while (true) { +[ok,R,exprs]=scicos_getvalue("Set Resistor block parameter","R (ohm)",list("vec",1),exprs); +if (!ok) { +break +} +model.rpar=R; +model.equations.parameters[2-1]=list(R); +graphics.exprs=exprs; +x.graphics=graphics; +x.model=model; +break +} +} } diff --git a/js/Electrical/SineVoltage.js b/js/Electrical/SineVoltage.js index 539c503e..bab918cd 100644 --- a/js/Electrical/SineVoltage.js +++ b/js/Electrical/SineVoltage.js @@ -1,25 +1,5 @@ /* autogenerated from "macros/Electrical/SineVoltage.sci" */ function SineVoltage() { -SineVoltage.prototype.get = function SineVoltage() { -} -SineVoltage.prototype.set = function SineVoltage() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -while (true) { -[ok,V,ph,frq,offset,start,exprs]=scicos_getvalue("Set voltage source parameter",["Amplitude (Volt)","phase (rad)","Frequency (Hz)","Voltageoffset (V)","Timeoffset (s)"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs); -if (!ok) { -break -} -model.rpar=[V,ph,frq,offset,start]; -model.equations.parameters[2-1]=list(V,ph,frq,offset,start); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; -break -} -} SineVoltage.prototype.define = function SineVoltage() { model=scicos_model(); model.in1=[1]; @@ -47,4 +27,24 @@ x.graphics.out_implicit=["I"]; } SineVoltage.prototype.details = function SineVoltage() { } +SineVoltage.prototype.get = function SineVoltage() { +} +SineVoltage.prototype.set = function SineVoltage() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +while (true) { +[ok,V,ph,frq,offset,start,exprs]=scicos_getvalue("Set voltage source parameter",["Amplitude (Volt)","phase (rad)","Frequency (Hz)","Voltageoffset (V)","Timeoffset (s)"],list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs); +if (!ok) { +break +} +model.rpar=[V,ph,frq,offset,start]; +model.equations.parameters[2-1]=list(V,ph,frq,offset,start); +graphics.exprs=exprs; +x.graphics=graphics; +x.model=model; +break +} +} } diff --git a/js/Electrical/Switch.js b/js/Electrical/Switch.js index 221c795f..250033f5 100644 --- a/js/Electrical/Switch.js +++ b/js/Electrical/Switch.js @@ -1,24 +1,5 @@ /* autogenerated from "macros/Electrical/Switch.sci" */ function Switch() { -Switch.prototype.get = function Switch() { -} -Switch.prototype.set = function Switch() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -while (true) { -[ok,Ron,Roff,exprs]=scicos_getvalue("Set non-ideal electrical switch parameters",["Resistance in On state (Ohm)","Resistance in Off state (Ohm)"],list("vec",1,"vec",1),exprs); -if (!ok) { -break -} -model.equations.parameters[2-1]=list(Ron,Roff); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; -break -} -} Switch.prototype.define = function Switch() { model=scicos_model(); Ron=0.01; @@ -45,4 +26,23 @@ x.graphics.out_implicit=["I"]; } Switch.prototype.details = function Switch() { } +Switch.prototype.get = function Switch() { +} +Switch.prototype.set = function Switch() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +while (true) { +[ok,Ron,Roff,exprs]=scicos_getvalue("Set non-ideal electrical switch parameters",["Resistance in On state (Ohm)","Resistance in Off state (Ohm)"],list("vec",1,"vec",1),exprs); +if (!ok) { +break +} +model.equations.parameters[2-1]=list(Ron,Roff); +graphics.exprs=exprs; +x.graphics=graphics; +x.model=model; +break +} +} } diff --git a/js/Electrical/VVsourceAC.js b/js/Electrical/VVsourceAC.js index 24cc91d2..fe630ff6 100644 --- a/js/Electrical/VVsourceAC.js +++ b/js/Electrical/VVsourceAC.js @@ -1,25 +1,5 @@ /* autogenerated from "macros/Electrical/VVsourceAC.sci" */ function VVsourceAC() { -VVsourceAC.prototype.get = function VVsourceAC() { -} -VVsourceAC.prototype.set = function VVsourceAC() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -while (true) { -[ok,FR,exprs]=scicos_getvalue("Set voltage source parameter",["Frequency (Hz)"],list("vec",-1),exprs); -if (!ok) { -break -} -model.rpar=[FR]; -model.equations.parameters[2-1]=list(FR); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; -break -} -} VVsourceAC.prototype.define = function VVsourceAC() { model=scicos_model(); model.in1=[1,1]; @@ -44,4 +24,24 @@ x.graphics.out_implicit=["I"]; } VVsourceAC.prototype.details = function VVsourceAC() { } +VVsourceAC.prototype.get = function VVsourceAC() { +} +VVsourceAC.prototype.set = function VVsourceAC() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +while (true) { +[ok,FR,exprs]=scicos_getvalue("Set voltage source parameter",["Frequency (Hz)"],list("vec",-1),exprs); +if (!ok) { +break +} +model.rpar=[FR]; +model.equations.parameters[2-1]=list(FR); +graphics.exprs=exprs; +x.graphics=graphics; +x.model=model; +break +} +} } diff --git a/js/Electrical/VariableResistor.js b/js/Electrical/VariableResistor.js index 3648ec5b..fafa9ec2 100644 --- a/js/Electrical/VariableResistor.js +++ b/js/Electrical/VariableResistor.js @@ -1,10 +1,5 @@ /* autogenerated from "macros/Electrical/VariableResistor.sci" */ function VariableResistor() { -VariableResistor.prototype.get = function VariableResistor() { -} -VariableResistor.prototype.set = function VariableResistor() { -x=arg1; -} VariableResistor.prototype.define = function VariableResistor() { model=scicos_model(); model.sim="VariableResistor"; @@ -25,4 +20,9 @@ x.graphics.out_implicit=["I"]; } VariableResistor.prototype.details = function VariableResistor() { } +VariableResistor.prototype.get = function VariableResistor() { +} +VariableResistor.prototype.set = function VariableResistor() { +x=arg1; +} } diff --git a/js/Electrical/VoltageSensor.js b/js/Electrical/VoltageSensor.js index 314386cf..8119bdf3 100644 --- a/js/Electrical/VoltageSensor.js +++ b/js/Electrical/VoltageSensor.js @@ -1,10 +1,5 @@ /* autogenerated from "macros/Electrical/VoltageSensor.sci" */ function VoltageSensor() { -VoltageSensor.prototype.get = function VoltageSensor() { -} -VoltageSensor.prototype.set = function VoltageSensor() { -x=arg1; -} VoltageSensor.prototype.define = function VoltageSensor() { model=scicos_model(); model.in1=1; @@ -25,4 +20,9 @@ x.graphics.out_implicit=["I","E"]; } VoltageSensor.prototype.details = function VoltageSensor() { } +VoltageSensor.prototype.get = function VoltageSensor() { +} +VoltageSensor.prototype.set = function VoltageSensor() { +x=arg1; +} } diff --git a/js/Electrical/VsourceAC.js b/js/Electrical/VsourceAC.js index 3fb38abf..5cdfa82b 100644 --- a/js/Electrical/VsourceAC.js +++ b/js/Electrical/VsourceAC.js @@ -1,25 +1,5 @@ /* autogenerated from "macros/Electrical/VsourceAC.sci" */ function VsourceAC() { -VsourceAC.prototype.get = function VsourceAC() { -} -VsourceAC.prototype.set = function VsourceAC() { -x=arg1; -graphics=arg1.graphics; -exprs=graphics.exprs; -model=arg1.model; -while (true) { -[ok,VA,FR,exprs]=scicos_getvalue("Set voltage source parameter",["Amplitude (Volt)","Frequency (Hz)"],list("vec",-1,"vec",-1),exprs); -if (!ok) { -break -} -model.rpar=[VA,FR]; -model.equations.parameters[2-1]=list(VA,FR); -graphics.exprs=exprs; -x.graphics=graphics; -x.model=model; -break -} -} VsourceAC.prototype.define = function VsourceAC() { model=scicos_model(); model.in1=[1]; @@ -44,4 +24,24 @@ x.graphics.out_implicit=["I"]; } VsourceAC.prototype.details = function VsourceAC() { } +VsourceAC.prototype.get = function VsourceAC() { +} +VsourceAC.prototype.set = function VsourceAC() { +x=arg1; +graphics=arg1.graphics; +exprs=graphics.exprs; +model=arg1.model; +while (true) { +[ok,VA,FR,exprs]=scicos_getvalue("Set voltage source parameter",["Amplitude (Volt)","Frequency (Hz)"],list("vec",-1,"vec",-1),exprs); +if (!ok) { +break +} +model.rpar=[VA,FR]; +model.equations.parameters[2-1]=list(VA,FR); +graphics.exprs=exprs; +x.graphics=graphics; +x.model=model; +break +} +} } |