summaryrefslogtreecommitdiff
path: root/js/Electrical/OpAmp.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Electrical/OpAmp.js')
-rw-r--r--js/Electrical/OpAmp.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/Electrical/OpAmp.js b/js/Electrical/OpAmp.js
index 4a807bc0..31437ba3 100644
--- a/js/Electrical/OpAmp.js
+++ b/js/Electrical/OpAmp.js
@@ -16,9 +16,9 @@ function OpAmp() {
this.model.in1 = new ScilabDouble([ones(size(mo.inputs,"*"),1)]);
this.model.out = new ScilabDouble([ones(size(mo.outputs,"*"),1)]);
this.model.rpar = new ScilabDouble(Z);
- var exprs = string(Z);
- var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"OpAmp\",sz(1),sz(2));"]);
- this.x = standard_define([3,5],this.model,exprs,gr_i);
+ this.exprs = string(Z);
+ this.gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"OpAmp\",sz(1),sz(2));"]);
+ this.x = standard_define([3,5],this.model,this.exprs,this.gr_i);
this.x.graphics.in_implicit = [["I"],["I"]];
this.x.graphics.out_implicit = ["I"];
return new BasicBlock(this.x);
@@ -38,17 +38,18 @@ function OpAmp() {
this.OLGain = arguments[0]["OLGain"]
this.SatH = arguments[0]["SatH"]
this.SatL = arguments[0]["SatL"]
+ 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 (false) {
- [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);
+ [ok,this.OLGain,this.SatH,this.SatL,this.exprs] = scicos_getvalue("Set the Operational Amplifier parameters",["Open Loop Gain","Positive saturation voltage","Negative saturation voltage"],list("vec",1,"vec",1,"vec",1),this.exprs);
if (!ok) {
break;
}
this.model.equations.parameters[2-1] = list(new ScilabDouble([this.OLGain]), new ScilabDouble([this.SatH]), new ScilabDouble([this.SatL]));
- this.graphics.exprs = new ScilabDouble([exprs]);
+ this.graphics.exprs = new ScilabDouble([this.exprs]);
this.x.graphics = this.graphics;
this.x.model = this.model;
break;