Error while running simulink model connecting to raspberry pi with a webcam for real time image processing
108 次查看(过去 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!