Pausing BCI2000 from Matlab using FieldTrip
Posted: 01 Nov 2011, 10:04
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
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