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.
>
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