Page 1 of 1

Data Acquisition

Posted: 17 Oct 2005, 08:18
by mspan
I am currently trying to implement a EEGsource module for use at our institution. I am trying to do this according to the Software Design Document. In this document, on page 20-23 a tutorial is given which I am following. I encounter the following problems:

Minor:

Page 22, last line of the "Preflight" function:
The last parameter in SignalProperties cannot be an Int.
Changed to SignalType::int16 to compile

Page 23, Process:4 lines before the end:
buffer: 'i' is not defined here: defined it at start of the function, set to zero, increase value using 'buffer[i++]'.

Ok, now it compiles. (Changes look quite straightforward...), and I end up with a source module.

When I start this module, and start and connect to an operator, the following (fatal) error occurs:

TfMain::EnterState: Unexpected system state transition: 0 -> 11.

What am I doing wrong here?

(ps. This is describing my 'Barebone' compile. Exactly the same occures with a 'meaningfull' Halt, Initialize, Process and Preflight function.)

Mark Span

Posted: 18 Oct 2005, 10:47
by mellinger
Hello Mark,

thank you for your questions.

The compilation errors you report should not occur with the code given in the current version of the Software Design Document, which is distributed along with the source code.

The reason for the fatal error is difficult to guess without knowing your code in more detail. Quite likely, there is an exception triggered in your ADC class' constructor. Running your source module from within the debugger should help you identify the problem.

To debug a single BCI2000 module, do the following:
  • Outcomment the module from the startup batch file you are using.
    In the Borland IDE, remove the output path from "Project->Options->Directories/Conditionals->Final Output".
    Use Run->Parameters to enter the appropriate command line options "AUTOSTART 127.0.0.1".
    Execute the batch file.
    Change to the IDE, and run the module in the debugger.
    After debugging, change the project output path to its previous value to make sure the executable will be updated in the BCI2000/prog directory.
Hope this helps,
Juergen