Modelportblockfrom a Functionblock
Modelportblockfrom a Functionblock
FAQ 431
Solution
If multiple models are used in ConfigurationDesk, the ‘Propagate to Simulink Model’ command
propagates changes to elements that are not connected to a specific model in the first Simulink
behavior model. Figure 1 shows how the ‘Propagate to Simulink Model’ command generates the
Model Port Block only in the first model that was added to the model topology (in this case, ‘Model 1’).
Figure 1: When using multiple models in ConfigurationDesk, executing the ‘Propagate to Simulink Model’ command for
elements that are not connected to a specific model always propagates Model Port Blocks to the first model that was added to
the model topology (in this case, ‘Model 1’).
However, often the changes to the model interfaces have be implemented in a specific behavior
model.
For that purpose, navigate to the ’Model-Function Mapping’ view in ConfigurationDesk. Existing
Function Blocks that are not yet connected to an application process appear in the ‘Elements Not
Connected to a Model’ view. These elements can be dragged and dropped either onto a model to
Propagating a Model Port Block from a Function Block in ConfigurationDesk and Assigning It to a Specific Model
FAQ Version: 2 / 17.12.2021
Page 1
dSPACE FAQ 431
create a new signal chain or onto a specific existing Model Port Block to update the signal chain.
Figure 2 shows how a Function Block from the ‘Elements Not Connected to a Model’ view is dragged
and dropped onto a specific behavior model. This creates a new signal chain in ConfigurationDesk.
Figure 2: In the ‘Model-Function Mapping’ view, existing Function Blocks (‘Elements Not Connected to a Model’ view) can be
dragged and dropped onto either specific existing Model Port Blocks to update the connected function blocks or onto the
desired behavior model to generate new Model Port Blocks connected to these Function Blocks.
If the Function Blocks are linked with a behavior model as in Figure 2, new Model Port Blocks are
created and automatically connected to the associated application process. Executing the ‘Propagate
to Simulink Model’ command for these unresolved Model Port Blocks then generates the respective
Model Port Blocks in the underlying behavior model (also see Figure 3).
Figure 3: Newly generated unresolved Model Port Blocks in ConfigurationDesk can be propagated to the underlying behavior
model using the ‘Propagate to Simulink Model’ command. Due to the linkage between the Function Block and the model port
block from Figure 2, these blocks are already connected in the Signal Chain (highlighted in green).
Propagating a Model Port Block from a Function Block in ConfigurationDesk and Assigning It to a Specific Model
FAQ Version: 2 / 17.12.2021
Page 2
dSPACE FAQ 431
Function Blocks that are to be newly created and simultaneously linked to a behavior model can be
assigned directly to a behavior model or to an existing Model Port Block in the ‘Model-Function
Mapping’ view using drag and drop from the Function Library. Depending on whether the Function
Block is dragged and dropped onto a behavior model or onto an existing Model Port Block, a new
Model Port Block is generated with a connection to the I/O function (compare Figure 3) or this
connection is created in the existing Model Port Block. Figure 4 shows how a Function Block from the
Function Library is linked to an existing Model Port Block.
Figure 4: In the ‘Model-Function Mapping’ view, new Function Blocks from the Function Library (‘Functions’ view) can be added
to the Signal Chain. Via drag and drop, either new Model Port Blocks can be generated in a desired behavior model with a
connection to the Function Block or the connection can be created with specific existing Model Port Blocks of a behavior model.
Linking Function Blocks to existing Model Port Blocks does not generate new Model Port Blocks.
Figure 5 shows how the previously unconnected Model Port Block has now been connected to the
selected I/O function (highlighted in green).
Figure 5: Due to the linkage of the Function Block to the existing Model Port Block in Figure 4, a connection was created in the
signal chain (highlighted in green).
Propagating a Model Port Block from a Function Block in ConfigurationDesk and Assigning It to a Specific Model
FAQ Version: 2 / 17.12.2021
Page 3
dSPACE FAQ 431
If a Function Block has not yet been connected to a model, the corresponding Model Port Block can be
created in the ‘Model-Function Mapping’ view by dragging and dropping it into the desired Simulink
model hierarchy of the respective model. The Model Port Block is then propagated into this model
hierarchy (compare Figure 6).
Figure 6: Function Blocks not connected to a model can be connected via drag & drop into the desired Simulink model
hierarchy (a). The corresponding Model Port Block is then propagated into this model hierarchy (b).
To assign a new Function Block directly to a hardware channel and to assign the corresponding Model
Port Block to the desired model at the same time, a hardware channel can be dragged from the
‘Hardware Resource’ view and dropped in the ‘Model-Function Mapping’ view to the desired Simulink
model hierarchy. The Function Block is assigned to the selected hardware channel and the
corresponding Model Port Block is propagated to the desired Simulink model hierarchy (compare
Figure 7). In this way, the signal chain can be built with a few mouse clicks using Model Port blocks
that are already in the correct model hierarchy.
Figure 7: With a selected Hardware Channel new Function Blocks can be created and directly connected to the desired Simulink
model hierarchy (a). The corresponding Model Port Block is then propagated into this model hierarchy (b).
Propagating a Model Port Block from a Function Block in ConfigurationDesk and Assigning It to a Specific Model
FAQ Version: 2 / 17.12.2021
Page 4
dSPACE FAQ 431
Note: If Model Port Blocks have been accidentally propagated to an incorrect or temporary interface
model, they can be moved to the correct Simulink model using copy and paste. However, since the
paste process generates a new Model Port Block in the model, new block and signal IDs are also
created. For this reason, it is possible to keep the IDs during the paste process by using the ‘Paste and
Keep IDs’ method (‘Model Port Blocks -> Paste and Keep IDs’, shortcut: CTRL+Alt+V). Figure 8
illustrates the procedure.
Figure 8: To copy model port blocks from a temporary interface model created by ConfigurationDesk to a specific behavior
model, the ‘Paste and Keep IDs’ command (shortcut: CTRL+Alt+V) lets you create model port blocks with identical IDs.
As an alternative, you can always use this workflow to copy the Model Port Blocks to the desired
model hierarchy.
Related FAQs
• -
Propagating a Model Port Block from a Function Block in ConfigurationDesk and Assigning It to a Specific Model
FAQ Version: 2 / 17.12.2021
Page 5
dSPACE FAQ 431
FAQ Overview
http://www.dspace.com/go/faq
Support
Important Notice
This document contains proprietary information that is protected by copyright. All rights are reserved.
The document may be printed for personal or internal use provided all the proprietary markings are
retained on all printed copies. In all other cases, the document must not be copied, photocopied,
reproduced, translated, or reduced to any electronic medium or machine-readable form, in whole or in
part, without the prior written consent of dSPACE GmbH.
© 2021 by:
dSPACE GmbH
Rathenaustraße 26
33102 Paderborn
Germany
This publication and the contents hereof are subject to change without notice.
Propagating a Model Port Block from a Function Block in ConfigurationDesk and Assigning It to a Specific Model
FAQ Version: 2 / 17.12.2021
Page 6