Hi All,
I am new to Labview so please forgive these potentially stupid questions.
I put together a VI that receives external trigger from one of the PFI lines and gather a user-defined amount of pretrigger samples. The program has to rearm after saving the TDMS file, and listening for the next trigger. This above part seems to work now. But I am not able to figure out a way so that I can stop the program by hitting the "stop" button, instead of using the "Abort Execution" button on the tool bar.
I have attached my code here. Do I need to change the whole structure to something else to enable this functionality? Also I feel using the Case structure to check whether to increment and go to the next file is stupid, but if I don't do this the loop sometimes will keep running and increment that trial number crazily - which I thought would not happen if the DAQmx Wait Until Done.vi should halt the while loop in the middle.
Thanks very much!!