Stimulus marker

200 weergaven
Naar het eerste ongelezen bericht

juan concepcion

ongelezen,
23 sep 2014, 10:34:4123-09-2014
aan e-p...@googlegroups.com
Hello I need help with sending an alphanumeric marker when presenting a stimulus. I have set the port for communication and already have successfully sent markers to another program. 

My wish now is to send markers if stimuli are correct or incorrect. So for example if stimulus is correct send marker "1" and if stimulus is incorrect send marker "0". I need to understand how  in-line script does this and what to write in the in-line script for it to perform the function specified.

Thank you in advance!!!

Juan 

David McFarlane

ongelezen,
23 sep 2014, 11:53:4623-09-2014
aan e-p...@googlegroups.com
Juan,

Once again, if you use EP2.0.10 or later, I think
you can do this better with Task Events than with
inline code. How about the following:

Suppose you use the object StimSlide to get your
subject response. Make sure that it logs
StimSlide.ACC; you might also have to set its
PreRelease to 0 to make sure that E-Prime sets
the StimSlide.ACC attribute before executing the
next object. Set up your trial Procedure something like

...
StimSlide
MarkerWait
...

MarkerWait is a Wait object with a Duration of
0. Add a Task Event at StartTime, ActionTime, or
OnsetTime (in this case it hardly matters which,
if you want to know the difference please see
https://groups.google.com/d/topic/e-prime/OeiZ00V9SRc
). Set it to use your communications device
(ParallelPort, Serial, etc.). Use WriteString as
the Action, "(custom)" as the Source,
"[StimSlide.ACC]" for Custom, String for Data
Type; leave Delay at 0, and Enabled at Yes.

The key is the Custom value for the Task
Event. If StimSlide is set to log .ACC, then
E-Prime will automatically create the
StimSlide.ACC attribute (though you might have to
set PreRelease to 0 to make sure that MarkerWait
does not try to use that attribute before its
value is set!). Then MarkerWait can use that as
an attribute reference in the Custom value.

I have not tested this out myself, so I will be
very interested to learn what you get to work. Please write back.

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

/----
Stock reminder: 1) I do not work for PST. 2)
You may reach PST's trained staff (and other
support facilities) at https://support.pstnet.com
. 3) If you do get an answer from PST staff,
please extend the courtesy of posting their reply
back here for the sake of others.
\----


At 9/23/2014 10:34 AM Tuesday, juan concepcion wrote:
>Hello I need help with sending an alphanumeric
>marker when presenting a stimulus. I have set
>the port for communication and already have
>successfully sent markers to another program.Â
>
>My wish now is to send markers if stimuli are
>correct or incorrect. So for example if stimulus
>is correct send marker "1" and if stimulus is
>incorrect send marker "0". I need to understand
>how  in-line script does this and what to write

juan concepcion

ongelezen,
23 sep 2014, 12:15:2423-09-2014
aan e-p...@googlegroups.com
Thank you for the fast response. I will carefully look at the advice.

Thanks alot!!

Juan


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/54219788.066b320a.21ca.0f18SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/d/optout.

juan concepcion

ongelezen,
23 sep 2014, 16:58:3323-09-2014
aan e-p...@googlegroups.com
Well I've tried it but no success.

I get this report (adjunct to this e-mail).

It says that it could not find the attribute StimSlide.ACC. I've tried changing the name of instead of StimSlide.ACC to Target.ACC because the slide in my experiment is called Target. Also, I've checked the ACC dependent measure logging.

One question: (is this for the purpose to create an attribute so that when the task event calls for that attribute, it exists?).

Also I've tried it for a Cue slide. To the cue slide I've added: Onset and Offset. It did not yielded results since I can not get pass the aboved mentioned error.

Best reguards,

Juan


Target Action StimSlide ACC Error WaitObject_0.txt

David McFarlane

ongelezen,
23 sep 2014, 17:19:4323-09-2014
aan e-p...@googlegroups.com
Juan,

1) The name of the object referenced in the
Custom field of the Task Event must match the
name of the stimulus object that gets the
response. "StimSlide" was just an example. If
your stimulus object is named "Target", then you
must use "[Target.ACC]" (and BTW, capitalization does not matter).

2) Yes, the dependent measure logging is just for
the purpose of creating an attribute so that when
the Task Event calls for that attribute, it
exists (although you probably want to log it anyway).

3) Did you set PreRelease of Target to 0? That alone might cause your error.

4) In a pinch, you might add an inline object
between Target and MarkerWait just to explicitly set the attribute:

c.SetAttrib "Target.ACC", Target.ACC

but this may also fail if you do not set the
PreRelease of Target to 0 (think about it).


