Millisecond Forums

Fixed Duration Trials with TTL signals on response mid-trial

https://forums.millisecond.com/Topic10979.aspx

By xiller09 - 7/22/2013

I have a trial like this at the moment.


<trial sometrial>
/ stimulustimes = [0=cue, TTLmarker_cueon;500=mask]
/ validresponse = (" ")
/ trialduration = 2000
</trial>


I need a way of sending out a parallel port signal (TTLmarker_responsemade) when the participant makes a response.


However, I need a way of doing this that preserves a 2 second duration between onsets.


I had thought about something like this, but it doesn't work:


<trial sometrial>
/ stimulustimes = [0=cue, TTLmarker_cueon;500=mask]
/ validresponse = (" ")


/ ontrialend = [values.iti = trial.sometrial.latency]


</trial>



<trial ititrial>


/stimulustimes = [0=TTLmarker_responsemade]


/trialduration = values.iti


</trial>


Any thoughts?

By Dave - 7/22/2013

Why don't you use /pre- or /posttrialpause for that?

By xiller09 - 7/22/2013

Because that would get me equal distances between responses rather than between trial starts? Or am I missing another use for it like:


/ posttrialpause = 2000-trial.sometrial.latency

By Dave - 7/22/2013

Not necessarily, as /pre- and /posttrialpause accept variables which you can compute at runtime as needed.


However, what's wrong with /trialduration, which will indeed *fix* every trial's duration to 2000ms, thus guaranteeing your onset distance.

By xiller09 - 7/22/2013

Hi Dave,


The issue with setting trialduration to 2000 is that I need to present two port stimuli:


<port cueon>
/ port = lpt1
/ subport = data
/ items = ("10000010")
</port>

<port cueresp>
/ port = lpt1
/ subport = data
/ items = ("10000011")
</port>



port.cueon needs to be sent when the cue stimulus appears. I have no problems with this one.


port.cueresp needs to be sent when the participant makes a response.  I can't work out how to send this signal while preserving a 2000ms trial duration.

By Dave - 7/22/2013

You use /responsemessage. For details see http://www.millisecond.com/forums/Topic1739.aspx#1739.

By xiller09 - 7/22/2013

Brilliant, that is exactly it.



Thanks Dave.




- Tim