Error while running simulink model connecting to raspberry pi with a webcam for real time image processing
조회 수: 137(최근 30일)
표시 이전 댓글
mehmet öztürk 2014년 4월 22일
답변: Ajay Joseph 2018년 11월 29일
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."
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.
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?
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?
댓글 수: 1
Ajay Joseph 2018년 11월 29일
Try disabling the firewall. I wasn't getting the exact error but it was similar.
Find more on Run on Target Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!