Error in builnding model on Arduino
2 次查看(过去 30 天)
显示 更早的评论
Hi everybody, I'm trying to build a very simply model on arduino mega 2560 board to move a servoactuator. When I press 'Build' it stops the procedure because of this error:
The corresponding 'msfun_arduino_servowrite.tlc' file for the MATLAB S-function 'msfun_arduino_servowrite' in block 'provaservu/Servo Write' must be located in the current working directory, the MATLAB S-function directory 'C:\Users\Valerio\Desktop\Tesi\Arduino0022-mavlink1.0\Arduino_simulink\demos', or the directory 'C:\Users\Valerio\Desktop\Tesi\Arduino0022-mavlink1.0\Arduino_simulink\demos\tlc_c'
I haven't any .tlc file and I don't know how to do to solve my problem.
Any ideas about that?
Thank you all!
VZ
2 个评论
回答(5 个)
Kaustubha Govind
2012-2-13
Is this where you got your blocks from? If yes, there is a comment in the Discussion section that talks about this error:
"[The] MATLAB Support Package does not support code generation. The included Simulink blocks communicate with the Arduino in Simulink "normal" (aka. simulation) mode only.
For blocks that support code generation, see http://www.mathworks.com/academia/arduino-software/arduino-simulink.html"
0 个评论
Valerio
2012-2-14
1 个评论
Kaustubha Govind
2012-2-14
Valerio: I would recommend setting a breakpoint in your Outputs method and stepping through it to see what is going wrong. My guess is that error is coming from:
fwrite(serialObj, data, 'uint8');
There might be something wrong with your serial port object?
Sebastian Dietz
2015-10-29
Valerio, it would be great if you could tell us how you solved your problem.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Support Package for Arduino Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!