summaryrefslogtreecommitdiff
path: root/js/Electrical
diff options
context:
space:
mode:
authorSunil Shetye2018-06-26 14:59:47 +0530
committerSunil Shetye2018-06-26 14:59:47 +0530
commiteb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00 (patch)
tree6378935263fe5cafd389b6893ac3b37a1dd4b1a7 /js/Electrical
parentafed64f1a0eab0b2d742088186d7bc340a2c895b (diff)
downloadsci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.gz
sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.bz2
sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.zip
add return value from scicos_getvalue to global vars
Diffstat (limited to 'js/Electrical')
-rw-r--r--js/Electrical/Capacitor.js16
-rw-r--r--js/Electrical/Capacitor.pickle8
-rw-r--r--js/Electrical/ConstantVoltage.js14
-rw-r--r--js/Electrical/ConstantVoltage.pickle6
-rw-r--r--js/Electrical/Diode.js20
-rw-r--r--js/Electrical/Diode.pickle12
-rw-r--r--js/Electrical/Ground.js4
-rw-r--r--js/Electrical/Gyrator.js4
-rw-r--r--js/Electrical/Gyrator.pickle8
-rw-r--r--js/Electrical/IdealTransformer.js4
-rw-r--r--js/Electrical/IdealTransformer.pickle6
-rw-r--r--js/Electrical/Inductor.js14
-rw-r--r--js/Electrical/Inductor.pickle6
-rw-r--r--js/Electrical/NMOS.js26
-rw-r--r--js/Electrical/NMOS.pickle24
-rw-r--r--js/Electrical/NPN.js4
-rw-r--r--js/Electrical/NPN.pickle40
-rw-r--r--js/Electrical/OpAmp.js4
-rw-r--r--js/Electrical/OpAmp.pickle12
-rw-r--r--js/Electrical/PMOS.js26
-rw-r--r--js/Electrical/PMOS.pickle24
-rw-r--r--js/Electrical/PNP.js4
-rw-r--r--js/Electrical/PNP.pickle40
-rw-r--r--js/Electrical/Resistor.js14
-rw-r--r--js/Electrical/Resistor.pickle6
-rw-r--r--js/Electrical/SineVoltage.js22
-rw-r--r--js/Electrical/SineVoltage.pickle16
-rw-r--r--js/Electrical/Switch.js8
-rw-r--r--js/Electrical/Switch.pickle8
-rw-r--r--js/Electrical/VVsourceAC.js14
-rw-r--r--js/Electrical/VVsourceAC.pickle6
-rw-r--r--js/Electrical/VoltageSensor.js4
-rw-r--r--js/Electrical/VsourceAC.js16
-rw-r--r--js/Electrical/VsourceAC.pickle8
34 files changed, 301 insertions, 147 deletions
diff --git a/js/Electrical/Capacitor.js b/js/Electrical/Capacitor.js
index 6d2dd4ab..2ebf136a 100644
--- a/js/Electrical/Capacitor.js
+++ b/js/Electrical/Capacitor.js
@@ -2,9 +2,9 @@
function Capacitor() {
Capacitor.prototype.define = function Capacitor() {
model = scicos_model();
- C = 0.01;
- v = 0;
- model.rpar = [[C],[v]];
+ this.C = 0.01;
+ this.v = 0;
+ model.rpar = [[this.C],[this.v]];
model.sim = "Capacitor";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -12,11 +12,11 @@ function Capacitor() {
mo.model = "Capacitor";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list(["C","v"],list(C,v),[0,1]);
+ mo.parameters = list(["C","v"],list(this.C,this.v),[0,1]);
model.equations = mo;
model.in1 = ones(size(mo.inputs,"*"),1);
model.out = ones(size(mo.outputs,"*"),1);
- exprs = string([[C],[v]]);
+ exprs = string([[this.C],[this.v]]);
gr_i = [];
this.x = standard_define([2,1.1],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -34,12 +34,12 @@ function Capacitor() {
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);
+ [ok,this.C,this.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);
+ model.rpar = this.C;
+ model.equations.parameters[2-1] = list(this.C,this.v);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/Capacitor.pickle b/js/Electrical/Capacitor.pickle
index 0d1dde24..389dfb7d 100644
--- a/js/Electrical/Capacitor.pickle
+++ b/js/Electrical/Capacitor.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'C'
+p3
+aS'v'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Electrical/ConstantVoltage.js b/js/Electrical/ConstantVoltage.js
index 43a2c0b6..c0e752f1 100644
--- a/js/Electrical/ConstantVoltage.js
+++ b/js/Electrical/ConstantVoltage.js
@@ -1,9 +1,9 @@
/* autogenerated from "macros/Electrical/ConstantVoltage.sci" */
function ConstantVoltage() {
ConstantVoltage.prototype.define = function ConstantVoltage() {
- V = 0.01;
+ this.V = 0.01;
model = scicos_model();
- model.rpar = V;
+ model.rpar = this.V;
model.in1 = 1;
model.out = 1;
model.sim = "ConstantVoltage";
@@ -13,9 +13,9 @@ function ConstantVoltage() {
mo.model = "ConstantVoltage";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list("V",list(V));
+ mo.parameters = list("V",list(this.V));
model.equations = mo;
- exprs = string(V);
+ exprs = string(this.V);
gr_i = [];
this.x = standard_define([1.5,1.1],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -33,12 +33,12 @@ function ConstantVoltage() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,V,exprs] = scicos_getvalue("Set ConstantVoltage block parameter","V (volt)",list("vec",1),exprs);
+ [ok,this.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);
+ model.rpar = this.V;
+ model.equations.parameters[2-1] = list(this.V);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/ConstantVoltage.pickle b/js/Electrical/ConstantVoltage.pickle
index 0d1dde24..4cc46e41 100644
--- a/js/Electrical/ConstantVoltage.pickle
+++ b/js/Electrical/ConstantVoltage.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'V'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Electrical/Diode.js b/js/Electrical/Diode.js
index 6e0c8417..4a92c751 100644
--- a/js/Electrical/Diode.js
+++ b/js/Electrical/Diode.js
@@ -1,12 +1,12 @@
/* autogenerated from "macros/Electrical/Diode.sci" */
function Diode() {
Diode.prototype.define = function Diode() {
- Ids = 1.e-6;
- Vt = 0.04;
- Maxexp = 15;
- R = 1.e8;
+ this.Ids = 1.e-6;
+ this.Vt = 0.04;
+ this.Maxexp = 15;
+ this.R = 1.e8;
model = scicos_model();
- model.rpar = [[Ids],[Vt],[Maxexp],[R]];
+ model.rpar = [[this.Ids],[this.Vt],[this.Maxexp],[this.R]];
model.in1 = 1;
model.out = 1;
model.sim = "Diode";
@@ -16,9 +16,9 @@ function Diode() {
mo.model = "Diode";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list(["Ids","Vt","Maxexp","R"],list(Ids,Vt,Maxexp,R));
+ mo.parameters = list(["Ids","Vt","Maxexp","R"],list(this.Ids,this.Vt,this.Maxexp,this.R));
model.equations = mo;
- exprs = string([[Ids],[Vt],[Maxexp],[R]]);
+ exprs = string([[this.Ids],[this.Vt],[this.Maxexp],[this.R]]);
gr_i = [];
this.x = standard_define([2,1],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -36,12 +36,12 @@ function Diode() {
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);
+ [ok,this.Ids,this.Vt,this.Maxexp,this.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));
+ model.rpar = [[this.Ids],[this.Vt],[this.Maxexp],[this.R]];
+ model.equations.parameters = list(["Ids","Vt","Maxexp","R"],list(this.Ids,this.Vt,this.Maxexp,this.R));
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/Diode.pickle b/js/Electrical/Diode.pickle
index 0d1dde24..4afadfea 100644
--- a/js/Electrical/Diode.pickle
+++ b/js/Electrical/Diode.pickle
@@ -4,6 +4,14 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'R'
+p3
+aS'Vt'
+p4
+aS'Ids'
+p5
+aS'Maxexp'
+p6
+atp7
+Rp8
. \ No newline at end of file
diff --git a/js/Electrical/Ground.js b/js/Electrical/Ground.js
index 69ab7bc0..eb0de336 100644
--- a/js/Electrical/Ground.js
+++ b/js/Electrical/Ground.js
@@ -16,7 +16,7 @@ function Ground() {
this.x = standard_define([1,1],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
- return new BasicBlock(this.x);
+ return new GroundBlock(this.x);
}
Ground.prototype.details = function Ground() {
return this.x;
@@ -25,6 +25,6 @@ function Ground() {
}
Ground.prototype.set = function Ground() {
this.x = arg1;
- return new BasicBlock(this.x);
+ return new GroundBlock(this.x);
}
}
diff --git a/js/Electrical/Gyrator.js b/js/Electrical/Gyrator.js
index c1da0455..3398aa39 100644
--- a/js/Electrical/Gyrator.js
+++ b/js/Electrical/Gyrator.js
@@ -62,11 +62,11 @@ function Gyrator() {
this.x = arg1;
exprs = this.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);
+ [ok,this.G1,this.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;
}
- this.x.model.equations.parameters[2-1] = list(G1,G2);
+ this.x.model.equations.parameters[2-1] = list(this.G1,this.G2);
this.x.graphics.exprs = exprs;
break;
}
diff --git a/js/Electrical/Gyrator.pickle b/js/Electrical/Gyrator.pickle
index 0d1dde24..0eb0c70b 100644
--- a/js/Electrical/Gyrator.pickle
+++ b/js/Electrical/Gyrator.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'G2'
+p3
+aS'G1'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Electrical/IdealTransformer.js b/js/Electrical/IdealTransformer.js
index 35559b0a..4470efff 100644
--- a/js/Electrical/IdealTransformer.js
+++ b/js/Electrical/IdealTransformer.js
@@ -62,11 +62,11 @@ function IdealTransformer() {
this.x = arg1;
exprs = this.x.graphics.exprs;
while (true) {
- [ok,N,exprs] = scicos_getvalue([["Set Transformer block parameters:"],[""],["N:"+" Turn ratio (N1/N2)"]],["N"],list("vec",1),exprs);
+ [ok,this.N,exprs] = scicos_getvalue([["Set Transformer block parameters:"],[""],["N:"+" Turn ratio (N1/N2)"]],["N"],list("vec",1),exprs);
if (!ok) {
break;
}
- this.x.model.equations.parameters[2-1] = list(N);
+ this.x.model.equations.parameters[2-1] = list(this.N);
this.x.graphics.exprs = exprs;
break;
}
diff --git a/js/Electrical/IdealTransformer.pickle b/js/Electrical/IdealTransformer.pickle
index 0d1dde24..af602144 100644
--- a/js/Electrical/IdealTransformer.pickle
+++ b/js/Electrical/IdealTransformer.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'N'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Electrical/Inductor.js b/js/Electrical/Inductor.js
index 24523d52..e9f81d71 100644
--- a/js/Electrical/Inductor.js
+++ b/js/Electrical/Inductor.js
@@ -4,8 +4,8 @@ function Inductor() {
model = scicos_model();
model.in1 = [1];
model.out = [1];
- L = 1.e-5;
- model.rpar = L;
+ this.L = 1.e-5;
+ model.rpar = this.L;
model.sim = "Inductor";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -13,9 +13,9 @@ function Inductor() {
mo.model = "Inductor";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list("L",list(L));
+ mo.parameters = list("L",list(this.L));
model.equations = mo;
- exprs = string(L);
+ exprs = string(this.L);
gr_i = [];
this.x = standard_define([2,0.9],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -33,12 +33,12 @@ function Inductor() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,L,exprs] = scicos_getvalue("Set Inductor block parameter","L (H)",list("vec",1),exprs);
+ [ok,this.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);
+ model.rpar = this.L;
+ model.equations.parameters[2-1] = list(this.L);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/Inductor.pickle b/js/Electrical/Inductor.pickle
index 0d1dde24..9c416581 100644
--- a/js/Electrical/Inductor.pickle
+++ b/js/Electrical/Inductor.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'L'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Electrical/NMOS.js b/js/Electrical/NMOS.js
index 0a8d1738..c9ec814a 100644
--- a/js/Electrical/NMOS.js
+++ b/js/Electrical/NMOS.js
@@ -2,15 +2,15 @@
function NMOS() {
NMOS.prototype.define = function NMOS() {
model = scicos_model();
- W = 20.e-6;
- L = 6.e-6;
- Beta = 0.041e-3;
- Vt = 0.8;
- K2 = 1.144;
- K5 = 0.7311;
- dW = -2.5e-6;
- dL = -1.5e-6;
- RDS = 1.e+7;
+ this.W = 20.e-6;
+ this.L = 6.e-6;
+ this.Beta = 0.041e-3;
+ this.Vt = 0.8;
+ this.K2 = 1.144;
+ this.K5 = 0.7311;
+ this.dW = -2.5e-6;
+ this.dL = -1.5e-6;
+ this.RDS = 1.e+7;
model.sim = "NMOS";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -18,11 +18,11 @@ function NMOS() {
mo.model = "NMOS";
mo.outputs = [["D"],["B"],["S"]];
mo.inputs = "G";
- mo.parameters = list([["W"],["L"],["Beta"],["Vt"],["K2"],["K5"],["dW"],["dL"],["RDS"]],[[W],[L],[Beta],[Vt],[K2],[K5],[dW],[dL],[RDS]]);
+ mo.parameters = list([["W"],["L"],["Beta"],["Vt"],["K2"],["K5"],["dW"],["dL"],["RDS"]],[[this.W],[this.L],[this.Beta],[this.Vt],[this.K2],[this.K5],[this.dW],[this.dL],[this.RDS]]);
model.equations = mo;
model.in1 = ones(size(mo.inputs,"*"),1);
model.out = ones(size(mo.outputs,"*"),1);
- exprs = [[string(W)],[string(L)],[string(Beta)],[string(Vt)],[string(K2)],[string(K5)],[string(dW)],[string(dL)],[string(RDS)]];
+ exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
@@ -40,11 +40,11 @@ function NMOS() {
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);
+ [ok,this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.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);
+ model.equations.parameters[2-1] = list(this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/NMOS.pickle b/js/Electrical/NMOS.pickle
index 0d1dde24..0f015c0a 100644
--- a/js/Electrical/NMOS.pickle
+++ b/js/Electrical/NMOS.pickle
@@ -2,8 +2,26 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'dL'
p2
-atp3
-Rp4
+aS'K5'
+p3
+aS'RDS'
+p4
+aS'L'
+p5
+aS'K2'
+p6
+aS'Beta'
+p7
+aS'Vt'
+p8
+aS'W'
+p9
+aS'dW'
+p10
+aS'x'
+p11
+atp12
+Rp13
. \ No newline at end of file
diff --git a/js/Electrical/NPN.js b/js/Electrical/NPN.js
index c82ac606..582c794b 100644
--- a/js/Electrical/NPN.js
+++ b/js/Electrical/NPN.js
@@ -62,11 +62,11 @@ function NPN() {
this.x = arg1;
exprs = this.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);
+ [ok,this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.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;
}
- this.x.model.equations.parameters[2-1] = list(Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax);
+ this.x.model.equations.parameters[2-1] = list(this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.EMinMax);
this.x.graphics.exprs = exprs;
break;
}
diff --git a/js/Electrical/NPN.pickle b/js/Electrical/NPN.pickle
index 0d1dde24..ffc05c1b 100644
--- a/js/Electrical/NPN.pickle
+++ b/js/Electrical/NPN.pickle
@@ -2,8 +2,42 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'Me'
p2
-atp3
-Rp4
+aS'Vak'
+p3
+aS'Bf'
+p4
+aS'Gbe'
+p5
+aS'Tauf'
+p6
+aS'Gbc'
+p7
+aS'Mc'
+p8
+aS'Phic'
+p9
+aS'Cjc'
+p10
+aS'Is'
+p11
+aS'Phie'
+p12
+aS'Ccs'
+p13
+aS'Cje'
+p14
+aS'Taur'
+p15
+aS'Vt'
+p16
+aS'Br'
+p17
+aS'EMinMax'
+p18
+aS'x'
+p19
+atp20
+Rp21
. \ No newline at end of file
diff --git a/js/Electrical/OpAmp.js b/js/Electrical/OpAmp.js
index 4123f4f8..44526b9a 100644
--- a/js/Electrical/OpAmp.js
+++ b/js/Electrical/OpAmp.js
@@ -34,11 +34,11 @@ function OpAmp() {
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);
+ [ok,this.OLGain,this.SatH,this.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);
+ model.equations.parameters[2-1] = list(this.OLGain,this.SatH,this.SatL);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/OpAmp.pickle b/js/Electrical/OpAmp.pickle
index 0d1dde24..aba723ba 100644
--- a/js/Electrical/OpAmp.pickle
+++ b/js/Electrical/OpAmp.pickle
@@ -2,8 +2,14 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'SatH'
p2
-atp3
-Rp4
+aS'x'
+p3
+aS'OLGain'
+p4
+aS'SatL'
+p5
+atp6
+Rp7
. \ No newline at end of file
diff --git a/js/Electrical/PMOS.js b/js/Electrical/PMOS.js
index cd2ba37e..fa73cb42 100644
--- a/js/Electrical/PMOS.js
+++ b/js/Electrical/PMOS.js
@@ -2,15 +2,15 @@
function PMOS() {
PMOS.prototype.define = function PMOS() {
model = scicos_model();
- W = 50.0e-6;
- L = 6.0e-6;
- Beta = 0.0105e-3;
- Vt = -1;
- K2 = 0.41;
- K5 = 0.839;
- dW = -2.5e-6;
- dL = -2.1e-6;
- RDS = 1.e+7;
+ this.W = 50.0e-6;
+ this.L = 6.0e-6;
+ this.Beta = 0.0105e-3;
+ this.Vt = -1;
+ this.K2 = 0.41;
+ this.K5 = 0.839;
+ this.dW = -2.5e-6;
+ this.dL = -2.1e-6;
+ this.RDS = 1.e+7;
model.sim = "PMOS";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -18,11 +18,11 @@ function PMOS() {
mo.model = "PMOS";
mo.outputs = [["D"],["B"],["S"]];
mo.inputs = "G";
- mo.parameters = list([["W"],["L"],["Beta"],["Vt"],["K2"],["K5"],["dW"],["dL"],["RDS"]],[[W],[L],[Beta],[Vt],[K2],[K5],[dW],[dL],[RDS]]);
+ mo.parameters = list([["W"],["L"],["Beta"],["Vt"],["K2"],["K5"],["dW"],["dL"],["RDS"]],[[this.W],[this.L],[this.Beta],[this.Vt],[this.K2],[this.K5],[this.dW],[this.dL],[this.RDS]]);
model.equations = mo;
model.in1 = ones(size(mo.inputs,"*"),1);
model.out = ones(size(mo.outputs,"*"),1);
- exprs = [[string(W)],[string(L)],[string(Beta)],[string(Vt)],[string(K2)],[string(K5)],[string(dW)],[string(dL)],[string(RDS)]];
+ exprs = [[string(this.W)],[string(this.L)],[string(this.Beta)],[string(this.Vt)],[string(this.K2)],[string(this.K5)],[string(this.dW)],[string(this.dL)],[string(this.RDS)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
@@ -40,11 +40,11 @@ function PMOS() {
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);
+ [ok,this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.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);
+ model.equations.parameters[2-1] = list(this.W,this.L,this.Beta,this.Vt,this.K2,this.K5,this.dW,this.dL,this.RDS);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/PMOS.pickle b/js/Electrical/PMOS.pickle
index 0d1dde24..0f015c0a 100644
--- a/js/Electrical/PMOS.pickle
+++ b/js/Electrical/PMOS.pickle
@@ -2,8 +2,26 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'dL'
p2
-atp3
-Rp4
+aS'K5'
+p3
+aS'RDS'
+p4
+aS'L'
+p5
+aS'K2'
+p6
+aS'Beta'
+p7
+aS'Vt'
+p8
+aS'W'
+p9
+aS'dW'
+p10
+aS'x'
+p11
+atp12
+Rp13
. \ No newline at end of file
diff --git a/js/Electrical/PNP.js b/js/Electrical/PNP.js
index 418bbf9c..f823a8ef 100644
--- a/js/Electrical/PNP.js
+++ b/js/Electrical/PNP.js
@@ -62,11 +62,11 @@ function PNP() {
this.x = arg1;
exprs = this.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);
+ [ok,this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.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;
}
- this.x.model.equations.parameters[2-1] = list(Bf,Br,Is,Vak,Tauf,Taur,Ccs,Cje,Cjc,Phie,Me,Phic,Mc,Gbc,Gbe,Vt,EMinMax);
+ this.x.model.equations.parameters[2-1] = list(this.Bf,this.Br,this.Is,this.Vak,this.Tauf,this.Taur,this.Ccs,this.Cje,this.Cjc,this.Phie,this.Me,this.Phic,this.Mc,this.Gbc,this.Gbe,this.Vt,this.EMinMax);
this.x.graphics.exprs = exprs;
break;
}
diff --git a/js/Electrical/PNP.pickle b/js/Electrical/PNP.pickle
index 0d1dde24..ffc05c1b 100644
--- a/js/Electrical/PNP.pickle
+++ b/js/Electrical/PNP.pickle
@@ -2,8 +2,42 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'Me'
p2
-atp3
-Rp4
+aS'Vak'
+p3
+aS'Bf'
+p4
+aS'Gbe'
+p5
+aS'Tauf'
+p6
+aS'Gbc'
+p7
+aS'Mc'
+p8
+aS'Phic'
+p9
+aS'Cjc'
+p10
+aS'Is'
+p11
+aS'Phie'
+p12
+aS'Ccs'
+p13
+aS'Cje'
+p14
+aS'Taur'
+p15
+aS'Vt'
+p16
+aS'Br'
+p17
+aS'EMinMax'
+p18
+aS'x'
+p19
+atp20
+Rp21
. \ No newline at end of file
diff --git a/js/Electrical/Resistor.js b/js/Electrical/Resistor.js
index fdc0f662..4341ccb6 100644
--- a/js/Electrical/Resistor.js
+++ b/js/Electrical/Resistor.js
@@ -2,8 +2,8 @@
function Resistor() {
Resistor.prototype.define = function Resistor() {
model = scicos_model();
- R = 0.01;
- model.rpar = R;
+ this.R = 0.01;
+ model.rpar = this.R;
model.sim = "resistor";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -11,11 +11,11 @@ function Resistor() {
mo.model = "Resistor";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list("R",list(R));
+ mo.parameters = list("R",list(this.R));
model.equations = mo;
model.in1 = ones(size(mo.inputs,"*"),1);
model.out = ones(size(mo.outputs,"*"),1);
- exprs = string(R);
+ exprs = string(this.R);
gr_i = [];
this.x = standard_define([2,1],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -33,12 +33,12 @@ function Resistor() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,R,exprs] = scicos_getvalue("Set Resistor block parameter","R (ohm)",list("vec",1),exprs);
+ [ok,this.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);
+ model.rpar = this.R;
+ model.equations.parameters[2-1] = list(this.R);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/Resistor.pickle b/js/Electrical/Resistor.pickle
index 0d1dde24..1fa90b15 100644
--- a/js/Electrical/Resistor.pickle
+++ b/js/Electrical/Resistor.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'R'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Electrical/SineVoltage.js b/js/Electrical/SineVoltage.js
index 0d7a554a..43cc8701 100644
--- a/js/Electrical/SineVoltage.js
+++ b/js/Electrical/SineVoltage.js
@@ -4,12 +4,12 @@ function SineVoltage() {
model = scicos_model();
model.in1 = [1];
model.out = [1];
- V = 1;
- ph = 0;
- frq = 1;
- offset = 0;
- start = 0;
- model.rpar = [[V],[ph],[frq],[offset],[start]];
+ this.V = 1;
+ this.ph = 0;
+ this.frq = 1;
+ this.offset = 0;
+ this.start = 0;
+ model.rpar = [[this.V],[this.ph],[this.frq],[this.offset],[this.start]];
model.sim = "SineVoltage";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -17,9 +17,9 @@ function SineVoltage() {
mo.model = "SineVoltage";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list([["V"],["phase"],["freqHz"],["offset"],["startTime"]],list(V,ph,frq,offset,start));
+ mo.parameters = list([["V"],["phase"],["freqHz"],["offset"],["startTime"]],list(this.V,this.ph,this.frq,this.offset,this.start));
model.equations = mo;
- exprs = [[string(V)],[string(ph)],[string(frq)],[string(offset)],[string(start)]];
+ exprs = [[string(this.V)],[string(this.ph)],[string(this.frq)],[string(this.offset)],[string(this.start)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,gr_i);
this.x.graphics.in_implicit = ["I"];
@@ -37,12 +37,12 @@ function SineVoltage() {
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);
+ [ok,this.V,this.ph,this.frq,this.offset,this.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);
+ model.rpar = [[this.V],[this.ph],[this.frq],[this.offset],[this.start]];
+ model.equations.parameters[2-1] = list(this.V,this.ph,this.frq,this.offset,this.start);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/SineVoltage.pickle b/js/Electrical/SineVoltage.pickle
index 0d1dde24..e7abe6f3 100644
--- a/js/Electrical/SineVoltage.pickle
+++ b/js/Electrical/SineVoltage.pickle
@@ -2,8 +2,18 @@ c__builtin__
set
p0
((lp1
-S'x'
+S'V'
p2
-atp3
-Rp4
+aS'start'
+p3
+aS'frq'
+p4
+aS'offset'
+p5
+aS'x'
+p6
+aS'ph'
+p7
+atp8
+Rp9
. \ No newline at end of file
diff --git a/js/Electrical/Switch.js b/js/Electrical/Switch.js
index d3c8d95b..e45d1b5c 100644
--- a/js/Electrical/Switch.js
+++ b/js/Electrical/Switch.js
@@ -2,8 +2,8 @@
function Switch() {
Switch.prototype.define = function Switch() {
model = scicos_model();
- Ron = 0.01;
- Roff = 1e5;
+ this.Ron = 0.01;
+ this.Roff = 1e5;
S = [["Ron"],["Roff"]];
Z = eval(S);
model.sim = "Switch";
@@ -36,11 +36,11 @@ function Switch() {
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);
+ [ok,this.Ron,this.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);
+ model.equations.parameters[2-1] = list(this.Ron,this.Roff);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/Switch.pickle b/js/Electrical/Switch.pickle
index 0d1dde24..5a7e7ba4 100644
--- a/js/Electrical/Switch.pickle
+++ b/js/Electrical/Switch.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'Roff'
+p3
+aS'Ron'
+p4
+atp5
+Rp6
. \ No newline at end of file
diff --git a/js/Electrical/VVsourceAC.js b/js/Electrical/VVsourceAC.js
index e87ac43d..779cdd91 100644
--- a/js/Electrical/VVsourceAC.js
+++ b/js/Electrical/VVsourceAC.js
@@ -5,8 +5,8 @@ function VVsourceAC() {
model.in1 = [[1],[1]];
model.out = [1];
VA = 220;
- FR = 50;
- model.rpar = [FR];
+ this.FR = 50;
+ model.rpar = [this.FR];
model.sim = "VVsourceAC";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -14,9 +14,9 @@ function VVsourceAC() {
mo.model = "VVsourceAC";
mo.inputs = ["p","VA"];
mo.outputs = "n";
- mo.parameters = list(["f"],list(FR));
+ mo.parameters = list(["f"],list(this.FR));
model.equations = mo;
- exprs = [string(FR)];
+ exprs = [string(this.FR)];
gr_i = [];
this.x = standard_define([2,2],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I","E"];
@@ -34,12 +34,12 @@ function VVsourceAC() {
exprs = graphics.exprs;
model = arg1.model;
while (true) {
- [ok,FR,exprs] = scicos_getvalue("Set voltage source parameter",["Frequency (Hz)"],list("vec",-1),exprs);
+ [ok,this.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);
+ model.rpar = [this.FR];
+ model.equations.parameters[2-1] = list(this.FR);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/VVsourceAC.pickle b/js/Electrical/VVsourceAC.pickle
index 0d1dde24..95e8974e 100644
--- a/js/Electrical/VVsourceAC.pickle
+++ b/js/Electrical/VVsourceAC.pickle
@@ -4,6 +4,8 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'FR'
+p3
+atp4
+Rp5
. \ No newline at end of file
diff --git a/js/Electrical/VoltageSensor.js b/js/Electrical/VoltageSensor.js
index e3369b94..1d463e44 100644
--- a/js/Electrical/VoltageSensor.js
+++ b/js/Electrical/VoltageSensor.js
@@ -17,7 +17,7 @@ function VoltageSensor() {
this.x = standard_define([2,2],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = [["I"],["E"]];
- return new BasicBlock(this.x);
+ return new VoltageSensorBlock(this.x);
}
VoltageSensor.prototype.details = function VoltageSensor() {
return this.x;
@@ -26,6 +26,6 @@ function VoltageSensor() {
}
VoltageSensor.prototype.set = function VoltageSensor() {
this.x = arg1;
- return new BasicBlock(this.x);
+ return new VoltageSensorBlock(this.x);
}
}
diff --git a/js/Electrical/VsourceAC.js b/js/Electrical/VsourceAC.js
index 8a2464c5..6cf00234 100644
--- a/js/Electrical/VsourceAC.js
+++ b/js/Electrical/VsourceAC.js
@@ -4,9 +4,9 @@ function VsourceAC() {
model = scicos_model();
model.in1 = [1];
model.out = [1];
- VA = 220;
- FR = 50;
- model.rpar = [[VA],[FR]];
+ this.VA = 220;
+ this.FR = 50;
+ model.rpar = [[this.VA],[this.FR]];
model.sim = "VsourceAC";
model.blocktype = "c";
model.dep_ut = [true,false];
@@ -14,9 +14,9 @@ function VsourceAC() {
mo.model = "VsourceAC";
mo.inputs = "p";
mo.outputs = "n";
- mo.parameters = list([["VA"],["f"]],list(VA,FR));
+ mo.parameters = list([["VA"],["f"]],list(this.VA,this.FR));
model.equations = mo;
- exprs = [[string(VA)],[string(FR)]];
+ exprs = [[string(this.VA)],[string(this.FR)]];
gr_i = [];
this.x = standard_define([2,2],model,exprs,list(gr_i,0));
this.x.graphics.in_implicit = ["I"];
@@ -34,12 +34,12 @@ function VsourceAC() {
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);
+ [ok,this.VA,this.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);
+ model.rpar = [[this.VA],[this.FR]];
+ model.equations.parameters[2-1] = list(this.VA,this.FR);
graphics.exprs = exprs;
this.x.graphics = graphics;
this.x.model = model;
diff --git a/js/Electrical/VsourceAC.pickle b/js/Electrical/VsourceAC.pickle
index 0d1dde24..7dc76fc6 100644
--- a/js/Electrical/VsourceAC.pickle
+++ b/js/Electrical/VsourceAC.pickle
@@ -4,6 +4,10 @@ p0
((lp1
S'x'
p2
-atp3
-Rp4
+aS'FR'
+p3
+aS'VA'
+p4
+atp5
+Rp6
. \ No newline at end of file