Code Inspector warning, tunable objects
6 views (last 30 days)
I’ve tried reading the documentation online and I have to say it’s horrendous. I haven’t been able to get a straight answer online or from the people at my work. When I run Simulink Code Inspector on our model I get a few warnings, and one of them wants:
Modify all workspace variables referenced by the model to be not tunable
My question is how can you do this? Is there a way that you can disable the fields from being used once we set the initial values? We use Simulink.Parameter to set some constant values in the model. It looks like:
VARIABLE = Simulink.Parameter;
VARIABLE.Value = uint32(190);
VARIABLE.RTWInfo.StorageClass = 'Custom';
VARIABLE.RTWInfo.CustomStorageClass = 'Define';
Is there any way to makes something like this non-tunable?
Ryan G on 30 Aug 2012
The reason that warning appears is because you are using a custom storage class. Since it is a warning you don't actually need to fix it to run the code inspector, but it is letting you know that, depending on how it's defined, it may not work as intended.
Your options are
1) Go ahead and try code inspector regardless of the warning 2) Change the storage class
If you see anything that doesn't make sense later on in the process and it involves this parameter, you will be able to better figure out that this was the reason.