summaryrefslogtreecommitdiff
path: root/js/Electrical/VVsourceAC.js
blob: 2985b8cb457d0ac251b527f61ef0042fad2e8710 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* autogenerated from "macros/Electrical/VVsourceAC.sci" */
function VVsourceAC() {
    VVsourceAC.prototype.define = function VVsourceAC() {
        model = scicos_model();
        model.in1 = [[1],[1]];
        model.out = [1];
        VA = 220;
        FR = 50;
        model.rpar = [FR];
        model.sim = "VVsourceAC";
        model.blocktype = "c";
        model.dep_ut = [true,false];
        mo = modelica();
        mo.model = "VVsourceAC";
        mo.inputs = ["p","VA"];
        mo.outputs = "n";
        mo.parameters = list(["f"],list(FR));
        model.equations = mo;
        exprs = [string(FR)];
        gr_i = [];
        x = standard_define([2,2],model,exprs,list(gr_i,0));
        x.graphics.in_implicit = ["I","E"];
        x.graphics.out_implicit = ["I"];
    }
    VVsourceAC.prototype.details = function VVsourceAC() {
    }
    VVsourceAC.prototype.get = function VVsourceAC() {
    }
    VVsourceAC.prototype.set = function VVsourceAC() {
        x = arg1;
        graphics = arg1.graphics;
        exprs = graphics.exprs;
        model = arg1.model;
        while (true) {
        [ok,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);
        graphics.exprs = exprs;
        x.graphics = graphics;
        x.model = model;
break;
}
    }
}