In order to send markers to eyetracker software (e.g. Tobii) to indicate the on- and/ or offset of stimuli, port elements for the markers have to be declared:
<port stimOnsetMarker> /*this marker sends value "1" to signal onset of stimulus /port = eyetracker /items = (1) </port>
<port stimOffsetMarker>/*this marker sends value "0" to signal offset of stimulus /port = eyetracker /items = (0) </port>
The port elements then have to be included into the relevant trials.
<trial collectData> /stimulustimes = [0 = stim, stimOnsetMarker; 1000 = eraseStim, stimOffsetMarker] ... </trial>
You can also dynamically set the value of your port markers.
You record participants' eye movements while they are looking at 2 different kinds of drinks; a soda can vs. a beer can. You test several different kinds of soda can images and several different kinds of beer can images and you counterbalance the screen positions of soda cans and beer cans.
You wish your marker to include information about stimulus positions and specific images presented.
<port dynamMarker> /port = eyetracker /items = (0) /*this value will change during runtime </port>
And add a value for the value that should be send as your marker:
<values> /marker = 0 </values>
For example (many different ways are possible - this is just one way), you could dynamically create markers of the following kind:" 015027"
0 = indicates start of left stimulus
1 = soda (Note: 2 would signal beer was the left stimulus)
5 = Next digits until 0 code the item number of left image
0 = indicates start of right stimulus
2 = beer
7 = Next digits until end code item number of right image
<trial SodaBeer> /*trial to present soda can left and beer can right /ontrialbegin = [ values.marker = ""; /*reset marker value values.marker = concat(values.marker, "01"); /*add '01' for soda is left values.marker = concat(values.marker, picture.sodaLeft.currentitemnumber); /* add current itemnumber for left image values.marker = concat(values.marker, "02"); /*add '02' for beer is right values.marker = concat(values.marker, picture.beerRight.currentitemnumber); /* add current itemnumber for right image port.dynamMarker.setitem(values.marker, 1); /*set the item for the marker you want to send ] /stimulustimes = [0 = sodaLeft, beerRight, dynamMarker] /*sends 015027 at stimulusonset … </trial>