diff options
Diffstat (limited to 'js/Electrical/VsourceAC.js')
-rw-r--r-- | js/Electrical/VsourceAC.js | 16 |
1 files changed, 8 insertions, 8 deletions
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; |