DIVISIONAL PRINTING OF HIGH-DENSITY DOT PATTERNS

Abstract: In a dot printer of the present invention, which is capable of printing a high quality, high-density pattern, input pattern data to be printed is stored in an image buffer RAM (22). A control determination unit (10) checks whether or not the pattern data stored in the image buffer RAM (22) is high-density data by referring to a determination data unit (17) prior to printing, and determines the required number of times of divisional printing in accordance with the checked result. A printer (23) prints the pattern data stored in the image buffer RAM (22) on the basis of the deci­ sion of the control determination unit (10).

Description: The present invention relates to a method of confirming that a pattern to be printed is a high-density pattern and divisionally printing the pattern, and a dot printer which can print a series of high-quality, high-density patterns in accordance therewith. As computers develop, printers have been widely used as one of the terminal devices in computer systems. As the application of printers increases, printer power sources have been reduced in size and weight, with subsequent decreases in costs. When a high-density pattern such as an all dot (100% duty) pattern is to be printed by a conventional printer (e.g., a 24-pin serial impact dot printer), all the pins are driven at all printing positions in accordance with the pattern. When such high-density patterns are sequentially printed, power consumption increases, resulting in decrease in the power source voltage. When pin drive voltages are decreased, changes in printing density tends to occur in the printed characters, thereby degrading printing quality. In order to prevent this, serial printing of high-density patterns is generally limited. In order to solve the problem of this limitation, power source capacity of the printer is increased, or the decrease in the power source voltage is detected and printing is temporarily stopped. However, in the former case, the printer itself tends to be large in size, resulting in high costs. In the latter case, printer operation is temporarily stopped after detecting the decrease in the power source voltage, or the printer is temporarily switched to divisional printing. At a result, high-duty dot printing is again enabled, without increasing the power source capacity. However, in this latter case, a detector for detecting the decrease in power source voltage is required, resulting in complicated structure and leading to increased costs. In addition, since printing is temporarily stopped or divisional printing is performed after the decrease in the power source voltage occurs, printing quality immediately before the voltage decrease is degraded. Prior art document US-A-4 116 567 discloses a printer synchronization control system in which a shuttle provided with a plurality of print elements traverses a paper in reverse and forward directions at non-uniform velocities. A control circuit actuates the plurality of print elements simultaneously to cause plural characters to be printed out on the paper at the same time. For example, each line of the paper may be able to accommodate 132 characters, wherein each character defines a 5 x 7 dot matrix. There may be 22 print elements which are employed to print all of the characters. Actuating of all 22 print elements simultaneously presents a considerable current drain on the system power supply. In order to limit this peak current drain, it is proposed to actuate the print elements in time-staggered fashion so that less than all of the print elements are actuated simultaneously. To this end, the print elements may be divided into any number of different sets, and it is assumed that the print elements are divided into two sets, wherein the first set comprises the first, third and other odd numbered print elements whereas the second set comprises the second, fourth and other even numbered elements. Further, prior art document US-A-4 278 359 describes a control circuit for use with a dot matrix printer which is able to vary its print density. This control circuit includes a command word gate which is connected to a data source to receive data signals. The command word gate generates a signal for enabling the control circuit in response to reception of a predetermined coded command word signal from the data source. Further, a density latch gate is connected to the data source to receive density code signals and to the command word gate and generates a density code output signal in response to reception of the command word signal and density code signals received from the data source. A printer signal generating circuit is connected to the density latch gate and produces an output signal having a frequency proportional to the density code signal. This density code signal is applied to a dot matrix printer to vary the ratio of the lateral velocity of the printing head of the printer and the printing frequency of the printing hammers thereof to thereby selectively alter the horizontal dimension of alphanumeric characters produced by the printer. It is an object of the present invention to provide a method of confirming that a pattern to be printed is a high-density pattern, and to provide a dot printer capable of printing a high quality, high-density pattern. In order to achieve the above objects, the present invention provides a dot printer and a method as specified in claims 1 and 7, respectively. It is determined whether or not a printing pattern is a high-density pattern, i.e., a high-duty pattern, in accordance with the ratio of the number of ON dots in the printing pattern data. If the printing pattern is determined to be a high-duty pattern, divisional printing is performed in accordance with predetermined divisions. Therefore, a detector for detecting the power source decrease need not be provided, unlike a conventional printer, and the determination is made in accordance with the ratio of the number of dots in the printing pattern. Thus, flexible detection can be performed to meet the limitations of the printer mechanism, e.g., power source capacity. Furthermore, according to the present invention, a high-duty pattern can be detected before the start of printing. As a result, variation in printing quality within a line is prevented. This invention can be more fully understood from the following detailed description when taken in conjunction with the accompanying drawings, in which: Fig. 1 is a block diagram showing a configuration of a dot printer according to an embodiment of the present invention; Fig. 2A shows printing pattern data which has a line consisting of 136 pica characters stored in an image buffer RAM of the embodiment shown in Fig. 1, and Fig. 2B shows in detail a memory state of printing pattern data for one character; Fig. 3 shows a content of a dot number table ROM of the embodiment shown in Fig. 1; Fig. 4 shows a content of a weighted conversion table ROM of the embodiment shown in Fig. 1; Fig. 5 is a flow chart showing an operation of detecting and printing high-density pattern data in the embodiment shown in Fig. 1; Fig. 6 is a flow chart showing an operation of calculating the number of dots in one character in the flow chart of Fig. 5; Fig. 7 is a flow chart showing an operation of calculating the weight from the number of dots in one line in the flow chart of Fig. 5; Fig. 8A is an example of a flow chart showing an operation for deciding the number of divisions in accordance with the weight and for printing in the flow chart of Fig. 5, and Fig. 8B is another example of such a flow chart; and Fig. 9 shows processing of reception data in the embodiment shown in Fig. 1. A dot printer according to an embodiment of the present invention will be described with reference to the accompanying drawings. The arrangement of an embodiment of the present invention will first be described with reference to Fig. 1. In general, the dot printer of the present invention has interface 18 for receiving data from an external unit, e.g., host computer 20, pattern generator 21 for generating printing pattern data from a character code received by interface 18 to correspond to the character, image buffer section 27 for temporarily storing the pattern data generated by generator 21, printer section 23 for printing the pattern data, and a control unit (10, 17) for controlling interface 18, pattern generator 21, buffer section 27 and printer section 23, and determining whether or not the pattern data stored in buffer section 27 is high-density pattern data. If the pattern data is determined to be a high-density pattern, the control unit (10, 17) decides the number of divisions for a character to be printed. More specifically, buffer section 27 consists of image buffer RAM (to be referred to as IB RAM hereinafter) 22 for storing the pattern data and indicator 26 for producing a signal indicating whether or not IB RAM 22 is empty. The control unit (10, 17) consists of determination data section 17 having various tables to determine whether or not the pattern data to be printed is a high-density pattern, and control determination section 10 for performing determination of the number of divisions using data from section 17. Unit 17 comprises dot number table ROM (to be referred to as DNT ROM hereinafter) 15, having a table for calculating the number of ON dots in printing pattern data, weighted conversion table ROM (to be referred to as WCT ROM hereinafter) 16, having a table for calculating the weight from the number of ON dots in one character; and division table ROM (to be referred to as DT ROM hereinafter) 14, provided as needed and having data of the number of divisions for printing. Control determination section 10 consists of CPU 11, ROM 12 storing a control program, and RAM 13 for storing data required for printing. Printer section 23 consists of controller driver 24 and print mechanism 25. Operation of this embodiment will be described in detail with reference to Figs. 2 to 9. A data receiving operation will first be summarized. Printing pattern data transmitted from host computer 20 is received by interface 18, based on control by section 10, is supplied to generator 21 and converted to pattern data. Converted pattern data is stored in IB RAM 22. Assume that a 24-dot printer is adopted in this embodiment, one pica character is constituted by 24 × 18 dots, and one line consists of 136 characters. Pattern data for one line, which is converted as described above, is stored in IB RAM 22 as shown in Fig. 2A. The first character storing state is shown in detail in Fig. 2B, but is not limited to this. In this embodiment, one pica character is divided into 54-byte data, each consisting of eight dots, which are stored in accordance with the data number order shown in Fig. 2B. the 54-byte data constitutes one unit block. An operation for determining whether the pattern data stored in IB RAM 22 is a high-duty pattern and printing will be described. As shown in the flow chart of Fig. 5, CPU 11 determines in step S1 whether or not pattern data to be printed exists in a pattern data storage area of RAM 22. When empty, the operation ends. When data exists, the flow advances to step S2 to initialize various conditions. For example, variable K indicating an address of byte data read out from IB RAM 22, step S of variable K, variable X used for the addition of the number of dots, variable CH indicating the number of characters read out, step T of variable CH, variable Y used for weighted addition, and variable Ymax indicating a maximum weight are initialized. In step S3, the ratio of the number of ON dots in one block is calculated. In step S4, the weight is calculated from the result of step S3 using a conversion table, and the calculated weight of one line is added. The required number of times of divisional printing is decided in step S5, and printing of the pattern data in accordance with that number is performed. In this manner, a high quality, high-density pattern can be printed. Step S3 will be described in detail with reference to Fig. 6. Note that variable K is 1. In step S11, one-byte data in IB RAM 22 is addressed, with variable K as its address, and is fetched by CPU 11. In other words, the first data of the data block shown in Fig. 2B is fetched. CPU 11 accesses, in step S12, DNT ROM 15 with this data as part of its address. As a result, Nd, the number of dots of the data fetched by CPU 11, is calculated in step S13. The number of calculated dots corresponds to the number (out of 24) of pins of the printer head which will be used in printing. DNT ROM 15 has a dot number table, as shown in Fig. 3. When the one-byte pattern data fetched by CPU 11 is hexadecimal, e.g., [FE], CPU 11 accesses DNT ROM 15 at an address [XXFE] to obtain data (7) representing the number of ON dots. In this example, hexadecimal [FE] is binary [1111 1110], and the number of dots as data 1 of one character block is 7. The same operation is performed for the other addresses of Fig. 3. [XX] is a predetermined hexadecimal number. In step S14, CPU 11 adds the obtained value to variable X. When weight calculation of one line was started, variable X was initialized in step S2. Therefore, variable X is now 7. It is discriminated in step S15 whether addition for one block, e.g., one character has been completed. If NO, step S16 is executed. S (1 in this example) is added to variable K (1) to increment it to 2. Subsequently, step S11 is executed to read out the second data of the data block shown in Fig. 2B. If the second data is hexadecimal [03], steps S12 and S13 are performed in the same manner as described above to obtain 2 as the number of dots. 2 is added to variable X in step S14 to increment it to 9 (= 7 + 2). Step S15 is then executed to determine whether or not calculation for one block has been completed, i.e., if K is 54. Since NO, variable K is incremented by one and steps S11 to S15 are repeated. When calculation for one block is completed (YES in step S15), step S17 is executed to calculate the ratio of the number of dots to be used. If variable X is 288, value W for the ratio is 66 (%) (= 100 × X/(24 × 18)). Step S3 thus ends. The step S4 subroutine is then executed and its operation will be described in detail with reference to Fig. 7. CPU 11 accesses WCT ROM 16 at address W (the ratio described above). WCT ROM 16 has a table as shown in Fig. 4. If value W of the ratio is 66%, CPU 11 obtains 4 as a weighting coefficient of the character in question (step S22). WCT ROM 16 can be directly accessed at its address W. However, it is more practical to code ratio W before access. In step S23, value W is added to variable Y. Since variable Y is initialized in step S2, it is now 4. In other words, when the ratio of number X of printing (ON) dots to the total number of dots is high (70 to 100%), 8 is selected as variable Y. Inversely, if the ratio of number X to the total number of dots is low, -4, e.g., is selected. Variable X is preset from a result of experiments. It is determined in step S24 whether or not calculation result Y in step S23 is smaller than 0. If YES, Y is set at 0 in step S25. If NO (Y > 0), Y is not changed. Step S5 is then executed and its operation will be described in detail with reference to Fig. 8A. It is determined in step S31 whether or not value Y obtained in step S4 is larger than a predetermined value, e.g., 25. If NO, step S33 is executed to determine whether or not determination for one line has been completed. In this embodiment, since 1 line has 136 characters, step S33 is executed to determine whether or not variable CH is 136. If NO, step S35 is executed to perform determination for the next character, and value T is added to variable CH. Value T is usually 1, but can take another value. As a result of step S35, variable CH is 2. After execution of step S35, step S3 is re-executed to examine the next character. If variable Y is higher than the predetermined value in step S31, CPU 11 determines that the printing pattern is a high-duty pattern and stops detection. In step S32, a preset number of divisional printings, e.g., 2 or 3 is determined. When determination for one line is completed (YES) in step S33, the number of printings is determined as 1. Printing is then executed in step S34 in accordance with the determined number of divisions. In this case, CPU 11 designates divisional printing to driver 24 in accordance with the determined printing number. Driver 24 then controls print mechanism 25 to perform divisional printing. Mechanism 25 dot-prints the high-density printing pattern data stored in IB RAM 22 in accordance with the number of divisional printings. In this manner, CPU 11 determines whether or not the printing pattern is a high-density pattern, i.e., a high-duty pattern. If the printing pattern data is determined to be a high-duty pattern, divisional printing is performed in accordance with the predetermined divisions. Step S1 is then executed again for the next line. When Y exceeds the predetermined value in step S31, detection is immediately stopped and printing is performed. However, detection can be performed for an entire line and printing can be performed thereafter. This case will be described with reference to Fig. 8B. When weighting variable Y is calculated in step S4, it is determined in step S61 whether or not Y exceeds maximum Ymax detected before. If Ymax ≦ Y in step S61, step S62 is executed to set Y as Ymax. If NO, Ymax is not changed. In step S63 it is determined whether or not detection for one line has been completed. If NO in step S63, processing similar to step S35 is performed in step S64. If YES, the number of divisions is decided in step S65, in accordance with maximum Ymax of the weighting variables detected in that line. Printing is then performed in step S66 in accordance with the decided number of divisions in a manner similar to that in step S34. In the above description, the pattern data is a character pattern, and detection is performed for all the byte data of the pattern data. However, the above processing can be altered according to the type of received printing data. This will be described with reference to Fig. 9. Data is transmitted in step S41 from, e.g., host computer 20 and received by interface 18. In this case, it is determined whether or not the data is to be printed and whether the input command concerns the method of the present invention. More particularly, it is determined in step S42 whether the received data is printing data. If NO in step S42, step S43 is executed. In step S43, it is determined whether or not the input command is a one concerning the method of the present invention. If YES in step S43, step S44 is executed, and if NO, step S45 is executed. If data to be transmitted is graphic data, it is signalled, for example, by an escape sequence before data transmission. When data transmission is completed, it is signalled. When data to be transmitted is character code data, it can be transmitted without signalling. Therefore, in step S44, if data to be transmitted next is graphic data, a DFC flag is set to 1. The DFC flag is set to 0 after data transmission. If the received data is character data, it is determined as such in step S42, and step S47 is then executed. In step S47 the DFC flag is checked. If the DFC flag is 1, the received data is graphic data and the byte date supplied from interface 18 is directly written in IB RAM 22. If the DFC flag is 0, the input data is character code data. The character code data is supplied to pattern generator 21 by CPU 11 to generate pattern data. This pattern data is then stored in IB RAM 22. Thereafter, the above-mentioned determination is performed. In this case, the weighting coefficient of the character pattern data is limited. Therefore, the value S of step S16 in Fig. 6 can take a value other than 1, e.g., 4. Calculation speed can be increased in this manner. However, if the data is graphic data, the location therein of a block having a high weighting coefficient cannot be estimated. In this case, above mentioned value S is set to 1, and printing is performed.

