Millisecond Forums

LPT markers during cuedgonogo task

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

By jcappsiv - 11/6/2018

Hello,
I am trying to send markers to a biopac fnirs system which accepts standard LPT signals. I am using the standard go/nogo task from inquist https://www.millisecond.com/download/library/gonogo/

I would like to send markers during each stimulus during the trials and different markers based on the trial type.

Blankscreen
Verticalcue
Horizontalcue
Verticalgotarget
Horizontalgotarget
Verticalnogotarget
Horizontalnogotarget

Is there a way to define it with the stimuli so that the marker is sent at the same time it is presented?
<picture verticalcue>
/ items = cues
/ select = 1
/ size = (25%,25%)
/ position = (50%,50%)
</picture>
By Dave - 11/6/2018

jcappsiv - Tuesday, November 6, 2018
Hello,
I am trying to send markers to a biopac fnirs system which accepts standard LPT signals. I am using the standard go/nogo task from inquist https://www.millisecond.com/download/library/gonogo/

I would like to send markers during each stimulus during the trials and different markers based on the trial type.

Blankscreen
Verticalcue
Horizontalcue
Verticalgotarget
Horizontalgotarget
Verticalnogotarget
Horizontalnogotarget

Is there a way to define it with the stimuli so that the marker is sent at the same time it is presented?
<picture verticalcue>
/ items = cues
/ select = 1
/ size = (25%,25%)
/ position = (50%,50%)
</picture>

Set up your <port> elements for the different types of markers as needed. Then include the markers in your trials, i.e. display them at the same time as the respective visual stimuli by adding them to the existing insertstimulustime() logic /ontrialbegin. Suppose you have defined a marker for a horizontal cue

<port horizontalcue_marker>
...
</port>

display it in sync with the visual horizontal cue by doing

<trial horizontalcue_go>
/ ontrialbegin = [
values.cuetype = 2;
values.targettype = 3;
values.soa=list.soa_horizontalcue_go.nextvalue;
values.trialcount+=1;

trial.horizontalcue_go.insertstimulustime(shape.blankscreen, parameters.fixationduration);
trial.horizontalcue_go.insertstimulustime(picture.horizontalcue,(parameters.fixationduration+parameters.cue_delay));
trial.horizontalcue_go.insertstimulustime(port.horizontalcue_marker,(parameters.fixationduration+parameters.cue_delay));
trial.horizontalcue_go.insertstimulustime(picture.horizontalgotarget,(parameters.fixationduration+parameters.cue_delay+values.soa));
]
/ stimulustimes = [0=blankscreen,fixation]
...
</port>

In other words, <port> elements work exactly like any other types of stimulus elements -- <text>, <picture>, etc. -- and you use them in exactly the same way.
By jcappsiv - 11/6/2018

Dave - Tuesday, November 6, 2018
jcappsiv - Tuesday, November 6, 2018
Hello,
I am trying to send markers to a biopac fnirs system which accepts standard LPT signals. I am using the standard go/nogo task from inquist https://www.millisecond.com/download/library/gonogo/

I would like to send markers during each stimulus during the trials and different markers based on the trial type.

Blankscreen
Verticalcue
Horizontalcue
Verticalgotarget
Horizontalgotarget
Verticalnogotarget
Horizontalnogotarget

Is there a way to define it with the stimuli so that the marker is sent at the same time it is presented?
<picture verticalcue>
/ items = cues
/ select = 1
/ size = (25%,25%)
/ position = (50%,50%)
</picture>

Set up your <port> elements for the different types of markers as needed. Then include the markers in your trials, i.e. display them at the same time as the respective visual stimuli by adding them to the existing insertstimulustime() logic /ontrialbegin. Suppose you have defined a marker for a horizontal cue

<port horizontalcue_marker>
...
</port>

display it in sync with the visual horizontal cue by doing

<trial horizontalcue_go>
/ ontrialbegin = [
values.cuetype = 2;
values.targettype = 3;
values.soa=list.soa_horizontalcue_go.nextvalue;
values.trialcount+=1;

trial.horizontalcue_go.insertstimulustime(shape.blankscreen, parameters.fixationduration);
trial.horizontalcue_go.insertstimulustime(picture.horizontalcue,(parameters.fixationduration+parameters.cue_delay));
trial.horizontalcue_go.insertstimulustime(port.horizontalcue_marker,(parameters.fixationduration+parameters.cue_delay));
trial.horizontalcue_go.insertstimulustime(picture.horizontalgotarget,(parameters.fixationduration+parameters.cue_delay+values.soa));
]
/ stimulustimes = [0=blankscreen,fixation]
...
</port>

In other words, <port> elements work exactly like any other types of stimulus elements -- <text>, <picture>, etc. -- and you use them in exactly the same way.

Many thanks works like a charm!