Re: Daq Toolbox--query about throughput timing

dear scott

thanks for writing. when you wrote i hadn't done latency tests, but now
i have.

terminology. "throughput" usually refers to the rate of data flow. to
use an oil or water analogy, this it the diameter of the pipe.
"latency" is how long it takes to get there. this is the length of the
pipe. in your letter you were measuring latency but calling it
"throughput".

in the newest release of the Daq Toolbox
(http://psychtoolbox.org/daq.html) the program TestDaq now sends a
random number to the digital output and then reads it back in as
digital input. this requires two calls to SetReport and one call to
receive the report. The cycle time (i.e. latency) from sending the
number to receiving it back measures the roundtrip time for a USB
message using HID reports. TestDaq measures this to be about 30 ms. a
one-way communication will be a fraction of that.

best

denis

On Apr 14, 2005, at 10:15 AM, Scott B. Stevenson wrote:

> Hi Denis,
> Once again we all owe you a debt of gratitude for your contributions.
> This looks extremely useful.
>
> My question is whether you have performed any throughput timing tests
> with the DAQ, such as sample a signal on A2D, send the same out on
> D2A, and measure the timing on an oscilloscope.
>
> I recently rigged a USB mouse so that a PC could close the mouse
> button switch via a relay. I monitored the mouse button in a tight
> loop with GetMouse, and found a variable 50 to 70 msec (!) delay
> between closing the mouse button switch and a subsequent
> Screen('copywindow') call. My concern is that such a delay may somehow
> be inherent in USB functions and would also apply to DAQ operations.
>
> (You may quote this on the forum if you think it's of general
> interest.)
> thanks,
> Scott
>
> Details, if you're interested: I'm running OS 9, Matlab 5.2.1, etc. on
> a dual 1GHz G4 tower. I ran the test several times to makes sure
> functions were loaded in memory. Here is the test program. (Note: I
> didn't measure the times from the tic/toc pair, I got them from the
> o-scope :)
>
> % clicktest.m tests timing of externally controlled mouse click
> % connect mouse button control signal from PC to oscilloscope chan 1
> % aim photocell at monitor, connect output signal to oscilloscope
> chan 2
> % (C) 2005 SBS peace*love*trees
> [winptr, rect] = screen(1,'OpenWindow',0);
> lastbut = 0;
> [offp(1), rect] = screen(winptr,'OpenOffScreenWindow',0);
> [offp(2), rect] = screen(winptr,'OpenOffScreenWindow',255);
> while kbcheck == 1;end
> while kbcheck == 0
> [x,y,button] = getmouse;
> if lastbut ~= button;
> lastbut = button;
> screen('CopyWindow',offp(lastbut+1),winptr);
> % toc % uncomment this line to measure internal timing
> end
> % tic % uncomment this line to measure internal timing
> end
>
>> hi all
>>
>> i just wrote and posted a set of OS X MATLAB functions, called Daq,
>> that provide full control of a data acquisition device (DAQ), the
>> PMD-1208FS from Measurement Computing. This daq costs $150 and offers
>> 50 kHz input and output 12-bit sampling of analog voltages (8 in, 2
>> out) and 16 digital i/o lines. It's the size of a wallet and is
>> powered
>> through its USB cable. We have complete control of it from within
>> MATLAB, via the PsychHID extension, included. Daq implements all the
>> important functions described in the PMD-1208FS firmware
>> specification
>> manual.
>> http://www.measurementcomputing.com/pmd.html
>>
>> you don't need to be a Psychtoolbox user; you can download and use
>> just
>> the Daq software. Requirements: MATLAB and Mac OS X 10.3 or better.
>> Works well with a laptop. You can read about and download the
>> software
>> here:
>> http://psychtoolbox.org/usb.html
>>
>> best
>>
>> denis
>>
>> Denis Pelli
>> Professor of Psychology and Neural Science
>> http://psych.nyu.edu/pelli/
>>
>>
>>
>> Post your message to: psychtoolbox@yahoogroups.com
>> Please indicate OS9, OSX, or WIN version, and include your full name.
>> Denis Pelli, David Brainard, and Allen Ingling.
>> http://psychtoolbox.org
>>
>> Yahoo! Groups Links
>>
>>
>>
>>