Communication interface
R2026bSelect communication protocol for external mode between Simulink and target Arduino hardware
Model Configuration Pane: Hardware Implementation / Hardware board settings / Target hardware resources / External mode
Description
Use the ‘serial’ option to run your model in the External mode with serial communication.
When running a model in External mode over serial, Simulink® generates error if the Hardware Serial Port parameter is set to Serial 0. The error is generated because the External mode uses serial port 0 to communicate with the Arduino® board by default. Browse to WiFi properties, and ensure that the Hardware Serial Port parameter is set to a port other than Serial 0.
Warning
External mode over XCP on WiFi on Simulink models having more than 3 multirate systems result in a connection error.
Use XCP on CAN to run your model in external mode over a CAN
network. This option is available only for Arduino boards with on-board CAN controllers (such as Arduino Due, Arduino Uno R4 WiFi, Arduino Uno R4 Minima, Arduino Nano R4, Teensy 4.0, and Teensy 4.1). When you select this option, the
External mode over CAN section appears in the Host-board connection pane, where you configure the CAN module, CAN IDs, and host CAN hardware
settings.
Settings
Serial — For AVR-based boards | XCP on Serial — For ARM-based boards | XCP on CAN — For boards with onboard CANDefault:
Serial — For AVR-based boardsXCP on Serial — For ARM-based boards
SerialTCP/IPWiFiXCP on SerialXCP on TCP/IPXCP on WiFiXCP on CAN
Programmatic Use
| No programmatic use is available. |
Version History
Introduced in R2015b