Patent ID: 8682469

Claim:
A processing device comprising: a first portion; a first servomotor configured to drive said first portion in a first direction; a distance sensor provided to said first portion; a second portion supported by said first portion such that said second portion is movable in a second direction orthogonal to said first direction; a second servomotor configured to drive said second portion in said second direction; and a control device, wherein said second portion supports a tool for processing a work, said distance sensor measures a distance in said second direction to a reference surface of said work and outputs a distance signal indicating said distance when said distance sensor is located at each of a plurality of positions in said first direction, said control device generates measurement data indicating relationships between coordinates in said first direction of a plurality of points on said reference surface and distances from said plurality of points to said distance sensor based on said distance signal, determines a step coordinate range as a coordinate range in said first direction of a step formed on said reference surface based on said measurement data, generates control data indicating a locus of said tool based on said measurement data and said step coordinate range, and numerically controls said first servomotor and said second servomotor based on said control data, said locus includes a first locus portion of which coordinates in said first direction are not included in said step coordinate range and a second locus portion of which coordinates in said first direction are included in said step coordinate range, and said control device calculates a portion of said control data, which corresponds to said first locus portion, based on a first offset value and calculates a portion of said control data, which corresponds to said second locus portion, based on a second offset value.