re DAQ toolbox

Hi

I get a 'device not attached' error using DaqDOut, I've called
DaqDeviceIndex to get a handle for the USB-1208fs and that returns a
value of 4.

If I pass that value to DaqDOut it generates the 'not attached' error.
The USB-1208fs is definitely attached with a green light so no problem
there.

DaqAOut works fine, I suspect I have not understood the device
index/inferface distinction properly.

Previous posts (i.e. Adam Greenberg's code example posted jun 11 2007)
seem to suggest that the value returned by DaqDeviceIndex is the
handle to pass into DaqDOut but there is still a problem

Any help much appreciated

L_W
L_W:

What platform, OS, and version of matlab & ptb are you running?Did you configure the port as output (DaqDConfigPort)?

I just ran the following script on my macs (OS 10.4, both intel and ppc) a few days ago with matlab R2007a, ptb 3.0.8, using a PMD1208fs, and it worked fine. It just blinks a couple of LEDs with various stimulus onset asynchronies.

-tom

% PMD_LED_test.m
%
% script to blink LEDs on A1 and A2 of PMD's USB 1208FS I/O device. wiring:
% pin21-->1k resistor -->(flat)LED(round) --> pin40
% pin22-->1k resistor -->(flat)LED(round) --> pin40
%
% 2/Oct/2007 -tgf


% set port and SOA (in sec)
port=0;
SOA=[50 45 40 35 30 25 20 15 10 5]./1000;


% set port
port=0;

% get device number of USB 1208FS & pull port A low
device=DaqDeviceIndex; % find device number for attached PMD device
DaqDConfigPort(device, port, 0); % configure for output
err=DaqDOut(device,port,0); % make sure all bits cleared



firststim=[1 1 2 1 2 2 1 2 2 1];


for i=1:length(firststim)
WaitSecs(1);
err=DaqDOut(device,port,firststim(i));
WaitSecs(SOA(i));
err=DaqDOut(device,port,3);
while CharAvail;
FlushEvents;
end
[ch(i), rt(i)]=GetChar;
err=DaqDOut(device,port,0);
end

On May 14, 2008, at 6:31 AM, luxton_wood wrote:

Hi

I get a 'device not attached' error using DaqDOut, I've called
DaqDeviceIndex to get a handle for the USB-1208fs and that returns a
value of 4.

If I pass that value to DaqDOut it generates the 'not attached' error.
The USB-1208fs is definitely attached with a green light so no problem
there.

DaqAOut works fine, I suspect I have not understood the device
index/inferface distinction properly.

Previous posts (i.e. Adam Greenberg's code example posted jun 11 2007)
seem to suggest that the value returned by DaqDeviceIndex is the
handle to pass into DaqDOut but there is still a problem

Any help much appreciated

L_W




::::::::::::::\\\\\\\\\\\\\\\\\\\\\\\\\|/////////////////////////::::::::::::::
Thomas G. Fikes
Professor of Psychology and Neuroscience
Westmont College, Santa Barbara, CA
805.565.6115 fikes@...
:::::::::::::://///////////////////////|\\\\\\\\\\\\\\\\\\\\\\\\\::::::::::::::