your data aquisition setup is in the state machine. this being in a while loop, there should be no problem to send via queue, the value for the next state from the event structure loop.
Loop 1: event structure - pause button, start button, restart...
Loop 2: case structure - start include initialisation of DAQmx, start, pause, stop...
notes:
1) be carfull to have no data dependancy between the 2 loops - no wires, no locals, only the queue / notifier.
2) in order to aquisition to continue: the aquisition is performed in a loop, inside the case structure. then use a stop/pause button to stop the loop and allow for the other cases to perform (less good option), or use a notifier from the event structure (better solution). any event should send, on top of the queued enum value, a notification to stop this inner loop.
3) to stop the two external loops, you will need also to send it from the user event loop. dont forget to add this case in the case structure.
4) in case of hardware error, you might decide to kill the user event loop as well - you will need then a notifier from the case structure to the event structure.
5) you might want an automatic save to file every aquisition run. to do so, send an enum trough the case structure.
to start you will find a nice template: vi from template -> design patterns ->producer consumer design pattern.
about pause in DAQmx: there is no such function. what you can do is stop the aquisition task, then when you want, start it again, without reinitialising. that means, at start of your program you need to initialise and create your task. however, if you have started, then stopped the task, you can still use the task and start it again.
to get an example about data aquisition, you can follow the examples->hardware input and output ->Cont Acq&Graph Voltage-Ext Clk-Dig Start.vi
final note: personally i think you can avoid a lot of the above mentionned complications if your system doesnt require too elaborate control, by using a single loop with event structure in it, that includes the DAQ tasks.
see examples->hardware input and output -> events -> ack&graph voltage-int Clk-everyN &doneEvent.ci
good luck.
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wire
s...