Output method and apparatus using the same

Abstract: According to an output method and an apparatus using the same, codes represented by respective control languages and representing instructions having higher frequencies of occurrence are stored, data represented by a control language for controlling an output is input, the input data is compared with the stored codes, and the control languages are switched.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to an output method and an apparatus using the same, wherein received data is determined to allow switching between control languages. Related Background Art An output apparatus such as a printer apparatus (e.g., an ink-jet or laser beam printer) generally has a control instruction group (to be referred to as a control language thereinafter) for controlling the output apparatus. The output apparatus can draw characters and figures on the basis of the control language. Since different control languages have different instruction codes for recognizing instructions in accordance with different types of printer apparatuses, a correct output character or figure cannot be obtained unless a control language suitable for a currently used printer apparatus is transmitted. For this reason, control languages used in other printer apparatuses are installed as emulation languages in addition to the language assigned to each printer apparatus, so that a plurality of control languages can be interpreted. In a printer apparatus installed with a plurality of control languages, a desired control language is manually switched on an operation panel or the like equipped in this printer apparatus. When an output apparatus for interpreting a plurality of these control languages is assumed, the output apparatus cannot automatically determine the control language of received data. Even if the output apparatus can automatically determine the control language of the received data, its accuracy cannot be evaluated. By the way, in a recent apparatus of this type, a detachable program storage medium is prepared in addition to an installed first control program, and a second control program having a different operation from that of the first control program is stored in the detachable program storage medium. Therefore, the first control program (i.e., the installed program) and the second control program can be selectively used. Most of the second control programs are so-called emulation programs for determining data of a command system different from that of the first control program and executing the program. When such a second control program is used, all existing application programs on the host side which could not have used the recording apparatus can use this recording apparatus by the second control program without modifying the existing application programs. For example, a new high-performance type command system of the first control program and a conventional command system having poor performance can be used. In the above conventional example, when recording and printing are to be performed on the basis of data suitable for the second command system supported by the second control program, a host computer sends a control program switching command to a recording apparatus in advance and then sends data of the second command system thereto. Assume that a storage medium which stores a third control program for supporting a third command system is attached against the will of an operator since the storage medium which stores the second control program is detachable. In this case, the command system supported by the control program stored in the detachable storage medium is inconsistent with the command system of print data sent from the host computer. As a result, a desired print cannot be obtained, resulting in inconvenience. It is known from PATENT ABSTRACTS OF JAPAN, vol. 014, no. 046 (M-0926), 26 January 1990 & JP 01 275173 A (NEC CORP), 2 November 1989 for an output apparatus to receive image data representing a report and to detect whether any erroneous condition exists in the format of the data. If detected, output is stopped and a next output command is awaited. Aspects of the present invention are set out in the appended claims. An embodiment provides an image recording apparatus capable of signalling a failure to a user when the apparatus cannot transit to a designated control command system, and provides an output method and an apparatus using the same, wherein a failure can be signalled to a user when a designating means designates command system switching to another command system and this designated command system is not installed in the apparatus. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a view showing a printer engine; Fig. 2 is a block diagram of a laser beam printer according to an embodiment of the present invention; Fig. 3 is a view showing a data storage format in a program cartridge of the printer shown in Fig. 2; Fig. 4 is a view showing a command format of a cartridge shift command in the printer shown in Fig. 2; Fig. 5 is a view showing a command format of a main body shift command in the printer shown in Fig. 2; Fig. 6 is a view showing a data structure of a main body shift command table in the printer shown in Fig. 2; Fig. 7 is a flow chart of a program stored in the main body of the apparatus; and Fig. 8 is a flow chart of a program stored in a program cartridge. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. Note that the present invention may be realized by a system comprising a plurality of equipments or a single equipment. In addition, the present invention is also realized by supplying programs to a system or apparatus. Fig.1 is a sectional view showing an internal structure of a laser beam printer (to be referred to as an LBP hereinafter) as an arrangement of an output apparatus according to an embodiment of the present invention. Note that the output apparatus is not limited to the laser beam printer but can be replaced with an LED printer, an ink-jet printer, or the like. A character pattern and a format (form data) can be registered from a data source (not shown) to the LBP. Referring to Fig. 1, an LBP main body (1-10 in Fig. 1) 1000 receives character information (character codes), form information, or a microinstruction from a host computer (1-1 in Fig. 8) connected to an external device. The LBP main body 1000 generates a character pattern and a form pattern corresponding to these pieces of input information and forms an image on a recording sheet serving as a recording medium. An operation panel 1012 has operation switches and LED indicators. A printer control unit 1001 performs overall control of the LBP main body 1000 and analyzes character information supplied from the host computer. The control unit 1001 mainly converts character information into a video signal representing a character pattern and outputs the video signal to a laser driver 1002. The laser driver 1002 is a circuit for driving a semiconductor laser 1003. The laser driver 1002 ON/OFF-controls a laser beam 1004 emitted from the semiconductor laser 1003 in accordance with the input video signal. The laser beam 1004 is swung by a rotary polygonal mirror 1005 to scan an electrostatic drum 1006, thereby forming an electrostatic latent image of a character pattern on the electrostatic drum 1006. This latent image is developed by a developing unit 1007 located around the electrostatic drum 1006 and is then transferred to the recording sheet. The recording sheet is a cut sheet. The cut sheets are stored in a sheet cassette 1008 attached to the LBP main body 1000. Each recording sheet is picked up and fed by a pickup roller 1009 and feed rollers 1010 and 1011 to the electrostatic drum 1006. An operation for signaling whether an output is possible when the current command system is to be switched to another command system will be described in detail. This embodiment will be described in detail with reference to accompanying drawings and exemplifies a laser beam printer as an image recording apparatus. Fig. 2 is a block diagram of a laser beam printer according to this embodiment. A laser beam printer 1000 is connected to a host computer 1-1 serving as a recording data source. The laser beam printer 1000 mainly comprises a print mechanism 109 and a print control unit 101 for receiving recording data from the host computer 1-1 and controlling the print mechanism 109. The print mechanism 109 receives an image signal to perform a series of laser beam printer operations such as supply of a recording sheet (recording medium), ON/OFF-control of a laser beam, transfer of an image to the sheet, and fixing of the transferred image. The print mechanism 109 is illustrated in Fig. 1 in detail. An arrangement of the print control unit 101 of the laser beam printer 1000 will be described below. The print control unit 101 includes a CPU 102, an input I/F 103, a ROM 104, a RAM 105, a display panel 106, an image signal generator 107, an output I/F 108, a cartridge I/F 110, and a cartridge connector 111. The CPU 102 controls the overall operation of the laser beam printer. The input I/F 103 receives data from the host computer 1000 through an input signal line S11 and signals data reception to the CPU 102. Various status data of the laser beam printer are output from the input I/F 103 through an output signal line S12. The ROM 104 stores a first program (i.e., a program (to be described later) shown in Fig. 7) for realizing recording processing of the first printer command system, and control information, character dot patterns, and the like used by the first program. The RAM 105 is used by the control program as a work area of the control program and an image memory area as a one-page bit map image data area. The display panel 106 is constituted by general 7-segment LEDs and is used to indicate various operating states under the control of the CPU 102. The image signal generator 107 converts the one-page bit map image data developed in the image memory area of the RAM 105 into an image signal. The image signal generator 107 outputs an image signal S22 to a print mechanism 109 in synchronism with a sync signal S21 from the print mechanism 109. The output I/F 108 performs input/output operations between the print control unit 101 and the print mechanism 109. The cartridge I/F 110 serves as an electrical interface between the program cartridge 112 and the control unit 100. The CPU 102 accesses the ROM in the program cartridge through the cartridge I/F 110 and senses the presence/absence of the program cartridge through the cartridge I/F 110. The program cartridge 112 is obtained by storing as a cartridge a ROM circuit board constituted by the ROM and its associated elements. The program cartridge 112 stores a second control program (i.e., a program for controlling the laser beam printer 1000 as in the first control program) having a printer command system (to be referred to as a second command system) different from that of the first control program stored in the ROM 104. A sequence of the second command system is shown as a flow chart in Fig. 8. This program cartridge 112 has a detachable structure through the cartridge connector 111 of the print control unit 101. The program cartridge 112 can be replaced with another program cartridge which stores a third control program. The first control program stored in the ROM 104 is referred to as program A, and the control program stored in the program cartridge 112 is referred to as program Bi (i = 1, 2,...). Fig. 3 is a view showing a ROM storage format 200 of program Bi stored in the program cartridge 112. Referring to Fig.3, the storage format 200 consists of a program ID area 201 for storing a program ID No. as a unique number in accordance with a type of control program stored in a 4-byte ROM area (addresses 0 to 3) from address 0, and a program area 202 for storing an object code of program Bi so that the program is started from address 4 of the ROM. Any program Bi can be stored in the program cartridge 12, and one program is shown in Fig. 8 (i.e., a program of this flow chart is defined as program Bj). Fig. 4 shows a command format of one of the printer commands applied to program A stored in the ROM 104 to designate shift from program A to program Bi stored in the program cartridge 112. This command format is of a so-called escape sequence command system and consists of a control ECC (1B H where H represents the hexadecimal notation) 301 representing the start of the command, a program ID No. 302 of program Bi to be shifted, and a command terminator "P" (also serving as a command ID name representing a shift command) 303. When switching is to be performed from program A to program Bi stored in the program cartridge 112, the above command is transmitted from the host computer and is analyzed by program A, so that control transits to program Bi stored in the program cartridge 112. The components 301 to 303 constitute a cartridge shift command 300. Fig. 5 shows a command format of one of the printer commands applied to program Bj as an example of program Bi stored in the program cartridge 112. This command designates a shift of control from program Bj to program A stored in the ROM 104. Note that since a shift to program A stored in the ROM 104 of the main body is performed, this command is called a main body shift command. This shift has the same function as a function of shifting program A to program Bi in Fig. 4. The command formats correspond to command systems stored in the program cartridges 112, respectively. In this embodiment, the command format is a text command format consisting of a character code train "@%" of an identifier for designating the start of the command and a command character string 402 following the character code train "GO TO NATIVE" for designating a shift to program A. When program Bj detects the main body shift command 400, its control transits to program A. Fig. 6 shows a data structure of a main body shift command table 500 prepared in the ROM 104. As described above, the plurality of program cartridges 112 are detachable from the laser beam printer. The main body shift command table 500 is used to cause the ROM 104 in the print control unit 100 to store the main body shift commands i of the command systems of programs Bi (i = 1, 2,...) stored in the respective program cartridges. This table consists of three elements, i.e., an ID No. area 501 for setting the program ID No. i of program Bi in each program cartridge, a command length area 502 for setting a length ℓi (the number of bytes) of the main body shift command, and a code area 503 for storing a code train of the main body shift command i . Sets each consisting of these three elements are prepared in number corresponding to the number of various program cartridges, thereby constituting the table 500. A set 504 consists of an ID No. area, a command length area, and a main body shift command of program Bj as one of programs Bi. Switching control operations of program A as the control program on the main body in the laser beam printer and program Bj as the control program on the program cartridge side will be described with reference to flow charts in Figs. 7 and 8, respectively. The operation of program A stored in the ROM 104 will be described first with reference to the flow chart in Fig. 7. When the power switch of the laser beam printer is turned on, initialization processing of the program is started in step S601, and the input I/F 103 is checked in step S602. The laser beam printer waits for input data from the host computer 1000. When data is received, the flow advances to step S603 to fetch input data from the input I/F, thereby executing data analysis. In this data analysis, the input data is determined whether to be a command or a character code. If the input data is consistent with the cartridge shift command 300 in Fig. 10, the flow is branched from step S604 and advances to step S608 to execute program switching processing. Otherwise, i.e., if the input data is determined to be a command or a character code, the flow advances to step S605 to select a corresponding character dot pattern from the ROM 104. The selected character dot pattern is. developed in an image memory area in the RAM 105 to form an output page image. The flow then advances to step S606, and operations in steps S602 to S606 are repeated until one-page data analysis is completed. When one-page image formation is completed, the flow advances to step S607 to send information of the image memory area of the RAM 105 to the image signal generator 107. The image signal generator 107 causes the print mechanism 109 to print the information. The flow then returns to step S602, and processing of the next page is started. When the cartridge shift command 300 is detected in step S604, the flow advances to step S608 to determine whether a program cartridge is attached. If YES in step S608, it is checked in steps S609 whether the program ID No. 302 designated by the cartridge shift command 300 is consistent with the program ID No. set in the program ID area 201 in the program cartridge. If YES in step S609, since the designated program Bi (Bj in this case) is present, control jumps to the start of the program area 202 in the program cartridge, and control transits to program Bj (i.e., step S701 to be described later) (step S610). When the program cartridge is determined in step S608 not to be attached to the laser beam printer, or when the program ID Nos. are inconsistent with each other in step S609, this indicates that program.Bi designated by the host computer is not present. Processing advances to step S611 and subsequent steps. An alarm mark as an error display is displayed on the display panel 106 in step S611 to indicate a message representing the absence of the designated program Bj (an error code may be displayed). In step S612, a dot pattern of each character constituting the error message is read out from the ROM 104, and the readout data is developed in the image memory area. The developed data is sent to the image signal generator 107, thereby printing a one-page error message. The host computer 1-1 sends a data group corresponding to program Bj after it sends the cartridge shift command. In step S613, a code train of the main shift command corresponding to the program ID No. 302 of the cartridge shift command 300 detected in step S602 is extracted from the code 503. In this embodiment, the table element 504 corresponding to program Bj is selected, and a code train "@% GOTONATIVE" of the main body shift command is selected. The laser beam printer waits for data from the host computer 1-1 in step S614 as in step S602. The received data are neglected until the received data is determined in step S615 as the previously extracted main body shift command. When the code train of the corresponding main body shift command is detected, the host computer 1-1 sends data based on the command system corresponding to program A. Therefore, the alarm mark and the message on the display panel 106 are deleted in step S616, and the flow returns to step S602. The processing contents of program Bj in the program cartridge 112 will be described with reference to the flow chart in Fig. 14. This processing is started upon reception of the cartridge shift command 300 during execution of program A in the ROM 104, as described with reference to Fig. 7. Initialization processing as program Bj is executed in step S701. The current state of the print control unit 100 by program A is reset. In step S702, the laser beam printer waits for data from the host computer 1-1. When data is received, the received data is analyzed in step S703. A command is discriminated from a character code in data analysis according to the command system supported by program Bj. If the input data is consistent with the main body shift command 400, the flow is branched from step S704, and control transits to program A (i.e., step S601) in the ROM 104 (step S708). When a command or character code for program Bj is detected, the flow advances to step S705, and a corresponding character pattern or the like is developed in the image memory area in the RAM 104. The operations in steps S702 to S706 are repeated until a one-page image is prepared in step S706. When the one-page image is completed, the flow advances to step S707, and the completed image information is sent to the image signal generator 107. The one-page image is printed. The flow then returns to step S702, and processing of the next page is continued. As described above, according to this embodiment, when the designated second control program is not present, an alarm mark or message can be displayed on the display panel because the absence of the designated second control program is signaled to the user. Since an error message representing the absence of the designated control program is output, the presence of a recording sheet on which the error message is printed indicates that nonprinted subsequent data are present. Therefore, if the laser beam printer has a timer backed up by a battery and current time is printed together with an error message, the user can know the subsequent nonprinted data set from the time when the error message is displayed, regardless of the length of time elapsed. In this embodiment, as an alarming means given when the control program of the program ID No. designated by the cartridge shift command is absent, the alarm mark and the message are displayed on the display panel, and the error message is printed. However, the present invention is not limited to this. For example, the presence/absence of the designated control program may be informed to the host computer through the output signal line S12. In this case, the host computer transmits the cartridge shift command and waits for a response signal from the printer. The host computer then transmits print data corresponding to the desired control program. If the designated control program is not present, transmission of the print data can be interrupted. Therefore, the printer need not neglect the received data, and wasteful data transmission can be prevented. This embodiment exemplifies the laser beam printer. However, the present invention is equally applicable to an ink-jet printer for causing a change in volume of an ink by heat energy and injecting an ink from an orifice. In the above embodiment, only one program cartridge is attached to the cartridge connector 111. However, if a plurality of connectors are used, the present invention is applicable to a plurality of command systems. At this time, in order to allow to switch the command system from each program cartridge to the command system of another program cartridge, tables having the number corresponding to combinations of the command systems are prepared in addition to the command table for switching the program from each program Bi to program A. For example, in step S613 of Fig. 7, character trains of commands which allow shift from the designated program Bj are extracted. It is determined in step S615 whether the input data is consistent with one of the character trains. If any command which is consistent with the input data, the corresponding command system is set. As has been described in detail, according to the above embodiment, when the output apparatus cannot be set in the designated control command system, the user can easily know this trouble. At this time, a message representing the absence of the designated control command system is printed and recorded. At the same time, if the output apparatus keeps neglecting all received data until a command representing that the designated command system can be set, unnecessary printing and recording need not be performed. At the same, nonprinted data can be known.