Claims: A dot printer for printing a high quality high-density pattern, comprising: memory means for storing input pattern data to be printed; control means for determining whether or not divisional printing is to be performed based on ON dots density of the pattern data stored in said memory means corresponding to a line to be printed, outputting a instruction corresponding to the determination; and printing means for printing the pattern data in said memory means in response to the instruction, characterized in that said control means comprises: table means (17) for storing conversion data required for determining whether or not divisional printing is to be performed; and control determination means (10) for reading out the pattern data corresponding to the line to be printed stored in said memory means, calculating the ratio of the number of ON dots referring to said table means, calculating a weight from said table means based on the calculated ratio, the weight being representative of the dot density of the pattern data to be printed determining based on said weight whether or not divisional printing is to be performed, and outputting the instruction corresponding to the divisional printing determination, said table means further comprises: a dot number table (15) for generating the number of "1"s in the data byte, said dot number table being accessed with the data byte; and a weighted conversion table (16) for generating the weight of the calculated ratio, the access of which being based on the calculated ratio; and said control determination means (10) further comprises a means (11, 12) for checking existence of pattern data to be printed in said memory means when pattern data of a new line is to be printed, and initializing condition parameters required for determining the number of divisional printing when the pattern data to be printed exists; a ratio means (11, 12) for calculating a ratio of the number of ON dots of one block consisting of a predetermined plurality of data bytes, each of them referring to said dot number table, said one block being a portion of said pattern data; a weight means (11, 12) for calculating the weight from said weighted conversion table based on the calculation result of said ratio means, and adding said weight to the previous calculated weight; a determination means (11, 12) for repeatedly operating said ratio means and said weight means for successive blocks of said pattern data to perform sequential addition until predetermined conditions are satisfied, and determining the required number of divisional printing based on the calculated weight when the predetermined conditions are satisfied; and a printing control means (11, 12) for generating the instruction corresponding to the result of said determination means. The dot printer according to claim 1, characterized in that said control determination means comprises: a first determination means (11, 12) for determining whether or not the weight calculated by said weight means is larger than a predetermined value; a means (11, 12) for determining the number of times of divisional printing when the weight is determined to be larger by said first determination means (11, 12); a second determination means (11, 12) for determining whether or not to check if one line is completed when the weight is determined to be smaller by said first determination means; and a means (11, 12) for causing said ratio means to operate when the check is determined to be uncompleted by said second determination means and setting the number of times of divisional printings to 1 when the check is determined to be completed. The dot printer according to claim 1, characterized in that said control determination means comprises: a first determination means (11, 12) for determining whether or not the weight calculated by said weight means is larger than a maximum calculated weight; a means (11, 12) for setting the weight to a new maximum weight when it is determined to be larger by said first determination means; a second determination means (11, 12) for determining whether or not the check for the one line is completed when the weight is determined to be smaller by said first determination means; a means (11, 12) for causing said ratio means to operate when the check is determined to be uncompleted by said second determination means; and a means (11, 17) for determining the number of times of divisional printing based on the maximum weight when the check is determined to be completed by said second determination means. The dot printer according to claim 1, characterized in that said control determination means (10) sequentially accesses all of the byte data of said block. The dot printer according to claim 1, characterized in that said control means further comprises a data discrimination means (11, 12, 13) for storing input data type information representing if data input from an external device comprises graphic data or character code data, and outputting said stored information as needed. The dot printer according to claim 5, characterized in that said ratio means comprises means (11, 12) for reading all of the byte data constituting the block when the pattern data stored in said memory means comprises a graphic data, and for reading the stored byte data as needed when the pattern data comprises character code data when the one byte data is read out from said memory means in response to an output from said data discriminating means (11, 12, 13). A method for printing a high quality high-density pattern with a dot printer comprising the steps of: determining whether or not divisional printing is to be performed based on a result of calculating a dot density of the pattern data corresponding to a line to be printed stored in a memory area; and executing printing in accordance with the result of determining divisional printing, characterized in that said divisional printing determination step comprises the steps of: checking the existence of pattern data to be printed in said memory area; initializing condition parameters required for divisional printing determination; calculating a ratio of the number of ON dots in each predetermined block, a predetermined block contains a plurality of data bytes and is a portion of said pattern data; calculating a weight from the result of said ratio calculating, and sequentially adding said weight to the previous calculated weight; repeatedly executing said ratio calculation and weight calculation for each successive block until predetermined conditions are satisfied; and determining the number of required divisional printing according to the sequentially added calculated weight when the predetermined conditions are satisfied, the sequentially added calculated weight being representative of the dot density of said pattern data to be printed wherein: said ratio calculation comprises: reading out one data byte from a memory area storing the pattern data; calculating the number of ON dots required for printing said data byte of a predetermined block of the read pattern data; sequentially adding the number of ON dots calculated for each data byte successively read from said memory area; checking whether or not addition is completed for the data bytes required for calculating the ratio of the number of ON dots in a block of the pattern data, and executing said reading out one data byte when not completed; and calculating the ratio of the number of ON dots when addition is determined to be completed, said number determination of required divisional printing comprises: checking whether or not the sequentially added calculated weight is larger than a predetermined value; determining the number of divisional printing when the sequentially added calculated weight is determined to be larger; and when the sequentially added calculated weight is determined to be smaller, checking if the determination of the pattern data is completed; and executing said ratio calculation of the next block when determined to be uncompleted and setting the number of times of divisional printing to 1 when completed; and wherein said method further comprises: storing information indicating data input from an external device comprises one of graphic data and character code data, and said reading out the data block comprises: reading out, in accordance with the stored information, all of the byte data constituting a block when the pattern data stored in a pattern data storing area comprises graphic data, and reading out the byte data as needed when the pattern data comprises character code data. The method according to claim 7, characterized in that said division number determination comprises: checking if the weight calculated in said weight adding step (S31) is larger than a maximum calculated weight; setting the weight to a new maximum weight when the weight is determined to be larger; checking if the one line is completed when the weight is determined to be smaller; executing said ratio calculation when the check is determined to be uncompleted; and determining the number of times of divisional printing based on the maximum weight when the check is determined to be completed.

Inventors: ISHIKAWA, TAKAO
Applicants: KABUSHIKI KAISHA TOSHIBA
Application year: 1986
Main classification: G06F3
IPC codes: B41J2, G06K15, G06F3