The valve gear of a steam engine is the mechanism that operates the inlet and exhaust valves to admit steam into the cylinder and allow exhaust steam to escape, respectively, at the correct points in the cycle. It can also serve as a reversing gear. It is sometimes referred to as the "motion".
In the simple case, this can be a relatively simple task as in the internal combustion engine in which the valves always open and close at the same points. This is not the ideal arrangement for a steam engine, though, because greatest power is achieved by keeping the inlet valve open throughout the power stroke (thus having full boiler pressure, minus transmission losses, against the piston throughout the stroke) while peak efficiency is achieved by only having the inlet valve open for a short time and then letting the steam expand in the cylinder (expansive working).
The point at which steam stops being admitted to the cylinder is known as the cutoff, and the optimal position for this varies depending on the work being done and the tradeoff desired between power and efficiency. Steam engines are fitted with regulators (throttles in US parlance) to vary the restriction on steam flow, but controlling the power via the cutoff setting is generally preferable since it makes for more efficient use of boiler steam.
A further benefit may be obtained by admitting the steam to the cylinder slightly before front or back dead centre. This advanced admission (also known as lead steam) assists in cushioning the inertia of the motion at high speed.
In the internal combustion engine, this task is performed by cams on a camshaft driving poppet valves, but this arrangement is not commonly used with steam engines, partly because achieving variable engine timing using cams is complicated. Instead, a system of eccentrics, cranks and levers is generally used to control a D slide valve or piston valve from the motion. Generally, two simple harmonic motions with different fixed phase angles are added in varying proportions to provide an output motion that is variable in phase and amplitude. A variety of such mechanisms have been devised over the years, with varying success.