Claims: An output apparatus (1000) for executing an output operation using any one of a plurality of control programs each being operable to interpret the control codes of a given control language, the apparatus comprising: input means (103) operable to receive control code; selection means (102) operable to select from the plurality of control programs (A,B i ) one control program for analyzing the received control code; and analysis means (102) operable to execute (S603, S703) the selected control program to analyze the received control code, characterized by control means (102) operable to skip over (S615) the control code received by the input means until a prescribed command (503) is received in the event that the selected control program for analyzing the received control code is not present in said apparatus, and to activate the analysis means in the event that the selected control program is present in said apparatus. Apparatus as claimed in claim 1, wherein each of the control programs is written in a page description language. Apparatus as claimed in any preceding claim, wherein the prescribed command indicates a shift from the selected control program to one of the plurality of control programs which is different from the selected control program. Apparatus as claimed in any preceding claim, wherein after the prescribed command is received, said control means is operable to execute one of the plurality of control programs indicated by the received prescribed command to interpret the control code received by said input means. Apparatus as claimed in any preceding claim, further comprising print means operable to print the bit image generated by interpreting the control code received by said input means. A method of operating an output apparatus (1000) in which an output operation can be executed using any one of a plurality of control programs each being operable to interpret the control codes of a given control language, said method comprising: a receiving step (S602) of receiving a control code; a selecting step (S610) of selecting from said plurality of control programs one control program for analyzing the received control code; and an analysis step (S603,S703) of executing the selected control program to analyze the received control code; characterised by further comprising: a control step (S615) of skipping over the control code received by said receiving step until a prescribed command (503) is received in the event that the selected control program for analyzing the received control code is not present in the apparatus, and of activating the analysis step to execute the selected control program in the event that the selected control program is present in the apparatus. A method as claimed in claim 6, wherein each of the control programs is written in a page description language. A method as claimed in any of claims 6 and 7, wherein the prescribed command indicates a shift from the selected control program to another one of the plurality of control programs which is different from the selected control program. A method as claimed in any of claims 6 to 8, wherein after the prescribed command is received, said control step executes one of the plurality of control programs indicated by the received prescribed command to interpret a control code received by said receiving step. A method as claimed in any of claims 6 to 9, further comprising a print step (707) for printing a bit image generated by analysing the control code received by said receiving step. A computer program comprising program code for instructing a processor to control an output apparatus (1000) to carry out all of the steps of a method as claimed in any of claims 6 to 10.

Inventors: OKADA KUNIO, SUGAYA AKIO, OKADA, KUNIO, SUGAYA, AKIO
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1992
Main classification: G06F3
IPC codes: G06K15