Trigger event markers from Eprime to BIOPAC

2,594 views
Skip to first unread message

Catarina Azevedo

unread,
Mar 29, 2012, 7:31:12 AM3/29/12
to E-Prime
Hi all!

I'm new in eprime and so I realize that this will be a beginner
question.But I really need some help!

I programmed an experiment in which participants will see first a
block of English words and then a block of Dutch words (or the
contrary, order was counterbalanced). The 40 words they will see in
the first block will be chosen pseudo-randomly from a list of 80
words. In the second block they will see their translations. I found a
way to do it with Nested lists (without scripts).

Each participant will see 10 EnglishPositive, 10EnglishNegative, 10
EnglishNeutral, 10English Taboo and 10 DutchPositive, 10DutchNegative,
10 DutchNeutral and 10DutchTaboo words.

I insert a column with the title "marker", being the options 1,2,3,4
for the english words and 5,6,7 and 8 for the dutch words
(corresponding to the type of words).

I would like to know the inline I should write and where so that I
would have 8 different types of events in BIOPAC. I saw this one:

xxx.OnsetSignalEnabled = True
xxx.OnsetSignalPort = &H378
xxx.OnsetSignalData = 1

xxx.OffsetSignalEnabled = True
xxx.OffsetSignalPort = &H378
xxx.OffsetSignalData = 2

But I if I put like this

marker.OnsetSignalEnabled = True
marker.OnsetSignalPort = &H378
marker.OnsetSignalData = 1

marker.OffsetSignalEnabled = True
marker.OffsetSignalPort = &H378
marker.OffsetSignalData = 2

I'm not sure if it will specified the type of words (events) in
Biopac.

Here you have the es. file
http://dl.dropbox.com/u/31016950/CAmarch2012quaseEXP.es

Thank you for your attention

Catarina

David McFarlane

unread,
Mar 29, 2012, 11:46:39 AM3/29/12
to e-p...@googlegroups.com
Catarina,

Here's the deal: For some years I have personally provided copious
free advice here (often starting with "do *all* the tutorials in the
manuals"), partly as mental exercise & self-training, partly as
public service, and partly to amuse myself.

Now we have taken a good deal of that and packaged it into an online
course, for which people must pay, and I cannot keep handing out the
same answers that we have already covered. As it turns out, your
very question is covered in the closing "fMRI, EEG, &
Psychophysiology" lesson of our course, complete with an exercise in
which I have you write a working program to do just what you descibe,
and which I then personally grade. (The course also includes a Live
Office Hour every week with me.)

That's all I can tell you now. But if you hold on, some more
generous folks here may supply your answer; or, try PST Web Support
at http://support.pstnet.com/e%2Dprime/support/login.asp , where
they strive to respond to all requests in 24-48 hours at no charge.

Regards,
-----
David McFarlane
E-Prime training
online: http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (twitter.com/EPrimeMaster)

Paul Groot

unread,
Mar 29, 2012, 4:43:24 PM3/29/12
to e-p...@googlegroups.com
Hi Catarina,

The SendPulse inline script of your es-file already contains a few
lines to send a pulse using WritePort. You could replace them with
something like this:

DutWords.OnsetSignalEnabled = True
DutWords.OnsetSignalPort = &H378
DutWords.OnsetSignalData = c.GetAttrib("marker")

DutWords.OffsetSignalEnabled = True
DutWords.OffsetSignalPort = &H378
DutWords.OffsetSignalData = 0 ' reset all digital lines to zero

Since BioPac will acquire the 8 digital TTL lines as separate signals,
you would probably want to use powers of two for the markers:
1,2,4,8,16,32,64 and128. If you don't use powers of two, you will get
a mixture of simultaneous pulses. (You could use a calculation channel
to convert the 8 digital channels back to a numerical one, but I would
suggest you should only do this when you need more than 8 unique
marker codes.)

Also make sure that the marker attribute is defined in all relevant
lists, because I noticed that the second part of your exp. is missing
the marker attribute.

I also have the feeling that part of your script contains duplicate
(identical) objects. Perhaps you need duplicates in some places to be
able to implement English/Dutch specific elements, but I'm sure that
in some places you could (re)use the same E-Object. (For example
Blank1 and Blank2 are probably identical). Although this is not a big
deal in your script, I often see scripts having large amounts of
copied objects. One of the side-effects of having duplicates is that
the log-file will become unnecessary complex.


Best,
Paul


2012/3/29 Catarina Azevedo <catarina.m...@gmail.com>:

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

Catarina Azevedo

unread,
Apr 3, 2012, 10:10:19 AM4/3/12
to E-Prime
Thank you so much for your help Paul!

Catarina
> 2012/3/29 Catarina Azevedo <catarina.melo.azev...@gmail.com>:

Scott

unread,
Jan 14, 2013, 1:21:45 AM1/14/13
to e-p...@googlegroups.com

I'm not sure I should reply to such an old thread, but I am asking Paul Groot for elaborate regarding part of his post to this topic -- and my question still is about "...markers from E-Prime to BIOPAC."  Can you please explain how one can "...use a calculation channel to convert the 8 digital channels back to a numerical one...", if one needs more than 8 unique marker codes?

I am just beginning work on  E-Prime programs that will send triggers via the parallel port to Biopac equipment. I have written quite a few E-Prime programs for ERP studies that send codes to Neuroscan amps. For that, it's simple to use different numbers (1-255) to distinguish various kinds of stimulus onset and offset and response events. I think I understand how to send a signal to one of 8 channels of the Biopac recording system using port codes that are powers of 2 (as you explained). However, I don't expect that will always be enough, so I'd like to know how to setup a "calculation channel" to facilitate the use of more than 8 codes with Biopac. Can you explain, or point me to some documentation about this?

Thanks. - Scott

...

Scott

unread,
Jan 17, 2013, 2:14:56 AM1/17/13
to e-p...@googlegroups.com
Never mind, Paul, I've found information about using a calculated channel in AcqKnowledge for simplifying  8 digital bit channels into a single number from 0 - 255.  My apologies for waking a dead thread to ask a question about BIOPAC, even though it's relevant to using E-prime with this equipment and software. - Thanks anyway, for a few clues you provided in previous posts to this thread.
Reply all
Reply to author
Forward
0 new messages