Hi Alloush,
It sounds like you want to do a finite acquisition, so I don't see why you need a state machine. You would have a while loop, that can setup the time required for the acquisition and then have the DAQmx "thread" in a case structure so that when you want to acquire you just press a "Go" button or something of the like. This will let you read for the set time period you have set up the finite acquisition time for and then once the acquisition has finished the loop will run around again so you can start the acquisition again.
Regards
JamesC
NIUK and Ireland