METHOD AND APPARATUS FOR SETTING CHARACTER WIDTH IN PRINTER

Abstract: When a specified head energizing pulse interval involves a decimal fraction, the fraction is accumulated at every printing, and when the cumulative value of the fraction is smaller than one pulse, a printing head (8) is driven at a pulse interval of an integer part (n) obtained by subtracting the fraction, and when the cumulative value of the fraction has reached one pulse, the printing head (8) is driven at a pulse interval of an integer obtained by adding one pulse to the above head energizing pulse interval.

Description: Field of the Invention and Related Art Statement: The present invention relates to a method for setting a character width in a printer for forming characters and symbols using a dot matrix. [Prior Art] In printers there are adopted such printing forms as pica and elite. These printing forms are different in the number of characters per inch. In the case of pica the number of characters is 10, while it is 12 in the case of elite, whereby the width of one character is determined. And a printing head is driven at a head energizing pulse interval decided according to the character width , see e.g. US-A-4 459431. However, other than the printing form of pica or elite, the printing width of one line and the number of characters to be printed in one line are sometimes specified. In this case, the value of the head energizing pulse interval sometimes involves a decimal fraction. Actually, therefore, it is required to give considerations in this connection, for example, required to form spaces at both ends of a line, and thus the printing form setting operation is troublesome. Object and Summary of the Invention: It is the first object of the present invention to have printing performed in the same manner as at a heat energizing pulse interval of an integer in appearance even in the case of a head energizing pulse interval involving a decimal point. It is the second object of the present invention to make adjustment of a head energizing pulse interval with a decimal point dispersedly in one line in the case where the printing width of one line and the number of characters to be printed in one line are specified in printing. It is the third object of the present invention to simplify the operation in the case where the printing width of one line and the number of characters to be printed in one line are specified in printing. It is the fourth object of the present invention to attain the aforesaid functions using a simple apparatus. According to the present invention, in a dot printer for printing characters, etc. using a dot matrix by driving a printing head at a predetermined head energizing pulse interval during movement of a carrier which carries the printing head, when the specified head energizing pulse interval involves a decimal fraction, the fraction is accumulated at every printing, and when the cumulative value of the fraction is smaller than one pulse, the printing head is driven at a pulse interval of an integer part obtained by subtracting the fraction, and when the cumulative value of the fraction has reached one pulse, one pulse is added to the above head energizing pulse interval, and the printing head is driven at a pulse interval of an integer part obtained by subtracting the decimal fraction from the one pulse-added head energizing pulse interval. These operations are repeated. Therefore, the printing head is driven at a predetermined head energizing pulse interval during movement of the carrier which carries the printing head, whereby printing is effected. But where the head energizing pulse interval involves a decimal fraction, the printing head is driven at a pulse interval of an integer part obtained by subtracting that fraction or at an integer pulse interval obtained by accumulating the fraction and adding one pulse. Brief Description of the Drawings: Fig. 1 is a block diagram showing an electronic circuitry; Fig. 2 is a flowchart showing how to set a character width in an ordinary form; Fig. 3 is a flowchart showing how to set a character width in the case of a head energizing pulse interval involving a fraction; Fig. 4 is an explanatory view showing a printed state in the form of pica; Fig. 5 is an explanatory view showing a printed state in the form of elite; and Fig. 6 is an explanatory view showing a printed state obtained at a head energizing pulse interval involving a fraction. Detailed Description of Preferred Embodiments: An embodiment of the present invention will now be described with reference to the accompanying drawings. Referring first to Fig. 1, there is illustrated an electronic circuitry, in which the numeral 1 denotes a CPU. To the CPU 1 are connected an ROM 3 in which are stored fixed data such as a character generator 2 and programs, and an RAM 4 in which are stored various data for modification, through a data bus 6 and an address bus 5. Further, an I/O interface 7 for the connection of an external controller to output various command signals such as character codes and a printing head driving circuit 9 for driving a printing head 8 are also connected to the CPU 1 through the address bus 5. Further connected to the CPU 1 is an I/O port 10 through the address bus 5. To the I/O port 10 are connected a carrier motor driving circuit 12 for driving a carrier motor 11 and a paper feed motor driving circuit 14 for driving a paper feed motor 13. The paper feed motor 13 drives a platen 23 which serves as a paper feed roller, and along the platen 23 is disposed a carrier 21 which is driven by the carrier motor 11. The carrier motor 11 moves the carrier 21 which carries the printing head 8, along the platen 23 with 720 pulses per inch. How to actually set a character width will now be explained. As shown in the flowchart of Fig. 2, when the number of characters, CN, to be printed in one line and the printing width, PW, of one line are given through the I/O interface 7, the data of the CN and PW are read into the RAM 4 and the number of lateral pulses, CW, per character is calculated by the CPU 1 on the basis of the data CN, PW, 720 pulses with which the carrier is advanced one inch, and the number of lateral dots, 12, of one character. First, the number of characters per inch, C/I, is calculated by dividing the number of characters, CN, to be printed in one line by the printing width PW (inch) of one line. The results of this calculation are as shown in Table 1 below. Next, since the carrier is driven 720 pulses per inch as noted previously, the number of lateral pulses, CW, per character is calculated by dividing the driving pulses 720 by the number of characters per inch. If the number of dots in the width direction per character is assumed to be 12 and the number of pulses in the width direction, CW, per character is divided by the said number of dots, there is calculated a head energizing pulse interval DP. The results of this calculation are as shown in Table 2. In the case of pica, as shown in Fig. 4, one character interval, including space, corresponds to 72 pulses, and during this movement the printing head 8 is driven at a head energizing pulse interval of 6 pulses to effect printing with 12 dots in the width direction. The printed character is "A". Likewise, in the case of elite, as shown in Fig. 5, one character interval, including space, corresponds to 60 pulses, and during this movement the printing head 8 is driven at a head energizing pulse interval of 5 pulses to effect printing with 12 dots in the width direction. As another example, where 80 characters are to be printed in the printing width of 7 inches, the head energizing pulse interval DP becomes 5.25 and thus there are fractions in decimal places, so it has heretofore been impossible to set a character width. But the present invention solves this problem. More specifically, an explanation will now be made with reference to the flowchart of Fig. 3. First, the head energizing pulse interval DP is calculated by dividing the number of lateral pulses, CW, per character by the number of lateral dots, DN, per character, as previously noted. Therefore, where the head energizing pulse interval DP is 5.25 as shown in Table 2, as an example other than pica and elite, the 5.25 is read in as DP = dp. Then, the 5.25 is stored as a constant value DP in a DP memory 4a which serves as a head energizing pulse interval storage means of the RAM 4, while (5.25 - 5) is stored as a variable value dp in a dp memory 4b which serves as a decimal storage means of the RAM 4. Then, an integer part, n, (corresponding to 5 pulses) of the dp is set to a step counter which serves as an integer storage means of the RAM 4. Subsequently, the carrier motor 11 is driven n pulses (5 pulses) to move the carrier n pulses (5 pulses) together with the printing head 8, whereupon the head 8 is driven by the printing head driving circuit 9 to effect dot printing. Then, there is performed the calculation of dp ← DP + (dp - n). In this case, the calculation is 5.25 + (5.25 - 5). The fractions of 0.25 are accumulated by an accumulating means to update the data dp. Where this updated value involves a decimal fraction, the integer part, n, pulses (5 pulses) are set to the step counter and the carrier motor 11 is driven n pulses (5 pulses) to move the carrier n pulses (5 pulses) together with the printing head 8, whereupon the printing head 8 is driven to repeat dot printing. In the step of calculating dp ← DP + (dp - n), as set forth above, the fractions in decimal places are added every time one dot is printed to update data, that is, the fractions 0.25 are accumulated. As a result, as shown in Table 3, dp is updated like 5.25, 5.5, 5.75 and 6 pulses successively at every printing. The fractions are subtracted except 6 pulses and the printing head 8 is driven at intervals of 5 pulses, while the fractions are accumulated until exceeding one pulse, whereupon the printing head 8 is energized at intervals of 6 pulses. Thus, as shown in Fig. 6, where 80 characters of A are to be printed within the width of 7 inches, printing is performed while the head energizing pulse interval dp varies like 5, 5, 5, 6, 5, 5, 5, 6 .... A look at Fig. 6 shows that there are 5- and 6-pulse portions as dot intervals. But since this is only one pulse expansion of interval at every plural dots, the character image is not unnatural even in comparison with the pica of Fig. 4 and elite of Fig. 5. Thus, even when the head energizing pulse interval involves fractions in decimal places, the fractions are accumulated and printing can be made at a head energizing pulse interval with one pulse added after printing of plural dots. As to the type of the printing head 8, either of a wire dot head and a thermal head may be used. According to the present invention constructed as above, the printing head is driven at a predetermined head energizing pulse interval during movement of the carrier which carries the printing head, whereby printing is effected. Where the head energizing pulse interval involves a decimal fraction, the printing head can be driven at a pulse interval of an integer part after subtraction of the fraction or at an integer pulse interval with one pulse added after accumulation of the fraction, whereby the printing form can be given diversity and the form setting operation can be simplified to a great extent.

