Not sure if this will help, but here's a trick I just used. The main loop handles UI stuff - changing which channel gets plotted, such things as that. It's a WHILE loop with an EVENT structure in it.
A separate WHILE loop needs to run every 1000 mSec. It reads DAQ data, calculates averages, and stores data away. I set the DAQ loop to wait on an occurrence, with a 1000 mSec timeout. Inside the DAQ loop I put a CASE structure, selected by the TIMED OUT output from WAIT ON OCCURRENCE. If the occurrence timed out, I perform the DAQ operations, and loop. If it did NOT time out, it must have been triggered, so I terminate the DAQ loop immediately. Inside the UI loop, I trigger the occurrence based on a DONE button. Outside BOTH loops, I generate an occurrence that feeds to both TRIGGER and WAIT functions in both loops. You can make THAT connection thru global variables, or pass thru connectors, with no penalty.
