Eprime - EEG: task events sending wrong code/integer

119 views
Skip to first unread message

Lauren K. White

unread,
Nov 20, 2023, 8:08:49 PM11/20/23
to E-Prime
Hi all,

I am programming a basic flanker task to send event/trigger codes to our EEG system (ANT neuro eego) using Eprime 3 and a chronos connection.

I am able to send event codes just fine, BUT the codes that register in the EEG system are the wrong numbers. Lets say I have an onset of an incongruent trial send a "61", the EEG system will code/register a "17"  Some event codes show up as the correct code (onset of a congruent trial coded as  a "50" registers as a "50" on the EEG system). But there does not seem to be a rhythm or reason for why come codes match and some to not. The mismatch happens for response-triggered events, stim onset or offset timed events. The number mismatches are not systematically different (i.e., they are not always of by a one or two).

Any clue on how I can trouble shoot this? I have been trying for a week. This happens across tasks and event types. I'm at a loss, so any thoughts would be greatly appreciated!

thanks

Lauren

Michiel Spape

unread,
Nov 20, 2023, 8:23:04 PM11/20/23
to e-p...@googlegroups.com

Hi Lauren,

This happens most likely because you forget to reset the trigger code to 0. Always be sure to send, after, say a trigger at stimulus onset (delay 0) another trigger with 0 just a ms after (e.g. delay 10). Otherwise the triggers add up in a way that isn’t uniquely reversible (I believe in the way that 00001100 + 00000111 = 00001111).

Best,

Michiel

--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/71b8441b-47ac-4428-b491-5e1b0129652dn%40googlegroups.com.

Lauren K. White

unread,
Nov 20, 2023, 8:30:17 PM11/20/23
to E-Prime
ah! I bet this is it. thank you. Will try in the morning. This is greatly appreciated!

Michiel Spape

unread,
Nov 20, 2023, 9:18:59 PM11/20/23
to e-p...@googlegroups.com

Hi,

No problem, we’ve all been here! Ah, and that should be ‘with just a few ms after’, not 0 ms. The danger of using 0 for the delayed reset is that you reset it more or less at the same time as the trigger channel is being polled, and it never reads the actual trigger.

Yun Shen

unread,
Jan 16, 2024, 5:11:21 AMJan 16
to E-Prime

Hi all,

