- 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.
- 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.
- 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).
Specified key type does not match the type expected for this container. in Simulink code from TCLAB (using Arduino Leonardo and TCLab)
2 views (last 30 days)
Show older comments
Camilo Vicente Gonzalez Pozo
on 18 Oct 2023
Commented: Camilo Vicente Gonzalez Pozo
on 25 Oct 2023
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:
- Error due to multiple causes.
- Specified key type does not match the type expected for this container.
- Error evaluating MATLAB function in 'arduino_pid/Temperature Control Lab/Arduino/Arduino'
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)
0 Comments
Accepted Answer
Uday
on 23 Oct 2023
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:
I hope this helps!
More Answers (0)
See Also
Categories
Find more on Programmatic Model Editing 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!