Error while running simulink model connecting to raspberry pi with a webcam for real time image processing
105 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to connect raspberry pi to simulink for capturing images from a webcam on raspberry pi. When I run the simulink model, some errors occur. Is there anyone to help me to solve this problem? Thanks for answers...
1) Error occurred while executing External Mode MEX-file 'ext_comm': ExtTargetPktPending() call failed while checking for target pkt
2) Error occurred while executing External Mode MEX-file 'ext_comm': ExtSetTargetPkt() call failed on CLOSE. Ensure target is still running
On matlab command window, it is written::"### Generated code for 'raspberrypi_inversion' is up to date because no structural, parameter or code replacement library changes were found."
0 件のコメント
回答 (4 件)
Pavel Roslovets
2016 年 1 月 13 日
Seems like you are trying to send a too big amount of data from Raspberry to MATLAB in External Mode, so you get lost connection to target.
You can check this proposition. When the error occures go to Code->External Mode Control Panel in your Simulink model window and press the Connect button (see the picture 1 below).
If after this action simulation will continue press the Arm Trigger button to continue recieve signals from target.
To solve your problem and get rid of error press Disarm Trigger to stop recieve signals and then press Signal & triggering... button and in window that appears turn off redundant signals (picture 2).
Also a good practice is to slightly change your model. Use Rate Transition blocks before Scopes that you use to collect data from target with a view to enlarge signal sample time and decrease the load on your data channel.
And the last advice is to close all your Scopes when starting simulation in External Mode because an open Scope window can slow down your simulation that cause a loss of connection to the target. Also you can change Solver settings in Model Configuration Parameters to speed up a simulation.
Picture 1
Picture 2
0 件のコメント
Myles Joseph
2018 年 1 月 24 日
I am having this issue, and it is largely due to the amount of data being send over in external mode. The time step of the system is not so important, so I can wait. is it possible to increase the timeout for this?
0 件のコメント
Murat Belge
2014 年 4 月 23 日
Is the webcam you are using in the supported USB webcams list? Check your webcam against the table in the following link: http://elinux.org/RPi_VerifiedPeripherals#USB_Webcams.
From the description, it looks like the Simulink application is not starting at all or exited because of an error. Are you executing one of the demo models?
Ajay Joseph
2018 年 11 月 29 日
Try disabling the firewall. I wasn't getting the exact error but it was similar.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Raspberry Pi Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!