Tingji,
So let me see if I understand ...
1) You have not changed computers; both the old, still working
experiment program, and the new, not-working experiment program are run
on the same computer.
2) You took the old, still working experiment program, and just added
some inline code intended to output another signal through the parallel
port to some external equipment at the start of another stimulus.
3) The new program still successfully outputs the old signals, but fails
to output the added signal.
Based on that, I would say that you forgot to first set the LPT output
back to 0 at some reasonable time before outputting your new signal.
You should look at your old, still working code to see how that works,
and then implement that in your new code (I go over this in detail in my
online course).
Now, because you use EP2.0.10, I would much, much rather that you
abandon your use of WritePort and replace that with the much superior
Task Events facility. That, however, would involve some substantial
revision to your program, so I do not really expect that you will do
that. But Task Events has the great advantage that you no longer have
to know about port addresses. It also does everything without inline
code, and you may easily package together both the signal you want to
output and the subsequent reset to 0 to get ready for the next signal
output. Please see
http://www.pstnet.com/support/kb.asp?TopicID=4803 ,
and the New Features Guide that came with E-Prime.
You should also know that, using WritePort, the actual onset of your
stimulus will occur with some delay after the signal to your external
equipment; i.e., the trigger values in your BrainVision data will all be
a bit early. This may or may not matter to you. You could have used
OnsetSignal... to avoid that (see the various OnsetSignal & OffsetSignal
topics in the E-Basic Help facility), and now Task Events provides an
even better mechanism. WritePort remains a useful low-level
communications mechanism for some special cases, but it is not the best
choice for your use here.
Best,
On 2016-12-16 2:28 AM, Mini Dragon wrote:
> Hi,
>
> Yes, the older experiment program still works. But the older one used
> "if..then..elseif" to send different triggers for different stimuli. This
> sort of inline script is also included in the present experiment. *After*