Trouble animating Square Gear/Rack

Hello,

I'm having some difficulty mating/animating an enclosed "square rack.

As you can see i the attached screenshot, the gear is to travel around the square rack.

I've created hidden surfaces extruded from their respective pitch diameters and mated them with "Cam Mating" so the gear follows properly along the contact lines.

However thats all it does.  I also need the gear to rotate and the teeth to fully mesh.  The furthest I can get is one side meshing properly.

I'm sure I'm not the first person to have ever done this kind of a design in solidworks. 

Any ideas?

SolidworksMotion Studies