diff options
author | Shashank | 2017-05-29 12:40:26 +0530 |
---|---|---|
committer | Shashank | 2017-05-29 12:40:26 +0530 |
commit | 0345245e860375a32c9a437c4a9d9cae807134e9 (patch) | |
tree | ad51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/xcos/demos | |
download | scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2 scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip |
CMSCOPE changed
Diffstat (limited to 'modules/xcos/demos')
106 files changed, 670 insertions, 0 deletions
diff --git a/modules/xcos/demos/Bouncing_ball.zcos b/modules/xcos/demos/Bouncing_ball.zcos Binary files differnew file mode 100755 index 000000000..afd6934cb --- /dev/null +++ b/modules/xcos/demos/Bouncing_ball.zcos diff --git a/modules/xcos/demos/CodeGen/controller.zcos b/modules/xcos/demos/CodeGen/controller.zcos Binary files differnew file mode 100755 index 000000000..e8ecf04a3 --- /dev/null +++ b/modules/xcos/demos/CodeGen/controller.zcos diff --git a/modules/xcos/demos/CodeGen/fibo.zcos b/modules/xcos/demos/CodeGen/fibo.zcos Binary files differnew file mode 100755 index 000000000..7960529aa --- /dev/null +++ b/modules/xcos/demos/CodeGen/fibo.zcos diff --git a/modules/xcos/demos/Command.zcos b/modules/xcos/demos/Command.zcos Binary files differnew file mode 100755 index 000000000..f508d2af8 --- /dev/null +++ b/modules/xcos/demos/Command.zcos diff --git a/modules/xcos/demos/Command_bode.zcos b/modules/xcos/demos/Command_bode.zcos Binary files differnew file mode 100755 index 000000000..4363d6a85 --- /dev/null +++ b/modules/xcos/demos/Command_bode.zcos diff --git a/modules/xcos/demos/Cont.Disc-Observer.zcos b/modules/xcos/demos/Cont.Disc-Observer.zcos Binary files differnew file mode 100755 index 000000000..01e2ceba2 --- /dev/null +++ b/modules/xcos/demos/Cont.Disc-Observer.zcos diff --git a/modules/xcos/demos/Controller.zcos b/modules/xcos/demos/Controller.zcos Binary files differnew file mode 100755 index 000000000..83bbc85e6 --- /dev/null +++ b/modules/xcos/demos/Controller.zcos diff --git a/modules/xcos/demos/Discrete-KalmanFilter.zcos b/modules/xcos/demos/Discrete-KalmanFilter.zcos Binary files differnew file mode 100755 index 000000000..75d37211c --- /dev/null +++ b/modules/xcos/demos/Discrete-KalmanFilter.zcos diff --git a/modules/xcos/demos/Electrical/AND_Gate.zcos b/modules/xcos/demos/Electrical/AND_Gate.zcos Binary files differnew file mode 100755 index 000000000..e308b7a0e --- /dev/null +++ b/modules/xcos/demos/Electrical/AND_Gate.zcos diff --git a/modules/xcos/demos/Electrical/Boost_Converter.zcos b/modules/xcos/demos/Electrical/Boost_Converter.zcos Binary files differnew file mode 100755 index 000000000..eb3e923dd --- /dev/null +++ b/modules/xcos/demos/Electrical/Boost_Converter.zcos diff --git a/modules/xcos/demos/Electrical/Bridge_Rectifier.zcos b/modules/xcos/demos/Electrical/Bridge_Rectifier.zcos Binary files differnew file mode 100755 index 000000000..f1ef54f3b --- /dev/null +++ b/modules/xcos/demos/Electrical/Bridge_Rectifier.zcos diff --git a/modules/xcos/demos/Electrical/Colpitts_Oscillator.zcos b/modules/xcos/demos/Electrical/Colpitts_Oscillator.zcos Binary files differnew file mode 100755 index 000000000..6616f9639 --- /dev/null +++ b/modules/xcos/demos/Electrical/Colpitts_Oscillator.zcos diff --git a/modules/xcos/demos/Electrical/DC_DC_Buck_Converter.zcos b/modules/xcos/demos/Electrical/DC_DC_Buck_Converter.zcos Binary files differnew file mode 100755 index 000000000..fae46a91f --- /dev/null +++ b/modules/xcos/demos/Electrical/DC_DC_Buck_Converter.zcos diff --git a/modules/xcos/demos/Electrical/Difference_amplifier.zcos b/modules/xcos/demos/Electrical/Difference_amplifier.zcos Binary files differnew file mode 100755 index 000000000..3b4543dbd --- /dev/null +++ b/modules/xcos/demos/Electrical/Difference_amplifier.zcos diff --git a/modules/xcos/demos/Electrical/NOR_Gate.zcos b/modules/xcos/demos/Electrical/NOR_Gate.zcos Binary files differnew file mode 100755 index 000000000..dffce81d3 --- /dev/null +++ b/modules/xcos/demos/Electrical/NOR_Gate.zcos diff --git a/modules/xcos/demos/Electrical/Opamp_Amplifier.zcos b/modules/xcos/demos/Electrical/Opamp_Amplifier.zcos Binary files differnew file mode 100755 index 000000000..5ee57b5ff --- /dev/null +++ b/modules/xcos/demos/Electrical/Opamp_Amplifier.zcos diff --git a/modules/xcos/demos/Electrical/Switched_capacitor_integrator.zcos b/modules/xcos/demos/Electrical/Switched_capacitor_integrator.zcos Binary files differnew file mode 100755 index 000000000..3c6565d11 --- /dev/null +++ b/modules/xcos/demos/Electrical/Switched_capacitor_integrator.zcos diff --git a/modules/xcos/demos/Electrical/Transformer.zcos b/modules/xcos/demos/Electrical/Transformer.zcos Binary files differnew file mode 100755 index 000000000..b2ba138b5 --- /dev/null +++ b/modules/xcos/demos/Electrical/Transformer.zcos diff --git a/modules/xcos/demos/Electrical/boost_conv.dem.sce b/modules/xcos/demos/Electrical/boost_conv.dem.sce new file mode 100755 index 000000000..a873d1221 --- /dev/null +++ b/modules/xcos/demos/Electrical/boost_conv.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Electrical/Boost_Converter.zcos"); + diff --git a/modules/xcos/demos/Electrical/bridge_rectifier.dem.sce b/modules/xcos/demos/Electrical/bridge_rectifier.dem.sce new file mode 100755 index 000000000..17d372634 --- /dev/null +++ b/modules/xcos/demos/Electrical/bridge_rectifier.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Electrical/Bridge_Rectifier.zcos"); + diff --git a/modules/xcos/demos/Electrical/buck_conv.dem.sce b/modules/xcos/demos/Electrical/buck_conv.dem.sce new file mode 100755 index 000000000..022afc07f --- /dev/null +++ b/modules/xcos/demos/Electrical/buck_conv.dem.sce @@ -0,0 +1,7 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Electrical/DC_DC_Buck_Converter.zcos"); diff --git a/modules/xcos/demos/Electrical/colpitts_osc.dem.sce b/modules/xcos/demos/Electrical/colpitts_osc.dem.sce new file mode 100755 index 000000000..dcff2b43b --- /dev/null +++ b/modules/xcos/demos/Electrical/colpitts_osc.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Electrical/Colpitts_Oscillator.zcos"); + diff --git a/modules/xcos/demos/Electrical/differential_amp.dem.sce b/modules/xcos/demos/Electrical/differential_amp.dem.sce new file mode 100755 index 000000000..4fcd7f093 --- /dev/null +++ b/modules/xcos/demos/Electrical/differential_amp.dem.sce @@ -0,0 +1,7 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Electrical/Difference_amplifier.zcos"); diff --git a/modules/xcos/demos/Electrical/logic_and.dem.sce b/modules/xcos/demos/Electrical/logic_and.dem.sce new file mode 100755 index 000000000..4ab0c0121 --- /dev/null +++ b/modules/xcos/demos/Electrical/logic_and.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Electrical/AND_Gate.zcos"); + diff --git a/modules/xcos/demos/Electrical/logic_nor.dem.sce b/modules/xcos/demos/Electrical/logic_nor.dem.sce new file mode 100755 index 000000000..82d77f984 --- /dev/null +++ b/modules/xcos/demos/Electrical/logic_nor.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Electrical/NOR_Gate.zcos"); + diff --git a/modules/xcos/demos/Electrical/op_amplier.dem.sce b/modules/xcos/demos/Electrical/op_amplier.dem.sce new file mode 100755 index 000000000..1856cb96d --- /dev/null +++ b/modules/xcos/demos/Electrical/op_amplier.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Electrical/Opamp_Amplifier.zcos"); + diff --git a/modules/xcos/demos/Electrical/rlc_circuit.dem.sce b/modules/xcos/demos/Electrical/rlc_circuit.dem.sce new file mode 100755 index 000000000..a6165e3db --- /dev/null +++ b/modules/xcos/demos/Electrical/rlc_circuit.dem.sce @@ -0,0 +1,10 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + + +// electrical blocks are simulated with Modelica +xcos("SCI/modules/xcos/demos/ModelicaBlocks/RLC_Modelica.zcos"); +clear thispath; diff --git a/modules/xcos/demos/Electrical/switched_cap_filter.dem.sce b/modules/xcos/demos/Electrical/switched_cap_filter.dem.sce new file mode 100755 index 000000000..022e35723 --- /dev/null +++ b/modules/xcos/demos/Electrical/switched_cap_filter.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Electrical/Switched_capacitor_integrator.zcos"); + diff --git a/modules/xcos/demos/Electrical/transformer.dem.sce b/modules/xcos/demos/Electrical/transformer.dem.sce new file mode 100755 index 000000000..608c6c459 --- /dev/null +++ b/modules/xcos/demos/Electrical/transformer.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Electrical/Transformer.zcos"); + diff --git a/modules/xcos/demos/Event/event_and.dem.sce b/modules/xcos/demos/Event/event_and.dem.sce new file mode 100755 index 000000000..21711f650 --- /dev/null +++ b/modules/xcos/demos/Event/event_and.dem.sce @@ -0,0 +1,6 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011-2011 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Event/event_and.zcos"); diff --git a/modules/xcos/demos/Event/event_and.zcos b/modules/xcos/demos/Event/event_and.zcos Binary files differnew file mode 100755 index 000000000..77e7cfb76 --- /dev/null +++ b/modules/xcos/demos/Event/event_and.zcos diff --git a/modules/xcos/demos/Event/event_if_then_else.dem.sce b/modules/xcos/demos/Event/event_if_then_else.dem.sce new file mode 100755 index 000000000..9bd1b7cc7 --- /dev/null +++ b/modules/xcos/demos/Event/event_if_then_else.dem.sce @@ -0,0 +1,6 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2011-2011 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Event/if_then_else.zcos"); diff --git a/modules/xcos/demos/Event/if_then_else.zcos b/modules/xcos/demos/Event/if_then_else.zcos Binary files differnew file mode 100755 index 000000000..a0fd25623 --- /dev/null +++ b/modules/xcos/demos/Event/if_then_else.zcos diff --git a/modules/xcos/demos/Fibonacci.zcos b/modules/xcos/demos/Fibonacci.zcos Binary files differnew file mode 100755 index 000000000..0c9ed4fe2 --- /dev/null +++ b/modules/xcos/demos/Fibonacci.zcos diff --git a/modules/xcos/demos/IF_block.zcos b/modules/xcos/demos/IF_block.zcos Binary files differnew file mode 100755 index 000000000..e645f1eb8 --- /dev/null +++ b/modules/xcos/demos/IF_block.zcos diff --git a/modules/xcos/demos/Ifsub.zcos b/modules/xcos/demos/Ifsub.zcos Binary files differnew file mode 100755 index 000000000..006db336e --- /dev/null +++ b/modules/xcos/demos/Ifsub.zcos diff --git a/modules/xcos/demos/Inverted_pendulum.zcos b/modules/xcos/demos/Inverted_pendulum.zcos Binary files differnew file mode 100755 index 000000000..d47ed331b --- /dev/null +++ b/modules/xcos/demos/Inverted_pendulum.zcos diff --git a/modules/xcos/demos/Kalman.zcos b/modules/xcos/demos/Kalman.zcos Binary files differnew file mode 100755 index 000000000..b0cc0786f --- /dev/null +++ b/modules/xcos/demos/Kalman.zcos diff --git a/modules/xcos/demos/Kalman_1.zcos b/modules/xcos/demos/Kalman_1.zcos Binary files differnew file mode 100755 index 000000000..df66e1ed3 --- /dev/null +++ b/modules/xcos/demos/Kalman_1.zcos diff --git a/modules/xcos/demos/Lorenz.zcos b/modules/xcos/demos/Lorenz.zcos Binary files differnew file mode 100755 index 000000000..5b7e01fb4 --- /dev/null +++ b/modules/xcos/demos/Lorenz.zcos diff --git a/modules/xcos/demos/ModelicaBlocks/Ball_Platform.zcos b/modules/xcos/demos/ModelicaBlocks/Ball_Platform.zcos Binary files differnew file mode 100755 index 000000000..15faf5349 --- /dev/null +++ b/modules/xcos/demos/ModelicaBlocks/Ball_Platform.zcos diff --git a/modules/xcos/demos/ModelicaBlocks/BouncingBall_Modelica.zcos b/modules/xcos/demos/ModelicaBlocks/BouncingBall_Modelica.zcos Binary files differnew file mode 100755 index 000000000..f5f6f7311 --- /dev/null +++ b/modules/xcos/demos/ModelicaBlocks/BouncingBall_Modelica.zcos diff --git a/modules/xcos/demos/ModelicaBlocks/Chaos_Modelica.zcos b/modules/xcos/demos/ModelicaBlocks/Chaos_Modelica.zcos Binary files differnew file mode 100755 index 000000000..0cb31dc7b --- /dev/null +++ b/modules/xcos/demos/ModelicaBlocks/Chaos_Modelica.zcos diff --git a/modules/xcos/demos/ModelicaBlocks/Hydraulics.zcos b/modules/xcos/demos/ModelicaBlocks/Hydraulics.zcos Binary files differnew file mode 100755 index 000000000..ed7305762 --- /dev/null +++ b/modules/xcos/demos/ModelicaBlocks/Hydraulics.zcos diff --git a/modules/xcos/demos/ModelicaBlocks/RLC_Modelica.zcos b/modules/xcos/demos/ModelicaBlocks/RLC_Modelica.zcos Binary files differnew file mode 100755 index 000000000..930deede1 --- /dev/null +++ b/modules/xcos/demos/ModelicaBlocks/RLC_Modelica.zcos diff --git a/modules/xcos/demos/ModelicaBlocks/ball_platform.dem.sce b/modules/xcos/demos/ModelicaBlocks/ball_platform.dem.sce new file mode 100755 index 000000000..e02968508 --- /dev/null +++ b/modules/xcos/demos/ModelicaBlocks/ball_platform.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/ModelicaBlocks/Ball_Platform.zcos"); + diff --git a/modules/xcos/demos/ModelicaBlocks/modelica_bouncing_ball.dem.sce b/modules/xcos/demos/ModelicaBlocks/modelica_bouncing_ball.dem.sce new file mode 100755 index 000000000..601efdc29 --- /dev/null +++ b/modules/xcos/demos/ModelicaBlocks/modelica_bouncing_ball.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/ModelicaBlocks/BouncingBall_Modelica.zcos"); + diff --git a/modules/xcos/demos/ModelicaBlocks/modelica_chaos.dem.sce b/modules/xcos/demos/ModelicaBlocks/modelica_chaos.dem.sce new file mode 100755 index 000000000..634641f00 --- /dev/null +++ b/modules/xcos/demos/ModelicaBlocks/modelica_chaos.dem.sce @@ -0,0 +1,7 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/ModelicaBlocks/Chaos_Modelica.zcos"); diff --git a/modules/xcos/demos/ModelicaBlocks/modelica_hydraulics.dem.sce b/modules/xcos/demos/ModelicaBlocks/modelica_hydraulics.dem.sce new file mode 100755 index 000000000..da5ded8a5 --- /dev/null +++ b/modules/xcos/demos/ModelicaBlocks/modelica_hydraulics.dem.sce @@ -0,0 +1,7 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/ModelicaBlocks/Hydraulics.zcos"); diff --git a/modules/xcos/demos/ModelicaBlocks/modelica_rlc_circuit.dem.sce b/modules/xcos/demos/ModelicaBlocks/modelica_rlc_circuit.dem.sce new file mode 100755 index 000000000..8c123b86a --- /dev/null +++ b/modules/xcos/demos/ModelicaBlocks/modelica_rlc_circuit.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/ModelicaBlocks/RLC_Modelica.zcos"); + diff --git a/modules/xcos/demos/OldGainTest.zcos b/modules/xcos/demos/OldGainTest.zcos Binary files differnew file mode 100755 index 000000000..de8761bc3 --- /dev/null +++ b/modules/xcos/demos/OldGainTest.zcos diff --git a/modules/xcos/demos/PENDULUM_ANIM.sci b/modules/xcos/demos/PENDULUM_ANIM.sci new file mode 100755 index 000000000..2ddfffe55 --- /dev/null +++ b/modules/xcos/demos/PENDULUM_ANIM.sci @@ -0,0 +1,73 @@ +///withoutPrompt +function [x,y,typ]=PENDULUM_ANIM(job,arg1,arg2) + // Animation of the cart-pendulum problem + x=[];y=[];typ=[] + select job + case "plot" then + standard_draw(arg1) + case "getinputs" then + [x,y,typ]=standard_inputs(o) + case "getoutputs" then + x=[];y=[];typ=[]; + case "getorigin" then + [x,y]=standard_origin(arg1) + case "set" then + x=arg1; + graphics=arg1.graphics;exprs=graphics.exprs + model=arg1.model;dstate=model.dstate + while %t do + [ok,plen,csiz,phi,xmin,xmax,ymin,ymax,exprs]=scicos_getvalue(.. + "Set Scope parameters",.. + ["pendulum length";"cart size (square side)";"slope"; + "Xmin";"Xmax"; "Ymin"; "Ymax"; ],.. + list("vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1,"vec",1),exprs) + if ~ok then break,end + mess=[] + if plen<=0|csiz<=0 then + mess=[mess;"Pendulum length and cart size must be positive.";" "] + ok=%f + end + if ymin>=ymax then + mess=[mess;"Ymax must be greater than Ymin";" "] + ok=%f + end + if xmin>=xmax then + mess=[mess;"Xmax must be greater than Xmin";" "] + ok=%f + end + if ~ok then + message(mess) + else + rpar=[plen;csiz;phi;xmin;xmax;ymin;ymax] + model.rpar=rpar; + graphics.exprs=exprs; + x.graphics=graphics;x.model=model + break + end + end + case "define" then + plen=2; csiz=2; phi=0; + xmin=-5;xmax=5;ymin=-5;ymax=5 + + model=scicos_model() + model.sim=list("anim_pen",5) + model.in=[1;1] + model.evtin=1 + model.dstate=0 + model.rpar=[plen;csiz;phi;xmin;xmax;ymin;ymax] + model.blocktype="d" + model.dep_ut=[%f %f] + + exprs=string(model.rpar) + gr_i=["thick=xget(''thickness'');xset(''thickness'',2);"; + "xx=orig(1)+sz(1)*[.4 .6 .6 .4 .4]" + "yy=orig(2)+sz(2)*[.2 .2 .4 .4 .2]" + "xpoly(xx,yy,''lines'')" + "xx=orig(1)+sz(1)*[.5 .6]" + "yy=orig(2)+sz(2)*[.4 .8]" + "xpoly(xx,yy)" + "xset(''thickness'',thick);"] + x=standard_define([3 3],model,exprs,gr_i) + end +endfunction + diff --git a/modules/xcos/demos/Plant_DiscreteController.zcos b/modules/xcos/demos/Plant_DiscreteController.zcos Binary files differnew file mode 100755 index 000000000..e626097f5 --- /dev/null +++ b/modules/xcos/demos/Plant_DiscreteController.zcos diff --git a/modules/xcos/demos/Scilab_Block.zcos b/modules/xcos/demos/Scilab_Block.zcos Binary files differnew file mode 100755 index 000000000..cbde748a0 --- /dev/null +++ b/modules/xcos/demos/Scilab_Block.zcos diff --git a/modules/xcos/demos/Signal_Builder.zcos b/modules/xcos/demos/Signal_Builder.zcos Binary files differnew file mode 100755 index 000000000..64b0f114d --- /dev/null +++ b/modules/xcos/demos/Signal_Builder.zcos diff --git a/modules/xcos/demos/Simple_Demo.zcos b/modules/xcos/demos/Simple_Demo.zcos Binary files differnew file mode 100755 index 000000000..754b6e7eb --- /dev/null +++ b/modules/xcos/demos/Simple_Demo.zcos diff --git a/modules/xcos/demos/Simple_Thermostat.zcos b/modules/xcos/demos/Simple_Thermostat.zcos Binary files differnew file mode 100755 index 000000000..09bae2f4b --- /dev/null +++ b/modules/xcos/demos/Simple_Thermostat.zcos diff --git a/modules/xcos/demos/System-Observer.zcos b/modules/xcos/demos/System-Observer.zcos Binary files differnew file mode 100755 index 000000000..a82dd2789 --- /dev/null +++ b/modules/xcos/demos/System-Observer.zcos diff --git a/modules/xcos/demos/Table_Lookup.zcos b/modules/xcos/demos/Table_Lookup.zcos Binary files differnew file mode 100755 index 000000000..1830ab079 --- /dev/null +++ b/modules/xcos/demos/Table_Lookup.zcos diff --git a/modules/xcos/demos/Temperature_Controller.zcos b/modules/xcos/demos/Temperature_Controller.zcos Binary files differnew file mode 100755 index 000000000..c9cb02f4e --- /dev/null +++ b/modules/xcos/demos/Temperature_Controller.zcos diff --git a/modules/xcos/demos/Thermique_bloc.zcos b/modules/xcos/demos/Thermique_bloc.zcos Binary files differnew file mode 100755 index 000000000..416c1308f --- /dev/null +++ b/modules/xcos/demos/Thermique_bloc.zcos diff --git a/modules/xcos/demos/Threshold_ZeroCrossing.zcos b/modules/xcos/demos/Threshold_ZeroCrossing.zcos Binary files differnew file mode 100755 index 000000000..f37026ea2 --- /dev/null +++ b/modules/xcos/demos/Threshold_ZeroCrossing.zcos diff --git a/modules/xcos/demos/anim_pen.sci b/modules/xcos/demos/anim_pen.sci new file mode 100755 index 000000000..45ca1878e --- /dev/null +++ b/modules/xcos/demos/anim_pen.sci @@ -0,0 +1,46 @@ +function [blocks] = anim_pen(blocks,flag) + //** 7 Jan 2009 : updated for Scilab 5.x + win = 20000+curblock(); + if flag<>4 then + H=scf(win) + end + xold = blocks.z + rpar = blocks.rpar + plen = rpar(1); csiz = rpar(2); phi = rpar(3); + + //** INIT + if flag==4 then + H = scf(win) + clf(H) + + Axe = H.children + Axe.data_bounds=rpar(4:7) + Axe.isoview="on" + S=[cos(phi),-sin(phi);sin(phi),cos(phi)] + XY=S*[rpar(4),rpar(5);-csiz/2,-csiz/2] + + drawlater(); + xsegs(XY(1,:),XY(2,:)) + x=0; theta=0; + x1=x-csiz/2;x2=x+csiz/2;y1=-csiz/2;y2=csiz/2 + XY=S*[x1 x2 x2 x1 x1;y1,y1,y2,y2,y1] + xpoly(XY(1,:),XY(2,:),"lines",1) + XY=S*[x,x+plen*sin(theta);0,0+plen*cos(theta)] + xsegs(XY(1,:),XY(2,:)); + drawnow(); + + //** UPDATE + elseif flag==2 then + Axe = H.children + x = blocks.inptr(1)(1) + theta = blocks.inptr(2)(1) + drawlater(); + XY=Axe.children(2).data' + [cos(phi)*(x-xold);sin(phi)*(x-xold)]*ones(1,5); + Axe.children(2).data=XY' ; + x1=x*cos(phi);y1=x*sin(phi) ; + XY=[x1,x1+plen*sin(theta);y1,y1+plen*cos(theta)] ; + Axe.children(1).data=XY' ; + blocks.z = x ; + drawnow(); + end +endfunction diff --git a/modules/xcos/demos/basic_controller.dem.sce b/modules/xcos/demos/basic_controller.dem.sce new file mode 100755 index 000000000..b963150c3 --- /dev/null +++ b/modules/xcos/demos/basic_controller.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Controller.zcos"); + diff --git a/modules/xcos/demos/batch_simulation.zcos b/modules/xcos/demos/batch_simulation.zcos Binary files differnew file mode 100755 index 000000000..3d2be17ae --- /dev/null +++ b/modules/xcos/demos/batch_simulation.zcos diff --git a/modules/xcos/demos/bounce.dem.sce b/modules/xcos/demos/bounce.dem.sce new file mode 100755 index 000000000..98001ddc6 --- /dev/null +++ b/modules/xcos/demos/bounce.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/bounce.zcos"); + diff --git a/modules/xcos/demos/bounce.zcos b/modules/xcos/demos/bounce.zcos Binary files differnew file mode 100755 index 000000000..4981a0932 --- /dev/null +++ b/modules/xcos/demos/bounce.zcos diff --git a/modules/xcos/demos/bouncing_ball.dem.sce b/modules/xcos/demos/bouncing_ball.dem.sce new file mode 100755 index 000000000..85fa0ec22 --- /dev/null +++ b/modules/xcos/demos/bouncing_ball.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Bouncing_ball.zcos"); + diff --git a/modules/xcos/demos/cont_sys_disc_cont.dem.sce b/modules/xcos/demos/cont_sys_disc_cont.dem.sce new file mode 100755 index 000000000..3692f1712 --- /dev/null +++ b/modules/xcos/demos/cont_sys_disc_cont.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Cont.Disc-Observer.zcos"); + diff --git a/modules/xcos/demos/control_systems.dem.gateway.sce b/modules/xcos/demos/control_systems.dem.gateway.sce new file mode 100755 index 000000000..1a9a66146 --- /dev/null +++ b/modules/xcos/demos/control_systems.dem.gateway.sce @@ -0,0 +1,18 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +subdemolist = [_("Basic controller") , "basic_controller.dem.sce" ;.. +_("Water tank") , "demo_watertank.dem.sce" ; .. +_("Discrete Controller") , "discrete_controller.dem.sce" ;.. +_("Kalman Filter") , "kalman.dem.sce" ; .. +_("Discrete Kalman Filter") , "discrete_kalman.dem.sce" ; .. +_("Cont.Plant-Hybrid Observer") , "cont_sys_disc_cont.dem.sce" ; .. +_("Temperature Controller") , "temp_controller.dem.sce" ; .. +_("Inverted pendulum") , "inverted_pendulum.dem.sce" ; .. +_("Lorenz butterfly") , "lorenz.dem.sce" ; .. +]; + +subdemolist(:,2) = SCI + "/modules/xcos/demos/" + subdemolist(:,2); diff --git a/modules/xcos/demos/data_type.dem.sce b/modules/xcos/demos/data_type.dem.sce new file mode 100755 index 000000000..c867ffaf7 --- /dev/null +++ b/modules/xcos/demos/data_type.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/demo_Datatype.zcos"); + diff --git a/modules/xcos/demos/demo_Datatype.zcos b/modules/xcos/demos/demo_Datatype.zcos Binary files differnew file mode 100755 index 000000000..7f21a8c04 --- /dev/null +++ b/modules/xcos/demos/demo_Datatype.zcos diff --git a/modules/xcos/demos/demo_watertank.dem.sce b/modules/xcos/demos/demo_watertank.dem.sce new file mode 100755 index 000000000..8aac57d15 --- /dev/null +++ b/modules/xcos/demos/demo_watertank.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/demo_watertank.zcos"); + diff --git a/modules/xcos/demos/demo_watertank.zcos b/modules/xcos/demos/demo_watertank.zcos Binary files differnew file mode 100755 index 000000000..eadf5a3d9 --- /dev/null +++ b/modules/xcos/demos/demo_watertank.zcos diff --git a/modules/xcos/demos/discrete_controller.dem.sce b/modules/xcos/demos/discrete_controller.dem.sce new file mode 100755 index 000000000..d5272d892 --- /dev/null +++ b/modules/xcos/demos/discrete_controller.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Plant_DiscreteController.zcos"); + diff --git a/modules/xcos/demos/discrete_kalman.dem.sce b/modules/xcos/demos/discrete_kalman.dem.sce new file mode 100755 index 000000000..62f456c26 --- /dev/null +++ b/modules/xcos/demos/discrete_kalman.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Discrete-KalmanFilter.zcos"); + diff --git a/modules/xcos/demos/electrical_systems.dem.gateway.sce b/modules/xcos/demos/electrical_systems.dem.gateway.sce new file mode 100755 index 000000000..2f20162e3 --- /dev/null +++ b/modules/xcos/demos/electrical_systems.dem.gateway.sce @@ -0,0 +1,20 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +subdemolist = [_("RLC Circuit") , "Electrical/rlc_circuit.dem.sce" ; .. +_("Bridge Rectifer") , "Electrical/bridge_rectifier.dem.sce" ; .. +_("Transformer") , "Electrical/transformer.dem.sce" ; .. +_("Differential amplifier") , "Electrical/differential_amp.dem.sce" ; .. +_("OpAmp amplifier") , "Electrical/op_amplier.dem.sce" ; .. +_("Switched capacitor integrator") , "Electrical/switched_cap_filter.dem.sce" ; .. +_("DC/DC Buck Converter") , "Electrical/buck_conv.dem.sce" ; .. +_("DC/DC Boost Converter") , "Electrical/boost_conv.dem.sce" ; .. +_("Colpitts oscillator") , "Electrical/colpitts_osc.dem.sce" ; .. +_("Logic AND gate") , "Electrical/logic_and.dem.sce" ; .. +_("Logic NOR gate") , "Electrical/logic_nor.dem.sce" ; .. +]; + +subdemolist(:,2) = SCI + "/modules/xcos/demos/" + subdemolist(:,2); diff --git a/modules/xcos/demos/event.dem.gateway.sce b/modules/xcos/demos/event.dem.gateway.sce new file mode 100755 index 000000000..6b2ce1b5e --- /dev/null +++ b/modules/xcos/demos/event.dem.gateway.sce @@ -0,0 +1,11 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +subdemolist = [_("If Then Else") , "Event/event_if_then_else.dem.sce"; ... + _("And") , "Event/event_and.dem.sce" ; ... + ]; + +subdemolist(:,2) = SCI + "/modules/xcos/demos/" + subdemolist(:,2); diff --git a/modules/xcos/demos/fibonacci.dem.sce b/modules/xcos/demos/fibonacci.dem.sce new file mode 100755 index 000000000..e3a2e65fa --- /dev/null +++ b/modules/xcos/demos/fibonacci.dem.sce @@ -0,0 +1,7 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Fibonacci.zcos"); diff --git a/modules/xcos/demos/goto_demo.zcos b/modules/xcos/demos/goto_demo.zcos Binary files differnew file mode 100755 index 000000000..b8e580b21 --- /dev/null +++ b/modules/xcos/demos/goto_demo.zcos diff --git a/modules/xcos/demos/goto_from.dem.sce b/modules/xcos/demos/goto_from.dem.sce new file mode 100755 index 000000000..aabfc50bc --- /dev/null +++ b/modules/xcos/demos/goto_from.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/goto_demo.zcos"); + diff --git a/modules/xcos/demos/if_xcos_block.dem.sce b/modules/xcos/demos/if_xcos_block.dem.sce new file mode 100755 index 000000000..b154b64bf --- /dev/null +++ b/modules/xcos/demos/if_xcos_block.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/IF_block.zcos"); + diff --git a/modules/xcos/demos/inv_pend_anim.dem.sce b/modules/xcos/demos/inv_pend_anim.dem.sce new file mode 100755 index 000000000..10c0c46e0 --- /dev/null +++ b/modules/xcos/demos/inv_pend_anim.dem.sce @@ -0,0 +1,16 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +function demo_xcospendul() + exec("SCI/modules/xcos/demos/PENDULUM_ANIM.sci",-1); + exec("SCI/modules/xcos/demos/anim_pen.sci",-1); + xcos("SCI/modules/xcos/demos/pendulum_anim5.zcos"); +endfunction + +demo_xcospendul(); +clear demo_xcospendul; + + diff --git a/modules/xcos/demos/inverted_pend.dem.sce b/modules/xcos/demos/inverted_pend.dem.sce new file mode 100755 index 000000000..213451962 --- /dev/null +++ b/modules/xcos/demos/inverted_pend.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Inverted_pendulum.zcos"); + diff --git a/modules/xcos/demos/inverted_pendulum.dem.sce b/modules/xcos/demos/inverted_pendulum.dem.sce new file mode 100755 index 000000000..3e280b892 --- /dev/null +++ b/modules/xcos/demos/inverted_pendulum.dem.sce @@ -0,0 +1,10 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2011 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +if ~isdef("setw") then exec("SCI/modules/xcos/demos/setw.sci",-1),end +xcos("SCI/modules/xcos/demos/Inverted_pendulum.zcos"); + + diff --git a/modules/xcos/demos/kalman.dem.sce b/modules/xcos/demos/kalman.dem.sce new file mode 100755 index 000000000..433086880 --- /dev/null +++ b/modules/xcos/demos/kalman.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Kalman.zcos"); + diff --git a/modules/xcos/demos/lorenz.dem.sce b/modules/xcos/demos/lorenz.dem.sce new file mode 100755 index 000000000..baf04e9cf --- /dev/null +++ b/modules/xcos/demos/lorenz.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Lorenz.zcos"); + diff --git a/modules/xcos/demos/mechanical_systems.dem.gateway.sce b/modules/xcos/demos/mechanical_systems.dem.gateway.sce new file mode 100755 index 000000000..a810c83b8 --- /dev/null +++ b/modules/xcos/demos/mechanical_systems.dem.gateway.sce @@ -0,0 +1,9 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +subdemolist = [_("Automotive Suspension") , "susp.dem.sce"]; + +subdemolist(:,2) = SCI + "/modules/xcos/demos/" + subdemolist(:,2); diff --git a/modules/xcos/demos/modelica_demos.dem.gateway.sce b/modules/xcos/demos/modelica_demos.dem.gateway.sce new file mode 100755 index 000000000..dbeca02c3 --- /dev/null +++ b/modules/xcos/demos/modelica_demos.dem.gateway.sce @@ -0,0 +1,20 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +if with_modelica_compiler() then + + subdemolist = [_("Ball on a Platform") , "ModelicaBlocks/ball_platform.dem.sce" ; .. + _("Bouncing Ball") , "ModelicaBlocks/modelica_bouncing_ball.dem.sce" ; .. + _("Chaos Modelica") , "ModelicaBlocks/modelica_chaos.dem.sce" ; .. + _("Hydraulics blocks") , "ModelicaBlocks/modelica_hydraulics.dem.sce" ; .. + _("RLC circuit") , "ModelicaBlocks/modelica_rlc_circuit.dem.sce" + ]; + + subdemolist(:,2) = SCI + "/modules/xcos/demos/" + subdemolist(:,2); + +end + +clear with_modelica_compiler; diff --git a/modules/xcos/demos/old_demos.dem.gateway.sce b/modules/xcos/demos/old_demos.dem.gateway.sce new file mode 100755 index 000000000..9cef7f760 --- /dev/null +++ b/modules/xcos/demos/old_demos.dem.gateway.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +subdemolist = [_("Old Gain Block") , "old_gain_block.dem.sce" ]; +subdemolist(:,2) = SCI + "/modules/xcos/demos/" + subdemolist(:,2); diff --git a/modules/xcos/demos/old_gain_block.dem.sce b/modules/xcos/demos/old_gain_block.dem.sce new file mode 100755 index 000000000..97652466f --- /dev/null +++ b/modules/xcos/demos/old_gain_block.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/OldGainTest.zcos"); + diff --git a/modules/xcos/demos/pendulum_anim5.zcos b/modules/xcos/demos/pendulum_anim5.zcos Binary files differnew file mode 100755 index 000000000..18b5bef49 --- /dev/null +++ b/modules/xcos/demos/pendulum_anim5.zcos diff --git a/modules/xcos/demos/scicos.dem.gateway.sce b/modules/xcos/demos/scicos.dem.gateway.sce new file mode 100755 index 000000000..dde2c5e05 --- /dev/null +++ b/modules/xcos/demos/scicos.dem.gateway.sce @@ -0,0 +1,15 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +subdemolist = [_("Standard demos") , "standard.dem.gateway.sce" ; .. +_("Control Systems") , "control_systems.dem.gateway.sce" ; .. +_("Electrical Systems") , "electrical_systems.dem.gateway.sce" ; .. +_("Mechanical Systems") , "mechanical_systems.dem.gateway.sce" ; .. +_("Modelica demos") , "modelica_demos.dem.gateway.sce" ; .. +_("Old demos") , "old_demos.dem.gateway.sce" ; .. +]; + +subdemolist(:,2) = SCI + "/modules/xcos/demos/" + subdemolist(:,2); diff --git a/modules/xcos/demos/scilab_block.dem.sce b/modules/xcos/demos/scilab_block.dem.sce new file mode 100755 index 000000000..8a36f479e --- /dev/null +++ b/modules/xcos/demos/scilab_block.dem.sce @@ -0,0 +1,7 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Scilab_Block.zcos"); diff --git a/modules/xcos/demos/setw.sci b/modules/xcos/demos/setw.sci new file mode 100755 index 000000000..81bc78510 --- /dev/null +++ b/modules/xcos/demos/setw.sci @@ -0,0 +1,9 @@ +function y = setw(x) + mu = size(x, 1); + y(1:mu,1:mu) = 0; + for j = 1:mu + for i = 1:mu-j+1 + y(i,j) = x(i+j-1); + end + end +endfunction diff --git a/modules/xcos/demos/signal_builder.dem.sce b/modules/xcos/demos/signal_builder.dem.sce new file mode 100755 index 000000000..6016dbfc9 --- /dev/null +++ b/modules/xcos/demos/signal_builder.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Signal_Builder.zcos"); + diff --git a/modules/xcos/demos/simple_demo.dem.sce b/modules/xcos/demos/simple_demo.dem.sce new file mode 100755 index 000000000..c56e79183 --- /dev/null +++ b/modules/xcos/demos/simple_demo.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Simple_Demo.zcos"); + diff --git a/modules/xcos/demos/simple_thermostat.dem.sce b/modules/xcos/demos/simple_thermostat.dem.sce new file mode 100755 index 000000000..89989f737 --- /dev/null +++ b/modules/xcos/demos/simple_thermostat.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Simple_Thermostat.zcos"); + diff --git a/modules/xcos/demos/standard.dem.gateway.sce b/modules/xcos/demos/standard.dem.gateway.sce new file mode 100755 index 000000000..0b946c207 --- /dev/null +++ b/modules/xcos/demos/standard.dem.gateway.sce @@ -0,0 +1,20 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +subdemolist = [_("Simple Demo") , "simple_demo.dem.sce" ; .. +_("Bouncing Balls") , "bounce.dem.sce" ; .. +_("Simple Thermostat") , "simple_thermostat.dem.sce" ; .. +_("Table Lookup") , "table_lookup.dem.sce" ; .. +_("Signal Builder") , "signal_builder.dem.sce" ; .. +_("Fibonacci Numbers") , "fibonacci.dem.sce" ; .. +_("Scilab block") , "scilab_block.dem.sce" ; .. +_("Xcos data types") , "data_type.dem.sce" ; .. +_("Zero Crossing") , "zero_crossing.dem.sce" ; .. +_("_IF_ Xcos block") , "if_xcos_block.dem.sce" ; .. +_("Goto/From blocks") , "goto_from.dem.sce" ; .. +]; + +subdemolist(:,2) = SCI + "/modules/xcos/demos/" + subdemolist(:,2); diff --git a/modules/xcos/demos/susp.dem.sce b/modules/xcos/demos/susp.dem.sce new file mode 100755 index 000000000..5257a9c4b --- /dev/null +++ b/modules/xcos/demos/susp.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/susp.zcos"); + diff --git a/modules/xcos/demos/susp.zcos b/modules/xcos/demos/susp.zcos Binary files differnew file mode 100755 index 000000000..6eed246bc --- /dev/null +++ b/modules/xcos/demos/susp.zcos diff --git a/modules/xcos/demos/table_lookup.dem.sce b/modules/xcos/demos/table_lookup.dem.sce new file mode 100755 index 000000000..98c7cb5c8 --- /dev/null +++ b/modules/xcos/demos/table_lookup.dem.sce @@ -0,0 +1,7 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Table_Lookup.zcos"); diff --git a/modules/xcos/demos/temp_controller.dem.sce b/modules/xcos/demos/temp_controller.dem.sce new file mode 100755 index 000000000..34915cc63 --- /dev/null +++ b/modules/xcos/demos/temp_controller.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Temperature_Controller.zcos"); + diff --git a/modules/xcos/demos/xcos.dem.gateway.sce b/modules/xcos/demos/xcos.dem.gateway.sce new file mode 100755 index 000000000..c74bf74c2 --- /dev/null +++ b/modules/xcos/demos/xcos.dem.gateway.sce @@ -0,0 +1,31 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// Copyright (C) 2011 - DIGITEO - Allan CORNET +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +function subdemolist = demo_gateway() + + demopath = get_absolute_file_path("xcos.dem.gateway.sce"); + add_demo(gettext("Xcos"), demopath + "xcos.dem.gateway.sce"); + + subdemolist = [_("Standard demos") , "standard.dem.gateway.sce" ; .. + _("Control Systems") , "control_systems.dem.gateway.sce" ; .. + _("Electrical Systems") , "electrical_systems.dem.gateway.sce" ; .. + _("Mechanical Systems") , "mechanical_systems.dem.gateway.sce" ;]; + + if with_modelica_compiler() then + subdemolist = [subdemolist; .. + _("Modelica demos") , "modelica_demos.dem.gateway.sce"]; + end + + subdemolist = [subdemolist; .. + _("Event demos") , "event.dem.gateway.sce" ; .. + _("Old demos") , "old_demos.dem.gateway.sce"]; + + subdemolist(:,2) = demopath + subdemolist(:,2); +endfunction + +subdemolist = demo_gateway(); +clear demo_gateway; diff --git a/modules/xcos/demos/xcos_demos.sce b/modules/xcos/demos/xcos_demos.sce new file mode 100755 index 000000000..f2f2a62c6 --- /dev/null +++ b/modules/xcos/demos/xcos_demos.sce @@ -0,0 +1,45 @@ +// +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2009 - DIGITEO - Vincent COUVERT +// Copyright (C) 2010 - DIGITEO - Allan CORNET +// +// This file must be used under the terms of the CeCILL. +// This source file is licensed as described in the file COPYING, which +// you should have received as part of this distribution. The terms +// are also available at +// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +// +// + +function demo_xcos() + + bResumeSomeVariables = %t; + // check if some variables used by demo_gui already exist + if isdef("demo_gui_update") & isdef("resize_gui") then + bResumeSomeVariables = %f; + end + + // Launch Scilab standard demo GUI + demo_gui(); + + // Get main list + frame1 = findobj("tag", "listbox_1"); + + // Select Xcos + allitems = frame1.string; + xcosItem = find(allitems == gettext("Xcos")); + frame1.value = xcosItem; + + // Exec callback to display Xcos demos list + gcbo = frame1; + execstr(frame1.callback, "errcatch"); + + // resume some variables + if bResumeSomeVariables then + [demo_gui_update, resize_gui] = resume(demo_gui_update, resize_gui); + end + +endfunction + +demo_xcos(); +clear demo_xcos; diff --git a/modules/xcos/demos/zero_crossing.dem.sce b/modules/xcos/demos/zero_crossing.dem.sce new file mode 100755 index 000000000..0d51590d9 --- /dev/null +++ b/modules/xcos/demos/zero_crossing.dem.sce @@ -0,0 +1,8 @@ +// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +// Copyright (C) 2008 - INRIA +// Copyright (C) 2009-2010 - DIGITEO +// +// This file is released under the 3-clause BSD license. See COPYING-BSD. + +xcos("SCI/modules/xcos/demos/Threshold_ZeroCrossing.zcos"); + |