Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

slreplace_mux - Replace Mux blocks used to create buses with Bus Creator blocks

Syntax

[muxes, uniqueMuxes, uniqueBds] = slreplace_mux(model)
[muxes, uniqueMuxes, uniqueBds] = slreplace_mux(model, reportonly)

Description

[muxes, uniqueMuxes, uniqueBds] = slreplace_mux(model) 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:

Before running this command in any form, you should set the Mux blocks used to create bus signals connectivity diagnostic to warning or none. See Connectivity Diagnostics Overview for more information.

[muxes, uniqueMuxes, uniqueBds] = slreplace_mux(model, reportonly) is equivalent to [muxes, uniqueMuxes, uniqueBds] = slreplace_mux(model) if reportonly is true.

If reportonly is false, the function reports all Mux blocks that create buses in model and in libraries referenced by model, and replaces all such Mux blocks with Bus Creator blocks. The function saves the model, if changed, and saves and closes any changed library. You should make a backup copy of your model and libraries before using this form of the command.

Inputs

model

The model for which slreplace_mux is to report and optionally replace muxes used as buses.

reportOnly

Whether to just generate a report (true) or also change the model(s) (false).

Default: true

Outputs

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

All models and libraries that use Mux blocks as Bus Creators

See Also

Bus Creator | Mux

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS