Products & Services Industries Academia Support User Community Company

Learn more about Real-Time Workshop   

Real-Time Workshop Pane: Interface

The Real-Time Workshop Interface pane includes the following parameters when the Real-Time Workshop product is installed on your system and you select a GRT-based target.

The Real-Time Workshop Interface pane includes the following parameters when the Real-Time Workshop product is installed on your system and you select an ERT-based target. ERT-based target parameters require a Real-Time Workshop Embedded Coder license when generating code.

Real-Time Workshop: Interface Tab Overview

Select the target software environment, output variable name modifier, and data exchange interface.

See Also

Target function library

Specify a target-specific math library for your model.

Settings

Default: C89/C90 (ANSI)

C89/C90 (ANSI)

Generates calls to the ISO®/IEC 9899:1990 C standard math library for floating-point functions.

C99 (ISO)

Generates calls to the ISO/IEC 9899:1999 C standard math library.

GNU99 (GNU)

Generates calls to the GNU® gcc math library, which provides C99 extensions as defined by compiler option -std=gnu99.

Tip

Before setting this parameter, verify that your compiler supports the library you want to use. If you select a parameter value that your compiler does not support, compiler errors can occur.

Command-Line Information

Parameter: GenFloatMathFcnCalls
Type: string
Value: 'ANSI_C' | 'C99 (ISO)' | 'GNU99 (GNU)'
Default: 'ANSI_C'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyAny valid library
Safety precautionNo impact

See Also

Configuring Model Interfaces

Utility function generation

Specify the location for generating utility functions.

Settings

Default: Auto

Auto

Operates as follows:

  • When the model contains Model blocks, place utilities within the slprj/target/_sharedutils directory.

  • When the model does not contain Model blocks, place utilities in the build directory (generally, in model.c or model.cpp).

Shared location

Directs code for utilities to be placed within the slprj directory in your working directory.

Command-Line Information

Parameter: UtilityFuncGeneration
Type: string
Value: 'Auto' | 'Shared location'
Default: 'Auto'

Recommended Settings

ApplicationSetting
DebuggingShared location (GRT)
No impact (ERT)
TraceabilityShared location (GRT)
No impact (ERT)
EfficiencyShared location
Safety precautionNo impact

See Also

Configuring Model Interfaces

Support: floating-point numbers

Specify whether to generate floating-point data and operations.

Settings

Default: On (GUI), 'off' (command-line)

On

Generates floating-point data and operations.

Off

Generates pure integer code. If you clear this option, an error occurs if the code generator encounters floating-point data or expressions. The error message reports offending blocks and parameters.

Dependencies

Command-Line Information

Parameter: PurelyIntegerCode
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOff (GUI), 'on' (command-line) — for integer only
Safety precautionNo impact

Support: absolute time

Specify whether to generate and maintain integer counters for absolute and elapsed time values.

Settings

Default: on

On

Generates and maintains integer counters for blocks that require absolute or elapsed time values. Absolute time is the time from the start of program execution to the present time. An example of elapsed time is time elapsed between two trigger events.

If you select this option and the model does not include blocks that use time values, the target does not generate the counters.

Off

Does not generate integer counters to represent absolute or elapsed time values. If you do not select this option and the model includes blocks that require absolute or elapsed time values, an error occurs during code generation.

Dependencies

Command-Line Information

Parameter: SupportAbsoluteTime
Type: string
Value: 'on' | 'off'
Default: 'on'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOff
Safety precautionOff

See Also

Timing Services

Support: non-finite numbers

Specify whether to generate nonfinite data and operations.

Settings

Default: on

On

Generates nonfinite data (for example, NaN and Inf) and related operations.

Off

Does not generate nonfinite data and operations. If you clear this option, an error occurs if the code generator encounters nonfinite data or expressions. The error message reports offending blocks and parameters.

Dependencies

Command-Line Information

Parameter: SupportNonFinite
Type: string
Value: 'on' | 'off'
Default: 'on'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOff
Safety precautionOff

Support: continuous time

Specify whether to generate code for blocks that use continuous time.

Settings

Default: off

On

Generates code for blocks that use continuous time.

