Hi There, This post might help ? Presenting stimuli and randomising interstimulus interval for a duration of 40 seconds - #2 by Becca