Newbie question about simulink "new" file format SLX
Afficher commentaires plus anciens
Hi everyone,
I just found out that in R2012a, there is a new file format called SLX for saving simulink model. SLX is a binary file.
The old file format is MDL which is a text file.
I prefer the MDL file and actually in my work I need the plain text MDL file.
Does this mean in the future, Simulink will not open MDL file?
Thanks Kevin
4 commentaires
Guy Rouleau
le 1 Fév 2013
Can you please provide more details on why you need text file?
Walter Roberson
le 1 Fév 2013
I do not have Simulink, but from time to time I can debug simulink problems by reading the text MDL file.
Now that I have read Benji's response I suspect I could probably do the same thing with the SLX files, but I don't think I have seen any fly by.
Aditya
le 16 Avr 2013
Is there an API to query a simulink slx file?
penguin359
le 4 Nov 2015
The SLX format for Simulink is actually a Zip file which contains in it a collection of XML files and images in at least PNG format. It is possible to work with SLX files with standard tools, it's just a little more involved than MDL files. One reason for the change is that MDL files are plain text files that can be saved in different character encodings. If any non ASCII characters such as vowels with accent marks is present, it can be corrupted if the wrong encoding is used. XML files do not suffer from this issue and will always be read correctly by an XML parser. They look like text files, but have a very well-defined format.
Réponses (1)
Shashank Prasanna
le 31 Jan 2013
1 vote
SLX is a compressed file that contains model information in XML format.
There is information about the format. http://www.mathworks.com/help/simulink/ug/saving-a-model.html#btbr7kx-1
If you want to dig into it, you can open the file in say winzip and extract it. I just renamed the file to filename.zip and extracted it and you can see the model in XML format.
However to answer your future question, we'll never know, as of now Simulink very much supports MDL, and several shipped models are in MDL
Catégories
En savoir plus sur Simulink Environment Fundamentals dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!