How to convert Simulink model into XML file ?

42 visualizaciones (últimos 30 días)
Dipesh  Mudatkar
Dipesh Mudatkar el 4 de Jul. de 2018
Comentada: Abdulkadir Eroglu el 21 de Jul. de 2020
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

Respuestas (2)

TAB
TAB el 4 de Jul. de 2018
Editada: TAB el 4 de Jul. de 2018
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 el 17 de Dic. de 2019
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 comentarios
Iris Iris
Iris Iris el 18 de Feb. de 2020
Have you solved this problem?
Abdulkadir Eroglu
Abdulkadir Eroglu el 21 de Jul. de 2020
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...

Iniciar sesión para comentar.

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by