In the Image Acquisition Toolbox, is the ErrorFcn callback of videoinput objects only triggered when the videoinput is in a running state?
2 views (last 30 days)
Show older comments
Documentation on the ErrorFcn callback for the Image Acquistion Toolbox 4.0 (R2010b) states the following:
"The ErrorFcn property specifies the function to execute when an error event occurs. A run-time error event is generated immediately after a run-time error occurs.
Run-time errors include hardware errors and timeouts. Run-time errors do not include configuration errors such as setting an invalid property value.
Run-time error event information is stored in the EventLog property. You can retrieve any error message with the Data.Message field of EventLog."
It is not clear based on this description that the ErrorFcn callback is only triggered when the object is in a running state, not a previewing state.
Accepted Answer
MathWorks Support Team
on 20 Jun 2011
This change has been incorporated into the documentation in Release 2011a (R2011a). For previous releases, read below for any additional information:
Here is additional information on the ErrorFcn callback in the Image Acquisition Toolbox.
In order to handle errors using the ErrorFcn callback, the only way to do
it is to put the object into the running state. The ErrorFcn callback is not triggered when the input object is not in a running state.
There are two ways to put the input object in a running state:
1. Use the START function. This also starts data logging.
2. To place the object in a running state without logging data, define a manual trigger for the object before starting it (using START). This will allow the object to run (and thus enable the ErrorFcn callback), but data will not be logged until the TRIGGER function is called.
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!