Is is possible to access the simulink block names in C-S-function.

2 ビュー (過去 30 日間)
Priyanka
Priyanka 2013 年 10 月 21 日
コメント済み: Priyanka 2013 年 10 月 25 日
Hello,
I have a problem in sending the character array as an input to the S-Function block. I could not find a way to send a string as an input to my S-function. Instead I thought of using the name that is displayed under every Simulink block. So can any one of you please suggest me if there is a way to access the Simulink block name in my S-function.
Thank you
Priyanka
  1 件のコメント
Priyanka
Priyanka 2013 年 10 月 23 日
Can any one please answer my above question.
Thank you
Priyanka

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

採用された回答

Zack Peters
Zack Peters 2013 年 10 月 24 日
Hi Priyanka,
The ssGetPath macro will allow you to get the full path to the block in question. This is going to be the closest that you will get to receiving the name of the calling block. From there you may be able to some manipulation to grab just the block name at the end of the character array.
Additionally you may want to check out this newsgroup post on "Passing strings to S-functions"
~Zack
  1 件のコメント
Priyanka
Priyanka 2013 年 10 月 25 日
Thank you very much.
It solved my problem.

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

その他の回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by