I wrote the following steps a while back for the PSR-E series. I don't know how much-- if at all-- they might apply to the PSR-S series, but I'm sure the details of "step 0" need to be adjusted to compensate for differences in the panel buttons and menu screens of the PSR-E and PSR-S models.
0. (Preliminary step.) Press the FUNCTION button, use the CATEGORY buttons to navigate to the "MtrVol" function, and set the Metronome Volume to 0. If you don't do this, you'll get a metronome tick when you press the "<< Rewind" button in step 3 below.
1. Sometime during the measure you want the loop to start with, press the "A-B Repeat" button. If you try to time it with the start of the measure but hit it too soon, you'll actually select the previous measure, so it's better to hit the button a little too late rather than too soon-- e.g., hit the button on the second beat of the measure.
2. Sometime during the measure you want the loop to end with, press the "A-B Repeat" button a second time. This time, instead of trying to wait until the end of the measure, just go ahead and press the "A-B Repeat" button a little early-- e.g., on the last beat of the measure, or maybe even in the middle of the measure. Note that some songs don't use 4/4 time, so you'll need to pay attention to whatever time signature the song uses-- e.g., if it uses 2/4 time then you'll want to hit the button on the second beat.
3. After you've pressed "A-B Repeat" to mark the last measure of the loop, try to press the "<< Rewind" button just as the last measure is ending. As long as you didn't wait too late, the selected loop will immediately start to replay from its first measure, so if you pressed the button a little prematurely you might lose part of a beat. But if you wait a little too late you'll get the beat of silence while the keyboard pauses before it tries to play the two measures of metronome ticks. It's probably better to lose part of a beat than to get a full beat of silence, but with practice you should be able to hit the "<< Rewind" button at just the right moment so the loop is repeated "on beat."
4. When you want to stop looping and continue with the rest of the song, press the "A-B Repeat" button a third time sometime during the last playback-- i.e., don't try to wait for the end of the loop, just go ahead and press the button as soon as the loop has started to repeat for the last time. The song will proceed normally from there.