Standalone Boot Method

You can configure the Simulink® Real-Time™ software to run as a standalone real-time application on your Speedgoat target machine. For more information on Boot mode Stand Alone, see Standalone Mode.

Standalone Settings

Speedgoat target machines come with DOS Loader software installed. You can set up the DOS Loader boot method on your development computer or configure another boot method. For more information about booting and kernel transfer, see your Speedgoat target machine documentation or follow the link from Speedgoat Target Computers and Support.

To set the kernel environment properties, use Simulink Real-Time Explorer . When you are done, you can create a standalone kernel and real-time application.

For Boot mode Stand Alone, you do not create a Simulink Real-Time boot disk or network boot image. Instead, you copy files created from the build process to the target computer hard drive.

  1. Open a Simulink Real-Time model by creating a model from the Simulink start page. In the MATLAB Command Window, type:

    simulink

    Select the Simulink Real-Time template from the start page and create the exampleSlrtApp model. Or, in the Command Window, use the Simulink.createFromTemplate command.

  2. In the Simulink Editor, open the Target Computer Manager. In the Real-Time tab, from the targets list, click Target Computer Manager.

  3. From the Target Computers list, select the target computer node.

    • To add a node representing another target computer, in the Targets pane, click the Add target button.

    • To remove a node representing a target computer, select the node and click the Remove target button.

  4. From the Advanced settings list, set Boot mode to Stand Alone. Check the host-target communications settings, which correspond to the Speedgoat target machine. See PCI Bus Ethernet Setup.

Repeat this procedure as required for each target computer.

Real-Time Application Build

After you set the Simulink Real-Time boot mode to Stand Alone, you can use Simulink Real-Time, Simulink Coder™, and a C/C++ compiler in Stand Alone mode to build a standalone kernel and real-time application with utility files.

  1. In the Command Window, open your Simulink model, for example, ex_slrt_rt_osc (open_system(docpath(fullfile(docroot, 'toolbox', 'xpc', 'examples', 'ex_slrt_rt_osc')))).

  2. Build the model. In the Simulink Editor, on the Real-Time tab, click Run on Target > Build Application.

    The Simulink Coder and Simulink Real-Time software create a folder, ex_slrt_rt_osc_slrt_emb, containing the files that boot the target computer and run the real-time application.

Repeat this procedure as required for each real-time application.

Real-Time Application Transfer and Boot Configuration

After building the kernel and real-time application on a development computer, transfer the files to a target computer by using the SimulinkRealTime.fileSystem object functions. Configure the target computer to run the real-time application upon startup.

For this procedure, your target computer must support network boot mode. If it does not support network boot mode, see Application Transfer and Boot Configuration with USB Flash Drive.

  1. Restart the target computer in DOS mode and open the DOS prompt.

    If the target computer was previously started from the network boot image, to disable the network boot capability, kill the boot server from Windows® Task Manager.

  2. Start the target computer by using network boot mode.

  3. In MATLAB, change to the folder that contains the kernel and real-time application files.

  4. Copy these files to the root folder of the target computer C:\ drive:

    tg = slrt;
    SimulinkRealTime.copyFileToTarget(tg,'xpckrnl.rtb')
    SimulinkRealTime.copyFileToTarget(tg,'ex_slrt_rt_osc.mldatx')
  5. Restart the target computer.

    To boot the kernel and start the real-time application, the target computer executes the following sequence of calls:

    C:\autoexec.bat
    C:\rttboot.com
    C:\xpckrnl.rtb
    C:\<application>.mldatx

Repeat this procedure for each target computer that you start in Stand Alone mode.

Continue by testing a real-time application in Stand Alone mode.

Application Transfer and Boot Configuration with USB Flash Drive

Speedgoat target machines come with DOS Loader software installed. You can set up the DOS Loader boot method on your development computer or configure another boot method. For more information about booting and kernel transfer, see your Speedgoat target machine documentation or follow the link from Speedgoat Target Computers and Support.

If the target computer does not support network boot mode, use a USB flash drive as a boot device.

  1. Restart the target computer in DOS mode and open the DOS prompt.

  2. At the DOS prompt, save a copy of the target computer C:\autoexec.bat file to a backup file, such as C:\autoexec_back.wrk.

  3. Connect the USB flash drive to the development computer.

  4. Copy these files to the root folder of the USB flash drive:

    autoexec.bat
    rttboot.com
    xpckrnl.rtb
    ex_slrt_rt_osc.mldatx
  5. Remove the flash drive from the development computer and connect it to the target computer.

  6. Restart the target computer.

    To boot the kernel and start the real-time application, the target computer executes the following sequence of calls:

    C:\autoexec.bat
    C:\rttboot.com
    C:\xpckrnl.rtb
    C:\<application>.mldatx

Repeat this procedure for each target computer that you start in Stand Alone mode.

Continue by testing a real-time application in Stand Alone mode.

Related Topics