Printer and control method therefor

Abstract: A printer which receives image information from host computer 100 and performs printing based on the image information. When option unit 15 is newly attached to the printer, the printer changes the device ID which is selected from ID ROM 9 in accordance with the option unit 15. Then output from interface circuit 1 is changed so that the host computer 100 detects the change of the output from the interface circuit 1. The host computer 100 makes device-ID request to the printer to obtain the device ID corresponding to the optional device. Then the host computer 100 determines whether or not a printer driver which is currently operative corresponds to the printer with the newly-attached optional device.

Description: BACKGROUND OF THE INVENTION This invention relates to a printer which performs printing based on image information obtained from an information processing apparatus and a control method for the printer and, more particularly to a printer, to which an optional device can be attached, and a control method for the printer. Recently, a printer, which has a simplified construction and which performs various operations by control of software programs which run on a host computer, has been put into practical use as so-called host-base printer. In this system, various printer operations are controlled via a printer driver in the host computer, by bidirectional communication between the printer and the host computer. Upon starting print operation, the printer driver installed in the host computer determines whether or not it supports the printer connected to the host computer. In this system, to attach an optional device to the printer, it is necessary that the printer driver has capability to communicate with the optional device. For example, if an optional device of the printer is a postcard feeder, the capability of the printer driver must include the card feeder function. Accordingly, in a case where a new optional function not supported by the printer driver is employed, a revised printer driver is included in a package upon shipment. When the new optional function is installed, the previous printer driver is replaced by the revised printer driver. However, the above conventional technique has the following problem. Conventionally, the host computer uses one device ID to recognize the printer regardless of option-device setting (i.e., attached or not) status of the printer. More specifically, the host computer recognizes a printer having a newly-attached optional device with the same ID as that used to recognize the printer before the optional device is attached to the printer. Accordingly, the host computer cannot detect whether or not the optional device has been attached to the printer. If a printer, to which an optional function is attached, is connected to the host computer but the host computer system is not updated to include the new function, the printer might perform erroneous operation. Similarly, when a printer, to which no optional device is attached, is connected to the host computer but the host computer system has been updated to include the new function of the printer driver, the printer might perform erroneous operation. The present invention has been made in consideration of the above situation, and is concerned with solving the above problem and with providing a printing system in which a printer and an information processing apparatus are connected. United States Patent Specification No 5365311 discloses a laser printer which on the basis of data items received has a print control section which determines whether or not optional devices are connected to the printer. The claims are delimited against this document. United States Patent Specification No 4924320 discloses a printer with a post selector which can establish connection between the main and optional units in accordance with relevant identity information. Japanese Patent Abstract Publication No 02116577 discloses a printer system in which the characteristics of the paper feed system can be optimized to a particular type of paper by reading a bar code attached to the case holding the paper. United States Patent Specification No 5124809 discloses an image forming system which includes a processor, a print engine and optional units. The processor can request the print engine to indicate if it can co-operate with the optional units. According to the present invention there is provided a printer as set out in claim 1, and a printing method as set out in claim 6. 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 name or similar parts throughout the figures thereof. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention. Fig. 1 is a block diagram showing the construction of a printer according to a first embodiment of the present invention; Fig. 2 is a block diagram showing the general construction of an ID ROM 9 in Fig. 1; Fig. 3A is a perspective view showing an option unit of the first embodiment; Fig. 3B is a perspective view explaining attachment of the option unit to the printer of the first embodiment; Fig. 4 is a flowchart showing device-ID selection by the printer of the first embodiment; Fig. 5 is a flowchart showing printer-driver selection based on a device ID of the printer and print control by a host computer 100 of the first embodiment; Fig. 6 is a block diagram showing the construction of the printer according to a second embodiment of the present invention; Fig. 7 is a block diagram showing the detailed construction of an ID-ROM controller 31 in Fig. 6; Fig. 8A is a perspective view showing an option unit of the second embodiment; Fig. 8B is a schematic view showing a connection between an electrical contact point 153 and an ID ROM 34 in the option unit 33 of Fig. 8A; Fig. 8c is a perspective view explaining attachment of the option unit to the printer of the second embodiment; Fig. 9 is a flowchart showing the device-ID selection by the printer of the second embodiment; and Fig. 10 is an example of a memory map of the printer of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will now be described in detail in accordance with the accompanying drawings. [First Embodiment] Fig. 1 shows the construction of a printer according to a first embodiment of the present invention. In Fig. 1, reference numeral 1 denotes an interface (I/F) circuit which is connected to a host computer 100, an external device, which controls the printer, for bidirectional communication between the printer and the host computer; 2, an I/F controller for controlling the I/F circuit 1; 3, a RAM; 4, a RAM controller for storage control of the RAM 3; 5, an image-output adjustment circuit for outputting print data from the RAM 3 in correspondence with output timing of a printer engine 6; and 7, an engine I/F circuit for controlling the printer engine 6 under the control of a controller 8. The controller 8 controls the overall printer of the present embodiment. Numeral 9 denotes an ID ROM holding device IDs of the printer, to be described later; 10, an ID-ROM controller for selecting a device ID to be outputted from the ID ROM 9 into the controller 8, as described later; and 11, an attachment unit for attaching an option unit 15 to the printer. The option unit 15 includes various devices attachable to the printer such as an automatic document feeder (ADF), a sorter, a double-sided printing unit, a paper cassette, a finisher, and a scanner. The I/F controller 2 is connected to the I/F circuit 1 with a control signal via a control signal line. Also, the I/F circuit 1 is connected to the RAM 3. When image information is received from the host computer 100, the I/F controller 2 controls the I/F circuit 1 to output the image information to the RAM 3. The image information received from the host computer is temporarily stored in the RAM 3. The RAM controller 4, connected to the RAM 3, controls the read/write operation with respect to the RAM 3. The image information stored in the RAM 3 is transferred to the image-output adjustment circuit 5, and outputted to the printer engine 6,'in synchronization with output timing of the printer engine 6. The printer engine 6 prints an image on a print medium based on the input image information. The printer engine 6 is connected to the engine I/F circuit 7. The engine I/F circuit 7 sends a control command to the printer engine 6, or receives from the printer engine 6 a status signal indicating operation status of the printer engine 6. The I/F controller 2, the RAM controller 4, the image-output adjustment circuit 5 and the engine I/F circuit 7 are connected to the controller 8. The controller 8 is connected to the ID ROM 9 in which a plurality of device IDs of the printer are stored. The ID-ROM controller 10 selects one of the device ID's in the ID ROM 9, and outputs the selected device ID into the controller 8. When the host computer 100 makes a device-ID request to the printer via the I/F circuit 1, the selected device ID is read from the controller 8 and outputted to the host computer 100. After the power of the printer has been turned on, the ID-ROM controller 10 detects whether or not the option unit 15 is attached to the attachment unit 11, at predetermined periods. When the ID-ROM controller 10 detects that the option unit 15 is attached to the attachment unit 11, the ID-ROM controller 10 can discriminate the type of the option unit 15. The ID-ROM controller 10 selects a device ID to be outputted to the controller 8 from the device IDs stored in the ID ROM 9, in accordance with the type of the option unit 15. Fig. 2 shows the general construction of the ID ROM 9 of the present embodiment. In this embodiment, the ID ROM 9 contains three device IDs. Note that in the following description, the three device IDs are stored in the ID ROM 9, however, the present invention is not limited to this number of device IDs. The number of device IDs can be changed in accordance with the number of optional devices which may be connected to the printer. In Fig. 2, numeral 21 denotes a memory in which a device ID corresponding to a device A is stored; 22, a memory in which a device ID corresponding to a device B is stored; 23, a memory in which a device ID corresponding to a device C is stored; and 24, a selector for selecting one of the memories 21 to 23. The memories 21 to 23 are connected to the selector 24. The selector 24 selects one of outputs from the memories 21 to 23, in accordance with a selection signal from a selection-signal input terminal 25, and outputs the selected memory content through a selection output terminal 26. Note that the device IDs stored in the memories 21 to 23 are information on the model of the printer and optional devices connected to the printer. Further, a device ID only indicative of the model of the printer is also stored in the ID ROM 9. In the present embodiment, when the option unit 15 is attached to the attachment unit 11 of the printer, the ID-ROM controller 10 detects the connection between the option unit 15 and the attachment unit 11. Then the ID-ROM controller 10 outputs a selection signal into the ID ROM 9 to read the device ID of the printer, in accordance with the type of the option unit 15. The ID ROM 9 is controlled by the selector based on the selection signal, to output a new device ID by the selection-output terminal 26 to the controller 8. The host computer 100 reads the device ID from the controller 8 by processing as shown in Fig. 4 to be described later. Next, detection of the option unit 15 attached to the printer, according to the first embodiment, will be described with reference to Figs. 3A and 3B. Fig. 3A is a perspective view showing the option unit 15. Fig. 3B is a perspective view explaining attachment of the option unit 15 to the printer. As shown in Fig. 3A, the option unit 15 is provided in advance with a barcode label 151 indicative of the device ID of the option unit 15. As shown in Fig. 3B, a printer 50 of the present embodiment has a barcode reader 152 at the attachment unit 11. Fig. 4 shows device-ID selection in accordance with the device ID of the option unit 15 having the above construction, performed by the printer 50 having the above construction. Fig. 4 is a flowchart showing device-ID selection by the printer of the first embodiment. When the power of the printer 50 is turned on and the process starts, the ID-ROM controller 10 detects whether or not the option unit 15 has been attached to the attachment unit 11 (step S11). If it is YES, i.e., it is detected at step S11 that the option unit 15 has been attached to the printer 50 via the attachment unit 11, the ID-ROM controller 10 reads the barcode label 151 by using the barcode reader 152, and interprets the obtained barcode (step S12). The ID-ROM controller 10 outputs a selection signal to the ID ROM 9 in accordance with barcode data obtained by interpretation of the read barcode (step S13), the ID ROM 9 outputs a device ID corresponding to the selection signal to the controller 8 (step S14). On the other hand, if it is detected at step S11 that the option unit 15 has not been attached to the attachment unit 11 when or after the power of the printer has been turned on, the reading of barcode is attempted a predetermined number of times. In this case, as no barcode is read, it is determined that the option unit 15 has not been attached to the attachment unit 11, and a device ID only indicative of the model of the printer 50 is selected from the ID ROM 9 (step S15). The above processing is repeated at predetermined intervals. When the host computer 100 makes a device-ID request regarding the optional-device setting status of the printer 50, the controller 8 transmits the device ID outputted from the ID ROM 9 to the host computer 100. Note that in the ID ROM 9, selection by the selector 24 may be performed by an operator, from a control panel (not shown) of the printer. Thus, if the ID-ROM controller 10 detects that an optional device is attached to the printer, and the controller 8 determines the attachment of option function by a device ID from the ID ROM 9, the controller 8 instructs the I/F controller 2 to control the output from the I/F circuit 1 so as to reset the power of the printer. As a result, the host computer 100 performs initialization to be described later on the printer. In the initialization, the device ID of the printer is read so that the host computer 100 obtains the device ID of the printer, when the optional function has been newly set, indicative of the type of the newly-attached optional device. Thus, the host computer 100 can obtain the device ID of the optional device newly attached to the printer before print-output operation is performed, and determine whether or not the printer driver currently connected to the host computer supports the newly-attached optional device. Note that the present invention is not limited to the reading of the device ID by the host computer 100 as above. It may be arranged such that the output from the I/F circuit 1 is controlled so as to disconnect and re-connect the communication link between the printer and the host computer. In this case, the host computer 100 also performs initialization on the printer, where the device ID of the printer is read, so that the host computer 100 receives the device ID indicating the model of the printer and the type of the newly-attached optional device. Next, printer control on the host computer side in a case where the option-device setting status of the printer is changed will be described with reference to the flowchart of Fig. 5. Fig. 5 shows an algorithm for printer-driver selection by the host computer 100 based on the device ID of the printer. The host computer 100 of the present embodiment executes this processing when the power of the host computer is turned on or when the system is reset. Note that the processing may be performed as an interrupt processing when the host computer 100 issues a device-ID request to the printer. When the power of the host computer 100 is turned on or the system is reset, resetting is performed at step S101. Next, at step S102, the device ID of the printer is read from the printer, and the option-device setting status of the printer is examined. At step S103, it is determined whether or not the printer driver, which is currently in the host computer 100, supports the currently-connected printer, based on the device ID read at step S102. If it is determined that the printer driver supports the printer, the process proceeds to step S105, at which, to confirm whether or not the status of the printer has changed after step S102, it is determined whether or not the power of the printer is on, or the connection cable between the printer and the host computer is normally connected. If it is determined that the power of the printer is off or the cable is disconnected, the process returns to step S102, to perform the reading the device ID of the printer again. On the other hand, if it is determined at step S105 that the power of the printer is on and the connection cable is normally connected, the process proceeds to step S108, at which it is determined whether or not print data exists. If there is no print data, the process returns to step S105, to repeat checking the power on/off status and the connected/disconnected status of the cable of the printer. On the other hand, if it is determined at step S108 that print data exists, the process proceeds to step S109, at which it is determined whether or not the overall system including the host computer 100 and the printer is in print-possible status. If YES, the process proceeds to step S110, at which print data is transferred to the printer for print-output. Then the process returns to step S105. On the other hand, if it is determined at step S109 that the overall system is not in print-possible status (including status where an appropriate printer driver is not operative), the process proceeds to step S111, at which the host computer 100 displays an warning message to inform an operator that printing is impossible. Then the process returns to step S105. Further, at step S103, if it is determined as a result of examination of the read device ID that the printer corresponding to the device ID is not supported by the printer driver currently operative in the host computer 100, the process proceeds to step S104, at which it is determined whether or not a printer driver corresponding to the device ID, which the host computer 100 can read and activate, exists in an external storage device such as a hard disk, or already exists in the memory of the host computer 100. If it is determined that the printer driver exists, the process proceeds to step S106, at which the printer driver is read into the memory, for example, in accordance with necessity, and the printer driver is made active in the memory. Then the process proceeds to step S105. On the other hand, if it is determined that the printer driver corresponding to the printer does not exist, the process proceeds to step S107, at which an warning message is displayed to inform the operator that printing is impossible, similar to step S111. Then the process proceeds to step S105. Note that on the host computer side, acquisition of device ID is performed when the power of the host computer 100 is turned on, or when the system is reset, or when the status of the printer is changed, or by polling the printer at predetermined periods. As described above, according to the present embodiment, when an optional device is attached to the printer, the printer changes its device ID, and changes the output from the I/F to the host computer. The host computer detects the change of the output from the I/F circuit, and makes a device-ID request to the printer. Then the host computer reads the new device ID, selects a printer driver corresponding to the optional device of the printer, based on the read device ID, and performs printing. When the printer driver is inappropriate for the printer, the above processing prevents printing by using the inappropriate printer driver, thus avoiding undesired print result. Further, this effectively prevents various inconveniences caused in printing with an inappropriate printer driver. In the present embodiment, especially when plural types of optional devices are attached to the printer, device IDs corresponding to attachment statuses of the respective optional devices can be prepared in advance, and an appropriate device ID can be outputted to the host computer. [Second Embodiment] In the first embodiment, device IDs corresponding to all the optional devices which are attachable to the printer are stored in the ID ROM 9 of the printer, and a device ID corresponding to the optional-device setting status of the printer is selected and supplied to the controller 8. However, the present invention is not limited to this arrangement. For example, it may be arranged such that device IDs corresponding to attachment statuses of the optional devices are respectively stored in the optional devices, and when the optional device is attached to the printer, the device ID is read from the optional device. This construction will be described as a second embodiment with reference to Figs. 6 to 9. Fig. 6 shows the construction of the printer according to the second embodiment of the present invention. Fig. 7 shows the detailed construction of an ID-ROM controller 31 in Fig. 6. In Figs. 6 and 7, the elements corresponding to those in Figs. 1 and 2 have the same reference numerals, and the explanation of those elements will be omitted. In the second embodiment, the ID-ROM controller 31 reads a device ID indicative of the model of the printer, from an ID ROM 32 in the printer, or reads a device ID indicative of an option unit 33, from an ID ROM 34 in the option unit 33 when attached to the printer. When the option unit 33 is attached to the printer, the ID-ROM controller 31 outputs the content of the ID ROM 34 to the controller 8. When the option unit 33 is not attached to the printer, the ID-ROM controller 31 outputs the content of the ID ROM 32 to the controller 8. In Fig. 7, numeral 301 denotes an ID output unit; 302, a selector for switching outputs from the ID ROM 32 in the printer and the ID ROM 34 in the option unit 33; 303, an input terminal A for inputting the output from the ID ROM 32 to the selector 302; 304, an input terminal B for inputting the output from the ID ROM 34 to the selector 302; and 305, an option detection unit for detecting that the option unit 33 is attached to the printer. The output from the option detection unit 305 is inputted into an input terminal of the selector 302. When the option unit 33 is connected to the printer, the input B, i.e., the output from the ID ROM 34 in the option unit 33 is selected. In the second embodiment, the option unit 33 includes various optional devices each having the ID ROM 34 in which a device ID of the device is stored. Next, the detection of the option unit 33 by the ID-ROM controller 31 will be described. Fig. 8A is a perspective view showing the option unit 33. Fig. 8B is a schematic view showing connection between an electrical contact point 153 and the ID ROM 34 in the option unit 33. Fig. 8c is a perspective view for explaining the attachment of the option unit 33 to the printer of the second embodiment. As shown in Figs. 8A to 8C, the option unit 33 has an electrical contact point 153. The electrical contact point 153 has a power-supply terminal 153A for receiving electric power from a printer 51 of the second embodiment, an output terminal 153B for outputting the content of the ID ROM 34 in the option unit 33, a control terminal 153C for controlling the ID ROM 34 from the ID ROM controller 31 in the printer 51, and a GND (ground) terminal 153D. As shown in Fig. 8C, the printer 51 has an electrical contact point 154 having terminals 154A to 154D corresponding to the terminals 153A to 153D of the electrical contact point 153. Next, device-ID selection by the printer and option unit having the above constructions will be described with reference to the flowchart of Fig. 9. Similar to the first embodiment, when the power of the printer 51 is turned on, it is detected whether or not the option unit 33 has been attached to the attachment unit 11 of the printer 51 (step S51). If it is YES at step S51, i.e., the option detection unit 305 detects that the option unit 33 has been attached to the printer 51, as the electrical contact points 153 and 154 are in contact, electric power is supplied from the printer to the ID ROM 34 via the power-supply terminal 153A (step S52). Next, the ID-ROM controller 31 issues an output instruction to output the content of the ID ROM 34, via the control terminal 153C, to the ID ROM 34. The ID ROM 34 outputs a pre-stored device ID to the controller 8 via the output terminal 153B (step S53). On the other hand, if it is determined at step S51 that the option unit 33 is.not attached to the printer 51 when or after the power of the printer 51 has been turned on, as a device ID can not be read, it is determined that the option unit 33 is not attached to the printer 51. Then the device ID of the printer 51 itself is read from the ID ROM 32 and transferred to the controller 8. The above processing is repeated at predetermined periods. On the printer side, device-ID selection, to be described later, is performed when the power of the printer is turned on, or when polling at a predetermined intervals by the host computer is performed, or the status of the printer is changed (including a case where an optional device has been attached/detached to/from the printer). When a device-ID request has been made by the host computer, a response is made immediately. It may also be arranged such that a device ID is obtained (recognized) and a response is made with the device ID after the device-ID request has been received. As described above, according to the second embodiment, since a device ID can be freely set by each option unit, more option units, in comparison with the first embodiment, can be used in printing without any change of settings in the printer. Especially, even when an option unit, which was not taken into consideration upon designing the printer, is connected to the printer, if the option unit has an ID ROM and if an appropriate printer driver is installed into the host computer in advance, the appropriate printer can be selected by reading a device ID from the ID ROM. This enables printing corresponding a variety of option units. Note that the device-ID reading and printer-driver selection on the host computer-side are the same as those in the first embodiment, therefore the explanation of these processings will be omitted. In this case, the host computer 100 must have printer drivers corresponding to the device IDs stored in the ID ROM 32 in the printer and stored in the ID ROM 33 in the option units. As described above, according to the embodiments, the device ID of the printer is changed on the printer side, in correspondence with an optional device attached to the printer, and the device ID is discriminated on the host computer side. Thus, a printer driver corresponding to the optional device attached to the printer can be appropriately supported for printing. Further, if a currently operative printer driver is inappropriate, printing is not performed, and an warning message is displayed to inform an operator that printing is impossible. This prevents printing using an inappropriate printer driver, thus avoiding printing error, and further, prevents various inconveniences occur in the host computer and the printer, caused by printing with inappropriate printer driver. The present invention can be applied to a system constituted by a plurality of devices (e.g., host computer, interface, reader, printer) or to an apparatus comprising a single device (e.g., copy machine, facsimile). Further, a concern of the present invention can be also achieved by providing a storage medium storing program codes for performing the aforesaid processes to a system or an apparatus, reading the program codes with a computer (e.g., CPU, MPU) of the system or apparatus from the storage medium, then executing the program. In this case, the program codes read from the storage medium realize the functions according to the embodiments. Further, the storage medium, such as a floppy disk, a hard disk, an optical disk, a magneto-optical disk, CD-ROM, CD-R, a magnetic tape, a non-volatile type memory card, and ROM can be used for providing the program codes. Furthermore, besides aforesaid functions according to the above embodiments are realized by executing the program codes which are read by a computer, the present invention includes a case where an OS (operating system) or the like working on the computer performs a part or entire processes in accordance with designations of the program codes and realizes functions according to the above embodiments. Furthermore, the present invention also includes a case where, after the program codes read from the storage medium are written in a function expansion card which is inserted into the computer or in a memory provided in a function expansion unit which is connected to the computer, CPU or the like contained in the function expansion card or unit performs a part or entire process in accordance with designations of the program codes and realizes functions of the above embodiments. In a case where the present invention is applied to the aforesaid storage medium, the storage medium stores program codes corresponding to the flowcharts described in the embodiments. Briefly, the storage medium stores each module shown as an example of a memory map in Fig. 10. More specifically, program codes which correspond to holding module (holding a device ID which the host computer can discriminate), changing module (changing the device ID when the power of the printer is turned on, or it is detected by polling with a predetermined period from the host computer that an optional device has been attached to the printer, in accordance with a request from the host computer), identification-information outputting module (causing the host computer to require a device ID when the optional device has been attached to the printer), request causing module (causing the host computer to make device-ID request when the optional device has been attached to the printer) and printing module (performing printing based on print information inputted from the host computer), at least, are to be stored in the storage medium. As described above, the present invention provides an information processing apparatus which performs appropriate control corresponding to option-device setting (attached or not) status of a printer connected to the apparatus. Further, it is arranged such that an option unit has identification information on the type of the optional device so that the identification information can be outputted to the information processing apparatus when the optional device is attached to the printer. In this case, even when an option unit, which was not been taken into consideration upon designing the printer, is connected to the printer, printing can be performed by changing the printer driver in the information processing apparatus in accordance with the identification information obtained from the optional device. This enables to connect various option units to the printer. Further, in the information processing apparatus, it is determined whether or not a currently control program for controlling the printer is appropriate, in accordance with the identification information from the printer. If the control program is inappropriate, an appropriate control program is selected based on the identification information and printing can be performed. Further, even if the information processing apparatus does not have an appropriate control program, printing by using an inappropriate control program can be prevented, thus avoiding undesired print result. Many apparently widely different embodiments of the present invention can be made without departing from the scope thereof. The invention is defined by the appended claims.

