Clear Filters
Clear Filters

How can I run a Lego Mindstorms robot without the Simulink model option "Run on target hardware"?

2 views (last 30 days)
Hello everybody, due to my laboratory at a university I have to program a Lego® Mindstorms® robot with MATLAB/Simulink since yesterday. I did what the tutorial said, but the robot didn't move or made a sound. That wasn't a real problem because I'm an absolute greenhorn in terms of MATLAB/Simulink and and I have much time left for that task. But since today the important option "Run on target hardware" which should be located under "Tools" in a Simulink model is missing. I used the same version of MATLAB (R2012a) as yesterday so I cannot imagine what I have done wrong that an option is disappearing. So my question is if there is a way to get the robot started without that option or if I can fetch it back somehow. Thanks in advance for all answers.
Greetings from Germany Nadine Gallert

Answers (2)

Ryan G
Ryan G on 5 Jul 2012
If you already have installed the Lego kit you could try:
Go to Simulation -> Configuration Parameters
Click the Code Generation tab and set the System target file to realtime.tlc
The Run on Target Hardware option should appear on the left hand side, click this.
Set this to Lego
Apply Changes
Set Simulation mode to external and try to build and run.
Although I would think there is something bigger going on if this option disappeared entirely, this might workaround that issue.
  2 Comments
Nadine Gallert
Nadine Gallert on 5 Jul 2012
Thank you for your answer, but you couldn't help me. It's a weird thing, on R2012a there is no tab called "Code Generation", but I checked R2011a too and there it is indeed. Unfortunately R2011a doesn't support working with the NXT brick based on Simulink.
Ryan G
Ryan G on 5 Jul 2012
You can try using:
restoredefaultpath
rehash toolboxcache
and see if it comes back. It's weird you have code generation in 2011a and not 2012a, sounds like a path issue or install issue on that particular version.

Sign in to comment.


Kaustubha Govind
Kaustubha Govind on 5 Jul 2012
Do you still see an option until Tools that says "Install/Update Package" or something to that effect? I've had the "Run on target" disappear before, when something changed in my MATLAB installation, and running targetinstaller again fixed the issue for me.
  2 Comments
Nadine Gallert
Nadine Gallert on 5 Jul 2012
"Install/Update Package" or something comparable to it is not there, too. The whole thing is more and more like a mystery to me.
Kaustubha Govind
Kaustubha Govind on 6 Jul 2012
Okay, I'm guessing something got corrupted in your installation. If Ryan's suggestion doesn't help, you could either try re-installing MATLAB or call MathWorks Tech Support to see if this is a known issue.

Sign in to comment.

Categories

Find more on MATLAB Support Package for LEGO MINDSTORMS EV3 Hardware in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!