{"id":1977,"date":"2013-03-18T12:00:05","date_gmt":"2013-03-18T17:00:05","guid":{"rendered":"https:\/\/blogs.mathworks.com\/seth\/?p=1977"},"modified":"2017-01-02T20:31:09","modified_gmt":"2017-01-03T01:31:09","slug":"time-to-convert-to-variant-subsystems","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/simulink\/2013\/03\/18\/time-to-convert-to-variant-subsystems\/","title":{"rendered":"Time to Convert to Variant Subsystems"},"content":{"rendered":"<p>If you are a user of <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2012b\/simulink\/slref\/configurablesubsystem.html\">Configurable Subsystems<\/a>, it is time to start thinking about making the switch to <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2012b\/ecoder\/variant-systems.html\">Variant Systems<\/a>.<\/p>\r\n\r\n<p>Simulink Variants provide increased functionality over Configurable Subsystems: \r\n\r\n<ul>\r\n\t<li>They exist in two flavors: <a title=\"https:\/\/www.mathworks.com\/help\/releases\/R2017a\/simulink\/slref\/modelvariants.html (link no longer works)\">Model Variants<\/a> and <a href=\"https:\/\/www.mathworks.com\/help\/simulink\/slref\/variantsubsystem.html\">Subsystem Variants<\/a>.<\/li>\r\n\t<li>They can be controlled programmatically via variables in the MATLAB workspace.<\/li>\r\n\t<li>They are in your model instead of a Simulink Library which simplifies model development.<\/li>\r\n<\/ul>\r\n\r\nOnce you try the Simulink Variants, I guarantee you will immediately see their advantages and understand why we recommend moving away from Configurable Subsystems.<\/p> \r\n\r\n<p>Here are some tips to help you migrate.<\/p>\r\n\r\n<p><strong>Upgrade Advisor<\/strong><\/p>\r\n\r\n<p>In R2012b, the <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2012b\/simulink\/ug\/consulting-the-model-advisor.html#btiimgy-1\">Upgrade Advisor <\/a> includes a check titled <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2012b\/simulink\/slref\/simulink-checks_bq6d4aa-1.html#btkt8nb-1\">Identify configurable subsystem blocks for converting to variant subsystem blocks<\/a>.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2013Q1\/upgradeAdvisor.png\" alt=\"Upgrade Advisor\" \/><\/p>\r\n\r\n<p>If you run the check and a configurable subsystem is found, the result will tell you that \"These blocks can be upgraded to variant subsystems as they have better programmatic control and code generation capabilities.\"<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2013Q1\/checkResult.png\" alt=\"Upgrade Advisor\" \/><\/p>\r\n\r\n<p><strong>Context Menu<\/strong><\/p>\r\n\r\n<p>If you right-click on a configurable subsystem (or any subsystem), you will see a new option to convert the subsystem to a variant.<\/p>\r\n\r\n<p><a href=\"https:\/\/blogs.mathworks.com\/images\/seth\/2013Q1\/convertToVariant.png\"><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2013Q1\/convertToVariant_small.png\" alt=\"Upgrade Advisor\" \/><\/a><\/p>\r\n\r\n<p>A window will allow you to specify some details needed for the conversion.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2013Q1\/configureVariantConversion.png\" alt=\"Converting to Variant\" \/><\/p>\r\n\r\n<p>and a new model will pop up with your new block converted to a variant subsystem. Notice the different icon in the lower left corner of the block, it indicates that the variant subsystem is configured to <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2012b\/simulink\/ug\/selecting-the-active-variant.html#bsk8ulq-1\">override variant conditions<\/a> and behaves exactly like the original configurable subsystem.<\/p>\r\n\r\n<p><img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2013Q1\/newVariant.png\" alt=\"New Variant Subsystem\" \/><\/p>\r\n\r\n<p><strong>Now it's your turn<\/strong><\/p>\r\n\r\n<p>Are you ready to move to Variant Subsystems? Let us know by leaving a <a href=\"https:\/\/blogs.mathworks.com\/seth\/?p=1977&#comment\">comment here<\/a><\/p>","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/seth\/2013Q1\/newVariant.png\" onError=\"this.style.display ='none';\" \/><\/div><p>If you are a user of Configurable Subsystems, it is time to start thinking about making the switch to Variant Systems.\r\n\r\nSimulink Variants provide increased functionality over Configurable... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/simulink\/2013\/03\/18\/time-to-convert-to-variant-subsystems\/\">read more >><\/a><\/p>","protected":false},"author":41,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[30,16],"tags":[313,441,315,314,312],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/1977"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/comments?post=1977"}],"version-history":[{"count":29,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/1977\/revisions"}],"predecessor-version":[{"id":2035,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/posts\/1977\/revisions\/2035"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/media?parent=1977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/categories?post=1977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/simulink\/wp-json\/wp\/v2\/tags?post=1977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}