parallel port communication: event markers

Michiel Spape Michiel.Spape at nottingham.ac.uk
Thu Jul 2 14:55:16 UTC 2009


Hi Sofia,
Almost, but it's a bit more difficult than I first thought. Here's the problem, which has exactly to do with your first question (before or after): the .RESP is only known AFTER the response (i.e. it is by definition "" before becoming either a or b), but you want to change properties of the slide BEFORE the slide is shown. Though I assume you can do something about this, I guess it would be much simpler just to make two Proposal slides that are basically just copies (control-drag to make a non-shadow copy).
Slide 1, let's call it Proposal1 proposes and has, for example, infinite duration or until keypress. Or whatever you currently have. Make sure it has offset sync turned off.
Slide 2, called Proposal2, is directly following Proposal1, and has neither onset, nor offset sync, and a duration of 1ms. 
In between, there's a mini inline, saying:
Proposal2.OnsetSignalPort = &H378
If Proposal1.RESP = "a" then Proposal2.OnsetSignalData = 28 else Proposal2.OnsetSignalData = 29

Thus, people will think they only see one slide but will always see them both, the second one having a very short duration and doing little other than sending a signal via the parallel port.
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)

That should just send a byte over the parallel port with the response converted to some byte (a = 97, for instance).

Let me know if that helps.

Michiel Spapé
Research Fellow
Perception & Action group
University of Nottingham
School of Psychology


-----Original Message-----
From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of sofia laureano
Sent: 02 July 2009 15:29
To: E-Prime
Subject: Re: parallel port communication: event markers


Dear Mich,

Thank you very much for your reply.
The Proposal is basically a slide where I have the offer (an amount of
money) and the options whether to accept it (a) or to reject it (b).
I would like to have a mark when the slide appears (i.e. when the
participant gets to know the offer) and then two different marks, one
for accept one for reject.

Being this all in one slide, shall the Inline come before or after the
Proposal slide?

And is this what I should write in the Inline?

Proposal.OnsetSignalData = 255
Proposal.OnsetSignalPort = &H378

If Proposal.RESP = "A" then Proposal.OffsetSignalData = 28 else
Proposal.OffsetSignalData = 29


thank you!

Best,
Sofia


On Jul 2, 1:45 pm, Michiel Spape <Michiel.Sp... at nottingham.ac.uk>
wrote:
> Hi,
> Doesn't seem to have much to do with the fact that you're using the parallel port for communication, I would say. I believe the following inline should be enough to send the number 28 over the parallel port:
> WritePort &H378, 28
>
> But conceivably, you want to have some data sent at the onset of this Proposal thingamabob you have, hence '.OnsetSignalData', rather than using the above which just sends the data, 28, at the moment this line is encountered at runtime.
> So, as far as I know, Proposal.OnsetSignalData = 255 sends '255' over the parallel port, and you can change that to different numbers which you'll just have to reconvert in psychlab to conditions. The rest is just very basic inline. Let's say, you have a screen, TextDisplay1 in which you ask participants to indicate 'Accept' (press A) or 'Reject' (press R). The small inline should do the trick:
> If TextDisplay1.RESP = "A" then Proposal.OffsetSignalData = 28 else Proposal.OffsetSignalData = 29
>
> That's it (as long as this proposal object comes after the inline, and the inline after the TextDisplay1). In PsychLab, you can then say that 28 indicates Accept and 29 reject.
>
> Best,
> Mich
>
> Michiel Spapé
> Research Fellow
> Perception & Action group
> University of Nottingham
> School of Psychology
>
> -----Original Message-----
> From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of sofia laureano
> Sent: 02 July 2009 12:28
> To: E-Prime
> Subject: parallel port communication: event markers
>
> Hi there all,
>
> I have an experiment in e-Prime and I am trying to link it to PsychLab
> equipment. Basically what I need is to programme the task so that it
> sends signals through the parallel port to the psychophysics data
> acquisition unit.
>
> So far, what I've done was to create an Inline object (called
> Proposal) which I've inserted just before Proposal. The inline
> contains the following code:
>
> Proposal.OnsetSignalEnabled = True
> Proposal.OnsetSignalData = 255
> Proposal.OnsetSignalPort = &H378
>
> Then I inserted another Inline just after Proposal, with the following
> code:
>
> Proposal.OffsetSignalEnabled = True
> Proposal.OffsetSignalData = 0
> Proposal.OffsetSignalPort = &H378
>
> It's seems to be working, i.e. events are being marked on the skin
> conductance screen.
> However, I would like it to be differentiating between two events
> (i.e. accept/reject). Participants press a different key for each
> event.
>
> How can I get E-Prime to do this?
>
> Thank you very much.
>
> Best,
> Sofia
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses, which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.


This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.


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