I get an error every time I try to connect simulink to the arduino motor encoder included in the engineering kit.

3 ビュー (過去 30 日間)
When I try uploading this program to the arduino MKR1000 whith the motor carrier, I get an error related to the encoder. The motor part works when the encoder is not there, but whenever the encoder block is in the program, I get this error message:
## Starting build procedure for model: myDCMotorControl
Code Generation
Elapsed: 0.211 sec
### Build procedure for model: 'myDCMotorControl' aborted due to an error.
Error evaluating 'InitFcn' callback of motorcarrier.blocks.mkrmotorcarrier_Encoder block (mask) 'myDCMotorControl/Encoder'.
Callback string is 'codertarget.arduinobase.blocks.registerI2CBlock(gcbh); '
Caused by:
motorcarrier.blocks.mkrmotorcarrier_Encoder block (mask) does not have a parameter named 'SlaveAddress'
  2 件のコメント
Madhu Govindarajan
Madhu Govindarajan 2018 年 10 月 1 日
Which release of MATLAB are you using and which Arduino_Engineering_Kit_Hardware_Support version are you using?
Dylan MacAllaster
Dylan MacAllaster 2018 年 10 月 1 日
MATLAB R2018b, with version 1.1.2 Arduino_Engineering_Kit_Hardware_Support

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

採用された回答

Madhu Govindarajan
Madhu Govindarajan 2018 年 10 月 2 日
Use this version of the hardware support instead - https://www.mathworks.com/matlabcentral/fileexchange/68620-arduino_engineering_kit_hardware_support_18b
1) Uninstall the existing Arduino_Engineering_Kit_Hardware_Support file by going to Manage Add Ons. 2) Install this one which has 18b suffixed to the name.
This should resolve the errors.
Madhu
  2 件のコメント
Jackson  Tan
Jackson Tan 2018 年 11 月 25 日
After installing the arduino_engineering_kit_hardware_support_18b, another issue comes out...
Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters.
An error occurred while computing the MD5 checksum of 'C:
Caused by:
  • The file C:\Users\Jackson\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\Arduino_Engineering_Kit_Hardware_Support\simulink\blocks\mkrmotorcarrierlib.slx could not be opened for reading.
How to fix that problem ?
Thank you
Madhu Govindarajan
Madhu Govindarajan 2018 年 11 月 26 日
If you notice the path on that, it is still referring to the old one. Step 1 is critical in the answer provided. Uninstall that old toolbox and if there are any leftover files in that location, please delete them and remove it from path if there were any issues during uninstall.
HTH,
Madhu

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

その他の回答 (0 件)

コミュニティ

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by