parallel port communication: event markers

sofia laureano sofia.schelten at gmail.com
Fri Jul 3 09:43:15 UTC 2009


Dear Michiel, Dear David,

Thank you very much for your support. I followed your suggestions (I
decided to just use one slide) and what I have now is:

1. An Inline before the Proposal (lets call it EventMarker1) with the
following:

Proposal.OnsetSignalPort = &H378
If Proposal.RESP = "a" then Proposal.OffsetSignalData = 28 else if
Proposal.RESP = "r" then Proposal.OffsetSignalData = 29 else
Proposal.OffsetSignalData = 30

(as you can see I entered another condition, since it can happen that
the participants don't respond to the Proposal on time, i.e. don't
press keys "a" or "r" during the 7sec they have to make up their
minds)

2. Proposal slide

3. Inline after the Proposal (EventMarker2):

WritePort &H378, Asc(Proposal.RESP)
Sleep 20
WritePort &H378, 0

I am not sure whether you suggested to have all the info in one lnline
after the Proposal or, as I have now, divided in two.

The problem I am encoutering now is, if I don't press any key (neither
"a" or "r"), I get a Runtime Error saying Invalid Procedure Call,
Error Number 5
The line in the script is: WritePort  &H378 Asc (Proposal.Resp) . If I
press "a" or "r" the error doesn't occur.

Any ideas on why this is happening would be welcome!

thank you again,

Best,
Sofia



On Jul 2, 5:14 pm, David McFarlane <mcfar... at msu.edu> wrote:
> >Of course, you could also just use the one slide you currently have
> >and add a little inline after that:
> >WritePort &H378, Asc(Proposal1.RESP)
>
> If you go this route (which is probably how I would do it), depending
> on how the PsychLab equipment works you might also need to send a
> full "pulse" and reset the output before continuing, something like
>
> WritePort &H378, Asc(Proposal1.RESP)
> Sleep 20
> WritePort &H378, 0
>
> Oh, following my fussy habits I would also replace the "magic number"
> &H378 with a proper constant, e.g.,
>
> Const LptDataPort as Integer = &H378
> WritePort LptDataPort, Asc(Proposal1.RESP)
> Sleep 20
> WritePort LptDataPort, 0
>
> -- David McFarlane, Professional Faultfinder
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list