Abstract:
A printing apparatus and a printing processing method are provided in which content of print information is discriminated. A variable is initialized if the result of discrimination indicates the start of a printing job, and the variable is counted up of the result of discrimination indicates start of the next page. In a case where trouble such as jamming occurs during processing of this print information, at which page from the start of printing this trouble occurred is calculated from the variable, and the page number obtained is outputted upon being incorporated in information indicative of the fact that trouble has occurred. As a result, it is possible to output information indicating at which page, from the start of a printing job, trouble such as jamming occurred.

Description:
This application is a continuation of application Ser. No. 08/206,837 filed Mar. 7, 1994, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to a printing apparatus and a printing processing method. More particularly, the invention relates to a printing apparatus and printing processing method for outputting trouble-related information, such as information indicative of paper jamming, by way of example. 
     2. Description of the Related Art 
     When an apparatus such as a printer develops trouble such as paper jamming, a technique is available according to which information indicating how many pages prior to the page currently being processed the problem occurred is sent back to the computer that issued the print instruction. However, the problem described below arises with this technique. 
     Specifically, the information sent back by the printer may indicate &#34;jamming occurred X pages prior to page now being processed&#34;; it does not indicate the number of the page from the start of the printing job at which the trouble occurred. Accordingly, the computer that has received this information must calculate, on the basis thereof, the number of the page at which the trouble occurred. The calculation is especially complicated if printing is performed on both sides of a page. 
     SUMMARY OF THE INVENTION 
     The present invention seeks to provide a printing apparatus and a printing processing method that solve the aforementioned problem, and an object thereof is to make it unnecessary for a computer or the like, which has issued the print instruction, to calculate the number of the page at which trouble occurred. 
     In order to attain the foregoing object, a preferred embodiment of the present invention discloses a printing apparatus and a printing processing method in which, when trouble occurs during execution of printing processing, information representing the page at which the trouble occurred is outputted in the form of the page number from the start of print processing. 
     Further, there are disclosed a printing apparatus and a printing processing method in which, when trouble occurs during execution of printing processing, trouble-occurrence information, which includes information representing the page at which the trouble occurred in the form of the page number from the start of printing processing, is outputted. 
     Further, there are disclosed a printing apparatus and a printing processing method in which count information is initialized or counted up in dependence upon the result of discriminating the content of print information, and trouble-occurrence information based upon the value of the count information is outputted if occurrence of trouble during processing of the print information is sensed. 
     Another object of the invention is to make it unnecessary for a computer that has issued a print instruction to perform complicated calculation of the page at which the trouble occurred, even in double-sided printing. 
     In order to attain the foregoing object, a preferred embodiment of the present invention discloses a printing apparatus and a printing processing method in which count information is initialized or counted up in dependence upon the result of discriminating the content of print information and, if occurrence of trouble during processing of the print information is sensed, information representing the page at which the trouble occurred, which has been calculated from the count information based upon whether the page at which the trouble occurred is an odd-numbered page or an even-numbered page, is outputted upon being included in trouble-occurrence information. 
     In accordance with the present invention, as described above, there can be provided a printing apparatus and a printing processing method in which formation indicating at what page from the start of a printing job a trouble such as jamming occurred is sent back to the computer that issued the print instruction. As a result, the computer that has received this trouble-occurrence information is capable of rapidly ascertaining at which page the trouble occurred. 
    
    
     Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof. 
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram illustrating the construction of a printer according to a first embodiment of the present invention; 
     FIG. 2 is a flowchart illustrating a page counting procedure according to the first embodiment; 
     FIG. 3 is a flowchart illustrating a procedure according to the first embodiment for a case where trouble has occurred; 
     FIG. 4 is a flowchart illustrating a procedure for outputting the value of a variable whenever print information signifying &#34;start of next page&#34; enters according to the first embodiment; and 
     FIG. 5 is a flowchart illustrating a procedure for outputting counter information according to a second embodiment of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     A printer embodying the present invention will now be described in detail with reference to the accompanying drawings. 
     In the embodiments set forth below, an example is described in which the present invention is applied to a page printer such as a laser-beam printer. However, this does not impose a limitation upon the invention, which can be applied also to an ink-jet printer, a copier having an interface with external equipment, etc. 
     FIG. 1 is a block diagram showing the construction of a printer according to a first embodiment of the invention. 
     As shown in FIG. 1, a printer 7 according to this embodiment is a page printer such as a laser-beam printer and includes a printing section 6 and an image processor/controller 8 comprising a CPU 3, a RAM 4, a ROM 5 and a page memory 10. 
     The CPU 3 in the image processor/controller 8 executes image processing of input print information in accordance with a program stored in the ROM 5, etc. Further, the CPU 3 receives signals from sensors (not shown) at various points in the printing section via an I/O unit (not shown), senses the operating state of the printing section 6 and controls the entirety of the printer 7, inclusive of the printing section 6, via a CPU bus 9 and signal lines, which are not shown. Accordingly, using as a reference the page of print information that it is currently processing, the CPU 3 ascertains where in the printing section 6 (e.g., the image forming unit, the fixing unit, the paper discharge unit, etc.) a sheet of recording paper on which an image of several pages previous has been recorded is located. It should be noted that the sensors include devices for sensing jamming, unprinted sheets, printing density, etc. 
     The RAM 4 functions as a working memory of the CPU 3 and temporarily stores print information such as character patterns. 
     The page memory 10 has enough capacity to store one page of image information of size A4, by way of example. 
     A control panel 11 is equipped with an LCD panel, indicators and the like for displaying information from the CPU 3, as well as a keyboard or touch panel manipulated by the user in order to enter commands. In accordance with commands entered from the control panel 11, the CPU 3 sets the operating conditions of the printer 7 and causes the operating conditions of the printer 7 and the operating state thereof, etc., to be displayed on the control panel 11. 
     It should be noted that the CPU 3, RAM 4, ROM 5, page memory 10 and control panel 11 are interconnected by the CPU bus 9. 
     Further, numeral 1 denotes an external device such as a host computer which, via a cable 2 forming a LAN or the like, sends the printer 7 print information inclusive of image information and control codes and the like for subjecting the image information to image processing or for outputting the same. The print information may be expressed in the form of page description language (hereinafter referred to as &#34;PDL&#34;). 
     The CPU 3 analyzes the entered print information and develops the information in the page memory 10. The image that has been developed in the page memory 10 is sent to the printing section 6, where the image is recorded on recording paper or the like. 
     FIG. 2 is a flowchart illustrating a page counting procedure according to this embodiment. This procedure is incorporated in a well-known print processing procedure stored in the ROM 5 and is executed by the CPU 3 whenever print information enters. 
     As shown in FIG. 2, the processing executed by the CPU 3 branches at step S1 in dependence upon the entered print information. More specifically, if this information signifies &#34;start of printing job&#34;, a variable PC is initialized to &#34;1&#34;, for example, at step S2, after which processing is terminated. It should be noted that &#34;start of printing job&#34; is discriminated when a printing-job start instruction defined by PDL is entered, or when print information is entered anew in a case where the print information does not possess a printing-job start instruction. 
     In a case where the information signifies &#34;start of next page&#34;, the variable PC is incremented at step S3, after which processing is terminated. Print information discriminated as indicating &#34;start of next page&#34; may be a page-eject instruction. 
     If the information signifies neither &#34;start of printing job&#34; nor &#34;start of next page&#34;, then processing is terminated directly. 
     More specifically, the variable PC functions as a counter for counting the number of pages from &#34;start of printing job&#34;. By referring to the variable PC, it is possible to ascertain, by counting pages from the start of the printing job, the page number of the page currently undergoing processing. The variable PC is set in an internal register of the CPU 3 or in the RAM 4. 
     As mentioned earlier, there is a technique for outputting trouble-occurrence information, which is information indicating &#34;jamming occurred X pages prior to page now being processed&#34;, by way of example. In this embodiment, however, trouble-occurrence information indicating &#34;jamming occurred at (PC-x)th page&#34;, for example, is outputted based upon a value obtained by subtracting X from the variable PC. Since this information is sent to the host computer 1 via the cable 2, the host computer 1 can be notified of the trouble, such as jamming, in a format identical with that of the page information managed by the computer. 
     FIG. 3 is a flowchart illustrating a procedure in a case where jamming has occurred. This procedure is incorporated in a well-known print processing procedure stored in the ROM 5 and is executed by the CPU 3 at a prescribed printing period during execution of printing. 
     As shown in FIG. 3, the occurrence of trouble is discriminated at step S11. If trouble has occurred, trouble-occurrence information is outputted at step S12. If the trouble that has occurred is jamming, then the trouble-occurrence information &#34;jamming occurred at (PC-x)th page&#34; is outputted, as set forth above. If no trouble has occurred, then processing is terminated directly. 
     It should be noted that the procedure for the case in which trouble has occurred is not limited to that shown in FIG. 3. For example, the aforesaid trouble-occurrence information may be outputted by interrupt processing, for example, if trouble has occurred. 
     FIG. 4 is a flowchart illustrating a procedure for outputting the value of the variable PC whenever print information signifying &#34;start of next page&#34; enters. Steps identical with those in the flowchart of FIG. 2 are designated by like step numbers. 
     In accordance with the procedure shown in FIG. 4, the value of the variable PC is outputted at step S4 whenever print information signifying &#34;start of next page&#34; enters. As a result, the host computer 1 is capable of ascertaining which page of the transmitted print information is being processed. 
     Furthermore, the CPU 3 is capable of utilizing the variable PC to display, on the control panel 11, the number of the page currently being processed or the number of pages that have already been printed. 
     In accordance with this embodiment, as described above, the arrangement is such that if trouble such as jamming has occurred during print processing, information indicating at what page from the start of the printing job the jamming occurred can be sent back to the host computer that issued the command for this printing job, and the host computer is capable of obtaining trouble-occurrence information in a format identical with that of the page information management by the host computer. As a result, it is unnecessary for the host computer to newly calculate page information indicative of the page at which the trouble occurred. 
     A printer according to a second embodiment of the present invention will now be described. 
     In the first embodiment, an example was described in which printing is performed on only one side of a page. In the example of the second embodiment, however, printing is performed on both sides. If trouble such as jamming occurs at a certain page in double-sided printing, it is necessary to request re-transmission of print information corresponding to whichever page number came first, namely the number of the page at which the trouble occurred or the number of page on the opposite side. In the description that follows, it is assumed that an odd-numbered page is printed after an even-numbered page. However, it goes without saying that printing may be performed in the reverse of this order. 
     FIG. 5 is a flowchart illustrating a procedure for outputting counter information. This procedure is incorporated in a well-known print processing procedure stored in the ROM 5 and is executed by the CPU 3 when trouble such as jamming occurs. 
     As step S21 in FIG. 5, the CPU 3 discriminates the value obtained by subtracting X from the variable PC. If (PC-X) is an even number, i.e., if the page number is an even number, then the CPU 3 decides at step S22 that the page at which the trouble occurred is (PC-X-1). If (PC-X) is an odd number, i.e., if the page number is an odd number, then the CPU 3 decides at step S23 that the page at which the trouble occurred is (PC-X). After the decision regarding the page number, the trouble-occurrence information is outputted at step S24, whereupon processing is terminated. 
     In accordance with the second embodiment, as described above, effects similar to those of the first embodiment are obtained. In addition, if trouble occurs during doubled-sided printing, information indicating which page from the start of a printing job is the page requiring a request for re-transmission is sent back to the host computer that issued the instruction for the printing job. After recovery from the problem, therefore, problems such as missing pages and a reversal in the correct order of odd- and even-numbered pages on the front and back sides of the recording paper do not arise. 
     In a case where the trouble that has occurred is the absence of recording paper or a decline in printing density as caused by insufficient toner, trouble-occurrence information indicating &#34;recording paper ran out at (PC-X)th page&#34; and &#34;printing density declined at (PC-X)th page&#34;, respectively, can be outputted in each of the embodiments described above. Upon being notified of this trouble-occurrence information, the host computer 1 or the user can take such measures as causing another printer to print out the data from the (PC-X)th page onward. 
     Furthermore, the destination of this trouble-occurrence information is not limited to the host computer that issued the print instruction; it can be communicated to other computers as well. If this is done, the user (especially a network manager) of the computer that has received the trouble-occurrence information is capable of ascertaining the fact that the trouble occurred. Moreover, if the user of the host computer is not present, recovery from the trouble can be carried out by someone acting for the user. 
     Further, if total page number T of the printing job is appended to the print information from the host computer 1, the CPU 3 can subtract the value of the variable PC from the total page number T, thereby ascertaining after how many pages the present printing job will end. The remaining number of pages (T-PC) determined can be displayed on the control panel 11 or communicated to another computer via the cable 2. Accordingly, the other computer or the user thereof can ascertain the operating state of the printer. This means that when a new printing job is sent out, it is possible to decide, based upon whether the printer has finished the current job, whether it is better to send the new job to this printer or send it to another printer. 
     As many apparently widely different embodiments of the present invention can be made without departing from the spirit and scope thereof, it is to be understood that the invention is not limited to the specific embodiments thereof except as defined in the appended claims.