My program is written in visual C# and NI-DAQMX. I have a routine that writes an analog output then reads the corresponding analog input (in a loop). I have a button that stops the data acquisition (assigns a variable to true) and exits the routine. The stop button doesn't work. It looks like window sees the event (the interface freezes NOT the program) but doesn't act on it. The data acquisition keeps going ignoring the event. I've tried putting the read in a separate thread. I've tried monitoring the event in a separate thread. Nothing works.
Any help will be appreciated! Thanks.