MATLAB: Are disabled Simulink signal test point still show up in the ASAP2 file as measurements

asap2Embedded Coderloggingpointsignaltest

I have a Simulink model with root level inport and outport signals which have enabled test points. After I disable the test point property of the signal the signal name still shows up in ASAP file after generating code from the model. The signal with the test points has the storage class "Default (Model default)".
The generated ASAP2 (.a2l) file contains all 10 test points of the model root level signals. If I remove the test point e.g. "myname1" from a root level signal (right-click, "Signal Properties", "Logging and Accessibility", check "Test Point"), save the modified model and generate code again: "myname1" is still present in the generated ASAP2 (.a2l) file.
I expect when toggle the test point feature of a root level Simulink signal the ASAP2 measurement will be not generated.

Best Answer

Refer to the following documentation page for ASAP2 Measurement, which says the following:
"...The data item is not represented in the ASAP2 file if any of the following conditions exist: You apply one of the storage classes Auto, FileScope, or Default (through Model default)."
From the description above, the behavior is because when you configure the storage class to "Default (Model default)" and the signals will show up in the generated ASAP2 (.a2l) file, with both Emebedded Coder target file ert.tlc and autosar.tlc.
Choosing the Model Default storage class is effectively the same as marking the signal as a test point. This is why the signals still show up in the ASAP2 (.a2l) file as MEASUREMENT, even if they are not test points.
You can try to work around this issue by changing a TLC option in "asap2setup.tlc". See the excerpt from R2012a release notes below for more information. Note that this could prevent signals from showing up as measurements even if they enable test points.
Options to control ASAP2 record generation for structured data are defined in the shipping target file:
matlabroot/toolbox/rtw/targets/asap2/asap2/user/asap2setup.tlc
ASAP2EnableTestPoints enables or disables record generation for test pointed Simulink signals, test pointed Stateflow states, and test-pointed Stateflow local data (enabled by default)
ASAP2EnableRootLevelIO enables or disables record generation for root-level inports and outports (disabled by default)