Stimuli/ Triggers/ Timing difficulties

David McFarlane mcfarla9 at msu.edu
Thu Apr 19 19:28:55 UTC 2012


Ah.  Did you make sure to use a PreRelease suitably shorter than 
Duration?  It is tempting to just set PreRelease to Duration, but 
that will often create problems like the ones you mention.  First, 
too short a trigger and your equipment may simply fail to detect 
it.  In other cases, you get a much stranger effect.  I do not know 
if this is due to the hardware or to E-Prime, but we have found that, 
when outputting a signal from E-Prime, it generates the output in two 
stages:  First it sets all the requested "1" bits from the specified 
signal value, then it resets all the "0" bits from the specified 
signal value.  This works fine as long as your new signal only sets 
some bits from 0 to 1, or resets some bits from 1 to 0, but not 
both.  E.g., outputting a decimal 5 (binary 0101) following a decimal 
4 (binary 0100), or vice versa, works OK.  But trouble ensues when 
you both change some bits from 0 to 1 and others from 1 to 0.  E.g., 
if you change decimal 1 (binary 0001) to decimal 4 (binary 0100), 
your output will actually go from 1 (0001) to *5* (0101) then to 4 
(0100)!  So under some circumstances you will get some odd behavior 
(you wouldn't believe how much trouble it took us to figure this out!).

So, as I explain in more detail in my online course (but without 
going into all these specific I/O intricacies), as a general rule you 
must make sure to set your output to a known base value well before 
you output each signal (including the first one!), and you must make 
each signal remain long enough for your equipment to detect it.

So, for practice, for your 500 ms stimulus, try setting PreRelease to 
400, and see how that works.  Then try shorter values, and titrate it 
until you get suitable results.

And take my online course!
-----
David McFarlane
E-Prime training 
online:  http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter:  @EPrimeMaster (twitter.com/EPrimeMaster)


At 4/19/2012 02:41 PM Thursday, you wrote:
>Hi again
>
>Thanks a lot for your prompt reply
>We just did what you said, a new problem occurred!
>
>Th first time after running the experiment,  a new unknown trigger
>showed up as "50"! and the second time there were no triggers shown on
>IWave ar all!
>
>Do you have any ideas, why this is happening?
>
>
>On Apr 19, 2:17 pm, David McFarlane <mcfar... at msu.edu> wrote:
> > Sorry, I forgot to elaborate on the "finesse" part.  The shortcoming
> > of this solution is that you *must* remember to adjust the PreRelease
> > value any time that you change Duration, and it is *very* easy for
> > most users to overlook that, as I can tell you from experience!
> >
> > -- David McFarlane
> >
> > At 4/19/2012 02:09 PM Thursday, you wrote:
> > >We do this all the time for our EEG programs, but it requires a
> > >little finesse.  In short, we use a PreRelease value of 1-20 ms less
> > >than the Duration of the stimulus object.  E.g., for your object
> > >with a Duration of 500, set PreRelease to 490.  Now your trigger
> > >will coincide exactly with the onset of your stimulus, and will last
> > >for 10 ms, when the "offset" of the stimulus occurs.
> >
> > >Note that, in E-Prime parlance, stimulus "offset" does not mean
> > >either the end of stimulus presentation, nor the onset of the
> > >following stimulus; "offset" actually refers to when E-Prime stops
> > >executing code for that object and moves on to executing further
> > >instructions.  Someday I need to write this all up, but it's tricky
> > >to describe this all correctly.
> >
> > >-----
> > >David McFarlane
> > >E-Prime training
> > >online:  http://psychology.msu.edu/Workshops_Courses/eprime.aspx
> > >Twitter:  @EPrimeMaster (twitter.com/EPrimeMaster)
> >
> > >At 4/19/2012 01:44 PM Thursday, you wrote:
> > >>Hello E-Prime experts,
> >
> > >>We are Working in our lab with Iwave and E-prime;
> >
> > >>There's a problem that bothers us.
> >
> > >>The triggers stay for 500 msec, exactly the same duration as the
> > >>Stimuli. We want to write a code that makes the trigger and stimulus
> > >>onset at the same time exactly( which is the case now with the new
> > >>line: Stimulus.OnsetSignalData = c.getattrib(`"Cond") ) AND the
> > >>trigger to offset as quickly as possible while the stimulus stays on
> > >>the screen for 500 msec.
> >
> > >>Looking forward to any solutions
> >
> > >>Many thanks in advance.

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