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

#error occurred while executing external mode mex-file 'ext_comm': exttargetpktpending() call failed while checking for target pktMATLABsimulink

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

Best Answer

need external power if use more than two motors.
5v alone is not enough need another 5v (external) to the motors
Related Question