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.
Model functioning in external mode, but not when built and deployed
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/996095/image.png)
Réponses (0)
Voir également
Catégories
En savoir plus sur Deployment, Integration, and Supported Hardware dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!