You can do this by the following function: (3/2) * (sin(x) + 1)
You also have to remember that in Maya, sine expects units in radians, meaning that 2*pi = (~6.28) = one full cycle of sine. Therefore, in 6 frames, you make a complete cycle of sine. In your expression, you have halved that (remember that multiplying inside the brackets does the opposite transformation), so it now takes 3 frames to cycle completely. The minimums and maximums of sine are found at pi/2 and (3*pi)/2. (Green lines) Since (2*pi)/3 = ~2.1, you are jumping past pi/2, and again past (3*pi)/2. In the example where you are currently hitting are the red lines.

In short:
float $speed = 0.02;
pCube1.rotateZ = (3.0 / 2.0) * (sin(frame * (1.0 / $speed)) + 1);
trying to combine the commands shown here with a previous one about a flickering light
would you be willing to explain this a little more further....
or maybe i have to open a new thread with an explanation of my goal......???
*
The Universe is larger then you ever can think, But smaller then the size of your imagination.
all are welcome at
www.ieoie.nl