neuroscan triggers help

851 views
Skip to first unread message

Martin

unread,
Aug 20, 2010, 3:09:47 PM8/20/10
to E-Prime
Hello,

I use Scan4.0 (Neuroscan through Compumedics) to record EEGs and
currently use STIM2 for experimental design and sending time-stamps to
the EEG recording. I have designed an experiment in E-Prime and want
to send time-stamp triggers to neuroscan. I've done some research on-
line and this is what I have tried.

I created an InLine Object within my TrialProc. I tried the following
script (WritePort address, value):

WritePort &H378, 1

But that didn't work.

I have three ports in device manager with different addresses (LPT =
0378, COM1 = 03F8, COM2 = 02F8)
I've tried each of these address, but they haven't worked. In the
STIM2 program, the port is set at KPC124 PCI -- I tried varations of
this but no luck so far.

Here are my basic questions so far?

1. Am I using InLine Objects correctly for sending triggers?
2. How do I find (or write) the correct address to send a trigger to
Scan4.0?
3. If I have several slides with a different response for each slide
in TrialProc, how do I make a different trigger for each response. Do
I use a different InLine object for each one with a different trigger
value?
I have

Any suggestions would be greatly appriciated. Or if anyone (or knows
someone) is using E-prime and neuroscan that I can contact, that would
be great.

Best regards,

Martin

Martin Shapiro, Ph.D.
Department of Psychology
California State University, Fresno
(559) 278-2358

Chris Blais

unread,
Aug 20, 2010, 3:25:30 PM8/20/10
to e-p...@googlegroups.com, Martin
In my experience, every time you send a code, you need to send a 0 (perhaps this is obvious, but I have not seen it documented anywhere).
e.g. you need this:

WritePort &h378, 1
WritePort &h378, 0

Depending on how fast things are, you might need to put a wait statement between the two WritePort commands. Using cogent with matlab, we had to insert a .1 ms wait command otherwise we missed ~15% of the event codes.

In order to make sure the port is correct, you pick the LPT port number (&h378 in your case).

--------------------
Chris Blais Ph.D.
Post-Doctoral Researcher
Center for Mind and Brain
University of California, Davis
267 Cousteau Pl
Davis, CA, 95618
cbl...@ucdavis.edu

> --
> You received this message because you are subscribed to the Google Groups "E-Prime" group.
> To post to this group, send email to e-p...@googlegroups.com.
> To unsubscribe from this group, send email to e-prime+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
>

David McFarlane

unread,
Aug 23, 2010, 5:20:30 PM8/23/10
to e-p...@googlegroups.com
At 8/20/2010 03:09 PM Friday, Martin wrote:
>I use Scan4.0 (Neuroscan through Compumedics) to record EEGs and
>currently use STIM2 for experimental design and sending time-stamps to
>the EEG recording. I have designed an experiment in E-Prime and want
>to send time-stamp triggers to neuroscan. I've done some research on-
>line and this is what I have tried.
>
>I created an InLine Object within my TrialProc. I tried the following
>script (WritePort address, value):
>
>WritePort &H378, 1
>
>But that didn't work.
>
>I have three ports in device manager with different addresses (LPT =
>0378, COM1 = 03F8, COM2 = 02F8)
>I've tried each of these address, but they haven't worked. In the
>STIM2 program, the port is set at KPC124 PCI -- I tried varations of
>this but no luck so far.
>
>Here are my basic questions so far?
>
>1. Am I using InLine Objects correctly for sending triggers?

Chris Blais covered that in one way. You might also use the
.OnsetSignal... properties, see the
RteRunnableInputObject.OnsetSignalEnabled and associated topics in
the online E-Basic Help.


>2. How do I find (or write) the correct address to send a trigger to
>Scan4.0?

a) Ask the manufacturer of your device. b) Consult the documentation
for the device. c) Physically trace the cable from the device back
to the computer and see if you can recognize whether it connects to
an LPT port, a COM port, or some other oddball I/O port.

Given some arbitray equipment controlled by a computer, I would not
assume that it is attached to the LPT or COM port, or if they were
that this was LPT1 or COM1 as opposed to LPT2, etc. But if you do
know that it is attached to an LPT or COM port, then you can find the
port address in Windows, just ask someone in your IT department to do
that for you. If it is attached to some other I/O board then you
will have some digging to do. And even if I knew what port to use, I
would not assume that it uses the value "1" for a trigger signal. I
might try sending a &hFF to set all bits and see if that works, and
if so I would titrate from there.

Finally, things like WritePort and .OnsetSignal... work only for
straight digital I/O ports, if you use a COM port then you have to
deal with the SerialDevice object in E-Prime.


>3. If I have several slides with a different response for each slide
>in TrialProc, how do I make a different trigger for each response. Do
>I use a different InLine object for each one with a different trigger
>value?

I might put the trigger values into a List attribute, then use that
attribute reference in my inline code. Please work through Chapter 4
of the User's Guide that came with E-Prime.

-- David McFarlane, Professional Faultfinder

Reply all
Reply to author
Forward
0 new messages