How do I rig Walschaerts valve gear in Blender? I'm trying to rig a Walschaerts valve gear, which looks like this:



I've got some of it working, but I can't figure out how to get the combination lever (the mostly vertical bar between the wheels and pistons) to be influenced from both sides while attached to the valve stem (the upper piston) which it rotates about. The point where the valve stem attaches to the combination lever must not move vertically on the z-axis, but does need to move horizontally along the y-axis, which is what controls the valve stem. 



I've got one IK constraint on the large yellow bone + the two bones guiding the lower piston. I have another IK constraint on the small yellow bone all the way through the two bones controlling the upper piston. I just don't know how to influence that from the top as well.

I've tried adding another IK constraint to the bone beneath the highlighted radius rod, but I can't get it to work. I basically have one rod, and each end needs to be acted on by a different IK constraint.

In case it is of use, here is my blend:
I think the problem is that you have the valve stem and crosshead rigged to move together.  In an actual valve, the motion is more complex

I'm not good at drivers, but what I think you need to do is match the actual cycle more closely.

Using the animation from wiki starting with the valve stem all the way to the right end of its cylinder, the piston end of the cross head in the middle of its cylinder


Steam enters, pushing the piston to the left end of its cylinder
As the piston approaches the end of the cylinder the various mechanical linkages pull the valve stem to the left.
Once the valve stem is all the way to the right, the direction of steam reverses. This reverses the direction of the piston.
The piston moves all the way to the right
Mechanical linkages pull the valve stem to the left


end of cycle.

A driver that causes the cylinder head to move as if it were driven by steam and a set of bones that match the actual mechanical linkages, down to parenting, should cause everything to behave properly.