フィルターのクリア

How can I generate a number of pulses?

4 ビュー (過去 30 日間)
Fazil Doruk Inanc
Fazil Doruk Inanc 2020 年 4 月 28 日
コメント済み: Fazil Doruk Inanc 2020 年 4 月 29 日
I am working on a cable robot project where I am using stepper motors to roll and unleash the winches to control the position. In order for the object to go to a certain position, the motors need to take a specific number of steps.
The pulse generator does not let me define the number of pulses. What can i use or what should i do in order the generate pulses with a certain amount?
(I can not use a time based solution such as; use the time it takes for 100 pulses to be generated and stop)

採用された回答

Fangjun Jiang
Fangjun Jiang 2020 年 4 月 28 日
Use a "Counter Limited" block. Set the limit to be a large number and sample time to be 1. Compare (<=) it to a Constant block (the number of pulses you want). Use the output to enable an "enabled subsystem". Inside it is a Pulse Generator. Set the period to be 1 and 50% pulse width. Run simulation in discrete with 0.5 simulation step time. You will get the number of pulses you want.
  3 件のコメント
Fangjun Jiang
Fangjun Jiang 2020 年 4 月 29 日
Ctrl+E, Configuration Parameters, Solver.
Fazil Doruk Inanc
Fazil Doruk Inanc 2020 年 4 月 29 日
Thank you so much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConverters (High Power) についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by