4 methods of how to transmit rotation around Z axis to rotation around X axis.
hagA rotates on Z axis, hagB will rotate on X axis.
For hagA, the keyframe has already been set.
Method 1
Duplicate hagA, name it hagB.
Rotate hagB on Z axis (reverse to hagA) with keyframes.
Make a group, rotate the group 90 degrees on Y axis.
Method 2
Duplicate hagA, name it hagB, rotate 90 degrees on Y axis.
Modify > Freeze Transformation , then rotates are 0,0,0.
Open the Connection Editor
Window > General Editors > Connection Editor
Select hagA (at Work Space or Outliner), click Reload Left
Select hagB, click Reload Right
Select RotateZ of hagA, select RotateX of hagB.
(You should pay attention to the button from > to.)
Then hagB will rotate, but same rotation direction to hagA.
Rotate hagB 180 degrees on Y axis.
Method 3
Duplicate hagA, name it hagB, rotate 90 degrees on Y axis.
Modify > Freeze Transformation , then rotates are 0,0,0.
Open the Set Driven Key window
Animate > Set Driven Key > Set
Select hagA(at Work Space or Outliner), click Load Driver , and select rotateZ.
Select hagB, click Load Driven , and select rotateX.
Select hagA, enter -360 to ratate Z (at the Channel Box).
Select hagB, enter 360 to ratate X (at the Channel Box).
Click Key
Select hagA, enter 0 to ratate Z.
Select hagB, enter 0 to ratate X.
Click Key (in the Set Driven Key Window)
Select hagA, enter 360 to ratate Z.
Select hagB, enter -360 to ratate X.
Click Key
Then hagB will rotate.
Method 4
Duplicate hagA, name it hagB, rotate 90 degrees on Y axis.
Modify > Freeze Transformation , then rotates are 0,0,0.
Open the Expression Editor
Window > Animation Editors > Expression Editor
Write
hagB.rx = hagA.rz * -1;
at Expression window, click Create
If you want to edit Expression, click Edit
(rx will expand to rotateX)
hagB.rotateX = hagA.rotateZ * 0.75;
You can change rotation speed as above.
Japanese article
Maya tutorials:animation of two gears