Control of Stepper Motor with Simulink
15 ビュー (過去 30 日間)
古いコメントを表示
Hi there!
I have a program that tells the step sequence for a step motor to take. So far, I have been able to make the stepper motor turn clockwise and counter-clockwise. I did this using a repeating sequence stair, where the output is [0,1,2,3], and the sample rate is .01 seconds
Now I want that if I push a button (eg. arduino push button), then the repeating sequence stair logic will operate for 5 seconds. However, the repeating sequence stair logic is a source with no input.
Therefore, my question now is, how do I integrate an if statement so that when the push button is pressed, then the repeating sequence stair logic will initiate for five seconds?
Hardware used:
Arduino Uno
5 Volt DC 28BYJ-48 step motor
Motor Driver Board ULN2003
-----
Thanks, Nick
2 件のコメント
回答 (2 件)
Cosimo Mercuro
2018 年 4 月 26 日
Hi Nicky. I've the same issue. Have you found any solution? Thanks in advance
Michael Goebel
2020 年 6 月 24 日
You could try to implement it with
- stateflow or
- an enabled subsystem or
- look under the mask of the repeating sequence block and adjust it as u want
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!