After building this model in FreeMASTER the variable "Poti ADC Wert" is in the variable list.
But the variable "Poti ADC Wert umgerechnet" isn't.
Obviously the gain block changes something...
How can I diplay the variable after the gain ?
Hello,
how does it work with the latest Matlab version (R2023a)?
I guess the interface for a signal property has changed.
Could you please summarize all options we have for seeing any model signal in FreeMaster (for R2023a version)?
Thanks
Petr
I have the same issue, but can't see an option to define the storage class in the data store block parameter:
I am using R2021b, so suppose this may be different... Is there another way to prevent the code generation from optimising away all my data stores? - it's very frustrating.
Thanks,
Sean.
Hi lethuer,
Matlab code generation will optimize out some of the signal.
You can force a signal to be kept in the final elf by using a few tricks like:
- connect the signal to a Data Store & Data Memory Write Blocks and then display it in FreeMASTER;
- use a generic Out Block to connect the signal instead of Terminator;
Hope this helps!
Daniel
Hi dumitru-daniel.popa,
now I've created this model:
In FreeMASTER the variable "Poti ADC Wert" is still visible.
But I can still not see the signals "Variante A - Poti ADC Wert umgerechnet" and "Variante B - Poti ADC Wert umgerechnet" in the variable list of FreeMASTER.
A variable <Modelname>.Out1 is now in the variable list and can be displayed.
A variable <Modelname>.Datastore or something like that I can not find. How the Data Store variable will be called ?
Hi lethuer,
Sorry for delayed answer - i had issues with log in.
Can you send me your Simulink model, generated code and FreeMASTER project ?
I want to check the issue with your original files.
Thank you!
Daniel
Hi dumitru-daniel.popa,
sorry for delayed answer.
Here you have the model, the generated code and the FreeMASTER Project as an Attachement.
Hi lethuer,
It looks like the Simulink is optimizing out that variable.
You can keep that that variable by forcing the Simulink to consider it as a volatile variable. Open the Data Store Memory block properties and select the appropriate storage class.
Recompile the application and you should see the variable now in the *.map file and also available in the FreeMASTER
CLOCK_SYS_GetGateCmd 0x00001273 0xc Code Gb fsl_clock_manager.o [1]
CLOCK_SYS_GetSystemClock
0x00001205 0x5a Code Gb fsl_clock_manager.o [1]
CSTACK$$Base 0x1fffc818 -- Gb - Linker created -
CSTACK$$Limit 0x1fffcc18 -- Gb - Linker created -
Datenspeicher_A 0x1fffc054 0x2 Data Gb NXP_Poti_mit_ADC_und_FreeMASTER_20171005.o [1]
FMSTR_AddressFromBuffer
0x00000717 0xe Code Gb freemaster_Kxx.o [1]
FMSTR_AddressToBuffer 0x00000701 0xe Code Gb freemaster_Kxx.o [1]
Hope this helps!
Daniel