|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 4/10/2012 10:08:36 AM
Posts: 4,
Visits: 26
|
|
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
|
|
|
|
|
Forum MVP
      
Group: Administrators
Last Login: 3/19/2013 12:41:41 PM
Posts: 706,
Visits: 1,496
|
|
I cannot ensure that this will work with BioPac, but I hope this info translates into what you are trying to design.
1) You can achieve 8 unique data points via a parallel port by assigning values that are powers of 2. For example the lowest bit would be 1, then 2, then 4, then 8, then 16.
2) Some external equipment requires a pulse transition that is the line to go high for a period then to be driven low. There are a few ways you can do this
a) If you have access to E-Prime 2.0 Professional (2.0.10.182+), you can set up two Parallel Port task events assigned to Stimulus.OnsetTime with a SetBit 0 at Delay 0 and ResetBit 0 at Delay 20 (see the New Features Guide for this example). Task Events requires no E-Basic in this example.
b) WritePort &H378, 1
Sleep 20
WritePort &H378, 0
c) ParallelPort.WriteByte 1
Sleep 20
ParallelPort.WriteByte
d) Stimulus.OnsetSignalData = 1
Stimulus.OffsetSignalData = 0
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 4/10/2012 10:08:36 AM
Posts: 4,
Visits: 26
|
|
Thank you so much for your help!
Catarina
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 4/12/2013 1:52:24 PM
Posts: 1,
Visits: 3
|
|
Hi Brandon,
I have E-Prime 2.0 Pro and was wondering how you set up the task events to send the information on a specific parallel port channel.
Thanks!
Brandon.Cernicky (4/2/2012) I cannot ensure that this will work with BioPac, but I hope this info translates into what you are trying to design.
1) You can achieve 8 unique data points via a parallel port by assigning values that are powers of 2. For example the lowest bit would be 1, then 2, then 4, then 8, then 16.
2) Some external equipment requires a pulse transition that is the line to go high for a period then to be driven low. There are a few ways you can do this
a) If you have access to E-Prime 2.0 Professional (2.0.10.182+), you can set up two Parallel Port task events assigned to Stimulus.OnsetTime with a SetBit 0 at Delay 0 and ResetBit 0 at Delay 20 (see the New Features Guide for this example). Task Events requires no E-Basic in this example.
b) WritePort &H378, 1
Sleep 20
WritePort &H378, 0
c) ParallelPort.WriteByte 1
Sleep 20
ParallelPort.WriteByte
d) Stimulus.OnsetSignalData = 1
Stimulus.OffsetSignalData = 0
|
|
|
|
|
Forum MVP
      
Group: Administrators
Last Login: 3/19/2013 12:41:41 PM
Posts: 706,
Visits: 1,496
|
|
Take a look at the attached .es2 file.
Add a ParallelPort device through experiment object.
Set its LPT number as appropriate if not LPT1.
The parallel port has a number of actions/methods that can be used.
SetBit will set the zero based LSB bit high when called. That is SetBit 0 will make LSB0 (pin 2) high (bool 1).
ResetBit will set the zero based LSB bit low when called. That is ResetBit 0 will make LSB0 (pin 2) low (bool 0).
WriteByte will set LSB0-LSB7 to the byte value 0-255 sent. That is WriteByte 255 will set all of the pins and WriteByte 0 will set them all to zero.
With that background aside, what you choose to use is up to the paradigm and equipment you are attaching.
If you view the TaskEvents tab of the two text displays, one uses SetBit and one uses WriteByte.
If you notice in the first OnsetTime event, there is a delay of zero, the second one has a delay of 50.
What this means is that if the delay is zero, the "action" will happen at the time of the event (the OnsetTime in this case).
If there is a delay value, then the action will not occur until the delay elapses.
This allows a high, then delay, then low value pulse as indicated by many scanners, etc.
|
|
|
|