How can I control servo motors via Simulink and arduino MEGA 2560 hardware with normal mode and real time sync
2 次查看(过去 30 天)
显示 更早的评论
I'm trying to control servo motors via a matlab function on simulink through and Arduino MEGA 2560 board (image below of the simulink model). I know the matlab function works as when I simply 'run' the function on normal mode it works however when I attempt to deploy it to hardware I get the error: ## Failed to generate all binary outputs. I can control the motors using External mode(though not with this model) but not in Normal mode, are there certain configuration settings I should be using or is this not at all possible with the Arduino board?
I would also like to know if it is possible to work with arduino hardware using the real time sync, I have tried to do this however it seems that arduino can only use the code generation ert.tlc which does not work with the real time sync.
I am using MATLAB 2016a and the most recent version of the Arduino Target hardware add-on. The matlab code takes the xyz position of an object and using inverse kinematics turns that into theta 1-4 for a robot arm, which then sends the the theta value to the motors via the Arduino MEGA2560. Thanks for your help, Josie.
0 个评论
回答(0 个)
社区
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Arduino Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!