I receive the following error message when trying to open the Arduino Engineering Kit library in Simulink

조회 수: 1 (최근 30일)
Warning: An error occurred while parsing
"C:\Users\konta\OneDrive\Dokumente\MATLAB\Add-Ons\Toolboxes\Arduino_Engineering_Kit_Hardware_Support_18b\simulink\blocks\slblocks.m".
Error Message: Invalid arguments in the message cell. They should be of type 'character vector',
'float' or 'integer'.
Is there anything that I can do against this error? I tried reinstalling the Arduino Engineering Kit Hardware Support package, which did not help.
  댓글 수: 3
Nicholas Pfaff
Nicholas Pfaff 2018년 10월 1일
This is the function that Simulink is trying to call:
function blkStruct = slblocks
% SLBLOCKS Defines the block library for MKR Motor Carrier and Sensors
% libraries
blkStruct.Name = sprintf('ArduinoEngineeringKit');
blkStruct.OpenFcn = {'arduinosensorlib', 'mkrmotorcarrierlib'};
blkStruct.MaskInitialization = '';
blkStruct.MaskDisplay = 'disp(''ArduinoEngineeringKit'')';
Browser(1).Library = 'mkrmotorcarrierlib';
Browser(1).Name = sprintf('Simulink Support for Arduino MKR Motor Carrier');
Browser(1).IsFlat = 0; % Is this library "flat" (i.e. no subsystems)?
% Define information for model updater
blkStruct.ModelUpdaterMethods.fhSeparatedChecks = @ecblksUpdateModel;
% LocalWords: Arduino Engineering Kit
Copyright 2018 The MathWorks, Inc.

댓글을 달려면 로그인하십시오.

채택된 답변

Madhu Govindarajan
Madhu Govindarajan 2018년 10월 2일
Thanks Nicholas for catching this bug. I did the following and fixed the errors -
1) remove the arduinosensorlib reference in line 8. The following should be changed from 'blkStruct.OpenFcn = {'arduinosensorlib','mkrmotorcarrierlib'};' to 'blkStruct.OpenFcn = {'mkrmotorcarrierlib'};'
2) add the following line of code in line # 15
blkStruct.Browser = Browser;
After this I closed and reopened MATLAB and the errors went away. I will work with internal teams to get this updated in the File Exchange as well.
Madhu

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by