Off

Does not generate code for blocks that use continuous time. If you do not select this option and the model includes blocks that use continuous time, an error occurs during code generation.

Dependencies

Command-Line Information

Parameter: SupportContinuousTime
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOff
Safety precautionOff

See Also

Support: complex numbers

Specify whether to generate complex data and operations.

Settings

Default: on

On

Generates complex numbers and related operations.

Off

Does not generate complex data and related operations. If you clear this option, an error occurs if the code generator encounters complex data or expressions. The error message reports offending blocks and parameters.

Dependencies

Command-Line Information

Parameter: SupportComplex
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOff (for real only)
Safety precautionNo impact

Support: non-inlined S-functions

Specify whether to generate code for noninlined S-functions.

Settings

Default: Off

On

Generates code for noninlined S-functions.

Off

Does not generate code for noninlined S-functions. If this parameter is off and the model includes a noninlined S-function, an error occurs during the build process.

Tip

Dependencies

Command-Line Information

Parameter: SupportNonInlinedSFcns
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOff
Safety precautionOff

See Also

Support: variable-size signals

Specify whether to generate code for models that use variable-size signals.

Settings

Default: Off

On

Generates code for models that use variable-size signals.

Off

Does not generate code for models that use variable-size signals. If this parameter is off and the model uses variable-size signals, an error occurs during code generation.

Dependencies

Command-Line Information

Parameter: SupportVariableSizeSignals
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOff
Safety precautionOff

Multiword type definitions

Specify whether to use system-defined or user-defined type definitions for multiword data types in generated code.

Settings

Default: System defined

System defined

Use the default system type definitions for multiword data types in generated code. During code generation, if multiword usage is detected, multiword types will be generated into the file rtwtypes.h.

User defined

Allows you to control how multiword type definitions are handled during the code generation process. Selecting this value enables the associated parameter Maximum word length, which allows you to specify a maximum word length, in bits, for which the code generation process will generate multiword types into the file rtwtypes.h. The default maximum word length is 256. If you select 0, no multiword types are generated into the file rtwtypes.h, which provides you complete control over type definitions for multiword data types in generated code.

Dependencies

Command-Line Information

Parameter: ERTMultiwordTypeDef
Type: string
Value: 'System defined' | 'User defined'
Default: 'System defined'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencySpecifying User defined and a low value for Maximum word length reduces the size of the generated file rtwtypes.h
Safety precautionUse default

Maximum word length

Specify a maximum word length, in bits, for which the code generation process will generate system-defined multiword types

Settings

Default: 256

Specify a maximum word length, in bits, for which the code generation process will generate multiword types into the file rtwtypes.h. All multiword types up to and including this number of bits will be generated. If you select 0, no multiword types are generated into the file rtwtypes.h, which provides you complete control over type definitions for multiword data types in generated code.

Dependencies

Command-Line Information

Parameter: ERTMaxMultiwordLength
Type: integer
Value: Any valid quantity of bits representing a word size
Default: 256

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencySmaller values reduce the size of the generated file rtwtypes.h
Safety precautionUse default

GRT compatible call interface

Specify whether to generate model function calls compatible with the main program module of the GRT target.

Settings

Default: off

On

Generates model function calls that are compatible with the main program module of the GRT target (grt_main.c or grt_main.cpp).

This option provides a quick way to use ERT target features with a GRT-based custom target that has a main program module based on grt_main.c or grt_main.cpp.

Off

Disables the GRT compatible call interface.

Tips

The following are unsupported:

Dependencies

Command-Line Information

Parameter: GRTInterface
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityOff
EfficiencyOff
Safety precautionOff

See Also

Support for Continuous Time Blocks, Continuous Solvers, and Stop Time

Single output/update function

Specify whether to generate the model_step function.

Settings

Default: on

On

Generates the model_step function for a model. This function contains the output and update function code for all blocks in the model and is called by rt_OneStep to execute processing for one clock period of the model at interrupt level.

Off

Does not combine output and update function code for model blocks in a single function, and instead generates the code in separate model_output and model_update functions.

Tips

