Configure host-side serial communications interface to transmit data to serial port
Embedded Coder / Embedded Targets / Host Communication
data — Data package
scalar (default) | vector
Data package, specified as a scalar or vector, sent to a target computer. The package can consist of headers, terminators, and data elements. The package size is limited to 16 bytes of ASCII characters, including headers and terminators. Calculate the size of a package by adding the byte sizes of headers, terminators, and the data.
This table lists the number of bytes for supported data types.
|Data Type||Byte Count|
For example, if your data package includes a 1-byte package header,
'S', and a 1-byte package terminator,
bytes remain for data. If your data is of type
int8, the data can
consist of up to 14 data elements. If your data is of type
the data can consist of up to 7 data elements. If your data is of type
int32, the data package can consist of up to 3 data elements with
2 bytes left over. Because you cannot mix data types in a package, the remaining 2
bytes are not used.
The number of data elements that can fit into a data package determine the data
length (see the Data length parameter). In the
preceding example, the 14 data elements of type
int8 and the 7 data
elements of type
uint16 are the data lengths for each data package,
respectively. When the data length exceeds 16 bytes, unexpected behavior, including
run-time errors, can result.
Port name — Name of COM port
COM1 (default) | COM2 | COM3 | COM4
Specify the name of the COM port that you are configuring for this SCI Transmit block. You can configure up to four COM ports for a model, one COM port for each SCI Transmit block in the model.
Additional package header — Header of transmitted data package
'S' (default) | 'ASCII value'
Specify the header of the transmitted data package as an ASCII value in single quotes. The value can be text or a number in the range 0 to 255. The quotes are not transmitted and are not included in the package byte count.
The header is not part of the data being transmitted. Typically, the header marks the start of the data. The header that you specify must match the header specified for the corresponding target computer SCI Receive block.
Additional package terminator — Terminator of transmitted data package
'E' (default) | 'ASCII value'
Specify the terminator of the transmitted data package as an ASCII value in single quotes. The value can be text or a number in the range 0 to 255. The quotes are not transmitted and are not included in the package byte count.
The terminator is not part of the data being transmitted. Typically, the terminator marks the end of the data. The terminator that you specify must match the terminator specified for the corresponding target computer SCI Receive block.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
This block does not support code generation. The block is supported for simulations on a host development computer only.