Add-on Error : Simulink Support Package for Arduino Hardware : XCP error

67 visualizaciones (últimos 30 días)
재홍 양
재홍 양 el 6 de Mzo. de 2023
Comentada: Cristian Napole el 13 de Nov. de 2024 a las 9:52
I am using the Matlab R2021b Update 4 version, and I am designing LFR using IR Sensor and UltraSonic Sensor.
XCP Serial error occurs continuously when using 'Simulink Support Package for Arduino Hardware'.
The error message is as follows:
-
External mode open protocol CheckData command failed
Cause:
Multiple errors detected.
XCP serial port error: serial port send error
Error detected while trying to disconnect Simulink from target application.
XCP error: XCP serial port error: serial port send error
Component:Simulink | Category:Block diagram error
-
The same error continues when you replace the board.
I guess it's a problem in transmitting data, but even if you manually specify COM Port, a method that various communities talk about as a solution, the same error occurs (COM 13~16).
The above error occurs 8 times out of 10 times, and it works normally 2 times.
Even after about two normal operations, the above error eventually occurs and stops working, usually when the IR Sensor is given a signal (such as putting your hand in front of it to cover the light), and even when you leave it for about 10 seconds without doing anything.
In other words, if I quickly finish building my model on the Arduino board, disconnect the computer from the board, and don't run it using power, that error will happen unconditionally.
I am writing down the following error messages as well. :
-
Simulink data type of signal '' is 64-bit 'double', but the target 'double' data type is 32-bit. For signal monitoring, the target application will upload 32-bit data, which, for display, Simulink will convert to 64-bit data. Use the Single Precision Converter to remove 'double' data type, or use the 'Data Type Conversion' block to convert the signals to 'single'.
Component:Simulink | Category:Model Warning
Simulink data type of the parameter 'SampleTime' is 64-bit 'double', but the target 'double' data type is 32-bit. For tuning, the parameter value was converted to target 'single', which can result in a loss of precision.
Consider using the 'single' data type for the Simulink parameter. Parameter data types depend on workspace variable data type settings and block parameter or signal attribute settings.
You can use the Single Precision Converter to remove 'double' data types.
Component:Simulink | Category:Model Warning
Saving external mode simulation output as a single object is not supported because the workspace variable 'out' is not created during model code execution. To suppress the warning, set 'ReturnWorkspaceOutputs' to 'off'.
Component:Simulink | Category:Model Warning
Unable to upload data to simpleLFR123/PK Algorithm. Logging is not enabled for the signal at block path simpleLFR123/PK Algorithm, or uploading of data to the block is not supported.
Component:Simulink | Category:Model Warning
-
Although there are many warning messages, I understand that they do not affect the operation itself.
In fact, as mentioned earlier, there are times when the XCP error does not occur, which works normally regardless of the warning message.
There seems to be no problem with the configuration of the model itself because a fatal error occurred during the model build process, so what is the alternative problem? Please give me a good answer.
I'm also attaching a model target map to help you solve the problem. If you need more information on the algorithm section to solve the problem, please tell me in the answer.

Respuestas (1)

Tushar
Tushar el 18 de Abr. de 2023
Hi,
This could be because of you having certain firewall settings possibly blocking connection. Due to this, the external mode stops or crashes immediately when started.
So, please have a look at you firewall settings.
You can also have a look at the related answer:
Hope it helps!
  1 comentario
Cristian Napole
Cristian Napole el 13 de Nov. de 2024 a las 9:52
I turned off the firewall and keeps delivering the XCP issue. In my case, it happens when I changed from a 1ms time step to a 0.1ms timestep

Iniciar sesión para comentar.

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by