Errors or unexpected behavior can occur if a Model block is part of a cycle, the Model block is a direct feedthrough block, and an algebraic loop results. See Model Blocks and Direct Feedthrough for details.

Dependencies

Command-Line Information

Parameter: CombineOutputUpdateFcns
Type: string
Value: 'on' | 'off'
Default: 'on'

Recommended Settings

ApplicationSetting
DebuggingOn
TraceabilityOn
EfficiencyOn
Safety precautionOn

See Also

rt_OneStep

Terminate function required

Specify whether to generate the model_terminate function.

Settings

Default: on

On

Generates a model_terminate function. This function contains all model termination code and should be called as part of system shutdown.

Off

Does not generate a model.terminate function. Suppresses the generation of this function if you designed your application to run indefinitely and does not require a terminate function.

Dependencies

Command-Line Information

Parameter: IncludeMdlTerminateFcn
Type: string
Value: 'on' | 'off'
Default: 'on'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOff
Safety precautionOff

See Also

model_terminate

Generate reusable code

Specify whether to generate reusable, reentrant code.

Settings

Default: off

On

Generates reusable, multi-instance code that is reentrant. The code generator passes model data structures (root-level inputs and outputs, block states, parameters, and external outputs) in, by reference, as arguments to model_step and other the model entry point functions. The data structures are also exported with model.h. For efficiency, the code generator passes in only data structures that are used. Therefore, when you select this option, the argument lists generated for the entry point functions vary according to model requirements.

Off

Does not generate reusable code. Model data structures are statically allocated and accessed by model entry point functions directly in the model code.

Tips

Dependencies

Command-Line Information

Parameter: MultiInstanceERTCode
Type: string
Value: 'on' | 'off'
Default: 'on'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOn (for single instance)
Safety precautionNo impact

See Also

Reusable code error diagnostic

Select the severity level for diagnostics displayed when a model violates requirements for generating reusable code.

Settings

Default: Error

None

Proceed with build without displaying a diagnostic message.

Warning

Proceed with build after displaying a warning message.

Error

Abort build after displaying an error message.

Under certain conditions, the Real-Time Workshop Embedded Coder software might

Dependencies

Command-Line Information

Parameter: MultiInstanceErrorCode
Type: string
Value: 'None' | 'Warning' | 'Error'
Default: 'Error'

Recommended Settings

ApplicationSetting
DebuggingWarning or Error
TraceabilityNo impact
EfficiencyNone
Safety precautionNo impact

See Also

Pass root-level I/O as

Control how root-level model input and output are passed to the model_step function.

Settings

Default: Individual arguments

Individual arguments

Passes each root-level model input and output value to model_step as a separate argument.

Structure reference

Packs all root-level model input into a struct and passes struct to model_step as an argument. Similarly, packs root-level model output into a second struct and passes it to model_step.

Dependencies

Command-Line Information

Parameter: RootIOFormat
Type: string
Value: 'Individual arguments' | 'Structure reference'
Default: 'Individual arguments'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Block parameter visibility

Specify whether to generate the block parameter structure as a public, private, or protected data member of the C++ model class.

Settings

Default: private

public

Generates the block parameter structure as a public data member of the C++ model class.

private

Generates the block parameter structure as a private data member of the C++ model class.

protected

Generates the block parameter structure as a protected data member of the C++ model class.

Dependencies

Command-Line Information

Parameter: ParameterMemberVisibility
Type: string
Value: 'public' | 'private' | 'protected'
Default: 'private'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionprotected

See Also

Configuring Code Interface Options

Internal data visibility

Specify whether to generate internal data structures such as Block I/O, DWork vectors, Run-time model, Zero-crossings, and continuous states as public, private, or protected data members of the C++ model class.

Settings

Default: private

public

Generates internal data structures as public data members of the C++ model class.

private

Generates internal data structures as private data members of the C++ model class.

protected

Generates internal data structures as protected data members of the C++ model class.

Dependencies

Command-Line Information

Parameter: InternalMemberVisibility
Type: string
Value: 'public' | 'private' | 'protected'
Default: 'private'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionprotected

See Also

Configuring Code Interface Options

Block parameter access

