PigeonMan
2008-07-30 19:10:08 UTC
This is a question that I think is independent of platform and/or soft/hardware. When using single- or double-buffered acquisition, it is my understanding that one has to specify a buffer and block size when starting sampling an analog signal. When sampling is finished, one can retrieve one complete block from the buffer, but not fractions of it. In my application, I can't know the block-size beforehand. Consider the following application: You have a START button (which starts sampling) and a STOP button (when some variable time interval -- anything between 20 sec and 10 min -- has elapsed), which should retrieve the samples that were collected between START and STOP. What is the general scheme to program this? (I am not using LabVIEW but NI-DAQ drivers with C/C++ and Metrowerks on a Mac).Any hint would be greatly appreciated.P.S. If you are curious ... I study bird behavior. I measure the bird's beak opening by using a Hall effect device and a small magnet (harmlessly glued to the bird's upper and lower beak). The resulting analog signal (changes in voltage proportional to beak opening) is sampled. But I only want to measure beak openings for certain amounts of time (between the presentation of a visual stimulus and the bird's peck to the stimulus, which could be of very short or very long latency).