Hello! hope you are all well.
i am very new to the matlab and simulink experience, have been playing around with simulink to control an arduino.
Yesterday i made a little test curcuit where i could control the power, and direction of a motor until a limit switch was hit which would stop it.
what i am after now is a single button that can start and stop the motor. Currently i have an enabeled subsystem with the input from a physical button going to the enable port and a pwm signal generator going to the output to run the motor.
This starts when i hit the button but does not always stop unless i time it just right or press it a few times.
is there a better way you would reccomend?
Next. What i am having the most difficulty with is figuring out a way to start the motor off in a direction until it hits a limit switch, then have it pause for 5-6 seconds and reverse directions until it hits another limit switch followed by another pause. i need this to be in a loop where it will just continually run.
All of your thoughts and opinions are greatly appreciated! hopefully this will provide some useful answers to others as well.
It seems there are several ways to hold a state in simulink, but im having a hard time figuring out how to make it fit this application.
1 Comment
MATTA KHAGESWARA RAO (view profile)
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/458226-help-with-creating-a-motor-controller#comment_697837
Sign in to comment.