To be sure, I threw together a little demo of my
own, and it ran without any problem as long as I
enabled the proper logging. If I turned off
logging, then I got the "attribute does not
exist" runtime error. Just set Data Logging of
Target to "Standard" to be sure.

For the record, my test program still ran even
with PreRelease set to "(same as duration)", but
I expect that it did not produce the correct
output. I did not hook up anything to look at
the output signals, so this was not a complete
test, but as I said at least the program did not crash.

Regards,
-- David McFarlane
>than with inline code. How about the following:
>
>Suppose you use the object StimSlide to get your
>subject response. Make sure that it logs
>StimSlide.ACC; you might also have to set its
>PreRelease to 0 to make sure that E-Prime sets
>the StimSlide.ACC attribute before executing the
>next object. Set up your trial Procedure something like
>
>Â Â ...
>Â Â StimSlide
>Â Â MarkerWait
>Â Â ...
>
>MarkerWait is a Wait object with a Duration of
>0. Add a Task Event at StartTime, ActionTime,
>or OnsetTime (in this case it hardly matters
>which, if you want to know the difference please
>see
><https://groups.google.com/d/topic/e-prime/OeiZ00V9SRc>https://groups.google.com/d/topic/e-prime/OeiZ00V9SRc
>).  Set it to use your communications device
>(ParallelPort, Serial, etc.). Use WriteString
>as the Action, "(custom)" as the Source,
>"[StimSlide.ACC]" for Custom, String for Data
>Type; leave Delay at 0, and Enabled at Yes.
>
>The key is the Custom value for the Task
>Event. If StimSlide is set to log .ACC, then
>E-Prime will automatically create the
>StimSlide.ACC attribute (though you might have
>to set PreRelease to 0 to make sure that
>MarkerWait does not try to use that attribute
>before its value is set!). Then MarkerWait can
>use that as an attribute reference in the Custom value.
>
>I have not tested this out myself, so I will be
>very interested to learn what you get to work. Please write back.
>
>-----
>David McFarlane
>E-Prime training
>online:Â
><http://psychology.msu.edu/Workshops_Courses/eprime.aspx>http://psychology.msu.edu/Workshops_Courses/eprime.aspx
>Twitter:Â @EPrimeMaster
>(<https://twitter.com/EPrimeMaster>https://twitter.com/EPrimeMaster)
>
>/----
>Stock reminder: 1) I do not work for PST. 2)
>You may reach PST's trained staff (and other
>support facilities) at
><https://support.pstnet.com>https://support.pstnet.com
>. 3) If you do get an answer from PST staff,
>please extend the courtesy of posting their
>reply back here for the sake of others.
>\----
>
>
>At 9/23/2014 10:34 AM Tuesday, juan concepcion wrote:
>Hello I need help with sending an alphanumeric
>marker when presenting a stimulus. I have set
>the port for communication and already have
>successfully sent markers to another program.Â
>
>My wish now is to send markers if stimuli are
>correct or incorrect. So for example if stimulus
>is correct send marker "1" and if stimulus is
>incorrect send marker "0". I need to understand
>how  in-line script does this and what to

juan concepcion

ongelezen,
1 nov 2014, 11:04:4501-11-2014
aan e-p...@googlegroups.com
Hello David!! Sorry I have'nt written back. I've been very busy. Today I've had the opportunity to apply the method you suggested and it worked!

Just wanted to let you know. 

Also, Im trying to send a Cue marker to the EEG registry. But the situation is more complicated this time since I have two different types of cues. One up, another down. How can I create a marker to be sent. Is it the same method as you suggested before.

Best regards,

Juan

On Tue, Sep 23, 2014 at 5:19 PM, David McFarlane <mcfa...@msu.edu> wrote:
Juan,

1) The name of the object referenced in the Custom field of the Task Event must match the name of the stimulus object that gets the response.  "StimSlide" was just an example.  If your stimulus object is named "Target", then you must use "[Target.ACC]" (and BTW, capitalization does not matter).

2) Yes, the dependent measure logging is just for the purpose of creating an attribute so that when the Task Event calls for that attribute, it exists (although you probably want to log it anyway).

3) Did you set PreRelease of Target to 0?  That alone might cause your error.

4) In a pinch, you might add an inline object between Target and MarkerWait just to explicitly set the attribute:

    c.SetAttrib "Target.ACC", Target.ACC

but this may also fail if you do not set the PreRelease of Target to 0 (think about it).


To be sure, I threw together a little demo of my own, and it ran without any problem as long as I enabled the proper logging.  If I turned off logging, then I got the "attribute does not exist" runtime error.  Just set Data Logging of Target to "Standard" to be sure.

