How can I control servo motors via Simulink and arduino MEGA 2560 hardware with normal mode and real time sync
조회 수: 3 (최근 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개)
커뮤니티
더 많은 답변 보기: Power Electronics Community
참고 항목
카테고리
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!