I am encountering an issue in Simulink when running a model in external mode using XCP protocol. The model works fine with a sampling rate of 40 kHz, but when I increase the sampling rate to 100 kHz, I receive the following error:
error:
External Mode Open Protocol DisconnectConfirmed command failed
Caused by:
XCP error: XCP internal error: timeout expired, in response to XCP SYNCH command
I am using 6 ADC channels to capture and display the signals in the Simulink scope. The simulation is set to run indefinitely, and I manually stop it after 100 seconds. However, when I attempt to stop the simulation, Simulink hangs for some time and shows the XCP timeout error, causing delays in stopping the simulation.
Steps Taken:
I have already tried lowering the sample time of the scope but still face the issue when increasing the sampling rate to 100 kHz.
I could not find any explicit setting for increasing the communication timeout in the External Mode section of the Model Configuration Parameters.
Question:
What are the best practices for avoiding XCP timeout errors when increasing the sampling rate? How can I adjust the communication timeout or optimize external mode performance to handle higher data rates efficiently?
Mr Saad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.