I have been using matlab in extern mode and i am aware of basic settings, And was doing extern mode but all of sudden this error started to appear.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I have been using matlab in extern mode and i am aware of basic settings, And was doing extern mode but all of sudden this error started to appear.
Hi,
The error occurs when the Host lost connection to target for various reasons.
1. The target has undergone a running reset.
2. The target is overrunning and can send the external mode message to host in background.
3. The communication link can be a issue like loose connection.
To avoid the problem or debug, try to run the model at lower sample rates, ensure a good cable is used for connection, try increasing the baudrate of the SCI peripheral, ensure the target code is running without issue.
Still the issue is not resolved, though it did worked in extern mode but again its not working.
whereas a template GPIO based code is running in extern properly.
Below are the settings that i had kept.
1) device manage = comport baud 921600 (max)
2) Matlab sciA baudrate 5625000 (as suggested, even tried various combination of device manage baudrate with sci baudrate.)
3) Solver ->additional para : fundamental sample time : 100e-6 and 50e-6 (tried with both).
since basic gpio and periph codes are running properly, i assume that error(2) (2. The target is overrunning and can send the external mode message to host in background.) as pointed by you might be the reason (as i can see code getting dumped and running on c2000 but on matlab the error as in question appears.
Can you suggest a cure for this or any other reason that you might think as a reason for this.
Hi,
Please try this:
You can also explore the 2 model approach as described in the page:
in.mathworks.com/.../permanent-magnet-synchronous-motor-field-oriented-control.html
Look for section:
Fast Serial Data Monitoring;
Hi Sharat,
The external mode adds its own files to the build that also add computation overhead.
You motor control loop may be suffering from this overhead. These are issues customer often face when running computation intensive algorithms at high sample rate and trying to use external mode on top of it. Hence to solve this pain we have come with 2 model approach to customer.
Hope this helps,
Hi Sharat,
Reading through this thread, I think it might be best for you to contact MathWorks Technical Support directly so they can help debug/analyze your model.
Cheers,
-Brian
Hi Sharat,
I agree with Brian.
The best way to help you is via tech support from MathWorks.
They can guide you through WebEx on how to Setup the SCI blocks and troubleshoot other issues.