필터 지우기
필터 지우기

S-function​の入出力にバスの配列​を設定する方法

조회 수: 3 (최근 30일)
tnksral
tnksral 2017년 10월 23일
답변: Akihiro Yasuda 2017년 10월 24일
S-functionの入出力にバスの配列を設定する方法、もしくはサンプルコードなどを教えてください。 S-function builderではバス配列に対応していないので、S-functionで記述したいです。
  댓글 수: 1
Birdman
Birdman 2017년 10월 23일
English translation:
Please tell me how to set the array of buses for S-function input / output, sample code, etc. Since S-function builder does not correspond to bus arrangement, I would like to describe it with S-function.

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

답변 (1개)

Akihiro Yasuda
Akihiro Yasuda 2017년 10월 24일
legacy_code関数を利用頂ければ、バス配列(構造体配列)を入出力引数としたS-Functionが生成できます。 構造体引数を使用した例は下記コマンドを実行頂ければ確認できます。
構造体引数をもつレガシ関数によるバスの使用
web(fullfile(docroot, 'simulink/examples/using-buses-with-legacy-functions-having-structure-arguments.html'))
上記資料にあるOutputFcnSpec を下記のように変更頂ければバス配列となります。
def.OutputFcnSpec = 'void counterbusFcn(COUNTERBUS u1[2], int32 u2, COUNTERBUS y1[2], int32 y2[2])';

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!