Abstract:
A method and device for positioning moving machine parts by using two sensors to detect the spacing of code markers on a code bearing part attached to the machine part and counting the number of code markers detected while accounting for uneven spacing between code markers which invariably occur when two code bearing parts are joined for use on a single machine part.

Description:
BACKGROUND OF THE INVENTION 
     The invention relates to a method and device for positioning of moving machinery parts, an optical signal being received from an emitter 20 by way of a timing rule 22 provided with line code markings 21 by a sensor and the sensor passing on an electrical time signal matching the line code marking to a counter. 
     A device of the kind mentioned is disclosed in U.S. Pat. No. 5,508,088 (PWB). The timing rule here consists of a transparent material on which the codings are arranged for scanning by optical sensors. 
     It is possible that the transparent material, on the side away from the transmitter, may be provided with a reflecting layer, in which case the light rays emitted from the transmitter are reflected along the optical axis and registered by the receiver, which emits a pulse to a control circuit to control the advance of a moving machinery part. 
     The length and frequency of the pulses is determined by so-called `window openings,` produced by the coding into `transmissive/opaque` preassigned areas on the timing rule. The beam of light issuing from the transmitter is thereby converted by a receiver located on the optical axis of the beam into a pulse, the kind of pulse depending on the nature of the window opening. 
     Conventionally, timing rules of finite length are employed to control a print head, a robot arm or a tool carriage. Increasingly, however, important applications are arising in which greater lengths are required for the motion of the carriage. Therefore the problem of constructing timing rules of considerable length presents itself. 
     The codings for timing rules, owing to the high precision required for the positioning of moving machinery parts, must be produced in one piece using costly machines. Costs of production thus rise exponentially, since the maintenace of close manufacturing tolerances becomes more and more expensive with increasing length. 
     In principle, it is possible to assemble several timing rules of shorter length to make a new timing rule of correspondingly greater length. The resulting butt joints, however, may corrupt the light signal and lead to errors in the determination of position. Another problem consists in that there will be an offset in the coding at the joints, inevitably leading to errors of measurement and hence to a faulty determination of position. 
     SUMMARY OF THE INVENTION 
     The object of the present invention, then, is to improve a method and device of the kind initially mentioned, in such manner that the determination of position will be possible even over considerable lengths using several assembled timing rules. The precision of the detection of position is to match the precision to be maintained in the use of an integral timing rule scale. 
     This object is accomplished by the features specified in claim 1. It has been found that by the use of two sensors and additional comparator units, the source of error in transgressing the boundary area of the timing rule can be minimized. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     In the following, the invention will be illustrated in more detail with reference to several embodiments by way of example. In the drawing, 
     FIGS. 1, 1a, 1b show a device according to the invention with a moving sensor carriage; 
     FIG. 2 shows a device according to the invention with a moving timing rule; 
     FIG. 3a, 3b shows error determination with a straight timing rule. 
    
    
     DETAILED DESCRIPTION 
     In FIG. 1, the device for detecting positions of moving machinery parts is represented in the form of a multipartite timing rule capable of being fastened to a printer housing by fastening means 18, 19. The timing rule consists of two code-bearing parts 1a, 1b with an initial position 2, each part bearing equally spaced code marks 3a, 3b. The timing rules are joined at the point 1c where they meet. 
     On a sensor carriage 7, two sensors 4, 8 are arranged. The sensor carriage may be for example fastened to a printer head, together with which it travels over the timing rule. The sensors 4, 8 receive optical signals from a transmitter located behind the sensor carriage 7 in the picture plane of FIG. 1 and hence not visible. 
     Upon motion of the sensor carriage 7 in the direction of the arrow, both sensors 4, 8 receive signals matching the code markings traversed by the carriage. The sensor 4 is connected by lines 6a, 6b to a counter 5, detecting the code marks 3a traversed from the start position 2 on and storing them. 
     As soon as the sensor 8 reaches the join 1c, a comparator 10 connected to the line 9a behind the sensor 8 observes a change in the spacing of the marks. This change may for example be acquired by comparison of a test signal with the code signal received. For this purpose, a testing means 10&#39; is integrated with the comparator 10. 
     Now if the test means 10&#39; ascertains that a changed code signal has been received by way of line 9a, the counter 5 is disconnected from the line 6b and another counter 11 is connected to the sensor 8 by way of line 17. This means that upon motion of the sensor carriage 7 across the point of contact of the two code-carrying parts 1a, 1b, the signal is no longer stored in counter 5, but in counter 11. 
     Between the sensor 4 and the counter 5, another comparator 12 is arranged, the comparator 12, containing a test means 12&#39;. If the test means 12&#39; ascertains that a changed code signal has been received by way of the line 6a, these code signals are then passed on, in the event of a non-coincidence with a test signal, to a transfer unit 13, by way of line 14. The transfer unit 13 then emits the signals received by way of a line 15 which are then totaled, with the counter 5 by way of line 16, the counter 5 being thus reconnected to the line 6a, 6b for reception of new signals from the sensor 4. 
     At the same time, upon transition from one timing rule to the other, by comparison of the measured code signal with the test signal a continuous timing sequence is obtained, as though there were only one timing rule, with no interruption. This may be explained in more detail with reference to FIG. 3a, 3b. 
     In FIG. 3a, the point of section S is so located that an error +f results. Here the code mark spacing b has been augmented by an amount +f, so that after traversing the point S, the value for the code counter must be increased by +f in order to compensate the error at the join. 
     In FIG. 3b, the point of section S is located that an error -f results. Consequently, the code mark spacing b must be curtailed by the amount f to compensate the error at the join. By the respective addition or subtraction of the error f, the value in the respective counter is properly corrected at the transition from timing rule 1 to timing rule 2. 
     Upon continued motion of the sensor carriage 7 beyond the point of section 1c, the sensor 4 also receives a changed code signal, not coinciding with the test signal in an associated comparator 12 with test means 12&#39;. At this instant, the counter 11 is stopped and the signals so far totaled by it are passed on by way of a transfer unit 13 to the counter 5, now replaced in operation. So after traversing the point of section 1c, the counter 5 occupies the exact position of the moving part, for example a printer head. The count can then be continued until a new timing rule with new coding is detected by the sensor 8. 
     In like manner, motions of a cylindrical machinery part, as for example a shaft, a hollow cylinder or a drive gear, may be detected. For this purpose, curved timing rules may be fastened to the periphery of the cylindrical part and monitored by sensor units suitably arranged radially for positioning. If the circumference of the cylindrical part is considerable, several timing rules may be arranged in series, the sensors successively arranged in the direction of travel being circuited as described in the previous example. 
     The precision of the device according to the invention may be further improved in that, upon starting and slowing of the sensor carriage 7, a correspondingly changed test signal is made available for the starting and slowing operation. This avoids interpretation of the code signals received in the accelerated state, owing to their changed structure, as indicating a change of code-carrying part. 
     A refinement of the sensor-emitter unit consists in that the emitter 31 is arranged between the sensors 32 and 33 on the transport carriage 34. The code-carrying parts are then provided with a reflecting layer, so that the signals emitted by the emitter 31 are reflected and received by the sensors 32, 33 at an angle. 
     FIG. 1b represents the situation in cross-section of a timing rule and a sensor carriage. The light rays 31a, 31b emitted by the sensor 31 are reflected on the surface, provided with line markings 35, of the timing rule 36 and received by the sensors 32, 33. Of course, an arrangement of several sensors is also possible, as illustrated in the top view of a sensor carriage 34 in FIG. 1a. 
     FIG. 2 shows, a moving timing rule 22 with various line codes 21. An optical signal emitted by the emitter 20 is received by a sensor 23, which passes on an electrical timing signal corresponding to the line code marking to a counter. 
     The timing rule 22 consists of two timing rule segments 22a, 22b provided with offset line code markings 21a, 21b. 
     Much as in the previous example, the sensor unit consists of two individual sensors 23a, 23b arranged one following the other in the direction of motion of the timing rule. 
     The sensor 23b located foremost in the direction of motion, upon encountering a new timing timing rule segment 21b, switches off a counter 25 of the first sensor 23a, and then counts the line code markings 21b of the new timing rule segment 22b. The segments counted are stored in a transfer unit 27. 
     As soon as the first sensor 23a also reaches the new timing rule segment 21b, the counter 26 of the second sensor 23b is stopped. Now the first counter 25 begins to count onward, the signals passed on by the second counter 26 to the transfer unit being added up with the contents of the first counter 25. 
     To improve the flow of signals, in addition to the counters 25, 26, comparators 28, 29 are connected to the individual sensors 23a, 23b. These comparators can ascertain changes in the line code markings by comparison with test signals, and so trigger the corresponding switching operations of the counters 25, 26 and transfer unit 27. 
     The switch. procedure described operates not in one direction only, but in either direction of motion. The only requirement is that the switch time for the sensors is sufficient so that no coding will travel past the sensor without being detected. 
     For fast-moving machine parts with high accelerations, it is necessary to arrange the sensors at a distance of several line codings. Experience indicates that the sensors should be spaced at least three line codes apart in order for the position-detecting routine to function reliably.