For the record, my test program still ran even with PreRelease set to "(same as duration)", but I expect that it did not produce the correct output.  I did not hook up anything to look at the output signals, so this was not a complete test, but as I said at least the program did not crash.

Regards,
-- David McFarlane


At 9/23/2014 04:58 PM Tuesday, juan concepcion wrote:
Well I've tried it but no success.

I get this report (adjunct to this e-mail).

It says that it could not find the attribute StimSlide.ACC. I've tried changing the name of instead of StimSlide.ACC to Target.ACC because the slide in my experiment is called Target. Also, I've checked the ACC dependent measure logging.

One question: (is this for the purpose to create an attribute so that when the task event calls for that attribute, it exists?).

Also I've tried it for a Cue slide. To the cue slide I've added: Onset and Offset. It did not yielded results since I can not get pass the aboved mentioned error.

Best reguards,

Juan



On Tue, Sep 23, 2014 at 12:15 PM, juan concepcion <<mailto:elmor...@gmail.com>elmor...@gmail.com> wrote:
Thank you for the fast response. I will carefully look at the advice.

Thanks alot!!

Juan

On Tue, Sep 23, 2014 at 11:53 AM, David McFarlane <<mailto:mcfa...@msu.edu>mcfarl...@msu.edu> wrote:
Juan,

Once again, if you use EP2.0.10 or later, I think you can do this better with Task Events than with inline code.  How about the following:

Suppose you use the object StimSlide to get your subject response.  Make sure that it logs StimSlide.ACC; you might also have to set its PreRelease to 0 to make sure that E-Prime sets the StimSlide.ACC attribute before executing the next object.  Set up your trial Procedure something like

    ...
    StimSlide
    MarkerWait
    ...

MarkerWait is a Wait object with a Duration of 0.  Add a Task Event at StartTime, ActionTime, or OnsetTime (in this case it hardly matters which, if you want to know the difference please see <https://groups.google.com/d/topic/e-prime/OeiZ00V9SRc>https://groups.google.com/d/topic/e-prime/OeiZ00V9SRc ).   Set it to use your communications device (ParallelPort, Serial, etc.).  Use WriteString as the Action, "(custom)" as the Source, "[StimSlide.ACC]" for Custom, String for Data Type; leave Delay at 0, and Enabled at Yes.

The key is the Custom value for the Task Event.  If StimSlide is set to log .ACC, then E-Prime will automatically create the StimSlide.ACC attribute (though you might have to set PreRelease to 0 to make sure that MarkerWait does not try to use that attribute before its value is set!).  Then MarkerWait can use that as an attribute reference in the Custom value.

I have not tested this out myself, so I will be very interested to learn what you get to work.  Please write back.

-----
David McFarlane
E-Prime training online:Â <http://psychology.msu.edu/Workshops_Courses/eprime.aspx>http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter:  @EPrimeMaster (<https://twitter.com/EPrimeMaster>https://twitter.com/EPrimeMaster)

/----
Stock reminder:  1) I do not work for PST.  2) You may reach PST's trained staff (and other support facilities) at <https://support.pstnet.com>https://support.pstnet.com .  3) If you do get an answer from PST staff, please extend the courtesy of posting their reply back here for the sake of others.
\----


At 9/23/2014 10:34 AM Tuesday, juan concepcion wrote:
Hello I need help with sending an alphanumeric marker when presenting a stimulus. I have set the port for communication and already have successfully sent markers to another program.Ã'

My wish now is to send markers if stimuli are correct or incorrect. So for example if stimulus is correct send marker "1" and if stimulus is incorrect send marker "0". I need to understand how Ã' in-line script does this and what to write in the in-line script for it to perform the function specified.

Thank you in advance!!!

Juan
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to e-p...@googlegroups.com.

David McFarlane

ongelezen,
3 nov 2014, 17:03:4203-11-2014
aan e-p...@googlegroups.com
Juan,

If you know what Cue marker you want to send
*before* your object runs, then you can always
use c.SetAttrib in inline code before the object
to set the marker value to whatever you like, and
then just use the attribute reference for the Custom value in Task Events.

But if you do not know what Cue marker to send
until after your object runs, then Task Events
will not work for you and you will have to resort
to older methods such as Onset & OffsetSignal...,
and WritePort. Sorry I cannot go into more
detail just now, but if you search this Group for
"Task Events" you should find several other threads where this gets discusssed.

Regards,
-- David McFarlane


