This cannot be answered generically. It entirely depends on how you implemented the rest of the task. Among other things, you need to spell out
- How exactly you've realized the letter presentation: Is the letter stream presented in a single <trial> via its /stimulustimes? Is it presented by running multiple <trial>s each presenting a single letter in quick succession? etc.
- What exactly is a "late" response supposed to mean?
etc.
To at least give you a *basic* idea, here's an example for one simple scenario:
<values>
/ latecount = 0
</values>
<block myblock>
/ trials = [1-10=mytrial]
</block>
<trial mytrial>
/ stimulustimes = [0=a; 100=x; 1100=systembeep]
/ inputdevice = mouse
/ validresponse = (lbuttondown, rbuttondown)
/ correctresponse = (lbuttondown)
/ responseinterrupt = immediate
/ beginresponsetime = 100
/ ontrialend = [if (trial.mytrial.latency>1000) values.latecount+=1]
</trial>
<text a>
/ items = ("A")
</text>
<text x>
/ items = ("X")
</text>
<data>
/ columns = [date time subject blocknum blockcode trialnum trialcode response latency correct values.latecount]
</data>