Go Down

Topic: arduino target for simulink (Read 2942 times) previous topic - next topic

Lucky13_

Hello, im trying to communicate with simulink using arduino target (http://www.mathworks.com/academia/arduino-software/arduino-simulink.html  ). Im following the instructions that comes with the file and i have done all the steps successfully until the "demo_arduino_blink". When im trying to run the demo_arduino_blink it shows me this error   Error in S-function 'demo_arduino_blink/Digital Output': S-Function 'sfunar_digitalOutput' does not exist. Does anybody have experience with this? Im running windows7 x64 and the matlab 2010a and i have allready installed the 64 bit visual studio components.

Coding Badly


Have you verified that the Arduino is working correctly?

For example, downloaded a simple Blink Sketch using the Arduino IDE?

Lucky13_

thanx for your reply, yes the arduino is working correctly. Also when i run this "demo_arduino_pil" for test the arduino responding normally and give me back results to matlab.

david.maclay

The download only has win32 modules prebuilt.

You can  create the win64 module with the mex command. From the MATLAB command window change directory to the blocks folder that contains the block source files then type

mex sfunar_digitalOutput.c

Lucky13_

#4
Sep 25, 2010, 02:56 pm Last Edit: Sep 25, 2010, 02:59 pm by lucky13 Reason: 1
thank you very much david!!that was the problem. now its working fine! =D

Maxi1984

Hello Im trying to add (Arduino Uno) target in Simulink:
   >> arduino.Prefs.setArduinoPath('c:\Program Files\arduino\arduino-0021')
I setup everything but the problem is when Im trying to build demo_arduino_blink this error appear

The call to arduino_make_rtw_hook, during the after_make hook generated the following error:
Download failed. Check your serial connection and and run the command arduino.Prefs.getMcu to check you have specified the correct MCU.

The build process will terminate as a result.


Download failed. Check your serial connection and and run the command arduino.Prefs.getMcu to check you have specified the correct MCU.

when Im checking Mcu:
>> arduino.Prefs.getMcu  

ans =

atmega328p

when Im checking the COM this is a result:
arduino.Prefs.setComPort('COM3');
>> arduino.Prefs.searchForComPort

ans =

    ''


Im using MacBook Pro Windows7 64bits
If anyone knows whats a problem please help me I have to finish this project for my graduation
THANX

Go Up