Using global variables in Embedded Matlab function in simulink
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Fangjun Jiang
el 28 de Sept. de 2011
0 votos
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 comentario
Muthappa
el 28 de Sept. de 2011
Categorías
Más información sobre String en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
