Using global variables in Embedded Matlab function in simulink
Ältere Kommentare anzeigen
Hi,
I am using data store memory blocks in conjunction with global variables to use global variables in embedded matlab function in simulink. I have 4 global variables and therefore I have 4 data storage memory blocks in my simulink model. However, when I ran my simulation, the values of the global variables were not taken from the data storage block and instead I got a warning which says:
Warning: The block 'Embedded MATLAB Function' is reading from element 0 of the data store 'Data Store Memory' before any blocks have written to this memory in a minor time step at time 400.0
400 - is my simulation time.
I do not understand the reason why I am receiving this message and the reason for the values of the global variables not being updated from the data storage :(
It would be great if any of you could advice or suggest me on this.
Thanks
Akzeptierte Antwort
Weitere Antworten (1)
Fangjun Jiang
am 28 Sep. 2011
0 Stimmen
Those are just warnings. If you are sure that you don't write to the memory as often as you read it, you can disable the warning.
Go to Simulink model, select menu Simulation->Configuration Parameters...->Diagnostics->Data Validity, in the "Data Store Memory Block" section.
1 Kommentar
Muthappa
am 28 Sep. 2011
Kategorien
Mehr zu String finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
