Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Real time user inputs to SimMechanics
Replies: 2   Last Post: May 7, 2012 4:24 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Dan Lluch

Posts: 16
Registered: 6/10/08
Real time user inputs to SimMechanics
Posted: May 7, 2012 8:50 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

> I recently interfaced Matlab and Simulink with my Arduino board using Arduino Target.

Can you confirm which version and target you have set up? This Technical Support solution shows some of the different options:
http://www.mathworks.com/support/solutions/en/data/1-HCE464/index.html

> I am giving analog input to the board and that is being correctly visualized into Matlab.
> Now, I have a simMechanics model where i wish to give the input (force) to this system as an input controlled by my analog input to the board ( basically wish to give a user controlled input rather than standard trigonometric/constant input blocks ).


It sounds like you want a hardware interface into your simulink model (like a joystick would be), and have that model run in a simulated state on the host computer (with MATLAB and Simulink running). I want to confirm that you do not want to put the SimMechanics model down on the arduino or otherwise (although a code gen path is possible given any limitations on the target hardware platform - arduino in this case may be too limiting).

> The dilemma here is system target file for Arduino interfacing needs to be arduino.tlc and for simMechanics i think, needs to be grt.tlc(generic real time).
> Is there a workaround for this or any setting that I am missing, so that I could get this working ?
>
> Any suggestion would be very helpful !


If you are simply using the arduino for I/O into your Simulink model, then I suggest you simply use the MATLAB Arduino I/O package... which comes with Simulink blocks. This is just an interface, and doesn't put algorithms down on the board. But you can use it to pump I/O through your arduino. given your description that is my best guess as to what would be most useful for you. The advice may change, if I didn't understand your intentions well.

Here is the Arduino I/O package, MATLAB interface:
Landing Page - http://www.mathworks.com/academia/arduino-software/arduino-matlab.html
File Exchange Entry - http://www.mathworks.com/matlabcentral/fileexchange/32374



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.