From: Zainab Calcuttawala on 31 Jan 2010 06:59 Hi , I am new to this forum and I needed help in the following. I am uising WinDAQ 194 rs 4-channel DAQ module to collect data to the computer from a sinusudol type voltage signal. My requirement is to view the data in the real time from the DAQ board once the signal is generated and to calculate the cycle on the basis on peak high and peak low. I am required to set a sample rate of about 25-30 samples /sec and the input signal generate is of very low frequency. I am setting trigger to be generated every 1 sec and the samplespertrigger property is set to 25 samples. In the timerfcn I am using PEEKDATA to view/store the data in real time and plot the graph. But I have compared my result with the GETDATA and find the PeekData function is not getting the overall picture of how my input signal looks . Can anyone guide on how to achieve my task better also is it possible to use GETDATA or DAQREAD function in the TIMER CALLBACK FUNCTION.
From: Sherryl Radbil on 1 Feb 2010 07:49 Hi Zainab, Take a look at the code for the daqscope program that comes with Data Acquisition Toolbox. It will be very instructive for you. demoai_fft is another good demo to study. peekdata is not guaranteed to give all the results as described on the doc pagehttp://www.mathworks.com/access/helpdesk/help/toolbox/daq/peekdata.html getdata is guaranteed to give you all the data with no repeats or misses. daqread is for reading previously collected data out of a *.daq file so you wouldn't use that in a timer callback function. You are not the only customer to ask about using the timer callback so for R2010a we've added a new demo to the product. Look for demoai_continuous.m If you are eligible to download the R2010a prerelease you can get it now. Otherwise look for it when R2010a is available. In the meantime see the doc for TimerFcn and the demo demodaq_callback Searching for timerfcn in the doc system will find additional demos you can view. All the best, Sherryl
|
Pages: 1 Prev: how to keep a horizontal line in real time plot without Next: Plot value on graph |