The faulty machine

A factory manufacturing flywheels for racing cars has ten machines to make them. The manufacturer knows the correct weight for a flywheel. However, one day one of the machines begins to produce faulty parts, either overweight or underweight. How can the manufacturer find the faulty machine in only two weightings?