> 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.