Machine Vision

Showing results for 
Search instead for 
Did you mean: 

Can you un-register from a Frame Done Event

Go to solution

Hi All,


I am acquiring form a camera using an architecture very similar to the one posted here. I am registering my camera for the Frame Done event and it is aquiring images with no problems.


What I would like to do is stop the acquisition. I have tried to deregister by creating a case where I register for an null reference (similar to how you dynamically unregister for a user or control event) but this threw up an error. I also tried to increase the 'buffer interval' to a huge number - this stopped the acquisition but when I tried to restart it the code hung - perhaps it was waiting for u32 frames to be acquired before acquiring again.


Is there anyway I can do this? Or would I be better off putting my code in a larger case structure where I can close the camera and re-open it later?


Many thanks in advance,




0 Kudos
Message 1 of 8

Hi Dave,


When you say stop the acquisition do you mean stop the program from running without error,  or do you want to stop the acquisition and then restart it pragmatically?



Matt Surridge

National Instruments
0 Kudos
Message 2 of 8

Hi Matt,


I'd like to be able to stop and then restart the acquisition programatically. My thought had been to dynamically unregister and then re-register for the frame-done event by using an empty reference. Unfortunately this threw up a camera error when I tried it.


Thanks for your help,





0 Kudos
Message 3 of 8

Hi Dave,


Is there any options for triggering with your camera? 



Matt Surridge

National Instruments
0 Kudos
Message 4 of 8

Hi Matt,


My plan is the final version will run both in 'live mode' and also with the option of an external TTL trigger. However I am focussing on implementing the live mode first.


Regards and thanks,





0 Kudos
Message 5 of 8
Accepted by topic author DeltaJ
08-27-2015 04:09 PM

You can actually just use 'Unregister for Events' to unregister it and then implement the same  'Frame Done' Event to start it up again.







Randall Pursley
Message 6 of 8

Hi Randall,


I'll give that a try - thank you very much,




0 Kudos
Message 7 of 8

That worked thank youSmiley Very Happy

0 Kudos
Message 8 of 8