I am a newbie for TargetLink and Matlab.
I ran into a problem.
Current code has a global variable(e.g. EventOut) for a specific function block. So, the global variable is auto-generated named as ‘Ca89_EventOut’ by TargetLink with a prefix ‘Ca89’ for the function block. By the way, I want to use the global variable for another function block. Of course, another function block also has the EventOut global variable. So, it also auto-generated with Ca12_EventOut by the TargetLink.
However, I want the 2nd function block to use Ca89_EventOut variable instead of Ca12_EventOut.
For the purpose, I tried to use the Simulink.signal or DataStoreMemory method.
So, I configured the EventOut in the Simulink.signal Object and Data Store Memory block with ‘double’ as data type and ‘real’ as a signal type on the ‘Base Workspace’.
But, I don’t know how to manage the same EventOut related port and data in the model explorer for each function block.
Could you give me a hint or example to understand them. Most of info or examples are oriented for the latest Matlab environment, so not that easy to follow them.
I would like to understand about how to manage Simulink.signal object and Data Store Memory block for global data sharing.
Ji Won Lee is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.