Error occurred while executing External Mode MEX-file 'ext_comm': ExtTargetPktPending() call failed while checking for target pkt

2 ビュー (過去 30 日間)
hi,
whenever i put 5 servos blocks in simulink, it keeps crashing and this error comes out:
Error occurred while executing External Mode MEX-file 'ext_comm':
ExtTargetPktPending() call failed while checking for target pkt
. i'm using arduino mega 2560
5 flex sensors
5 servo motors
windows 10 64-bit.
matlab 2017b
but if only one servo block used then it will not crash.
i see many people have this problem. and it still does not solve.
we pay for matlab and all staffs for education and work.
please help us or me solve it
if it is not important, we won't ask.
regards
Help please

採用された回答

SYED AFDAR syed
SYED AFDAR syed 2019 年 1 月 14 日
need external power if use more than two motors.
5v alone is not enough need another 5v (external) to the motors

その他の回答 (3 件)

Scott Huang
Scott Huang 2019 年 1 月 11 日
編集済み: Scott Huang 2019 年 1 月 11 日
Hi
you can try this: set your baud rate to 921600. Probably your baud rate is below this value. This solved my same problem.
codertarget.arduinobase.registry.setBaudRate('mdl',921600)
mdl = your model name
  3 件のコメント
Scott Huang
Scott Huang 2019 年 1 月 11 日
you also need to update the same setting some where in the "code"
I couldn't find what is the maximum allowed baud rate in the serial port setting, but I think this is the limit of your system.
another case reported that 3rd party arduino board may not support high baud rate because of the chip, maybe this is the root cause for your case.
SYED AFDAR syed
SYED AFDAR syed 2019 年 1 月 13 日
i will try my best to solve it.
Thanks Scott
appreciatte it!

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


SYED AFDAR syed
SYED AFDAR syed 2019 年 1 月 14 日
i have solved it.
thanks

Félix Bertrand
Félix Bertrand 2019 年 1 月 24 日
How? Please, i have the same problem

カテゴリ

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

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by