Some questions about Xcos

classic Classic list List threaded Threaded
5 messages Options
Andrea.Amorosi76@gmail.com Andrea.Amorosi76@gmail.com
Reply | Threaded
Open this post in threaded view
|

Some questions about Xcos

Hi to all,
I'm a Simulink user and I would like to switch to Xcos.
So I have the following questions:
1) is it possible to run a simulation in a soft real time mode?
2) is it possible to select a fixed step solver (Euler, Runge-Kutta 4, etc)?
3) is it possible to send and receive udp packet and/or interface with a
joystick?
4) is it possible to generate c/c++ code from a model?
5) can I create additional blocks libraries?
6) is there any mechanism similar to the referenced model of
Matlab/Simulink?
Thank you,
Andrea

Serge Steer-2 Serge Steer-2
Reply | Threaded
Open this post in threaded view
|

Re: Some questions about Xcos

[hidden email] a écrit :
> <div class="moz-text-flowed" style="font-family: -moz-fixed">Hi to all,
> I'm a Simulink user and I would like to switch to Xcos.
> So I have the following questions:
> 1) is it possible to run a simulation in a soft real time mode?
Yes, select the "Simulation/Setup" Menu
> 2) is it possible to select a fixed step solver (Euler, Runge-Kutta 4,
> etc)?
No in the simulation context, but it is possible (and easy) to a new
block based on generated C code that embed fixed step solver.

Hybrid asynchronous dynamical system requires high quality solvers
which, in particular, have root finding capabilities, so it has been
decided to base the Xcos/Scicos simulator on the Sundials library (CVODE
and IDA).
If one wants to check the behavior of a model with a fixed step solver,
he may use the code generator which generates a new block using
internaly a fixed step solver. This way it is possible to compare tthe
results.
> 3) is it possible to send and receive udp packet and/or interface with
> a joystick?
There is no pre defined block for that, but if you know the API of the
driver is should be easy to developp a block for that.

> 4) is it possible to generate c/c++ code from a model?
Yes, use the "Tools/Code generation" menu. It will generate C code
(standalone or new Xcos block)
> 5) can I create additional blocks libraries?
The answer here is yes and no:
 It is possible to create new blocks using the "user defned blocks" in
particular the CBLOCK (which allow to interactively define a new block
based on C code), The EXPRESSION block (which allow to interactively
define a new functionnal block), ...

But it is not yet possible (it is a Scicos feature which is not yet
implemented in the xcos editor) to create a new block library from scratch.
> 6) is there any mechanism similar to the referenced model of
> Matlab/Simulink?
No

Thanks for your interest

Serge Steer
INRIA

ray joseph ray joseph
Reply | Threaded
Open this post in threaded view
|

Re: Some questions about Xcos

Serge,

Thank you for the detailed response.  This really helps me as a new comer
understand Scilab and Xcos better.

If you would please, explain a little more about an Xcos library.  You
pointed out that we could build blocks but not libraries.  What is
unique/special about a library?

Ray

----- Original Message -----
From: "Serge Steer" <[hidden email]>
To: <[hidden email]>; <[hidden email]>
Sent: Tuesday, May 11, 2010 2:33 AM
Subject: Re: [scilab-Users] Some questions about Xcos


