MATLAB: Is the external signal from the TI C2000/LaunchPad device not being seen in Simulink

Embedded Coder

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.

Best Answer

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 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: