One (good, in my opinion) way to do this is to have three loops running in parallel. The middle loop is your Queued State Machine, which basically handles "commands" such as Initialize, Configure, Acquire, and Stop. The top loop is an Event loop driven by Front Panel controls -- I'm thinking of a big button that says "Acquire", and a bigger Red button that says "Stop". All the Event loop does is to put the appropriate Command on the Queue for the State Machine.
The third loop is your Acquire loop. I'm assuming that data acquisition is timed, "more important" (higher priority) than commands. Configure it to take a point every N ticks, and do whatever it needs to with the data. Have some form of "write-once" structure, such as a Stop Global Variable, a Stop Single Process Shared Variable, a VIG (or Functional Global Variable) wired to the Stop button of the Acquire loop. [You could also use a Local Variable, but they tend to be harder to find when you need to debug your code]. When the State Machine decides it is time to stop acquisition, it "sets" the appropriate Stop condition for the Acquisition loop (e.g. it wires a True into the Global or Shared Variable, or sets the VIG to True).
One nice thing about this design is that it separates Front Panel processing, Command Processing, and Data Acquisition into their own parallel loops. This can lead to code that is (a) easier to understand, (b) easier to debug, (c) easier to write, and (d) more likely to work the first time.