Main Content

Simulink.Breakpoint

Store and share data for breakpoint set, and configure the data for ASAP2 and AUTOSAR code generation

Description

A Simulink.Breakpoint object stores breakpoint set data for a lookup table. You can use that data in one or more Prelookup blocks. With the object, you can specify a data type and code generation settings for the breakpoint set and share the set between multiple lookup tables. Use Simulink.Breakpoint objects and Simulink.LookupTable objects to configure common axis (COM_AXIS) code generation for calibration.

The code generated for a Simulink.Breakpoint object specifies an array or a structure with two fields. If you configure the object to appear as a structure, one field stores the specified breakpoint set data and one field stores the number of elements in the breakpoint set data. You can configure the structure type name, the field name, and other characteristics by using the properties of the object.

To package lookup table and breakpoint set data into a single structure in the generated code, such as for standard axis (STD_AXIS) code generation, use a Simulink.LookupTable object to store all of the data. See Package Shared Breakpoint and Table Data for Lookup Tables.

Creation

Description

BreakpointSet = Simulink.Breakpoint returns a Simulink.Breakpoint object named BpSet with default property values.

example

To create a Simulink.Breakpoint object by using the Model Explorer, click the Add Simulink LookupTable button and select Simulink Breakpoint. The default name for the object is Object.

Properties

expand all

Breakpoint set data, specified as a Simulink.lookuptable.Breakpoint object. Use this embedded object to configure the structure field names and characteristics of the breakpoint set data such as breakpoint values, data type, and dimensions.

Code generation settings for the structure variable (if you set SupportTunableSize to true) or array variable (false) that stores the breakpoint set data, specified as a Simulink.CoderInfo object. You can specify a storage class or custom storage class by using this embedded object. For more information, see Simulink.CoderInfo.

Settings for the structure type that the structure variable uses in the generated code, specified as a Simulink.lookuptable.StructTypeInfo object.

If you set SupportTunableSize to false, the Simulink.Breakpoint object does not appear in the generated code as a structure. The code generator ignores this property.

Option to simulate model or generate code with tunability of the effective size of the table, specified as logical 1(true) or 0(false).

Data Types: logical

Examples

collapse all

Create a breakpoint data set and share it between two one-dimensional lookup tables.

Create a Simulink.Breakpoint object named myBreakpointSet and specify the breakpoint data.

myBreakpointSet = Simulink.Breakpoint
myBreakpointSet.Breakpoints.Value = [-2 -1 0 1 2];

Create a Simulink.LookupTable object named FirstLookupTable and specify the table data. Then configure the lookup table to refer to the breakpoint set object.

FirstLookupTable = Simulink.LookupTable;
FirstLookupTable.Table.Value = [1.1 2.2 3.3 4.4 5.5];
FirstLookupTable.BreakpointsSpecification = "Reference";
FirstLookupTable.Breakpoints = {'myBreakpointSet'};

Create another Simulink.LookupTable object to store a different set of table data. Configure the lookup table object to refer to the same breakpoint set object.

SecondLookupTable = Simulink.LookupTable;
SecondLookupTable.Table.Value = [1.2 2.3 3.4 4.5 5.6];
SecondLookupTable.BreakpointsSpecification = "Reference"; 
SecondLookupTable.Breakpoints = {'myBreakpointSet'};

You can use FirstLookupTable and SecondLookupTable to specify the table data in two different Interpolation Using Prelookup blocks. Use myBreakpointSet to specify the breakpoint set data in one or two Prelookup blocks that provide the inputs for the Interpolation Using Prelookup blocks.

Limitations

  • Generating code according to the FIX_AXIS style is not supported.

  • When blocks in a subsystem use Simulink.LookupTable or Simulink.Breakpoint objects, setting data type override (see Control Fixed-Point Instrumentation and Data Type Override) only on the subsystem is not supported. Instead, set data type override on the entire model.

Version History

Introduced in R2016b

expand all