It might help to have a little more information about how your program runs. Do you have your image display function inside a while loop that runs for a specific amount of time? You could either do your data acquisition in that same loop, or you could have a second loop that performs the DAQ operation. Then just use some global flag like a boolean local or global variable that you poll to find out if you should continue acquiring data.
Here's an example that simulates displaying and acquiring data in separate loops. It shows how to check a global flag before acquiring data.
Jarrod S.
National Instruments