I'm trying to rig a robot using this armature with IK constrain.
The behavior should be:

 - Base: rotates only on Y (bone) axe.
 - Arm 1: rotates only on X (bone)
   axe.
 - Arm 2: rotates only on X (bone) axe.
 - Point down: Automatically points down (stays always perpendicular to the floor). And rotates with Arm 2. Basically it copies Base bone buy inverted.

How can I do it??

[![enter image description here][1]][1]


  [1]: https://i.sstatic.net/TtbpZtJj.png