필터 지우기
필터 지우기

How to convert Simulink model into XML file ?

조회 수: 47 (최근 30일)
Dipesh  Mudatkar
Dipesh Mudatkar 2018년 7월 4일
댓글: Abdulkadir Eroglu 2020년 7월 21일
I tried following.
>> sys='Example'; % Model name is Example
>> save_system(sys, 'exported_file_name.xml', 'ExportToXML', true)
I am getting following error.
Error using save_system (line 38)
Invalid Simulink object name: Example

답변 (2개)

TAB
TAB 2018년 7월 4일
편집: TAB 2018년 7월 4일
You need to first load or open the model.
sys='Example'; % Model name is Example
open_system(sys); % Example model must be in current folder or Matlab path
save_system(sys, 'exported_file_name.xml', 'ExportToXML', true);

hao wang
hao wang 2019년 12월 17일
oh,I am getting following warning.
warning: The 'ExportToXML' option is no longer supported and will be removed in a future release.
How can I do?
  댓글 수: 2
Iris Iris
Iris Iris 2020년 2월 18일
Have you solved this problem?
Abdulkadir Eroglu
Abdulkadir Eroglu 2020년 7월 21일
Me too, waiting for an answer here... Though i have read in this article that slx is based on opc open package convention:
not sure if it helps solve the problem though...

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

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by