Why is my external signal from my TI C2000/LaunchPad device not being seen in Simulink?
1 view (last 30 days)
Show older comments
MathWorks Support Team
on 22 Jan 2020
Edited: MathWorks Support Team
on 13 Apr 2023
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.
Accepted Answer
MathWorks Support Team
on 10 Apr 2023
Edited: MathWorks Support Team
on 13 Apr 2023
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 Comments
More Answers (0)
See Also
Categories
Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!