Tune Parameters and Measure Signal Data for Deployed Applications
After you deploy an application to a Linux target environment, you can view the list of measurable signals and tunable parameters in Signals and Parameters tabs respectively by selecting the application in the target tree. These tabs display the signals and parameters that are exported in ASAP2 file.
To set up the data:
Select the signals to measure and move them from Signals available on target to Signals to Instrument.
Programmatically:
tg.selectSignalsToInstrument(<applicationName>, <SignalNamesArray>);
Remove signals from Signals to Instrument by selecting them and clicking the delete button.
Programmatically:
tg.removeSignalsFromInstrument(<applicationName>, <SignalNamesArray>);
If the application is in running state, stop it by clicking the Linux Target > Run On Target > Stop Application.
Start tuning the parameters clicking the Linux Target > Calibrate > Monitor & Tune.
Programmatically:
tg.startMonitorAndTune(<applicationName>);
Note
If the application is in running state, you can start the calibration by clicking Linux Target > Calibrate > Monitor & Tune > Connect.
Programmatically:
tg.startMonitorAndTune(<applicationName>,false);
To see a plot of the selected signals, open the
Simulation Data Inspector
by selecting Linux Target > Review Results > Data Inspector.Programmatically:
Simulink.sdi.view
You can add more signals or remove signals for measurement.
To view an updated list of signals to appear on Simulink Data Inspector, click the Restart Streaming button.
Programmatically:
tg.restartStreaming(<applicationName>);
On the Parameters tab, you can read parameter values.
Programmatically:
To read a specific parameter:
To read the parameters available:tg.readParameter(<applicationName>, <paramName>);
tg.readParameters(<applicationName>);
To tune parameters, select Parameters tab and specify a value in the value field of the parameter of interest.
Programmatically:
Thetg.writeParameter(<applicationName>, <paramName>, <paramValue>);
paramValue
accepts multiple data types to support various kinds of parameters.Note
To enable calibration for AUTOSAR Adaptive models, configure the XCP communication interface by setting the Code Generation > AUTOSAR Code Generation > XCP Server Configuration > Transport layer to
XCP On TCP/IP
.In Simulink Data Inspector, you can observe changes to signal data as you tune parameters.
To stop streaming of signal data:
tg.stopStreaming(<applicationName>);
You can stop signal measurement and parameter tuning by clicking Linux Target > Calibrate > Stop Monitor & Tune.
Programmatically:
tg.stopMonitorAndTune(<applicationName>);
See Also
startStreaming
| stopStreaming
| startMonitorAndTune
| writeParameter