Claims: In a dot printer for printing characters, etc. using a dot matrix by driving a printing head at a predetermined head energizing pulse interval during movement of a carrier which carries the printing head, a character width setting method characterized in that when said head energizing pulse interval involves a decimal fraction, the fraction is accumulated at every printing, and when the cumulative value of the fraction is smaller than one pulse, the printing head is driven at a pulse interval of an integer part after subtraction of the fraction, and when the cumulative value of the fraction has reached one pulse, one pulse is added to said head energizing pulse interval, and the printing head is driven at a pulse interval of an integer part obtained by subtracting the decimal fraction from the one pulse-added head energizing pulse interval, followed by repetition of these operations. A character width setting apparatus in a printer, comprising: a CPU connected to various components to control their operations and calculations; a character generator; a carrier which is driven by a carrier motor connected to a carrier motor driving circuit; a printing head mounted on said carrier; paper which is fed by a paper feed motor connected to a paper feed motor driving circuit; a head energizing pulse interval storage means for storing a head energizing pulse interval including a decimal fraction; a decimal storage means for storing the decimal value of the head energizing pulse interval; and an integer storate means for storing an integer value of the head energizing pulse interval. A character width setting apparatus in a printer according to Claim 2, including an RAM provided with a step counter, said RAM having a region of a DP memory for storing the head energizing pulse interval including the decimal fraction and a region of a dp memory for storing the decimal value in that head energizing pulse interval.

Inventors: ODA, AKIRA
Applicants: TOKYO ELECTRIC CO., LTD.
Application year: 1989
Main classification: B41J19
IPC codes: B41J19, B41J2