MATLAB Answers

0

Arduino and Simulink?

Asked by cerverus33 on 15 Apr 2012
My question it's simple... there is a download called "*Simulink Support Package for Arduino Uno Hardware*" And another one called "*Embedded Coder Support Package for Arduino*" What's the diference between them? I already installed the last one, just because i didn't know how to install the first one

  0 Comments

Sign in to comment.

1 Answer

Answer by Dan Lluch on 16 Apr 2012

As of R2012a, MathWorks enabled Simulink to have built-in hardware support for Arduino, Lego, and Beagleboard. This allows users to ru their algorithms on those platforms directly from Simulink. This does leverage code generation technology, but the workflow is meant to be very streamlined and easy, primarily serving educational users, whose main intent may be to get something running on the hardware very quickly and in a very exploratory fashion. More information can be found here: http://www.mathworks.com/products/simulink/simulink-targets/ For this capability you only need Simulink.
A major tool workflow available to MathWorks products is production code generation. For C/C++ this is cornerstoned in Embedded Coder. Arduino is one example target available for those workflows. Some features that are available here are items like code tracability, Processor in the Loop, and many other aspects that the production code generation user may be interested in. this requires the Coder family of products.
You also asked how to install the first one... you need R2012a. And if you have access to that, you just need to execute 'targetinstaller' at the command prompt. you can refer to this video for more information on installation: http://www.mathworks.com/products/simulink/simulink-targets/videos/introduction-to-simulink-support-for-target-hardware.html
Hope this helps, Dan

  1 Comment

It actually doesn't answer the question. The Simulink Support Package for Arduino provides near the exact same blocks as Embedded Coder Support Package for Arduino. The former is only available on R2012a while the latter is available on R2010b, R2011a, or R2011b. Processor-In-the-Loop appears to just be renamed to 'Run on hardware'
The only outward differences appear to be that it uses the R2012a tool "targetinstaller", some cosmetic changes on the library and servo support.

Sign in to comment.