BrainVision Brainamp MR 32 channels RDAQueue issue

Known Issues and Problems with BCI2000
Locked
hhallez
Posts: 2
Joined: 22 May 2006, 08:24

BrainVision Brainamp MR 32 channels RDAQueue issue

Post by hhallez » 13 Aug 2009, 05:18

Dear all,

We want to start with some BCI projects. From a previous project we acquired a brainamp MR plus system.

I've tried the RDAgetparams tool to retrieve the parameters while Recorder is running. But it crashed. I merged the code from RDAgetparams with the RDAClient32 from Brainproducts and got a working version. This resulted in the following parameter file

---start parameter file
RDA string HostName= 127.0.0.1 getparams 127.0.0.1 %
RDA int SourceCh= 33 getparams 127.0.0.1 %
RDA floatlist SourceChOffset= 33 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 // getparams 127.0.0.1
RDA floatlist SourceChGain= 33 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 1 // getparams 127.0.0.1
RDA float SamplingRate= 250 // getparams 127.0.0.1
RDA intlist TransmitChList= 32 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 // getparams 127.0.0.1
RDA matrix SpatialFilter= 32 32 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 // getparams 127.0.0.1
RDA int SourceMax= 300muV // getparams 127.0.0.1
RDA int SourceMin= -300muV // getparams 127.0.0.1
-----end parameter file


Next, I use these paramters to setup de BCIlauncher. However, the operator reports the following.

-----start operator system log
8/13/2009 11:07:43 AM - BCI2000 started
8/13/2009 11:07:44 AM - Executing script after all modules connected ...
8/13/2009 11:07:44 AM - unnamed script: Successfully loaded parameter file C:\BCI\Brainvision2.prm
8/13/2009 11:07:44 AM - Operator set configuration
8/13/2009 11:07:44 AM - unnamed script: Set configuration
8/13/2009 11:07:44 AM - Signal Processing confirmed new parameters ...
8/13/2009 11:07:44 AM - RDAClientADC::Preflight: The SourceCh parameter must match the number of channels in the recording software plus one (1) .
8/13/2009 11:07:44 AM - RDAClientADC::Preflight: The number of values in the SourceChOffset parameter must match the number of channels in the recording software plus one (1) .
8/13/2009 11:07:44 AM - RDAClientADC::Preflight: The number of values in the SourceChGain parameter must match the number of channels in the recording software plus one (1) .
8/13/2009 11:07:44 AM - RDAClientADC::Preflight: The recording software reports an infinite sampling rate -- make sure it shows a running signal in its window.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 2 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 3 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 4 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 5 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 6 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 7 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 8 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 9 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 10 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 11 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 12 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 13 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 14 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 15 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 16 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 17 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 18 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 19 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 20 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 21 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 22 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 23 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 24 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 25 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 26 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 27 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 28 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 29 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 30 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 31 is not a valid channel specification.
8/13/2009 11:07:44 AM - TransmissionFilter::Preflight: TransmitChList entry 32 is not a valid channel specification.
---end operator system log
.

I did investigate the code in borland C++ of the RDAQueue and compared it with the RDAClient32, as both codes show a similar workflow.
Apparently, at RDAQueue.cpp at the function member
void RDAQueue::GetServerMessage() the following statement

Code: Select all

pData = receiveBuffer + sizeof( RDA_MessageHeader );
produces a and empty char * (pDATA= "").

Is this an operating system issue? Did anyone else have this issue?

mellinger
Posts: 1065
Joined: 12 Feb 2003, 11:06

Post by mellinger » 13 Aug 2009, 08:50

From the error messages, it appears there are no data being sent by the BrainVision Recorder software. Make sure the EEG signal is displayed in the BrainVision Recorder window prior to starting BCI2000.

HTH,
Juergen

hhallez
Posts: 2
Joined: 22 May 2006, 08:24

Post by hhallez » 13 Aug 2009, 14:43

Dear Juergen,

Recorder was running actually and I could see EEG signals scrolling on the screen. But I figured it out. I ported the RDAclient code to a visual studio project. There I noticed that it takes a while until a message of type (RDAStart, RDAData or RDAData32) was sent. So the RDAQueue couldn't determine the number of channels and the samplingrate, I think. I managed to solve by inserting some code.

The old fragment of RDAQueue::RecieveData() was this:

Code: Select all

.....
  GetServerMessage();
  if( failstate )
  {
    lastMessageType = RDAStop;
    return;
  }
  const RDA_MessageHeader* msg
    = reinterpret_cast<const RDA_MessageHeader*>( receiveBuffer );
  switch( msg->nType )
  {
   .....
But I had to insert some code:

Code: Select all

     ....
  GetServerMessage();
  if( failstate )
  {
    lastMessageType = RDAStop;
    return;
  }
  const RDA_MessageHeader* msg
    = reinterpret_cast<const RDA_MessageHeader*>( receiveBuffer );
  //HH: new code here
  while(msg->nType<0 || msg->nType>4)
        GetServerMessage();
  //end HH
  switch( msg->nType )
  {
   .....
It works now using the launcher and the operator. However I did not fully tested it yet.

greetings,
Hans

mellinger
Posts: 1065
Joined: 12 Feb 2003, 11:06

Post by mellinger » 14 Aug 2009, 07:42

Dear Hans,

thank you for your fix. I'll update the code accordingly.

Regards,
Juergen

Locked

Who is online

Users browsing this forum: No registered users and 2 guests