Real time, Matlab, SpeedGoat, Simulink, read write data, Solution?
20 views (last 30 days)
Show older comments
Bonyadi Arezoo
on 14 Jul 2022
Commented: Bonyadi Arezoo
on 15 Jul 2022
Hi,I'm using Simulink connected to speedgoat in a real time status. The simulink model includes a user defined block in which along with the main code, there are commands open, close fprintf, fscanf, in order to write/read some numerical data. The model is built correctly, but when the start application button is clicked the following error pops up "external mode open protocol start command failed". So, is there any other way by which we can enjoy write and read data while connected to speedgoat online. Mathwork expers, do you know how to solve this issue?
4 Comments
Accepted Answer
Fangjun Jiang
on 14 Jul 2022
Edited: Fangjun Jiang
on 14 Jul 2022
To store runtime data like "A" in your example, use "Data Store Memory" block in your Simulink model. Use "Data Store Read" and "Data Store Write" block to read and write the data.
To log data for offline use, use "To Workspace" block or utilize signal logging.
7 Comments
Fangjun Jiang
on 14 Jul 2022
Data Store Memory block does not support variable size signal. See doc
You could declare the maximum size and fill the un-used with zeros.
More Answers (0)
See Also
Categories
Find more on Simulink Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!