Sampling animation data involves taking samples of transformations every n number of frames. Within mel you can use the currentTime function to set the current position on the timeline. For example,
currentTime 18;
sets the current position on the timeline to frame 18.