At 11/1/2014 10:04 AM Saturday, juan concepcion wrote:
>Hello David!! Sorry I have'nt written back. I've
>been very busy. Today I've had the opportunity
>to apply the method you suggested and it worked!
>
>Just wanted to let you know.Â
>
>Also, Im trying to send a Cue marker to the EEG
>registry. But the situation is more complicated
>this time since I have two different types of
>cues. One up, another down. How can I create a
>marker to be sent. Is it the same method as you suggested before.
>
>Best regards,
>
>Juan
>
>On Tue, Sep 23, 2014 at 5:19 PM, David McFarlane
><<mailto:mcfa...@msu.edu>mcfa...@msu.edu> wrote:
>Juan,
>
>1) The name of the object referenced in the
>Custom field of the Task Event must match the
>name of the stimulus object that gets the
>response. "StimSlide" was just an
>example. If your stimulus object is named
>"Target", then you must use "[Target.ACC]" (and
>BTW, capitalization does not matter).
>
>2) Yes, the dependent measure logging is just
>for the purpose of creating an attribute so that
>when the Task Event calls for that attribute, it
>exists (although you probably want to log it anyway).
>
>3) Did you set PreRelease of Target to 0? That alone might cause your error.
>
>4) In a pinch, you might add an inline object
>between Target and MarkerWait just to explicitly set the attribute:
>
>Â Â c.SetAttrib "Target.ACC", Target.ACC
>
>but this may also fail if you do not set the
>PreRelease of Target to 0 (think about it).
>
>
>To be sure, I threw together a little demo of my
>own, and it ran without any problem as long as I
>enabled the proper logging. If I turned off
>logging, then I got the "attribute does not
>exist" runtime error. Just set Data Logging of
>Target to "Standard" to be sure.
>
>For the record, my test program still ran even
>with PreRelease set to "(same as duration)", but
>I expect that it did not produce the correct
>output. I did not hook up anything to look at
>than with inline code. How about the following:
>
>Suppose you use the object StimSlide to get your
>subject response. Make sure that it logs
>StimSlide.ACC; you might also have to set its
>PreRelease to 0 to make sure that E-Prime sets
>the StimSlide.ACC attribute before executing the
>next object. Set up your trial Procedure something like
>
>  ...
>  StimSlide
>  MarkerWait
>  ...
>
>MarkerWait is a Wait object with a Duration of
>0. Add a Task Event at StartTime,
>ActionTime, or OnsetTime (in this case it hardly
>matters which, if you want to know the
>difference please see
><<https://groups.google.com/d/topic/e-prime/OeiZ00V9SRc>https://groups.google.com/d/topic/e-prime/OeiZ00V9SRc><https://groups.google.com/d/topic/e-prime/OeiZ00V9SRc>https://groups.google.com/d/topic/e-prime/OeiZ00V9SRc
>).  Set it to use your communications
>device (ParallelPort, Serial, etc.). Use
>WriteString as the Action, "(custom)" as the
>Source, "[StimSlide.ACC]" for Custom, String for
>Data Type; leave Delay at 0, and Enabled at Yes.
>
>The key is the Custom value for the Task
>Event. If StimSlide is set to log .ACC, then
>E-Prime will automatically create the
>StimSlide.ACC attribute (though you might have
>to set PreRelease to 0 to make sure that
>MarkerWait does not try to use that attribute
>before its value is set!). Then MarkerWait
>can use that as an attribute reference in the Custom value.
>
>I have not tested this out myself, so I will be
>very interested to learn what you get to work. Please write back.
>
>-----
>David McFarlane
>E-Prime training online:Â
><<http://psychology.msu.edu/Workshops_Courses/eprime.aspx>http://psychology.msu.edu/Workshops_Courses/eprime.aspx>http://psychology.msu.edu/Workshops_Courses/eprime.aspx
>Twitter: @EPrimeMaster
>(<<https://twitter.com/EPrimeMaster>https://twitter.com/EPrimeMaster>https://twitter.com/EPrimeMaster)
>
>/----
>Stock reminder: 1) I do not work for
>PST. 2) You may reach PST's trained staff
>(and other support facilities) at
><<https://support.pstnet.com>https://support.pstnet.com>https://support.pstnet.com
>. 3) If you do get an answer from PST staff,
>please extend the courtesy of posting their
>reply back here for the sake of others.
>\----
>
>
>At 9/23/2014 10:34 AM Tuesday, juan concepcion wrote:
>Hello I need help with sending an alphanumeric
>marker when presenting a stimulus. I have set
>the port for communication and already have
>successfully sent markers to another program.Ã'
>
>My wish now is to send markers if stimuli are
>correct or incorrect. So for example if stimulus
>is correct send marker "1" and if stimulus is
>incorrect send marker "0". I need to understand
>how Ã' in-line script does this and what to
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten