Main Content

MEX-file arguments

Arguments to pass to external mode interface MEX-file

Model Configuration Pane: Code Generation / Interface

Description

The MEX-file arguments parameter specifies arguments to pass to an external mode interface MEX-file for communication between the Simulink® engine and a target system.

Dependency

To enable this parameter, select the External mode parameter.

Settings

'' (default) | argument-list

For XCP communication with a TCP/IP transport layer, there are four optional arguments:

  • Network name of your target processor –– For example, 'localhost' if the target process is your development computer or the IP address '148.27.151.12'.

  • Verbosity level –– 0 to not display information during a data transfer or 1 to display detailed information during a data transfer.

  • Port number of TCP/IP server –– An integer value between 256 and 65535, with a default of 17725. The specified port must not be used by another TCP/IP service that runs on the target hardware.

  • Symbols file name –– File format is PDB for Windows® or ELF for Linux®.

For XCP communication with a serial transport layer, there are four optional arguments:

  • Verbosity level –– 0 to not display information or 1 to display detailed information.

  • Serial port ID –– On Windows, 'COM1' or 1 for COM1, 'COM2' or 2 for COM2, and so on. On Linux, '/dev/ttyS0', and so on.

  • Baud –– 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600 (default), or 115200.

  • Symbols file name –– File format is PDB for Windows or ELF for Linux.

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

  • Network name of your target processor –– For example, 'myComputer' or '148.27.151.12'.

  • Verbosity level –– 0 to not display information during a data transfer or 1 to display detailed information during a data transfer.

  • Port number of TCP/IP server –– An integer value between 256 and 65535, with a default of 17725. The selected port must not be used by another TCP/IP service that runs on the target hardware.

For a serial transport, ext_serial_win32_comm allows three optional arguments:

  • Verbosity level –– 0 to not display information or 1 to display detailed information.

  • Serial port ID –– 1 for COM1, and so on.

  • Baud –– 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600 (default), or 115200.

Specify the arguments in the list order. For example, if you want to specify the verbosity level (the second argument), then you must also specify the network name of the target processor (the first argument). You can use white space or commas as argument delimiters.

'148.27.151.12' 1 30000

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: ExtModeMexArgs
Type: character vector
Value: valid arguments
Default: ''

Version History

Introduced before R2006a