d SPACE FAQ 733

FAQ 733

Meaning of Min/Max values

Keywords

Min, Max, Saturation

Question

What is the meaning of the Min/Max values I can specify in the TargetLink block dialogs and for

Stateflow data?

Answer

1. Min/Max values for TargetLink blocks:

The Min/Max entries let you specify constraint range limits for an output variable where you know that the limits will never be exceeded. These constraint range limits are taken into account by the Code

Generator when optimizing the code. Do not confuse these Min/Max values of TargetLink blocks with the saturation limits you can specify with the TargetLink Saturation block. The Min/Max values of

TargetLink blocks are not used to generate saturation but to optimize the code using the confirmation you made to the Code Generator.

Typical consequences of misunderstanding the meaning of the Min/Max values of TargetLink blocks:

- A user specifies Min/Max values and expects that a saturation pattern is generated which saturates to the Min/Max values. This is not the case. Instead of a saturation pattern

(which would saturate not to the Min/Max values but to the range of the selected data type), no saturation pattern is generated at all because of the confirmation that the value of the variable will never exceed the Min/Max values.

- A user specifies Min/Max values at block X and places a TargetLink Saturation block Y after X which has saturation limits equal to the Min/Max values of X and expects a saturation pattern to be generated for Y which saturates to the Min/Max values of X. This is not the case. No saturation pattern is generated at all because of the confirmation that the value of X will never exceed its Min/Max values.

- A user specifies Min/Max values at block X, models a plausibility check after X which checks if the output of X is in the range of the Min/Max values of X, and expects code to be generated for the plausibility check. This is not the case. The Code Generator uses the

Min/Max values as a confirmation that X will always be in the range of its Min/Max values and the plausibility check is removed by optimization.

2. Min/Max values for Stateflow data:

The meaning of Min/Max values for an item of Stateflow data differs from the meaning of Min/Max values for a TargetLink block in one point: If a Stateflow data has enabled saturation (properties sf.checkmin and/or sf.checkmax on the block list of the TargetLink Property Manager), the Code

Generator generates saturation to the limits specified by the Stateflow data’s Min and/or Max values, if specified (sf.min and sf.max ). If saturation is activated and no Min or Max value is specified, the Code

Generator generates saturation to the range of the selected data type.

Meaning of Min/Max values

FAQ Version: 3 / 2012-05-22

Page 1

d SPACE FAQ 733

How to Contact dSPACE Support dSPACE GmbH

Rathenaustraße 26

33102 Paderborn

Germany

++49 5251 1638-941 mailto:support@dspace.de

http://www.dspace.com/support dSPACE recommends that you use the support request form on the Internet to contact dSPACE Support.

It is available at: http://www.dspace.com/goto?supportrequest

Software Updates and Patches dSPACE strongly recommends that you download and install the most recent patches for your current dSPACE installation. Visit http://www.dspace.com/goto?patches

for software updates and patches.

FAQ

FAQ documents are available at http://www.dspace.com/goto?faq

.

Important Notice

This document contains proprietary information that is protected by copyright. All rights are reserved. Neither the documentation nor software may 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.

© Copyright 2012 by: dSPACE GmbH

Rathenaustraße 26

33102 Paderborn

Germany

This publication and the contents hereof are subject to change without notice.

A list of registered dSPACE trademarks is available at: http://www.dspace.com/goto?Trademarks

Meaning of Min/Max values

FAQ Version: 3 / 2012-05-22

Page 2