| Simulink® | ![]() |
Replace Mux blocks used to create buses with Bus Creator blocks
[muxes, uniqueMuxes, uniqueBds] = slreplace_mux(model, reportonly)
slreplace_mux(model) or slreplace_mux(model, true) reports all Mux blocks that create buses in model and in libraries referenced by model.
A signal created by a Mux block is a bus if the signal meets either or both of the following conditions:
A Bus Selector block individually selects one or more of the signal's elements (as opposed to the entire signal).
The signal's components have different data types, numeric types (complex or real), dimensionality, storage classes, or sampling modes.
Note Before running this command, you should set the Mux blocks used to create bus signals connectivity diagnostic to warning or none. See Connectivity Diagnostics Overview for more information. |
slreplace_mux(model, false) replaces all Mux blocks in model that create buses, including Mux blocks in libraries, with Bus Creator blocks. This command saves the model, if changed, and saves and closes any library that it modifies.
Note You should make a backup copy of your model and libraries before using this form of the command because it is difficult to undo its effects. |
[muxes, uniqueMuxes, uniqueBds] = slreplace_mux(model) returns the following output variables:
muxes
All Mux blocks used as Bus Creators in the model and in libraries referenced by the model
uniqueMuxes
All Mux blocks used as Bus Creators in the model and in libraries referenced by the model except blocks in the model that are copies of blocks in libraries
uniqueBds
Models and libraries that use Mux blocks as Bus Creators
![]() | slmdldiscui | slupdate | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |