Getting an error with start(vid)
Show older comments
Using code I have used time and time again sudenly I am getting an error. I have a NI-PCIe-1430 Cameralink capture card which is supported by Image Acqusistion Toolbox. I know the Camera is working and the card is working because I can see images beign aquired when I use NI's Measurement and Automation explorer program. But using Matlab and the code below I get the following error.
ni: The serial read did not complete within the specified timeout period
for line 89 of imagdevie/start
Here is my code:
clear all close all clc
cols =640; rows =510; numframes = 1;
%% get data
disp('Get Data')
vid = videoinput('ni',1);
vid.Timeout = 10;
vid.FramesPerTrigger = numframes;
vid.ROIPosition = [0 0 cols rows];
start(vid);
data = squeeze(getdata(vid));
stop(vid);
delete(vid)
Accepted Answer
More Answers (1)
Jan
on 13 Nov 2012
0 votes
What exactly does "suddenly" mean? What happend until it worked? A new operating system, Matlab version, camera driver, virus scanner, version of another software, windows update, ...? While our chance is only to guess what has changed, you have the real chance to find the difference.
Did you try to increase the timeout value?
Categories
Find more on National Instruments Frame Grabbers in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!