LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

chaging to event structure

I am currently modifyinga code written in 6.1 to 7 and I am shifting to the event structure. My problem is this. I am acquiring images continuosly and then I do pattern matching on these images. Now I want a event that says acquire images and another event for pattern matching. However I see that until I end the end the acquire image I cannot begin the pattern matching in the events. How can I get around this. I need to have the acquire image run throughout the module and all the other events should take place one after the other.
How can i do this?
0 Kudos
Message 1 of 3
(2,704 Views)
The loop and data flow is not dead...if going from loop to event driven creates a problem you should ask yourself - Why do I want to change this working code, and is really events the way to go?

Events are still first and foremost useful for GUI stuff in LV so in your case you can always have events react to a "start aquisition" button and so forth, but the events loop is still executed based on data flow so if there are continous processes to be run they should not be within the event case unless you don't need it to catch any other events until the process within is finished...(data flow is still the king). You can have multiple event structures in different loops to overcome this. If e.g. you create a VI that does the aquisition and in that only start the aqui
sition if there is a certain user event, and then in your main VI have a GUI handling event structure that fires the user event for aquisition you'll be free...but still to stop the event a functional global and continous polling is necessary (you can have an event structure with a timeout and poll that for a stop user event instead...but that's not much different.
0 Kudos
Message 2 of 3
(2,704 Views)
Thanks for that answer. I guess I will just put it utside of the event case. I just wanted to know if there was a way of handling that with events.

Thanks!
Hema
0 Kudos
Message 3 of 3
(2,704 Views)