Why is my external signal from my TI C2000/LaunchPad device not being seen in Simulink?

1 次查看(过去 30 天)
I am running a model in external mode with the TI C2000 support package. The model itself works and appears to run fine, but there is a problem with logging or monitoring signals.
When I try to log signal from blocks or in scopes, sometimes I do not get any data back. Other times, depending on the signal, I only get '0' values.

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2023-4-13
In general, External Mode executes as a part of the background loop for these types of models.
If the sample rate of the model is too fast for External Mode, signal logging may fail and data will not be returned. If this is the case, please try to reduce the sample rate and try to feed in a signal again.
In other cases, such as motor control applications, the use of asynchronous scheduling may mean that the model has a large number of interrupts. If there are too many interrupts, this will may block external mode from running successfully in the background loop, which can lead to communication loss or failed signal logging issues.
In those cases, consider using a 2-model approach for the host and target models rather than explicitly relying on external mode. In this approach, one model is used to send/receive data serially from the host, while a second model is used to send/receive data serially for the target. This achieves the same end goal as most external mode workflows, but alleviates some overhead memory concerns.
For an example of the 2-model approach, refer to the c28379Dpmsmfocdual_cpu1_ert.slx, and c28379Dpmsmfocdual_cpu2_ert.slx models on the following documentation page:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by