Thread Tools  
eeg
Junior Member
 
Join Date: Jul 2011
eeg is on a distinguished road Posts: 2
Hi,
I'm a phd student in psychology, We recently bought a Brain vision EEG and a cedrus stimTracker device. I'd like to thanks first people from this forum for the usefull information I found to make the RB device works and send a trigger to StimTracker, CedrusResponseBox.m works properly. But Now I have to add to my experimental code (in matlab) command line to send to say when does the stimulus occurs. And I don't have any clue about the command I have to use, I checked the support for stim tracker and unhopfully nothing is said for matlab users.
I would be extremly gratfull for any help.
Cedric
Reply With Quote
Hisham
Founder
 
Join Date: Aug 2006
Location: San Pedro, CA
Hisham is on a distinguished road Posts: 1,163
Posted July 14th, 2011 #2
Hi Cédric,

The same code CedrusResponseBox.m should still work as far as opening the serial port, sending bytes, and closing it. However, the commands are different. The ones that you need are posted on this page:
http://www.cedrus.com/support/stimtr...t_commands.htm
I hope this helps.
Reply With Quote
eeg
Junior Member
 
Join Date: Jul 2011
eeg is on a distinguished road Posts: 2
Posted July 15th, 2011 #3
Hi hisham,
I did see that already but i did knew how to use this command.
I think I found out now that I have to use the fprint function. I succed (Thanks to you), to send some triggers visible from my eeg recording, but there are still some weerd stuff hapening.
I used as a try the following code (I don't know what's a byte mask so I tried 1010 and 0101):

s1 = serial('COM2', 'BaudRate', 115200,'DataBits', 8, 'StopBits', 1, 'FlowControl', 'none', 'Parity', 'none', 'Terminator', 'CR', 'Timeout', 400, 'InputBufferSize', 16000);
fopen(s1);
fprintf(s1,['mh',0101]); % return R10 on my eeg recording
WaitSecs(1);
fprintf(s1,['mh',1010]);% return R14 on my eeg recording
WaitSecs(1);
fprintf(s1,['mh',0101]);
WaitSecs(1);
fprintf(s1,['mh',1010]);
WaitSecs(1);
fprintf(s1,['mh',0101]);
WaitSecs(1);
fprintf(s1,['mh',1010]);
WaitSecs(1);
fprintf(s1,['mh',0101]);
WaitSecs(1);
fprintf(s1,['mh',1010]);
WaitSecs(1);

But I figure out that the first is never shown by my eeg recording, and also I can't use the same twice in a row (To see the triggers appearing I have to alternate 0101 & 1010). I really wonder Why ?
Thx again for everything
Reply With Quote
Hisham
Founder
 
Join Date: Aug 2006
Location: San Pedro, CA
Hisham is on a distinguished road Posts: 1,163
Posted July 23rd, 2011 #4
Alas, we really cannot provide support for Matlab code, or at least not yet. However, see the following E-Prime code ; the syntax is a little different from Matlab's but it should help.
Reply With Quote
Tags
command line, matlab, stimtracker, trigger
Thread Tools
Posting Rules
Forum Jump:
© Copyright Cedrus Corporation, 1991-2014.
All times are GMT -7. The time now is 12:36 PM.