> [hidden email] a écrit :
> > <div class="moz-text-flowed" style="font-family: -moz-fixed">Hi to all,
> > I'm a Simulink user and I would like to switch to Xcos.
> > So I have the following questions:
> > 1) is it possible to run a simulation in a soft real time mode?
> Yes, select the "Simulation/Setup" Menu
> > 2) is it possible to select a fixed step solver (Euler, Runge-Kutta 4,
> > etc)?
> No in the simulation context, but it is possible (and easy) to a new
> block based on generated C code that embed fixed step solver.
>
> Hybrid asynchronous dynamical system requires high quality solvers
> which, in particular, have root finding capabilities, so it has been
> decided to base the Xcos/Scicos simulator on the Sundials library (CVODE
> and IDA).
> If one wants to check the behavior of a model with a fixed step solver,
> he may use the code generator which generates a new block using
> internaly a fixed step solver. This way it is possible to compare tthe
> results.
> > 3) is it possible to send and receive udp packet and/or interface with
> > a joystick?
> There is no pre defined block for that, but if you know the API of the
> driver is should be easy to developp a block for that.
>
> > 4) is it possible to generate c/c++ code from a model?
> Yes, use the "Tools/Code generation" menu. It will generate C code
> (standalone or new Xcos block)
> > 5) can I create additional blocks libraries?
> The answer here is yes and no:
>  It is possible to create new blocks using the "user defned blocks" in
> particular the CBLOCK (which allow to interactively define a new block
> based on C code), The EXPRESSION block (which allow to interactively
> define a new functionnal block), ...
>
> But it is not yet possible (it is a Scicos feature which is not yet
> implemented in the xcos editor) to create a new block library from
scratch.
> > 6) is there any mechanism similar to the referenced model of
> > Matlab/Simulink?
> No
>
> Thanks for your interest
>
> Serge Steer
> INRIA
>


Andrea.Amorosi76@gmail.com Andrea.Amorosi76@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Some questions about Xcos

In reply to this post by Serge Steer-2
Thank you for your answer.
I've another two questions:
1) can I use the auto generated code in a proprietary project? Is there
any particular problem with libraries and licenses?
2) as far I've understand, I can add additional blocks to an existing
model Library, but I can't create  anew one, is it correct?
Thank you,
Andrea

Serge Steer ha scritto:

> [hidden email] a écrit :
>> <div class="moz-text-flowed" style="font-family: -moz-fixed">Hi to all,
>> I'm a Simulink user and I would like to switch to Xcos.
>> So I have the following questions:
>> 1) is it possible to run a simulation in a soft real time mode?
> Yes, select the "Simulation/Setup" Menu
>> 2) is it possible to select a fixed step solver (Euler, Runge-Kutta 4,
>> etc)?
> No in the simulation context, but it is possible (and easy) to a new
> block based on generated C code that embed fixed step solver.
>
> Hybrid asynchronous dynamical system requires high quality solvers
> which, in particular, have root finding capabilities, so it has been
> decided to base the Xcos/Scicos simulator on the Sundials library (CVODE
> and IDA).
> If one wants to check the behavior of a model with a fixed step solver,
> he may use the code generator which generates a new block using
> internaly a fixed step solver. This way it is possible to compare tthe
> results.
>> 3) is it possible to send and receive udp packet and/or interface with
>> a joystick?
> There is no pre defined block for that, but if you know the API of the
> driver is should be easy to developp a block for that.
>
>> 4) is it possible to generate c/c++ code from a model?
> Yes, use the "Tools/Code generation" menu. It will generate C code
> (standalone or new Xcos block)
>> 5) can I create additional blocks libraries?
> The answer here is yes and no:
>  It is possible to create new blocks using the "user defned blocks" in
> particular the CBLOCK (which allow to interactively define a new block
> based on C code), The EXPRESSION block (which allow to interactively
> define a new functionnal block), ...
>
> But it is not yet possible (it is a Scicos feature which is not yet
> implemented in the xcos editor) to create a new block library from scratch.
>> 6) is there any mechanism similar to the referenced model of
>> Matlab/Simulink?
> No
>
> Thanks for your interest
>
> Serge Steer
> INRIA
>

vijeesh vijeesh
Reply | Threaded
Open this post in threaded view
|

Re: Some questions about Xcos

In reply to this post by ray joseph
Hi,

I'm also new to Scilab/Xcos and want to migrate from Simulink to XCos. My
objective is similar to what Andrea had asked. I want to interface joystick
to the model and run the model in soft real time in windows platform. I also
want to sent and receive data through UDP to some other software. Because
Andrea's question was long time ago, I thought there might be some updates
on this. So please help me to accomplish this task so that we can use Xcos
for our model development.


Vijeesh
CSIR-NAL
Bangalaore



--
Sent from: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users