Adding an additional trigger

32 views
Skip to first unread message

Dea Luma

unread,
Jun 27, 2022, 3:24:39 AM6/27/22
to e-p...@googlegroups.com
Hello, 

I have a question regarding trigger signals that need to be sent to another computer recording program.

I have the stimulus images (5 images (5 triggers)) which i have attributed, have written an Inline text, and there is no problem with them going as triggers to the recording software. For these the inline text is as follows:

WritePort &HDFF8, 0
ImageDisplay2.OnsetSignalEnabled = True
ImageDisplay2.OnsetSignalPort = &HDFF8
ImageDisplay2.OnsetSignalData = c.GetAttrib("Trigger")


However, since each of the 5 images gets repeated 10 times, I decided to create blocks after 10 random image appearances by adding a 'pause'. When the pause comes up on the screen it asks subjects to take their time to rest, and it ends whenever the subject presses SPACE. For this procedure i have created 2 inline texts as follows: 

1)
'Insert a pause after every ten trials
If c.GetAttrib(c.GetAttrib("Running")&".Sample") Mod 10 = 0 Then
'Must set input properties if running from Unredefenced E-Objects
Pause.InputMasks.Add Keyboard.CreateInputMask("{SPACE}","",CLng(Pause.Duration),CLng("1"), ebEndResponseActionTerminate, Clogical("Yes"),"","","ResponseMode:All ProcessBackspace:Yes")
Pause.Run
End If


2)
'Insert a pause after every ten trials
If c.GetAttrib(c.GetAttrib("Running")&".Sample") Mod 10 = 0 Then
'Must set input properties if running from Unredefenced E-Objects
Baseline.InputMasks.Add Keyboard.CreateInputMask("{SPACE}","",CLng(Baseline.Duration),CLng("1"), ebEndResponseActionTerminate, Clogical("Yes"),"","","ResponseMode:All ProcessBackspace:Yes")
Baseline.Run
End If


So, before continuing with the new block of images, I have a baseline (fixation cross - i used a text display) of 10 seconds which practically starts the moment the subjects press SPACE to end the pause. I want to add the start of this fixation cross as the 6th trigger, but I am having trouble doing it. The current triggers are images which are attributed as 'triggers' and I cannot think of a way to add this fixation to that list.

Is there any other way I can add this as a trigger? Should I write a new InLine message? Or does it take something completely else?

I would appreciate it very much  any help I can get, and i thank you in advance.

Best regards,
Dea

David McFarlane

unread,
Jul 28, 2022, 4:11:31 PM7/28/22
to e-p...@googlegroups.com
[Addressing some old posts here, probably too late to do any good ...]

Dea,

I would indeed approach this in an entirely different way. In particular:

(1) Assuming using EP2.0.10 or later, I would use ParallelPort & Task
Events instead of WritePort & OnsetSignal.

(2) I would structure my trial or block List to handle the pause, and
then run the Pause or Baseline as regular objects within a Procedure
instead of using InLine code to run them.

-- David McFarlane


On 2022-06-27 Mon 3:29 AM, Dea Luma wrote:
> Hello,
>
> I have a question regarding trigger signals that need to be sent to
> another computer recording program.
>
> I have the stimulus images (5 images (5 triggers)) which i have
> attributed, have written an Inline text, and there is no problem with
> them going as triggers to the recording software. For these the inline
> text is as follows:
>
> /WritePort &HDFF8, 0
> ImageDisplay2.OnsetSignalEnabled = True
> ImageDisplay2.OnsetSignalPort = &HDFF8
> ImageDisplay2.OnsetSignalData = c.GetAttrib("Trigger")/
>
> However, since each of the 5 images gets repeated 10 times, I decided to
> create blocks after 10 random image appearances by adding a 'pause'.
> When the pause comes up on the screen it asks subjects to take their
> time to rest, and it ends whenever the subject presses SPACE. For this
> procedure i have created 2 inline texts as follows:
>
> 1)
> /'Insert a pause after every ten trials
> If c.GetAttrib(c.GetAttrib("Running")&".Sample") Mod 10 = 0 Then
> 'Must set input properties if running from Unredefenced E-Objects
> Pause.InputMasks.Add
> Keyboard.CreateInputMask("{SPACE}","",CLng(Pause.Duration),CLng("1"),
> ebEndResponseActionTerminate, Clogical("Yes"),"","","ResponseMode:All
> ProcessBackspace:Yes")
> Pause.Run
> End If/
>
> 2)
> /'Insert a pause after every ten trials
> If c.GetAttrib(c.GetAttrib("Running")&".Sample") Mod 10 = 0 Then
> 'Must set input properties if running from Unredefenced E-Objects
> Baseline.InputMasks.Add
> Keyboard.CreateInputMask("{SPACE}","",CLng(Baseline.Duration),CLng("1"),
> ebEndResponseActionTerminate, Clogical("Yes"),"","","ResponseMode:All
> ProcessBackspace:Yes")
> Baseline.Run
> End If/
>
> So, before continuing with the new block of images, I have a baseline
> (fixation cross - i used a text display) of 10 seconds which practically
> starts the moment the subjects press SPACE to end the pause. I want to
> add the start of this fixation cross as the 6th trigger, but I am having
> trouble doing it. The current triggers are images which are attributed
> as 'triggers' and I cannot think of a way to add this fixation to that list.
>
> Is there any other way I can add this as a trigger? Should I write a new
> InLine message? Or does it take something completely else?
>
> I would appreciate it very much  any help I can get, and i thank you in
> advance.
>
> Best regards,
> Dea
>
> --
> 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
> <mailto:e-prime+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/e-prime/CABdTP9Gy6q1cBV%2BgC_UH76REa9Phxze%2BYyG-wgUwhRJz%2B2ccUA%40mail.gmail.com
> <https://urldefense.com/v3/__https://groups.google.com/d/msgid/e-prime/CABdTP9Gy6q1cBV*2BgC_UH76REa9Phxze*2BYyG-wgUwhRJz*2B2ccUA*40mail.gmail.com?utm_medium=email&utm_source=footer__;JSUlJQ!!HXCxUKc!xKsxpRZ3xOlYDCq-nGD7cI-RC5t_-FHcB-UVaWWBY1UYcW6iHJBuTpe3U_gOk_RoGEaEkjvf_KLcSsnN$>.
Reply all
Reply to author
Forward
0 new messages