Problems with trigger coding

Peter Quain pquain at une.edu.au
Wed Jun 10 01:52:07 UTC 2009


At 10:06 AM 10/06/2009, you wrote:

>Hi everyone,
>
>An absolute E-Prime newbie here. I'm just working on my first set of E-
>Prime tasks (just standard stuff like stop-signal and flanker) for an
>ERP study and I'm having a few issues with triggering at the moment.
>
>The thing is that everyone in my entire lab uses Presentation and has
>very limited or no experience with E-Prime (and we're trying to
>diversify, which is why I've been asked to independently teach myself
>how to use E-Prime so at least someone in the lab knows it), so I'm
>not getting many answers from that direction. Hopefully you guys can
>give me a bit of help with my problems.
>
>I've set up my first set of triggers in a flanker task. However, when
>I run it through our BioSemi set-up, the triggers are displaying in an
>unusual way in the EEG read-out.
>
>For the onset of the FlankerImage (see the screencaps below for my
>task structure), the trigger is correctly displaying as the expected
>numbers (128, 129, etc). For the onset of the inter-trial interval
>(which indirectly denotes the participant's response), the trigger is
>correctly displaying as the expected numbers (64, 65, etc).

The code in your screenshots refers to the practice image, not the 
flanker image. Not sure how you're getting triggers from the flanker slide..

>However,
>at the onset of the FlankerImage, below the correct number,

Maybe it is just after .. or before the 'proper' pulse, and format 
for close event codes writes one lower than the other on display. 
Seems unlikely that BioSemi would be designed to accept or display 
simultaneous, different event codes.

>I'm
>getting a second number that seems to be a summation of the numbers
>coming through on the two different pins.

All 8 pins have a value, 1 or 0.

>  So for example, below 128 in
>the EEG readout will be the number 192, which seems to be a summation
>of 128 and 64.

Does this happen on the very first trial of the first block, or not 
until the second?

... in InLine2 the port is not zeroed - WritePort &H378, 0 - after 
the pulse (value=64) is sent.
... parallel port has 8 pins for ttl pulse. Each pin = 1 bit, 8 pins 
= 1 byte (or a word)
... WritePort command sends byte, which turns on (makes value of '1') 
or turns off (makes value of '0') each of the 8 pins.

64 = binary   01000000
128 = binary 10000000
pin addition = 11000000 .. which = 192 decimal
129 = binary 10000001
pin addition = 11000001 .. which = 193 decimal

It seems like when you send '128' while '64' still active (pins 
remain high until pulled low .. set to '0') that e-prime or BioSemi 
is simply turning on pin8 (leftmost) while leaving pin7 high... so 
you get a 'new' byte based on the binary value of the active pins. My 
guess is it is in the BioSemi buffer that this is occurring, because 
you are getting both the correct and pin additive codes. E-prime 
would likely send a whole new byte to the port after parsing the 
trigger value, in decimal or hexadecimal, to binary each time it was called.

  Also, in inline1, the offset signal is set to 32, not 0. Strange 
that this isn't causing the same thing?

Maybe zero the pins after each pulse will show if that's the problem?

---------------------------------------------
WritePort &H378, RespData
t5 = Clock.Read
' send pulse for 7ms
Do
hh = Clock.Read
Loop While hh - t5 < 7
'toggle all bits low (turn off TTL pulse)
WritePort &H378, &H0
-----------------------------------------
PracticeImage.OffsetSignalData = 0
---------------------------------------------


>Here are some screencaps of my inline codes.
>Inline 1 for onset of FlankerImage: http://i40.tinypic.com/2j2b7gp.jpg
>Inline 2 for onset of ITI: http://i40.tinypic.com/5kp0ns.jpg
>
>Does anyone know where I'm going wrong with the trigger coding? Is the
>extraneous number in the EEG readout a problem? And please let me know
>if I've put in any stupid/redundant coding. I'm really just stumbling
>around in the dark with E-Prime at the moment.
>
>Thanks for your help.
>
>Jess
>

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