Dear all,
I'm writing codes using the NetStationPC.m, which is a customized version of NetStation.m, to send record EEG data with Event labels. My code is shown below:
DAC_IP = '10.10.10.42';
NetStationPC('Connect', DAC_IP);
NetStationPC('Synchronize');
NetStationPC('StartRecording');
pause(1);
for J = 1:10
s = GetSecs();
NetStationPC('Event','stm+', s, 0.001, 'obs#', J);
pause(1);
end;
NetStationPC('Synchronize');
NetStationPC('StopRecording');
NetStationPC('Disconnect', DAC_IP);
Here is my results: (0) the NetStation Acquisition software turned pink, meaning it started to record, which is good; but (1) while my code ran in the lines of NetStationPC('Event', ...), the data acquisition GUI was frozen. I found the EEG data was recorded, though, by checking the output .mff file; and (2) I noticed in NetStation Tool software that my events have "stm+" in their "Code" field and "obs# == 1, 2, ..., 10" in their "Key Code" field, which is good, but (3) those events cannot be used to generate segments, because their starttime are labeled large negative values, e.g., Starttime == -04:09:17.647, duration == 00:00:00.001.
My guess is that this failure was due to wrong specification of starttime, and as a side-effect the NetStation Acquisition froze during data event-labeling.
Does anyone have working sample code? Or, is there anything wrong in the code of "NetStationPC.m" that is known? Or, a raw guess of the potential causes of these is also appreciated. Thanks!!!
PS: I got all "Z"-responses for my "D"-(event)-commands, which means the commands were properly received and parsed by NetStation. This is another reason why I guess the problem is primarily the time.