Legacy Serial Setup
Set up baseboard serial communications
Libraries:
Simulink Real-Time /
RS232 /
Mainboard
Description
The Legacy Serial Setup block sets up baseboard serial communications on the Speedgoat® target computer.
For more information, see RS-232 Serial Communication and RS-232 Legacy Drivers.
Examples
ASCII Encoding/Decoding Resync Loopback Test
Use the ability of the FIFO Read HDRS block to resynchronize after being repeatedly disabled and apply this ability to resolve errors such as when a message is only partially complete at the time the read is attempted.
Binary Encoding/Decoding Resync Loopback Test
Use the ability of the FIFO Read BINARY block to handle messages that are interrupted and only partially complete.
Simple ASCII Encoding/Decoding Loopback Test (with Baseboard Blocks)
Convert a single floating point number to ASCII and transmit the value over a serial link.
ASCII Encoding/Decoding Loopback Test (with Baseboard Blocks)
Send ASCII data over a serial link.
ASCII Encoding/Decoding Resync Loopback Test (with Baseboard Blocks)
Use the ability of the FIFO Read HDRS block to resynchronize after being repeatedly disabled and apply this ability to resolve errors such as when a message is only partially complete at the time the read is attempted.
Binary Encoding/Decoding Loopback Test (with Baseboard Blocks)
Send Binary data over a serial link.
Binary Encoding/Decoding Resync Loopback Test (with Baseboard Blocks)
Use the ability of the FIFO Read BINARY block to handle messages that are interrupted and only partially complete.
Parameters
Specify the serial port for communications.
If using USB-to-serial adapters, the target computer
detects these adapters as serusb1, serusb2, and so
on in the order that the adapters are connected to the serial devices.
The order of port assignment is retained through the power cycle of the target computer or serial device if there is no change in the connections to the ports.
Programmatic Use
Block Parameter:
port |
Use this value to select the serial port baud rate.
Programmatic Use
baud
Use this value to select the number of serial port data bits.
Programmatic Use
width
Use this value to select the number of serial port stop bits.
Programmatic Use
nstop
Use this value to select serial port parity.
Programmatic Use
parity
Use this value to select the serial port RTX/CTS mode.
Programmatic Use
ctsmode
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2020bThe RS232 mainboard blocks support connecting USB serial adapter ports. The
Serial port parameter of the Legacy Serial Read
block, Legacy Serial Write block, Legacy Serial Setup block,
Legacy Serial Port block, and Legacy Serial Port F block
means that you can select a USB Serial Port or a
Legacy Serial Port.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)








