필터 지우기
필터 지우기

Model functioning in external mode, but not when built and deployed

조회 수: 3 (최근 30일)
Quinn Riley
Quinn Riley 2022년 5월 12일
댓글: Quinn Riley 2022년 5월 12일
I am currently working on a project involving a motorized platform controlled by an arduino due. The inputs are two signals on two digital pins and the outputs are analog through the DAC0 and DAC1 pins.
When run in the monitor and tune external mode the model works correctly. However when I build and deploy the model the motors being controlled behave erroneously. While I am running the model in monitor and tune I can even hit the disconnect button in simulink and completely disconnect my computer and the device will function as desired, but if I hit the reset button on the arduino it behave erroneously once again.
I have tried changing the solver settings to fixed step, and a discreet solver as mentioned in this forum post-
This did not change any results.
Do you guys have any ideas why simulink does this? isn't the idea that I can tune my model in the monitor and tune app and then upload that code with the build function and it should do the same thing?
Model attached
  댓글 수: 1
Quinn Riley
Quinn Riley 2022년 5월 12일
I measured the voltage output by the DAC pins, in monitor and tune the voltage ranges from .7 volts to 2.6 volts which is the range needed to control the motor controllers. When the same model is built and deployed it is ranging from 2.1 to 2.55 volts, which is a small part of the range needed.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by