05-02-2008 04:00 PM
05-05-2008 06:43 AM
I had a similar application acquiring images every 2 seconds and saving them to a hard drive. I used a vision acquisition vi , imaq write file , build path, and build text. You can build a path using the build text vi to enter the current time into the path as a file name for each image. To do this you will need to enter the time into the build text vi. This was also my first attempt at programming an application in labview, probably not where I would choose to start learning to program if I had a choice. If you have access to Vision Builder for Automated Inspection it makes programming a lot easier. In VBAI there is a function to do exactly what you want.
Good Luck
05-05-2008 09:54 AM
If your timing requirements only apply to short intervals, you can use the frame numbers of a grab sequence to measure your time interval. If you use a fixed frame rate on the camera, you can easily calculate the time interval.
Acquire your images using the grab function, and record the frame number for each image. As long as you keep the grab going, you will be able to measure the intervals between images. You can even request specific images if you want an image every 2 seconds, etc.as long as you request them before they are taken. If you use a sequence, you can request them shortly before or after they are taken.
If you need to stop the acquisition and measure longer intervals, you won't be able to get split second resolution. Your best option would be to read the computer time immediately after acquiring each image. Once again, a grab function will be a better choice since you won't have to worry about the first image.
I believe there is an option in MAX to ignore the first image. This makes it automatically take a second image in snap mode so you don't get white images.
Bruce
05-05-2008 11:44 AM
05-05-2008 12:30 PM
Most cameras have fixed frame rates available as an option in MAX. If not, you can run a continuous grab acquisition and read the current frame number and the millisecond timer, then wait a few seconds and read the frame number and timer again. The change in frame number divided by change in second (milliseconds/1000) will give you a pretty accurate frame rate. The bigger the gap between readings, the more accurate your frame rate will be.
Once you have the frame rate, you can measure the elapsed time between frames by subtracting the frame numbers and dividing by frames per second. For example, if the difference of your frame numbers is 40, and the frame rate is 60 fps, the elapsed time is 40/60 or 2/3 of a second.
I still think checking the "ignore first frame" box in MAX is the best solution to your first white frame.
Bruce