OSX: TestDaq error

Greetings,

I recently bought a USB-1208FS data acquisition device and have run across an error when
I try the TestDaq program. All goes well until the tests for DaqAInScanBegin,
DaqAInScanContinue, DaqAInScanEnd and the following error results:

??? Undefined function or variable "dinc".

Error in ==> DaqAInScan at 371
for d=(1:3)*dinc % interfaces 1,2,3

Error in ==> DaqAInScanContinue at 15
[data,params]=DaqAInScan(device,options);

Error in ==> TestDaq at 323
params=DaqAInScanContinue(daq(1),options);

Has anyone else seen this or have ideas on its cause? I have not tried to use these
functions in another program yet. I am using the current beta of PTB and Matlab 7.2 on a
Powerbook G4 667 with 1 Gb of RAM running Tiger 10.4.6.

Thanks,
Richard Schmidt
Associate Professor
Psychology Department
College of the Holy Cross
Yes, I get precisely the same error below when running TestDaq.m with
the USB-1208FS plugged into either a PowerBook G4 or an Intel-based
Mac mini. (i.e., before I installed Software Updates recently and
MATLAB on the Mac mini stopped working.)

Both my Macs have the 'beta' branch of OSX Psychtoolbox installed.

Daniel Shima
Vanderbilt Vision Research Center


On 5/27/06, r_schmidly <schmidtr@...> wrote:
> Greetings,
>
> I recently bought a USB-1208FS data acquisition device and have run across an error when
> I try the TestDaq program. All goes well until the tests for DaqAInScanBegin,
> DaqAInScanContinue, DaqAInScanEnd and the following error results:
>
> ??? Undefined function or variable "dinc".
>
> Error in ==> DaqAInScan at 371
> for d=(1:3)*dinc % interfaces 1,2,3
>
> Error in ==> DaqAInScanContinue at 15
> [data,params]=DaqAInScan(device,options);
>
> Error in ==> TestDaq at 323
> params=DaqAInScanContinue(daq(1),options);
>
> Has anyone else seen this or have ideas on its cause? I have not tried to use these
> functions in another program yet. I am using the current beta of PTB and Matlab 7.2 on a
> Powerbook G4 667 with 1 Gb of RAM running Tiger 10.4.6.
>
> Thanks,
> Richard Schmidt
> Associate Professor
> Psychology Department
> College of the Holy Cross
>
>
>
>
>
>
>
>
>
>
> 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
>
>
>
>
>
>
>
>
Thanks for the verification, Daniel. I think I fixed the problem though......

The problem seems to be in the DaqAInScanContinue and DaqAInScanEnd functions which
call the DaqAInScan. Looking at the code of the latter, I was perplexed as to how the 'dinc'
variable takes on a value when the options.begin flag is set to 0 (as it would be for the
DaqAInScanContinue or DaqAInScanEnd functions): the 'dinc' variable only takes on
a value (line: 269) within a conditional (lines:245-286) that depends on the options.begin
flag being set to 1.

In order to have the 'dinc' variable to be valued between calls to DaqAInScan (from
DaqAInScanBegin to DaqAInScanContinue to DaqAInScanEnd), I defined it on line 245 as

persistent dinc;

With that addition to DaqAInScan, TestDaq (and its calls to DaqAInScanContinue and
DaqAInScanEnd) runs fine. I have not tested it further though....

-Richard


--- In psychtoolbox@yahoogroups.com, "Daniel Shima" <danielshima@...> wrote:
>
> Yes, I get precisely the same error below when running TestDaq.m with
> the USB-1208FS plugged into either a PowerBook G4 or an Intel-based
> Mac mini. (i.e., before I installed Software Updates recently and
> MATLAB on the Mac mini stopped working.)
>
> Both my Macs have the 'beta' branch of OSX Psychtoolbox installed.
>
> Daniel Shima
> Vanderbilt Vision Research Center
>
>
> On 5/27/06, r_schmidly <schmidtr@...> wrote:
> > Greetings,
> >
> > I recently bought a USB-1208FS data acquisition device and have run across an error
when
> > I try the TestDaq program. All goes well until the tests for DaqAInScanBegin,
> > DaqAInScanContinue, DaqAInScanEnd and the following error results:
> >
> > ??? Undefined function or variable "dinc".
> >
> > Error in ==> DaqAInScan at 371
> > for d=(1:3)*dinc % interfaces 1,2,3
> >
> > Error in ==> DaqAInScanContinue at 15
> > [data,params]=DaqAInScan(device,options);
> >
> > Error in ==> TestDaq at 323
> > params=DaqAInScanContinue(daq(1),options);
> >
> > Has anyone else seen this or have ideas on its cause? I have not tried to use these
> > functions in another program yet. I am using the current beta of PTB and Matlab 7.2
on a
> > Powerbook G4 667 with 1 Gb of RAM running Tiger 10.4.6.
> >
> > Thanks,
> > Richard Schmidt
> > Associate Professor
> > Psychology Department
> > College of the Holy Cross
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 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
> >
> >
> >
> >
> >
> >
> >
> >
>