Patent ID: 7348547

Claim:
A position detecting apparatus comprising: a mechanical member that moves in a direction set in advance; bit marks that indicate values of respective digits of binary numbers formed by gray codes appended at predetermined pitches to a surface of the mechanical member in order to indicate respective positions of the mechanical member with respect to the moving direction of the mechanical member; bit mark reading sensors arranged to be capable of simultaneously reading, every time the bit marks indicating the binary numbers formed by the gray codes appended to the surface of the mechanical member reach a reading position, the bit marks of the respective digits that reach the reading position; and a position deriving unit that derives a position of the mechanical member from values indicated by the bit marks of the respective digits obtained when the bit mark reading sensors simultaneously read the bit marks that reach the reading position wherein the bit marks indicating the respective digits of the binary numbers are appended at equal intervals in a direction orthogonal to the moving direction of the mechanical member and the bit marks are also appended at equal intervals for each of the digits of the binary numbers along the moving direction of the mechanical member wherein, when overall display by the bit marks appended to the surface of the mechanical member is a bit matrix and logics indicated by two bit marks that belong to a same digit of the binary numbers in the bit matrix and are adjacent to each other in a front-to-back direction with respect to the moving direction of the mechanical member are opposite, assuming that a point between these adjacent bit marks is a bit change point, a straight line connecting a first bit change point that belongs to a first digit and a second bit change point that belongs to a second digit different from the first digit and is adjacent to the first bit change point in the front-to-back direction with respect to the moving direction of the mechanical member is an inter-mark connection slanted line, and an angle formed by the inter-mark connection slanted line and a straight light orthogonal to the moving direction of the mechanical member is a counter malfunction angle, a smallest counter malfunction angle in one bit matrix is set as a minimum counter malfunction angle, minimum counter malfunction angles in all new bit matrixes created by replacing a bit string of any one of the digits with a bit string of the other digits are compared, a bit matrix having a minimum counter malfunction angle larger than minimum counter malfunction angles of the other bit matrix is selected as an optimum bit matrix, and the optimum bit matrix selected is appended to the surface of the mechanical member.