Jump to content

Camera communication - program structure


krzych07

Recommended Posts

I'm trying to make simple program for acquisition from camera. I'm using framegrabber and LabView wrapper delivered by its manufacturer.

 

1. In first version (minimal_camera_code.vi) grabbing from camera time is very high and is not constant (camera is set to constant frame rate = 5ms, in framegrabber manufacturer software acquisition goes with 200 fps)

After adding delay (fig. 2b) it is better but after some frames, acquisition time is not constant (fig. 2a)

 

2. In second version (minimal_camera_code2.vi) grabbing time is constant and is exacly 1ms after adding "Wait until next multiple ms" = 25ms (adding shorter delay gives effects similar to described in point 1).

 

I think that problems are connected with loops and are connected with misunderstanding of this code execution.

 

What are your suggestions for implementing this piece of code? I want grabbing frames with constant frame rate.

post-50579-0-75857200-1392153215_thumb.p

post-50579-0-59222400-1392153219_thumb.p

post-50579-0-06850100-1392153221.png

minimal_camera_code.vi

minimal_camera_code2.vi

Link to comment

I know these figures very well. I would like to see the code, but my current system does not have a LV2013 installation.

Do you run your code on a standard OS/Hardware? (e.g.: Windows 7 on PC)

 

For now I assume you do:

General purpose OS and Hardware do not guaranty real-time capabilities. So the kernel will pause any thread whenever it sees fit. In my past tests the time sometimes spiked up to 400ms instead of the required 10ms, resulting in such graphs (even if the priority is set to 'critical'). Now you could let an external hardware do the acquisition and stream directly to disk. There might be other solutions though.

Edited by LogMAN
Link to comment

I have attached files saved for LabVIEW 2011.

 

I run code on standard OS and Hardware (Win7 on PC).

 

I know that it do not guarantee real time, but as I've mentioned in camera manufacturer acquisition goes with required and constant frame rate. I suppose that this LabVIEW code can be done better. Unfortunately I do not know too much how LabVIEW executes the code under the hood.

minimal_camera_code.vi

minimal_camera_code2.vi

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.