From: Ricardo on 9 Jul 2010 11:54 > % Configure the analog input object to trigger manually twice. > % We do this because we are using peekdata to acquire the data in > % a timer callback function. > % The first trigger will fill the buffer with handles.samplesPerTrigger > % number of samples. We'll know we have enough samples to start > % processing data when the analog input object's SamplesAvailable property > % is equal to handles.samplesPerTrigger. > % The analog input object will then wait for > % another manual trigger, and while it is waiting the object will still be > % in its running state, which means the timer event will run. To keep the > % object in the running state, we need only never manually trigger this > % second trigger. > % Had we set the TriggerRepeat to 0, the analog input object would stop > % after the first trigger and the timer functions would stop running. Hello, I am using some of the code in daqwaterfall.m written dy Daniel and I want to create a start and stop button instead of the exit button. The start button works fine but the stop button doesn't stop the analog input. My stop callback is simply stop(ai) and delete(ai). I think it has to do with that second manual trigger but I am not shure how to stop the acquisition. In other words, my application would be the same as the demoai_fft but adding the waterfall plot to it. I want my start and stop buttons to wrk the same way it works in demoai_fft. Thank you.
|
Pages: 1 Prev: imEllipse equivalent of setString? Next: Edge contour for scattered data |