Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
slref.pdf
Скачиваний:
39
Добавлен:
26.03.2015
Размер:
16.01 Mб
Скачать

10 Model Advisor Checks

Check for partial structure parameter usage with bus signals

Identify blocks that use partial structures as parameter values for bus signals.

Description

This check compares structures that provide parameter values for bus signals, to identify partial structures. This check returns a table listing the:

Paths to blocks that use partial structures as parameter values for bus signals

Names the block parameters that use the partial structure

For all data stores that you define with a Simulink.Signal object that uses a partial structure for its Initial value parameter, this check lists the following information, in a second table:

Name of the signal object

Workspace (MATLAB or model) of the signal object

Name of the signal object parameter that uses the partial structure

Results and Recommended Actions

Condition

Recommended Action

Block using partial

Consider using the

structure

Simulink.Bus.createMATLABStructure function

 

to convert a partial structure parameter to a

 

full structure of parameter values for the listed

 

blocks.

Signal objects using

Consider using the

partial structure

Simulink.Bus.createMATLABStructure function

 

to convert a partial structure parameter to a

 

full structure of parameter values for the listed

 

signals.

10-28

Simulink® Checks

Tips

Specifying partial structures for block parameter values can be useful during the iterative process of creating a model. You can use partial structures to focus on a subset of signals in a bus.

Specifying full structures for code generation offers these advantages:

-Generated code is more readable than the code generated for partial structures.

-Supports a modeling style that explicitly initializes unspecified signals. When you use partial structures, Simulink initializes unspecified signals implicitly.

See Also

“Specify Initial Conditions for Bus Signals”

“Data Stores with Signal Objects”

Simulink.Bus.createMATLABStruct

Simulink.Signal

10-29

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]