In my Simulink model, I have many Block S-Functions sharing a global variable. As we know, the value of the global variable will be transferred and possibly changed from block to block. I wonder if there is an alternative to transfer the data from block to block.
Asked
Active
Viewed 1,208 times
0
-
Can you please describe the problem a little more? Do you want to *unshare* the global variable, i.e have a copy of that variable per S-Function block? Or is it something else you're asking? – Praetorian Apr 22 '14 at 22:05
1 Answers
0
I prefer using pwork vectors to share c and c++ classes (or any other stuff) between functions. A pwork vector is actually just a pointer to an object.
Check this out: http://www.mathworks.de/de/help/simulink/sfg/elementary-work-vectors.html?searchHighlight=Pwork

spieb
- 73
- 1
- 1
- 5