summaryrefslogtreecommitdiff
path: root/js/Electrical/Diode.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Electrical/Diode.js')
-rw-r--r--js/Electrical/Diode.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/Electrical/Diode.js b/js/Electrical/Diode.js
index f696eef6..d29202b3 100644
--- a/js/Electrical/Diode.js
+++ b/js/Electrical/Diode.js
@@ -18,9 +18,9 @@ function Diode() {
mo.outputs = "n";
mo.parameters = list(["Ids","Vt","Maxexp","R"],list(this.Ids,this.Vt,this.Maxexp,this.R));
this.model.equations = new ScilabDouble([mo]);
- var exprs = string([[this.Ids],[this.Vt],[this.Maxexp],[this.R]]);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Diode\",sz(1),sz(2));"]);
- this.x = standard_define([2,1],this.model,exprs,list(gr_i,0));
+ this.exprs = string([[this.Ids],[this.Vt],[this.Maxexp],[this.R]]);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"Diode\",sz(1),sz(2));"]);
+ this.x = standard_define([2,1],this.model,this.exprs,list(this.gr_i,0));
this.x.graphics.in_implicit = ["I"];
this.x.graphics.out_implicit = ["I"];
return new BasicBlock(this.x);
@@ -42,18 +42,19 @@ function Diode() {
this.Vt = parseFloat(arguments[0]["Vt"])
this.Maxexp = parseFloat(arguments[0]["Maxexp"])
this.R = parseFloat(arguments[0]["R"])
+ this.exprs = arguments[0]["exprs"]
this.x = arg1;
this.graphics = arg1.graphics;
- var exprs = this.graphics.exprs;
+ this.exprs = this.graphics.exprs;
this.model = arg1.model;
while (true) {
- [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);
+ [ok,this.Ids,this.Vt,this.Maxexp,this.R,this.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),this.exprs);
if (!ok) {
break;
}
this.model.rpar = new ScilabDouble([this.Ids],[this.Vt],[this.Maxexp],[this.R]);
this.model.equations.parameters = list(["Ids","Vt","Maxexp","R"],list(this.Ids,this.Vt,this.Maxexp,this.R));
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;