Pages: [1]   Go Down
Author Topic: arduino target for simulink  (Read 2317 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 39
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Have you verified that the Arduino is working correctly?

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 39
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 39
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thank you very much david!!that was the problem. now its working fine! =D
« Last Edit: September 25, 2010, 07:59:55 am by lucky13 » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: