10-02-2012 10:55 AM
I have a subvi for a Piezoelectric stage that does a scan of a surface. This vi takes about 1-5 sec to run depending on my input. Now, in the main Vi I want to have a Daq Assistant that would take data from a separate device (not the Piezo stage) only when the subvi is running. I don't need it to be highly synchronous. Only if I can make sure that the Daq assistant starts collecting data before the subvi starts, take data the entire time when the subvi is running and end after the subvi ends (let say about 100 ms off in time is fine.), works for me.
Hope I am able to clarify my problem. Can any one help with this?
10-02-2012 11:17 AM
You could either implement this as a state machine or an Event Structure by having a event being triggered once you have taken the measurement. The Event Structure (and register Events) would be a better solution since the trigger would be set in a controlled manner... Although the same could be said with proper coding using a State Machine.
You can search for both state machine and event structure or register events within this forum and there may be some examples on the forum. You can also look for examples in the Help menu.
10-02-2012 11:19 AM
Strangly enough, the post immediately following yours talks about registered events.. Plus some images.
It will give you an idea.. Depending on if there is a mix in the main VI to include user/operator events, you may want to use a producer/consumer implementation.
http://forums.ni.com/t5/LabVIEW/Register-for-Events-Removing-Elements/m-p/2173938#U2173938