- 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 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Midhulesh Vellanki
2022-3-31
This might be a little late but here is my suggestion:
Let me know how that works out for you
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Real-Time Simulation and Testing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!