Clear Filters
Clear Filters

How do I run an exe written for Windows in Simulink

22 views (last 30 days)
I have an application/exe that runs on Windows, which we use to communicate with ECUs in vehicles. I need to create a simulation system that we can use to test how our application interacts with virtual ECUs. I have seen examples of something similar in webinars but I cannot find anything now that explains what I need to create in Simulink to run our application on. I assume I'm using the wrong technical terms when I search for it. I'm basically looking for a way to create a virtual PC in Simulink on which I can run our application and control it's inputs. This does not need to be a real time system where timings are crucial.

Answers (1)

Gagan Agarwal
Gagan Agarwal on 22 Nov 2023
Hi Hannes,
I understand that you are looking to execute a '*.exe' file within Simulink. To accomplish this, you can utilize a MATLAB function block inside Simulink to run the executable file using the 'system' function.
Additionally, I understand that you are interested in creating a virtual PC within Simulink. It's not possible to create a virtual PC directly in simulink, however as a way around you can establish a connection between Simulink and virtual PC which will enable you to send and receive messages between the virtual PC and the Simulink model using TCP/IP receive, thereby enabling you to run the application and control its inputs.
For additional information regarding 'system' function and TCP/IP receive please refer to the following documentation:
I hope it helps!

Categories

Find more on Simulink in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!