parallel port communication: event markers
Michiel Spape
Michiel.Spape at nottingham.ac.uk
Thu Jul 2 12:45:25 UTC 2009
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.
--~--~---------~--~----~------------~-------~--~----~
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