diff options
author | Sunil Shetye | 2018-06-26 14:59:47 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-06-26 14:59:47 +0530 |
commit | eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00 (patch) | |
tree | 6378935263fe5cafd389b6893ac3b37a1dd4b1a7 /js/Electrical/VVsourceAC.js | |
parent | afed64f1a0eab0b2d742088186d7bc340a2c895b (diff) | |
download | sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.gz sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.tar.bz2 sci2js-eb7c8e0cd42d4afe02be3adda2e94b6b0dfdaa00.zip |
add return value from scicos_getvalue to global vars
Diffstat (limited to 'js/Electrical/VVsourceAC.js')
-rw-r--r-- | js/Electrical/VVsourceAC.js | 14 |
1 files changed, 7 insertions, 7 deletions
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; |