The documentation discusses this here. I'll elaborate on that.
To prevent Data Type Override from changing a numerictype, set the property
DataTypeOverride = 'Off'
For example, change
fixdt(1,5,2)
to
fixdt(1,5,2,'DataTypeOverride','Off')
This can also been done using a Blocks Data Type Assistant interface.
Step 1
Step 2
Step 3
If all the data types in a subsystem are changed in this way, and we have Data Type Override set to Double model wide
set_param(bdroot,'DataTypeOverride','Double')
then that subsystem's types will stay the same.
I've attached a example function that shows how to do this more automatically.
To use it, open the attached model
example_DTO_inherit_off_R2015b
I saved to model to work as far back as R2015b. But 'DataTypeOverride','Off' is even older than that.
notice that Data Type Override to Single is in effect
set_param(bdroot,'DataTypeOverride','Single')
and has forced all the types to single, even though fixed-point types are specified on the many blocks.
To prevent that on two of the subsystems, run the attached example function like, so
change_data_type_settings_for_DTO_inherit_off(['example_DTO_inherit_off_R2015b/SubSys1'])
change_data_type_settings_for_DTO_inherit_off(['example_DTO_inherit_off_R2015b/SubSys2'])
these scripts will attempt to set Data Type Override inheritance to Off for the data type parameters under these subsystems. Command window output will show what's happening such as
For block: example_DTO_inherit_off_R2015b/SubSys1/In1
Parameter: OutDataTypeStr
Current value: Inherit: auto
LEFT UNCHANGED
For block: example_DTO_inherit_off_R2015b/SubSys1/Dbl-to-FixPt
Parameter: OutDataTypeStr
Current value: fixdt(1,5,2)
New value : fixdt(1,5,2,'DataTypeOverride','Off')
For block: example_DTO_inherit_off_R2015b/SubSys2/Dbl-to-FixPt
Parameter: OutDataTypeStr
Current value: fixdt(1,wl1,2)
New value : dtoInheritOffWrapper( fixdt(1,wl1,2) )
The two subsystems that were change now have Data Type Override inheritance Off. The 3rd subsystem is still reacting to Data Type Override to Single.
HTH,
Andy Bartlett