Specify whether to generate access methods for block parameters for the C++ model class.

Settings

Default: None

None

Does not generate access methods for block parameters for the C++ model class.

Method

Generates noninlined access methods for block parameters for the C++ model class.

Inlined method

Generates inlined access methods for block parameters for the C++ model class.

Dependencies

Command-Line Information

Parameter: GenerateParameterAccessMethods
Type: string
Value: 'None' | 'Method' | 'Inlined method'
Default: 'None'

Recommended Settings

ApplicationSetting
DebuggingInlined method
TraceabilityInlined method
EfficiencyInlined method
Safety precautionNone

See Also

Configuring Code Interface Options

Internal data access

Specify whether to generate access methods for internal data structures, such as Block I/O, DWork vectors, Run-time model, Zero-crossings, and continuous states, for the C++ model class.

Settings

Default: None

None

Does not generate access methods for internal data structures for the C++ model class.

Method

Generates noninlined access methods for internal data structures for the C++ model class.

Inlined method

Generates inlined access methods for internal data structures for the C++ model class.

Dependencies

Command-Line Information

Parameter: GenerateInternalMemberAccessMethods
Type: string
Value: 'None' | 'Method' | 'Inlined method'
Default: 'None'

Recommended Settings

ApplicationSetting
DebuggingInlined method
TraceabilityInlined method
EfficiencyInlined method
Safety precautionNone

See Also

Configuring Code Interface Options

External I/O access

Specify whether to generate access methods for root-level I/O signals for the C++ model class.

Settings

Default: None

None

Does not generate access methods for root-level I/O signals for the C++ model class.

Method

Generates noninlined access methods for root-level I/O signals for the C++ model class.

Inlined method

Generates inlined access methods for root-level I/O signals for the C++ model class.

Dependencies

Command-Line Information

Parameter: GenerateExternalIOAccessMethods
Type: string
Value: 'None' | 'Method' | 'Inlined method'
Default: 'None'

Recommended Settings

ApplicationSetting
DebuggingInlined method
TraceabilityInlined method
EfficiencyInlined method
Safety precautionNone

See Also

Configuring Code Interface Options

Generate destructor

Specify whether to generate a destructor for the C++ model class.

Settings

Default: on

On

Generates a destructor for the C++ model class.

Off

Does not generate a destructor for the C++ model class.

Dependencies

Command-Line Information

Parameter: GenerateDestructor
Type: string
Value: 'on' | 'off'
Default: 'on'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionOff

See Also

Configuring Code Interface Options

Use operator new for referenced model object registration

Specify whether generated code uses the operator new, during model object registration, to instantiate objects for referenced models configured with a C++ encapsulation interface.

Settings

Default: off

On

Generates code that uses dynamic memory allocation to instantiate objects for referenced models configured with a C++ encapsulation interface. Specifically, during instantiation of an object for the top model in a model reference hierarchy, the generated code uses new to instantiate objects for referenced models.

Selecting this option frees a parent model from having to maintain information about submodels beyond its direct children.

Off

Does not generate code that uses new to instantiate referenced model objects.

Clearing this option means that a parent model maintains information about all of its submodels, including its direct and indirect children.

Dependencies

Command-Line Information

Parameter: UseOperatorNewForModelRefRegistration
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyOn
Safety precautionOff

See Also

Configuring Code Interface Options

Generate preprocessor conditionals

Generate preprocessor conditional directives globally for a model or locally for each Model block with variant models.

Settings

Default: Use local settings

Use local settings

Generates preprocessor conditional directives based on the value of the Generate preprocessor conditionals parameter on the Model block parameters dialog. If you select the Generate preprocessor conditionals parameter in the Model block parameters dialog, the generated code contains preprocessor conditional directives for all variant models of that Model block. If you do not select this parameter for a Model block, code is generated for the active variant model.

Enable all

Generates preprocessor conditional directives for all variant models of the Model blocks. Disables the Generate preprocessor conditionals parameter in the Model block parameters dialog.

Disable all

Only generates code for the active variant model of the Model block. Disables the Generate preprocessor conditionals parameter in the Model block parameters dialog for all Model blocks.

Tips

