LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure memory and programmatic repeatability

Hello.
 
I am wondering if there is a way to programmatically repeat a series of events.  For example:
 
I have developed a program where I am able to modify certain aspects of an image such as size, contrasts, brightness, resolution, etc.  There is one event for size, one for contrast, one for brightness, etc.
I want a user to be able load an image (test001.tif) and then change its size then change its contrast.  Then the user can click a button (apply to series) and these changes will affect a series of images (test002.tif-test100.tif).
 
And then if the user wanted to change its resolution then its contrast in image test001.tif, the user will be able to click the same button (apply to series) and then these changes will affect the series of images.
 
Is it possible to saves which events has been done into memory and then replays the series of events when desired? 
 
I think I saw code which mimicked a series of slider movements using the event structure but after spending many hours looking through the example database and forums I could not find a good example to help me.
 
Thank You.
Charlie C.
0 Kudos
Message 1 of 5
(2,908 Views)
Since no user interface needed when apply changes to series, you can use queued state mechina instead of event structure.  It's easy to add repeated "event" into a queue.
 
George Zou
http://gtoolbox.yeah.net
George Zou
Message 2 of 5
(2,897 Views)
Hello.
 
Thanks for the quick reply.
 
Can you please elaborate alittle more.  I am sorry but I am new to queued state machines. 
1.) Would I put a state machine within the "apply to series" event case and then use the create/obtain/etc queue functions to get the user response and then use the function generate user response within the "apply to series" state machine? 
 
2.) Or do I remove all my event structure all together and then create a state machine and use the queue function?
 
If it is 1.) can you elaborate or have examples on how to use queues to record event loops
If it is 2.) I am wondering if there is a way to do it by keeping the event structures.  I have created a large number of event cases (20+) and I am reluctant to change the entire structure.  But I do appreciate your help.
 
Thanks again,
Charlie C.
0 Kudos
Message 3 of 5
(2,893 Views)
 
You should create a parallel loop for the state machine.  So 2 loops on the diagram, one for event structure, one for state machine.
 
In event structure, in the "apply to series" case, add "events" to the queue.  See attached VI.
 
George Zou
http://gtoolbox.yeah.net
George Zou
Message 4 of 5
(2,885 Views)
Cool thanks alot.  I'll look into the file.
0 Kudos
Message 5 of 5
(2,882 Views)