I'm facing a similar problem as Lauren (but I'm using NeuroScan4). The wrong codes are all undefined (which means I didn't set them in the script), and only show in Word1, Word2 and Word3EventCode, but not in the ResponseEventCode. I'm attaching the InLine script for reference.

Here's the procedure of my experiment, and all of the EventCode are scripted in InLine object.
Fixation > Word1EventCode > Word1 > Blank1 > Word2EventCode > Word2 > Blank2 > Word3EventCode > Word3 > Blank3 > Response > ResponseEventCode

Would you kindly explain how to reset the trigger to 0 with E? Is it typing "sleep [ms number]" at the very end of each InLine object (which I've already tried, but it was not working)? Any help will be appreciated! Thank you so much!

Best,
Phoebe
E Prime InLine script.docx

McFarlane, David

unread,
Jan 16, 2024, 2:12:42 PMJan 16
to e-p...@googlegroups.com
To proceed any further, what PreRelease settings do you use for each one of your stimulus objects?

And is there any reason that you are using OnsetSignal, etc., instead of the much superior Task Events facility?


Additional comments for now ...

Since OffsetSignalData never changes, I might set those once in InLine code at the start of the program. Similarly, ...SignalPort never changes. I would also define a constant for the SignalPort (but thanks for using hex notation!), e.g.,

Const SignalPort as Integer = &hD050
Word1.OnsetSignalEnabled = True
Word2.OnsetSignalEnabled = True
Word3.OnsetSignalEnabled = True
Word1.OnsetSignalPort = SignalPort
Word2.OnsetSignalPort = SignalPort
Word3.OnsetSignalPort = SignalPort
Word1.OffsetSignalEnabled = True
Word2.OffsetSignalEnabled = True
Word3.OffsetSignalEnabled = True
Word1.OffsetSignalPort = SignalPort
Word2.OffsetSignalPort = SignalPort
Word3.OffsetSignalPort = SignalPort
Word1.OffsetSignalData = 0
Word2.OffsetSignalData = 0
Word3.OffsetSignalData = 0


Finally, thanks for at least using If-ElseIf instead of a sequence of If-Then statements. I would, however, replace that extensive If-ElseIf structure with a Select Case structure, which I find easier to follow. (But if you wanted to be evil, you could replace all that with a single deeply nested Iif() statement!)

-- David McFarlane


On 2024-01-16 Tue 5:11 AM, Yun Shen wrote:
> Hi all,
>
> I'm facing a similar problem as Lauren (but I'm using NeuroScan4). The wrong codes are all undefined (which means I didn't set them in the script), and only show in Word1, Word2 and Word3EventCode, but not in the ResponseEventCode. I'm attaching the InLine script for reference.
>
> Here's the procedure of my experiment, and all of the *EventCode* are scripted in InLine object.
> Fixation > Word1EventCode > Word1 > Blank1 > Word2EventCode > Word2 > Blank2 > Word3EventCode > Word3 > Blank3 > Response > ResponseEventCode
>
> Would you kindly explain how to reset the trigger to 0 with E? Is it typing "sleep [ms number]" at the very end of each InLine object (which I've already tried, but it was not working)? Any help will be appreciated! Thank you so much!
>
> Best,
> Phoebe
> On Tuesday, November 21, 2023 at 10:18:59 AM UTC+8 msp...@um.edu.mo wrote:
>
> Hi,____
>
> No problem, we’ve all been here! Ah, and that should be ‘with just a few ms after’, not 0 ms. The danger of using 0 for the delayed reset is that you reset it more or less at the same time as the trigger channel is being polled, and it never reads the actual trigger. ____
>
> Best,____
>
> Michiel____
>
> __ __
>
> *From:* e-p...@googlegroups.com <e-p...@googlegroups.com> *On Behalf Of *Lauren K. White
> *Sent:* Tuesday, November 21, 2023 9:30 AM
> *To:* E-Prime <e-p...@googlegroups.com>
> *Subject:* Re: Eprime - EEG: task events sending wrong code/integer____
>
> __ __
>
> ah! I bet this is it. thank you. Will try in the morning. This is greatly appreciated! ____
>
> On Monday, 20 November 2023 at 20:23:04 UTC-5 msp...@um.edu.mo wrote:____
>
> Hi Lauren,____
>
> This happens most likely because you forget to reset the trigger code to 0. Always be sure to send, after, say a trigger at stimulus onset (delay 0) another trigger with 0 just a ms after (e.g. delay 10). Otherwise the triggers add up in a way that isn’t uniquely reversible (I believe in the way that 00001100 + 00000111 = 00001111). ____
>
> Best,____
>
> Michiel____
>
> ____
>
> *From:* e-p...@googlegroups.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__tniopfoorp&d=DwMFaQ&c=KXXihdR8fRNGFkKiMQzstpt6drHDqSenG-8Qi3URQqo&r=BMsFFGMuZtBYTrJj0NLsetv8cdSmdbAu6Sx9YUoCjYQ&m=HI7vqT6riGjFs8fBLx7Hx9EGPFxC3uSHxEpzdMGOxDaw9_VI0pYcHRZT3u2k0Qnb&s=EdN5xnpWtsGGT-uX0nQHUR1cUttJwVRI5eexVMLz1PQ&e=> <e-p...@googlegroups.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__tniopfoorp&d=DwMFaQ&c=KXXihdR8fRNGFkKiMQzstpt6drHDqSenG-8Qi3URQqo&r=BMsFFGMuZtBYTrJj0NLsetv8cdSmdbAu6Sx9YUoCjYQ&m=HI7vqT6riGjFs8fBLx7Hx9EGPFxC3uSHxEpzdMGOxDaw9_VI0pYcHRZT3u2k0Qnb&s=EdN5xnpWtsGGT-uX0nQHUR1cUttJwVRI5eexVMLz1PQ&e=>> *On Behalf Of *Lauren K. White
> *Sent:* 21 November 2023 09:09
> *To:* E-Prime <e-p...@googlegroups.com <https://urldefense.proofpoint.com/v2/url?u=http-3A__tniopfoorp&d=DwMFaQ&c=KXXihdR8fRNGFkKiMQzstpt6drHDqSenG-8Qi3URQqo&r=BMsFFGMuZtBYTrJj0NLsetv8cdSmdbAu6Sx9YUoCjYQ&m=HI7vqT6riGjFs8fBLx7Hx9EGPFxC3uSHxEpzdMGOxDaw9_VI0pYcHRZT3u2k0Qnb&s=EdN5xnpWtsGGT-uX0nQHUR1cUttJwVRI5eexVMLz1PQ&e=>>
> *Subject:* Eprime - EEG: task events sending wrong code/integer____
>
> ____
>
> Hi all,____
>
> ____
>
> I am programming a basic flanker task to send event/trigger codes to our EEG system (ANT neuro eego) using Eprime 3 and a chronos connection.____
>
> ____
>
> I am able to send event codes just fine, BUT the codes that register in the EEG system are the wrong numbers. Lets say I have an onset of an incongruent trial send a "61", the EEG system will code/register a "17"  Some event codes show up as the correct code (onset of a congruent trial coded as  a "50" registers as a "50" on the EEG system). But there does not seem to be a rhythm or reason for why come codes match and some to not. The mismatch happens for response-triggered events, stim onset or offset timed events. The number mismatches are not systematically different (i.e., they are not always of by a one or two).____
>
> ____
>
> Any clue on how I can trouble shoot this? I have been trying for a week. This happens across tasks and event types. I'm at a loss, so any thoughts would be greatly appreciated!____
>
> ____
>
> thanks____
>
> ____
>
> Lauren____
Reply all
Reply to author
Forward
0 new messages