add_block from other toolboxs

조회 수: 8 (최근 30일)
Tonghui Zhang
Tonghui Zhang 2019년 9월 24일
답변: Kiran Kintali 2023년 10월 30일
Hi all,
I have a question on building models automatically. When I use add_block to create blocks in a model, is it possible to add blocks from libraries outside simulink? For example adding 'HDL Coder/Discrete/Delay' to a model. And where can I find a list or table including all blocks' paths for add_block?
Thanks in advance.
  댓글 수: 3
Tonghui Zhang
Tonghui Zhang 2019년 9월 24일
Hi,
Thank you. This problem has been solved. I still have another question that when I insert the state flow chart, how can I use code to insert states or transitions in this chart?
Thanks in advance
Steven Lord
Steven Lord 2019년 9월 24일
Use the Stateflow.State or Stateflow.Transition functions. From the main starting page in the Stateflow documentation included in your installation, select "Chart Programming" then "Programmatic Interface". The first page linked in the Examples and How To section will show you how to create and populate a Stateflow chart.
I'm not linking to the online documentation because I know it has functionality not present in the release R2016b that you're using. Use your locally installed documentation.

댓글을 달려면 로그인하십시오.

답변 (1개)

Kiran Kintali
Kiran Kintali 2023년 10월 30일
Run this command to see the supported block list.
>> hdllib('html')
### HDL supported block list hdlblklist.html
### HDL implementation list hdlsupported.html
>>
You can see the block path specified in the html page generated in your add_block command.

카테고리

Help CenterFile Exchange에서 Stateflow Programmatic Interface에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by