[Scilab-users] From Xcos model to DLL

classic Classic list List threaded Threaded
6 messages Options
qzhong qzhong
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] From Xcos model to DLL

Dear all,

I am working on a controller model in Xcos which takes inputs from sensors
and generates control decisions. The Xcos model has been built and compiled
with no error. The issue I have is that I need to generate a .dll file from
the Xcos model and use it in another simulation tool, similar to the process
done in Simulink by the Real Time Workshop module. I am not quite sure
whether similar packages exist for Scilab/Xcos.

Does anyone have a similar experience when using Scilab/Xcos? Any comments
would be much appreciated.

Qian



--
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
ol.bond ol.bond
Reply | Threaded
Open this post in threaded view
|

Re: From Xcos model to DLL

Hi,
You can check for RTAI-Lab: https://www.rtai.org/?About_RTAI-Lab, which is
similar to the Simulink RTW.



--
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
qzhong qzhong
Reply | Threaded
Open this post in threaded view
|

Re: From Xcos model to DLL

Thank you!

On Mon, Jul 2, 2018 at 6:12 PM, ol.bond <[hidden email]> wrote:
Hi,
You can check for RTAI-Lab: https://www.rtai.org/?About_RTAI-Lab, which is
similar to the Simulink RTW.



--
Qian Zhong
Graduate
Department of Mechanical Engineering
University of California, Berkeley


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|

Re: From Xcos model to DLL

In reply to this post by qzhong
Hello Qian,

The most obvious solution is to use the Tools->Code generator that will generate C code for the
schema (the calls to the simulation functions) and using the simulation functions shipped with
Scilab (and freely available within Scilab source code).

If you want to target a specific hardware, the STM32 toolbox [1] (based on the same code generator)
will let you generate similar C code but optimized and with some blocks for hardware support !

[1]: https://atoms.scilab.org/toolboxes/xcos_stm32_toolbox

--
Clément

Le lundi 02 juillet 2018 à 15:58 -0700, qzhong a écrit :

> Dear all,
>
> I am working on a controller model in Xcos which takes inputs from sensors
> and generates control decisions. The Xcos model has been built and compiled
> with no error. The issue I have is that I need to generate a .dll file from
> the Xcos model and use it in another simulation tool, similar to the process
> done in Simulink by the Real Time Workshop module. I am not quite sure
> whether similar packages exist for Scilab/Xcos.
>
> Does anyone have a similar experience when using Scilab/Xcos? Any comments
> would be much appreciated.
>
> Qian
>
>
>
> --
> 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
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
qzhong qzhong
Reply | Threaded
Open this post in threaded view
|

Re: From Xcos model to DLL

Hi Clément,

Thanks for the suggestions! I have tried the code generator in Xcos. However, it seems the C code was generated to substitute the blocks, but the code generator cannot handle the I/O blocks and deliver a standalone executable for real-time control. Also, when I put everything in my model to a single superblock and tried generating C code for it, the process kept running for hours without giving any output. I think it may be that my controller model has too many inputs and layers.

I am trying the RTAI and see if I can move forward with it.

Kind regards,
Qian

On Thu, Jul 12, 2018 at 8:50 AM, Clément David <[hidden email]> wrote:
Hello Qian,

The most obvious solution is to use the Tools->Code generator that will generate C code for the
schema (the calls to the simulation functions) and using the simulation functions shipped with
Scilab (and freely available within Scilab source code).

If you want to target a specific hardware, the STM32 toolbox [1] (based on the same code generator)
will let you generate similar C code but optimized and with some blocks for hardware support !

[1]: https://atoms.scilab.org/toolboxes/xcos_stm32_toolbox

--
Clément

Le lundi 02 juillet 2018 à 15:58 -0700, qzhong a écrit :
> Dear all,
>
> I am working on a controller model in Xcos which takes inputs from sensors
> and generates control decisions. The Xcos model has been built and compiled
> with no error. The issue I have is that I need to generate a .dll file from
> the Xcos model and use it in another simulation tool, similar to the process
> done in Simulink by the Real Time Workshop module. I am not quite sure
> whether similar packages exist for Scilab/Xcos.
>
> Does anyone have a similar experience when using Scilab/Xcos? Any comments
> would be much appreciated.
>
> Qian
>
>
>
> --
> 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
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



--
Qian Zhong
Graduate
Department of Mechanical Engineering
University of California, Berkeley


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Grzegorz Grzegorz
Reply | Threaded
Open this post in threaded view
|

Re: From Xcos model to DLL

Dear Qian,

If you need out of the box solution for rapid control prototyping and data acquisition you can check MicroDAQ toolbox [1]. It features automatic code generation for MicroDAQ DSP processor, Xcos blocks for ADC, DAC, Encoder, PWM, DIO,... real-time data access with standard Xcos sink block,  legacy/custom C code integration, target execution profiling, standalone DSP application generation, data acquisition functionality.


Grzegorz

2018-07-12 18:47 GMT+02:00 Q Z <[hidden email]>:
Hi Clément,

Thanks for the suggestions! I have tried the code generator in Xcos. However, it seems the C code was generated to substitute the blocks, but the code generator cannot handle the I/O blocks and deliver a standalone executable for real-time control. Also, when I put everything in my model to a single superblock and tried generating C code for it, the process kept running for hours without giving any output. I think it may be that my controller model has too many inputs and layers.

I am trying the RTAI and see if I can move forward with it.

Kind regards,
Qian

On Thu, Jul 12, 2018 at 8:50 AM, Clément David <[hidden email]> wrote:
Hello Qian,

The most obvious solution is to use the Tools->Code generator that will generate C code for the
schema (the calls to the simulation functions) and using the simulation functions shipped with
Scilab (and freely available within Scilab source code).

If you want to target a specific hardware, the STM32 toolbox [1] (based on the same code generator)
will let you generate similar C code but optimized and with some blocks for hardware support !

[1]: https://atoms.scilab.org/toolboxes/xcos_stm32_toolbox

--
Clément

Le lundi 02 juillet 2018 à 15:58 -0700, qzhong a écrit :
> Dear all,
>
> I am working on a controller model in Xcos which takes inputs from sensors
> and generates control decisions. The Xcos model has been built and compiled
> with no error. The issue I have is that I need to generate a .dll file from
> the Xcos model and use it in another simulation tool, similar to the process
> done in Simulink by the Real Time Workshop module. I am not quite sure
> whether similar packages exist for Scilab/Xcos.
>
> Does anyone have a similar experience when using Scilab/Xcos? Any comments
> would be much appreciated.
>
> Qian
>
>
>
> --
> 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
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



--
Qian Zhong
Graduate
Department of Mechanical Engineering
University of California, Berkeley


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users