This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

stopModel

Stop Simulink model running on EV3 hardware

Syntax

stopModel(myev3,modelname)

Description

stopModel(myev3,modelname) stops a Simulink® model that is running on the EV3 hardware.

Examples

collapse all

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

collapse all

Connection to a specific EV3 brick, specified as a handle.

Use legoev3 to create this connection.

Example: legoev3

Name of model, specified as a character vector. Use 'all' to clear all Simulink models from the EV3 memory.

Example: 'ev3_gettingstarted'

Example: 'all'