accessing Data associated with bus signal inside a s-function

5 ビュー (過去 30 日間)
Jagmohan singh
Jagmohan singh 2012 年 6 月 14 日
コメント済み: Erwin Torreao Dassen 2013 年 10 月 23 日
Hi, Is it possible to access data associated with a signal which is output of a bus creator in its structure form? For example I have two signals (signal1 and signal2) , I send them to a bus creator whose output is signal3. So Signal3 is now a structure. I have to access the data associated with signal1 and signal2 in s-function in following way. Signal1_Data = signal3. signal1; Signal2_Data = signal3.signal2;
Is it possible?
Thanks, Jagmohan

回答 (1 件)

TAB
TAB 2012 年 6 月 14 日
You can access the bus signal data in the s-function in the same way you have mentioned (ie in structure format)
Bus Input/Output support for s-function, using S-function builder is included from Simulink 7.3 (R2009a).
See a similar thread here.
Also see
  4 件のコメント
Kaustubha Govind
Kaustubha Govind 2012 年 7 月 6 日
Bus support is not available in MATLAB S-functions. Bus signals are supported in (Embedded) MATLAB Function blocks and C-MEX S-functions however.
Erwin Torreao Dassen
Erwin Torreao Dassen 2013 年 10 月 23 日
I really need bus signal support in a level 2-M S-function. This should be supported... (Feature request??)
Any work around to work with a "struct-like" data type in an M S-function?

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

カテゴリ

Help Center および File ExchangeBlock and Blockset Authoring についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by