フィルターのクリア

Specified key type does not match the type expected for this container. in Simulink code from TCLAB (using Arduino Leonardo and TCLab)

5 ビュー (過去 30 日間)
Hi i'm trying to run the TCLab Code for PID in the simulink files, package from Matlab and Simulink for arduino installed correctly, but at the moment of running the program the following picture shows:
Error due to multiple causes.
Caused by:
Specified key type does not match the type expected for this container.
Error evaluating MATLAB function in 'arduino_pid/Temperature Control Lab/Arduino/Arduino'
When i try to Run the code from Simulink it shows:
An error occurred while running the simulation and the simulation was terminated
Caused by:
And a yellow error block showing a Matlab function block of 'interpreted MATLAB fcn.
There are the same code, one is running from the MATLAB Console and the other is running from a .slx file (it shouldn't matter cause is the same file).
And reinstalling or remove package and add-ons isnt working , thanks in advance. (this error is caused in the 2023b version)

採用された回答

Uday
Uday 2023 年 10 月 23 日
Dear Camilo,
As per my understanding, you are encountering an issue while trying to run the “TCLab” Code for “PID” in Simulink. You’ve also mentioned that reinstalling or removing packages and add-ons hasn’t resolved the issue.
Here are some possible solutions to resolve the error:
  1. Check Key Type: The error message suggests that there might be a mismatch between the expected key type and the specified key type in your code.
  2. Interpreted MATLAB Function Block: You mentioned a yellow error block showing a MATLAB function block of “interpreted MATLAB fcn”’. The Interpreted MATLAB Function block applies a specified MATLAB function or expression to the input. If there’s an issue with this function or expression, it could lead to errors: https://www.mathworks.com/help/simulink/slref/interpretedmatlabfunction.html.
  3. Reinstallation Issues: If reinstalling or removing packages and add-ons isn’t working, ensure that you’re following the correct steps for uninstallation and reinstallation. Since you mentioned that this error is occurring in the 2023b version, it’s possible that there might be some compatibility issues, check for the compatibility issues if any (https://www.mathworks.com/hardware-support/arduino.html).
I hope this helps!
  1 件のコメント
Camilo Vicente Gonzalez Pozo
Camilo Vicente Gonzalez Pozo 2023 年 10 月 25 日
Thanks Uday , most probably is that MATLAB 2023b no longer support interpreted MATLAB fcn , because i tried the same code in a 2021b version and it works (in the interpreted MATLAB fcn was a notification of end in support that block), do you think if i re code that blocks with a s-function or MATLAB function block , maybe i could Run the code successfully ?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeArduino Hardware についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by