Contenido principal

Tune Parameters and Measure Signal Data for Deployed Applications

R2026b

To enable calibration for a model, use the linux.setXCPServiceConfiguration function before you build the model and deploy the application to the target computer. After deployment, use the Linux Runtime Manager application to instrument signals and tune parameters on the target computer. This workflow lets you monitor signal data and adjust parameter values during execution.

Set Up Signal Measurement and Parameter Tuning

  • Open the Linux Runtime Manager application.

  • On the Signals tab, select the signals to measure from Signals available on target section, and click blue arrow icon to move them to the Signals to Instrument section.

    Alternatively, use this command:

    selectSignalsToInstrument(tg,<applicationName>,<SignalNamesArray>);
  • To stop measuring signals, select the signals in the Signals to Instrument section and click the delete icon to remove them.

    Alternatively, use this command:

    removeSignalsFromInstrument(tg,<applicationName>,<SignalNamesArray>);
  • If the application is running, click Linux Target > Run On Target > Stop Application to stop it.

  • Click Linux Target > Calibrate > Monitor & Tune to start parameter tuning and stream the instrumented signals.

    Alternatively, use this command:

    startMonitorAndTune(tg,<applicationName>);
  • To start tuning parameters while the application is running, click Linux Target > Calibrate > Monitor & Tune > Connect.

    Alternatively, use this command:

    tg.startMonitorAndTune(<applicationName>,false);

Tune Parameters and Instrument Signals

  • Click Linux Target > Review Results > Data Inspector to open the Simulation Data Inspector and plot the selected signals.

    Alternatively, use this command:

    Simulink.sdi.view
  • Add or remove signals during measurement as needed. After updating the signal list, click Restart Streaming to refresh the signals displayed in the Simulation Data Inspector.

    Alternatively, use this command:

    tg.restartStreaming(<applicationName>);
  • Read the parameter values on the Parameters tab or use the readParameters function. To read a specific parameter value, use:

    tg.readParameter(<applicationName>, <paramName>);

  • Enter a new value in the paramValue field to tune the parameter of interest.

    Alternatively, use this command:

    tg.writeParameter(<applicationName>, <paramName>, <paramValue>);
    The paramValue argument accepts multiple data types to accommodate various kinds of parameters.

  • Observe the signal changes in the Simulation Data Inspector.

  • Stop streaming the signals by using the command:

    tg.stopStreaming(<applicationName>);
  • Click Linux Target > Calibrate > Stop Monitor & Tune to stop parameter tuning and signal streaming.

    Alternatively, use this command:

    tg.stopMonitorAndTune(<applicationName>);

See Also

| | | | | | | | | |

Topics