How to interface Ardiuno with external application on host machine using Simulink
Show older comments
I am trying to create a Simulink model in which I read information from some external application on my host computer using UDP and then send information to a piece of hardware via an Arduino. My external application is an driving simulation and the hardware I am controlling with the Arduino is an engine test rig. See the diagram below for basic setup:

The model I am trying to run in external mode looks like the following, with the UDP Receive block from the Instrument Control Toolbox reading from an external application and the SPI writing data from Arduino.

The issue is that when I try to run this model in external mode I get the following error:
ERROR: ### Build procedure for model: 'Arduino_test_UDP_edit' aborted due to an error.Level-2 MATLAB S-function 'sudprb' in 'Arduino_test_UDP_edit/UDP Receive' specifies 'SetSimViewingDevice(true)' , which prevents an output port from being created for the S-function.
What can I do?
Accepted Answer
More Answers (0)
Categories
Find more on Arduino Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
