Hi
I would like to be able to pause BCI2000 while I am doing some processing in Matlab. For example, if I am running the StimulusPresentation task, I want the process to be paused after one sequence and the next sequence to begin when I tell it to from Matlab.
I have tried doing this using ft_write_event as follows:
event_suspend.type = 'Running';
event_suspend.value = 0;
event_suspend.offset = 0;
event_suspend.duration = 0;
ft_write_event(filename, event_suspend);
This does manage to suspend BCI2000 but I then get a message:
Application: Unexpected Param message.
so I can't change the Running state back to 1.
Also, this seems to suspend BCI2000 and then restart the task - is there any way to just pause it within the same task and then continue from that point instead of starting again?
Thanks
Leandra
Pausing BCI2000 from Matlab using FieldTrip
-
mellinger
- Posts: 1341
- Joined: 12 Feb 2003, 11:06
Re: Pausing BCI2000 from Matlab using FieldTrip
Hi Leandra,
are you using a recent version of BCI2000? The "unexpected param message" when setting the "Running" state to 0 should have been fixed long ago.
In order to pause and continue BCI2000 from a state, you will need to modify the application module. In src/shared/modules/application/StimulusTask.cpp, you might change all lines that read
to
Also, in the constructor of that class, add a state definition line:
This way, you should be able to control BCI2000 by setting the "MyState" state.
Also, in order to interrupt recording to the data file, set the state "Recording" to 0.
Regards,
Juergen
are you using a recent version of BCI2000? The "unexpected param message" when setting the "Running" state to 0 should have been fixed long ago.
In order to pause and continue BCI2000 from a state, you will need to modify the application module. In src/shared/modules/application/StimulusTask.cpp, you might change all lines that read
Code: Select all
doProgress = true;Code: Select all
doProgress = State( "MyState");Code: Select all
BEGIN_STATE_DEFINITIONS
"MyState 1 0 0 0",
END_STATE_DEFINITIONS
Also, in order to interrupt recording to the data file, set the state "Recording" to 0.
Regards,
Juergen
-
UCTEEGLab
- Posts: 18
- Joined: 30 Jun 2011, 09:34
Re: Pausing BCI2000 from Matlab using FieldTrip
Thanks for the reply.
I'm using version 3.0.2, which is why I was surprised to see that message because I did read somewhere that it had been fixed.
Thanks for the suggestion about pausing BCI2000, I will give that a try.
Regards
Leandra
I'm using version 3.0.2, which is why I was surprised to see that message because I did read somewhere that it had been fixed.
Thanks for the suggestion about pausing BCI2000, I will give that a try.
Regards
Leandra
Who is online
Users browsing this forum: No registered users and 0 guests
