MATLAB: Wireless communication between 2 Simulink blocks without Goto/From

simulinkwirelesswireless communication blockswirelessly

Hi,
Would there be a way to create 2 Simulink blocks (Matlab Function? S-Function ?) that would be in a same model, at different levels and which could communicate together wirelessly?
I'm looking for a solution that do not use Goto/From blocks. I'm pretty sure there is a code solution, surely complicated, but the outlines of this solution are not clear in my mind.
GL

Best Answer

  • Global Goto/From blocks
  • Data Store Memory block with Data Store Read and Data Store Write blocks
The advantage of the first solution is that the signal at the 'From' block is calculated after it is put on the 'Goto' block. In other words, order of execution is managed automatically. Using Data Store Memories you are not sure that the data is written before it is read.
The advantage of the second solution is that you can write to the Data Store in multiple locations.
When sending the signal accross subsystems which run at different sample rates, a Rate Transition is automatically inserted at Goto/From blocks. This is not the case for the Data Store blocks.