Simulink, MS Visual Studio and Lego NXT
Mostrar comentarios más antiguos
I have a Simulink model for controlling Lego robot. I have c# project in MSVS which receives robot's coordinates from web camera every 100 ms. How can i get data from c# application and use it in Simulink model?
Respuestas (4)
Gautam Vallabha
el 1 de Abr. de 2012
0 votos
I assume you are referring to the Run on Target Hardware capability in R2012a. You have a couple of options:
- You can configure your model to use external mode. In this mode, the model would run on the LEGO robot but you can change parameters via Simulink on the host computer. To use this, you would (a) send the coordinates from C# to MATLAB workspace, and (b) use set_param to change the appropriate parameters. There are several ways of sending the coordinates; see here for details.
- You can use a "Receive via Bluetooth" block in your model, and figure out how to send the Bluetooth data from your C# program.
1 comentario
grig
el 14 de Abr. de 2012
grig
el 15 de Abr. de 2012
0 votos
grig
el 15 de Abr. de 2012
0 votos
grig
el 15 de Abr. de 2012
0 votos
Categorías
Más información sobre LEGO MINDSTORMS EV3 Hardware en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!