- You stream data using matlab sdi command line interface. So you can add a logic in your simulink model to set a variable when it is time to trigger your pythn script.
- You can read trigger in matlab on host machine using sdi command line interface (this is just a simple matlab script that can start your real-time application and waits for a trigger from your target.)
- Once your your matlab script recieves the trigger it can lauch your python script with system() on your host machine.
Execute command on Host PC (windows) triggered by simulink real time model
3 views (last 30 days)
Show older comments
Hello,
my setup is the following:
- Device under test (MCU board)
- Host PC (Windows) running simulink real time and python application
- Target PC (Speedgoat) running the real time application
I tried to use a test sequence to run the simulink model on the target PC while triggering a python script that activates specific functions on the device under test. I used the matlab
system()
command to run a .bat file to launch the python script but it is not supported by simulink coder hence it rightfully does not build the real time application.
How is it possible to trigger commands on the host PC from the target PC at runtime?
What I would like to verify with the real time application and hardware is if the sequence of commands written in the python script and launched by the host PC, are executed correctly by the device under test.
The following figure shows the configuration of the system.
Thank you
0 Comments
Answers (1)
Midhulesh Vellanki
on 31 Mar 2022
This might be a little late but here is my suggestion:
Let me know how that works out for you
0 Comments
See Also
Categories
Find more on Real-Time Simulation and Testing 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!