how to change a variable value in the middle of simulation in simulink

4 ビュー (過去 30 日間)
kesava rao
kesava rao 2021 年 1 月 26 日
コメント済み: Birdman 2021 年 1 月 29 日
I am giving pulse to a mosfet through pulse generator and i want to vary the pulse witdth to another value after 2 sec. How can i do it in simulink
  2 件のコメント
Birdman
Birdman 2021 年 1 月 27 日
As far as I know, it is already doable from the mask of it. What is your situation so that you are not able to change it? Can you share your model as a file?
kesava rao
kesava rao 2021 年 1 月 28 日
Thank u for responding
here in pulse generator i assigned P=80 in call back -int function
after 1 sec i want to change it to p=30 ...can you show a way to change

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

回答 (1 件)

Birdman
Birdman 2021 年 1 月 28 日
編集済み: Birdman 2021 年 1 月 28 日
Try the attached model. Copy the structure and replace it with the pulse generation block. It should work. Instead of writing p inside the constant block, just write the numerical value, 80 or 30.
  2 件のコメント
kesava rao
kesava rao 2021 年 1 月 29 日
Thank you for trying to solve
But Your new block didnt solve my problem
i want to change my pulse width to 30 from 80 to apply forward breaking after 1 sec
suggest some other method
Birdman
Birdman 2021 年 1 月 29 日
Try the attached model. It does what you need.

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

カテゴリ

Help Center および File ExchangeSources についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by