Main Content

addToRunOnBoot

Add Simulink model to Run-on-boot

Add-On Required: This feature requires the Simulink Support Package for Raspberry Pi Hardware add-on.

Description

addToRunOnBoot(raspPiObj,'model_name1') adds a Simulink® model to Run-on-boot. If you add a model to Run-on-boot, the model automatically starts to run each time you restart the Raspberry Pi® hardware.

Note

Simulink Online™ does not support the addToRunOnBoot function currently.

example

Examples

collapse all

To add a model to Run-on-boot:

  1. Create a connection to the Raspberry Pi hardware.

    raspPiObj = raspberrypi('192.168.1.5','pi','raspberry')
    rasPiObj = 
    
      raspberrypi with properties:
    
        DeviceAddress: '192.168.1.5'
                 Port: 22

    For more information on creating a connection to Raspberry Pi hardware, see raspberrypi.

  2. Use the addToRunOnBoot function.

    If the model is successfully added, the function returns the name of the model. Otherwise, the function returns an empty cell.

    addToRunOnBoot(raspPiObj,'raspberrypi_gettingstarted')
    ans = 
    
         1×1 cell array 
         {'raspberrypi_gettingstarted'} 
    

Input Arguments

collapse all

The object that represents the connection to Raspberry Pi hardware.

Example: raspPiObj

The name of the Simulink model to be added to Run-on-boot.

Example: 'raspberrypi_gettingstarted'

Data Types: char

Version History

Introduced in R2015b