For generating preprocessor directives we recommend the following settings:

Dependencies

Command-Line Information

Parameter: GeneratePreprocessorConditionals
Type: string
Value: 'Use local settings' | 'Enable all' | 'Disable all'
Default: 'Use local settings'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Suppress error status in real-time model data structure

Specify whether to log or monitor error status.

Settings

Default: off

On

Omits the error status field from the generated real-time model data structure rtModel. This option reduces memory usage.

Be aware that selecting this option can cause the code generator to omit the rtModel data structure from generated code.

Off

Includes an error status field in the generated real-time model data structure rtModel. You can use available macros to monitor the field for error message data or set it with error message data.

Dependencies

Command-Line Information

Parameter: SuppressErrorStatus
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingOff
TraceabilityNo impact
EfficiencyOn
Safety precautionOn

See Also

rtModel Accessor Macros

Configure Model Functions

Click the Configure Model Functions button to open the Model Interface dialog box. In this dialog box, you can specify whether the code generator uses default model_initialize and model_step function prototypes or model-specific C prototypes. Based on your selection, you can preview and modify the function prototypes.

Dependency

See Also

Configure C++ Encapsulation Interface

Click the Configure C++ Encapsulation Interface button to open the Configure C++ encapsulation interface dialog box. In this dialog box, you can customize the C++ class interface for your model code. Based on your selections, you can preview and modify the model-specific C++ encapsulation interface.

Dependency

See Also

Create Simulink (S-Function) block

Specify whether to generate an S-function block.

Settings

Default: off

On

Generates an S-function block to represent the model or subsystem. The coder generates an inlined C or C++ MEX S-function wrapper that calls existing hand-written code or code previously generated by the Real-Time Workshop software from within the Simulink product. S-function wrappers provide a standard interface between the Simulink product and externally written code, allowing you to integrate your code into a model with minimal modification.

When this option is selected, the Real-Time Workshop software:

  1. Generates the S-function wrapper file model_sf.c (or .cpp) and places it in the build directory.

  2. Builds the MEX-file model_sf.mexext and places it in your working directory.

  3. Creates and opens an untitled model containing the generated S-Function block.

Off

Does not generate an S-function block.

Dependency

Command-Line Information

Parameter: GenerateErtSFunction
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingOn
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Enable portable word sizes

Specify whether to allow portability across host and target processors that support different word sizes.

Settings

Default: off

On

