- 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
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/837110/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/837110/image.png)
Thank you
0 comentarios
Respuestas (1)
Midhulesh Vellanki
el 31 de Mzo. de 2022
This might be a little late but here is my suggestion:
Let me know how that works out for you
0 comentarios
Ver también
Categorías
Más información sobre Test Model Components en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!