runModel
Start or restart Simulink model running on EV3 hardware
Description
Examples
Manage a Simulink Model That Is Running on EV3 Hardware
After you run a Simulink model on the EV3 hardware, you can use commands to stop, restart, and delete the model.
Create a connection between the MATLAB® software on your host computer and the operating system on the EV3 hardware.
myev3 = legoev3('172.21.128.249')
myev3 = legoev3 with properties: ipAddress: '172.21.128.249'
The function returns a handle, myev3
, that
you will use as the first argument in the following commands.
To stop the model on the EV3 hardware, enter:
stopModel(myev3,'ev3_gettingstarted')
ans = 0
When the function has stopped the model, it returns 0
.
To restart the model on the EV3 hardware, enter:
runModel(myev3,'ev3_gettingstarted')
ans = 0
When the function has restarted the model, it returns 0
.
To delete the model on the EV3 hardware, enter:
deleteModel(myev3,'ev3_gettingstarted')
ans = 0
When the function has deleted the model, it returns 0
.
Input Arguments
myev3
— Connection to specific EV3 brick
handle
Connection to a specific EV3 brick, specified as a handle.
Use legoev3
to
create this connection.
Example: legoev3
modelname
— Name of model
model name
Name of model, specified as a character vector.
Example: 'ev3_gettingstarted'
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)