Claims: A printer adapted to receive print information from an information processing apparatus (100) connected to said printer via an interface (1) and to perform print processing based on the print information, and comprising: detecting means (S11, S51) for detecting whether or not an optional device (15) is attached to said printer; selecting means (S10, S12-S15, S52-S54) for selecting, in accordance with detection result of said detecting means, first identification information related to the printer or second identification information representing data related to said optional device, identification-information output means (8) for outputting the identification information as selected by said selecting means to said information processing apparatus in response to a received request from the information processing apparatus, and characterised in that said detecting means are adapted to repeat detection as to whether or not an optional device is attached to said printer at predetermined intervals after power on. A printer according to claim 1 and adapted to recognize, when said detecting means detects that an optional device has been attached to said printer, a barcode identifying said optional device, said selecting means selecting the second identification information in accordance with a recognized barcode. A printer according to claim 1 or claim 2, wherein said selecting means is adapted to obtain the second identification information from a ROM provided in the attached optional device. A printer according to any one of the preceding claims, and adapted to mount an optional device which can be any one of the following: an automatic document feeder (ADF), a sorter, a double-sided printing unit, a paper cassette, a finisher and a scanner. A printer according to any preceding claim in combination with an information processing apparatus (100), wherein said information processing apparatus is adapted to select a printer driver in accordance with the first or second identification information outputted from said printer. A method of controlling a printer including receiving print information from an information processing apparatus (100) connected to said printer via an interface (1) and to perform print processing based on the print information, and comprising the steps of: detecting (S11, S51) whether or not an optional device (15) is attached to said printer; selecting (S10, S12-S15, S52-S54), in accordance with detection result of said detecting step, first identification information related to the printer or second identification information representing data relating to the optional device, and outputting the identification information as selected by said selecting step to said information processing apparatus in response to a received request from the information processing apparatus, and characterised in that said detecting step is repeated at predetermined intervals after power on. A method according to claim 6 characterised by recognising a barcode corresponding to an optional device when the optional device is connected to the printer, recognition of the barcode causing the selecting step to select the second identification information for transmission to the information processing apparatus. A method according to claim 6 or 7, characterised in that , in said selecting step, the second identification information is obtained from a ROM provided in the attached optional device. A method according to any one of claim 6 to 8, characterised in that said information processing apparatus selects a printer driver in accordance with the first or second identification information outputted from said printer. A storage medium storing processor implementable instructions for controlling the processor of a printer to carry out the method of any one of claims 6 to 9.

Inventors: SAKURAI TOSHIO, SAKURAI, TOSHIO
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1997
Main classification: G06K15
IPC codes: G06K15, B41J29, G06F3, G06F13