Generates conditional processing macros that support compilation of generated code on a processor that supports a different word size than the target processor on which production code is intended to run (for example, a 32-bit host and a 16-bit target. This allows you to use the same generated code for both software-in-the-loop (SIL) testing on the host platform and production deployment on the target platform.

Off

Does not generate portable code.

Dependencies

Command-Line Information

Parameter: PortableWordSizes
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingOn
TraceabilityOn
EfficiencyOff
Safety precautionNo impact

See Also

MAT-file logging

Specify whether to enable MAT-file logging.

Settings

Default: off

On

Enables MAT-file logging. When you select this option, the generated code saves to MAT-files any data specified in the Configuration Parameters > Data Import/Export Pane > Save to workspace subpane, and the data specified by any To Workspace blocks. See Data Import/Export Pane and To Workspace. In simulation, this data would be written to the MATLAB workspace, as described in Exporting Data to the MATLAB Workspace, but setting MAT-file logging redirects the data to a MAT-file instead. The file is named model.mat, where model is the name of your model.

Off

Disables MAT-file logging. Clearing this option has the following benefits:

  • Eliminates overhead associated with supporting a file system, which typically is not needed for embedded applications

  • Eliminates extra code and memory usage required to initialize, update, and clean up logging variables

  • Under certain conditions, eliminates code and storage associated with root output ports

  • Omits the comparison between the current time and stop time in the model_step, allowing the generated program to run indefinitely, regardless of the stop time setting

Dependencies

Limitation

MAT-file logging does not work in a referenced model, and no code is generated to implement it.

Command-Line Information

Parameter: MatFileLogging
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingOn
TraceabilityNo impact
EfficiencyOff
Safety precautionOff

See Also

Using Virtualized Output Ports Optimization

MAT-file variable name modifier

Select the string to add to MAT-file variable names.

Settings

Default: rt_

rt_

Adds a prefix string.

_rt

Adds a suffix string.

none

Does not add a string.

Dependency

When an ERT target is selected, this parameter is enabled by MAT-file logging.

Command-Line Information

Parameter: LogVarNameModifier
Type: string
Value: 'none' | 'rt_' | '_rt'
Default: 'rt_'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Data Logging

Interface

Specify the data exchange interface (API) to include.

Settings

Default: None

None

Does not include an API in the generated code.

C API

Uses the C API data interface.

External mode

Uses an external data interface.

ASAP2

Uses the ASAP2 data interface.

Dependencies

Selecting C API enables the following parameters:

Selecting External mode enables the following parameters:

Command-Line Information

Parameter: see table
Type: string
Value: 'on' | 'off'
Default: 'off'
To enable...Set this parameter...To this value...
noneRTWCAPIParams,
RTWCAPISignals,
ExtMode,
GenerateASAP2
'off'
C APIRTWCAPIParams,
RTWCAPISignals
'on'
External modeExtMode'on'
ASAP2GenerateASAP2'on'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact during development
None for production code generation

See Also

Signals in C API

Generate a C API signal structure.

Settings

Default: on

On

Generates C API for global block outputs.

Off

Does not generate C API signals.

Dependency

This parameter is enabled by selecting Interface > C API.

Command-Line Information

Parameter: RTWCAPISignals
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

C API for Interfacing with Signals and Parameters

Parameters in C API

Generate C API parameter tuning structures.

Settings

Default: on

On

Generates C API for global block and model parameters.

Off

Does not generate C API parameters.

Dependency

This parameter is enabled by selecting Interface > C API.

Command-Line Information

Parameter: RTWCAPIParams
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

C API for Interfacing with Signals and Parameters

Transport layer

Specify the transport protocol for external mode communications.

Settings

Default: tcpip

tcpip

Applies a TCP/IP transport mechanism. The MEX-file name is ext_comm.

serial_win32

Applies a serial transport mechanism. The MEX-file name is ext_serial_win32_comm.

Tip

The MEX-file name displayed next to Transport layer cannot be edited in the Configuration Parameters dialog box. The value is specified either in matlabroot/toolbox/simulink/simulink/extmode_transports.m, for targets provided by The MathWorks™, or in an sl_customization.m file, for custom targets and/or custom external mode transports.

Dependency

This parameter is enabled by selecting External mode in the Interface parameter.

Command-Line Information

Parameter: ExtModeTransport
Type: integer
Value: 0 | 1
Default: 0

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

MEX-file arguments

Specify arguments to pass to an external mode interface MEX-file for communicating with executing targets.

Settings

Default: ""

For TCP/IP interfaces, ext_comm allows three optional arguments:

For a serial transport, ext_serial_win32_comm allows three optional arguments:

Dependency

Depending on the specified target, this parameter is enabled by Data Exchange > Interface > External mode or by External Mode.

Command-Line Information

Parameter: ExtModeMexArgs
Type: string
Value: any valid arguments
Default: ""

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

Static memory allocation

Control memory buffer for external mode communication.

Settings

Default: off

On

Enables the Static memory buffer size parameter for allocating dynamic memory.

Off

Uses a static memory buffer for external mode instead of allocating dynamic memory (calls to malloc).

Tip

To determine how much memory you need to allocate, select verbose mode on the target to display the amount of memory it tries to allocate and the amount of memory available.

Dependencies

Command-Line Information

Parameter: ExtModeStaticAlloc
Type: string
Value: 'on' | 'off'
Default: 'off'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

External Mode Interface Options

Static memory buffer size

Specify the memory buffer size for external mode communication.

Settings

Default: 1000000

Enter the number of bytes to preallocate for external mode communications buffers in the target.

Tips

Dependency

This parameter is enabled by Static memory allocation.

Command-Line Information

Parameter: ExtModeStaticAllocSize
Type: integer
Value: any valid value
Default: 1000000

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

See Also

External Mode Interface Options

  


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