We have designed, fabricated, and evaluated a micromachined optical scanner intended for optical measurement systems. It consists of a micromachined Si resonator, a Si spacer and a permalloy piece for electromagnetic actuation. An FEM-based simulator was used to design both a scanner structure and a magnetic circuit. We replaced a tuning fork scanner with the micromachined scanner in a commercial equipment for measureing the diameter of strings. The measurement accuracy was as good as the commercial system, but the energy consumption was 10 times lower than it. Consequently, the micormachined optical scanner offers advantages for various optical measurement systems.