Page 1 of 1

BufferedADC derived class OnStartAcquisition() not called

Posted: 17 Dec 2013, 18:46
by slauser
Hello,

I am working on developing our own Signal Source ADC module to talk to a hardware via COM port. I created a Signal Source Module by running NewBCI2000Module.exe. The new signal source module is derived from the BufferedADC class. According to the comments, I put OpenCOMPort() and SendConfigCmd() functions in the OnStartAcquisition() function, however, the functions seem not being called. I put a bcidbg statement at the beginning of the OnStartAcqusition() function, and there is no debug message printout in the system log either (with --DebugLevel=5). The other debug messages from OnPreflight() and OnInitialize() were output in the system log.

The BCI2000 seems hanging, the Operator's 'Set Config' and 'Resume' buttons are both grey and disabled. The System Log output is as following,

2013-12-17T15:35:43 - BCI2000 Started
2013-12-17T15:35:44 - Started "SignalSourceSLATest"
2013-12-17T15:35:44 - Started "SpectralSignalProcessing"
2013-12-17T15:35:44 - Started "StimulusPresentationSLA"
2013-12-17T15:35:44 - Waiting for configuration ...
2013-12-17T15:35:44 - Waiting for configuration ...
2013-12-17T15:35:44 - Waiting for configuration ...
2013-12-17T15:35:44 - Loaded parameter file "C:\work\bci_src\bci2000\current\BCI2000\prog\../parms/examples/StimulusPresentation_SignalGenerator.prm"
2013-12-17T15:35:44 - Loaded parameter file "C:\work\bci_src\bci2000\current\BCI2000\prog\../parms/mental_state/app_only/test.prm"
2013-12-17T15:35:53 - Operator set configuration
2013-12-17T15:35:53 - DataIOFilter::Preflight: SignalSourceSLATestADC::Preflight: ...OnPreflight...
2013-12-17T15:35:53 - RandomGenerator::Initialize: RandomGenerator ID: Signal Source SLATest , Seed: 23241d83.
2013-12-17T15:35:53 - DataIOFilter::Initialize: SignalSourceSLATestADC::Initialize: ...OnInitialize...
2013-12-17T15:35:53 - StimulusPresentationSLATask::Halt: Event: Halt.
2013-12-17T15:35:53 - SignalProcessing confirmed new parameters ...
2013-12-17T15:35:53 - StimulusPresentationSLATask::Preflight: Event: Preflight.
2013-12-17T15:35:53 - RandomGenerator::Initialize: RandomGenerator ID: ApplicationBase , Seed: 7a1a1fc3.
2013-12-17T15:35:53 - RandomGenerator::Initialize: RandomGenerator ID: ApplicationBase , Seed: 7a1a1fc3.
2013-12-17T15:35:53 - StimulusPresentationSLATask::Initialize: Event: Initialize.
2013-12-17T15:35:53 - StimulusPresentationSLATask::Initialize: NumOfSequence=1, SequenceType=1.
2013-12-17T15:35:54 - Application confirmed new parameters ...

Please help,

Thanks,

Heather

Re: BufferedADC derived class OnStartAcquisition() not calle

Posted: 18 Dec 2013, 18:21
by slauser
Somehow the bcidbg in the OnStartAcquisition() function 'blocks' the acquisition thread for some reason. After removing all debug statements, the OpenPort and SendCommand work fine in the acquisition thread. If someone knows a way to debug in the acquisition thread, I would like to know.

Thanks,

Heather