LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

taking input only while an image is displayed

Hi, I am writing a program for an experiment that will display images
for a specified amount of time, and take lever presses through an NI
DAQ as input. I want the vi to only accept lever presses while an
image is displayed, and I am trying to figure out how to do so. I'm
using the IMAQ WindDraw function to display the image, and the amount
of time the image is on the screen is user controllable. Any help
would be greatly appreciatied.

Thanks,
Henry

0 Kudos
Message 1 of 2
(2,297 Views)
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
0 Kudos
Message 2 of 2
(2,287 Views)