Main Content

Target Computer Command-Line Interface

You can load, run, stop, and check the status of a real-time application by using the target computer command-line interface commands.

By default, the target computer displays the session 1 screen with the target computer status monitor. For information about switching to the session 2 screen with the command-line interface, see Target Computer Status Monitor.

To read the target computer console log, view the log in the slrtLogViewer.

Target Object Commands

When you are using the target computer command-line interface, target object functions support loading, starting, stopping, and checking the status of the real-time application.

For a description of how to use these commands, see Control Real-Time Application at Target Computer Command Line.

Note

To run user commands, log in as user slrt by using password slrt. To run the system commands (for example, date, ntpdate, ntpd, rtc, or setting the time zone), login as user root by using password root.

These commands are Target object commands that you can use through the command-line interface on the target computer. Each command appears with its equivalent MATLAB® syntax. In the descriptions, tg_object is the target object name, and app_name is the real-time application MLDATX file name.

  • Target: slrealtime listApplications

    MATLAB: getInstalledApplications(tg_object)

    When run from the development computer in the MATLAB Command Window, the getInstalledApplications command returns a list of the real-time application that are installed on the target computer.

  • Target: slrealtime load --AppName app_name

    MATLAB: load(tg_object,'app_name')

    When run from the development computer in the MATLAB Command Window, the load command deploys the real-time application to the target computer and loads the application. When run from the target computer command interface, the load command loads the application.

  • Target: slrealtime start

    MATLAB: start(tg_object)

    The start command runs the real-time application that is loaded on the target computer.

  • Target: slrealtime stop

    MATLAB: stop(tg_object)

    The stop command stops the real-time application that is running on the target computer.

  • Target: slrealtime install --AppName app_name

    The slrealtime install command installs the real-time application MLDATX file for standalone operation on the target computer. The MLDATX file should have been previously downloaded to the target computer and be either in the current directory or specified using absolute path.

    MATLAB: install(tg_object,'app_name')

    The install command installs the real-time application for standalone operation on the target computer. The command uses the MATLAB path to find the real-time application MLDATX file to install.

  • Target: slrealtime saveParamSet filename

    MATLAB: saveParamSet(tg_object,filename)

    The saveParamSet command saves the parameter set from the loaded real-time application on the target computer.

  • Target: slrealtime loadParamSet filename

    MATLAB: loadParamSet(tg_object,filename)

    The loadParamSet command loads the parameter set into the real-time application on the target computer.

  • Target: shutdown -S reboot

    MATLAB: reboot(tg_object)

    The reboot command reboots the target computer.

    If you prefer to safely shutdown the RTOS before turning off power to the target computer, you can use the command: shutdown -S system

Target Computer RTOS System Commands

The target computer uses the QNX Neutrino Real-Time Operating System (RTOS). You can run system commands on the target computer from the development computer by using an SSH utility, such as PuTTY. Or, you can run system commands on the target computer from its keyboard (console). Target computer RTOS system command information is available in the Utilities Reference in the QNX Momentics IDE 7.1 User’s Guide. All commands that this reference identifies as Runs on: QNX Neutrino are supported on the target computer.

Some RTOS commands are required for configuring the target computer. These commands include:

  • date — set date and time

  • ntpdate — set the local date and time from NTP server

  • ntpd — start NTP daemon

  • rtc — set date from hardware clock

Note

To run user commands, log in as user slrt by using password slrt. To run the system commands (for example, date, ntpdate, ntpd, rtc, or setting the time zone), login as user root by using password root.

For a description of how to use these commands, see Execute Target Computer RTOS Commands at Target Computer Command Line.

Related Topics

External Websites