Data synchronization of multi core Simulink RT programs designed in a producer-consumer architecture

2 次查看(过去 30 天)
Suppose a reference model, running at 1 khz, produces a bunch of data to be used by another reference model running at 500 Hz. Each of those models is configured to run as different tasks.
Are there any design guidelines I need to adhere by to ensure consistency and synchronization of the data supplied by the producer reference model?
To be more specific, I'm worried about the following scenario : Producer ref model has two outputs : output1 which is a 12x1 signal and output2 which is a 50x50 matrix. Is there any possibility that those outputs aren't synchronized when read by the consumer ref model (e.g., output 1 is from iteration 10 of producer loop while output 2 is from an iteration 9, which may happen if consumer loop is executed before completion of output 2 update?)
If so, how do I ensure synchronization?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by