So you want a certain number of trials and then the program will end.
S.S.1,
S1,
#START: ON ^LeftLever; ADD T ---> S2
S2,
#R^LeftLever: OFF ^LeftLever; Z^Reward ---> S3
1': OFF ^LeftLever ---> S3
S3,
30": IF T >= 60 [@Done, @Cont]
@Done: ---> STOPABORTFLUSH
@Cont: ON ^LeftLever; ADD T ---> S2
Hopefully this example demonstrates how you can accomplish what you need for your program.
Is there a benefit to always ending a program after a fixed set of time?
I am interested in writing code to end after 60 presentations of a lever rather than after a fixed set of time like this:
30': ---> STOPABORTFLUSH
I do not want the program to be closed after a fixed set of responses like this: