Electronic cash register

Abstract: The invention provides an electronic cash register adaptable to change of output devices to be connected, comprising a memory means for storing information on output formats corresponding to the output devices, a model designating means for specifying the output device or devices connected, a search-reader for searching through the memory means according to model specification by the model designating means and reading information on an output format corresponding to the particular model designated and an output data editing means for editing output data according to the information read by the search-reader in response to an output demand and a predetermined editing rule.

Description: FIELD OF THE INVENTION The present invention relates to an electronic cash register and more particularly to an electronic cash register which is adaptable to varying output formats according to different models of output devices (printer, display, etc.) connected thereto. BACKGROUND OF THE INVENTION The electronic cash register (hereinafter referred to briefly as ECR) is generally connected to a printer and a display as standard output devices which respectively print out and display output data. Meanwhile, for a change in specification or an improvement in function of an ECR, it is sometimes practiced to replace the existing printer and display devices with other models of such devices or connect other additional devices. In such cases, on the part of the ECR, it is common practice to additionally mount a software enabling the ECR to adapt itself to the output format of the newly connected output device and execute the output processing operation according to the new software. When it is impossible to mount such a new software for reasons of the limited memory capacity of the ECR, the existing software is dismounted and the new software is mounted instead. However, the practice of replacing the existing software with a new one for adapting the ECR to the new output device has the drawback that much time and cost are incurred for the preparation of the new software. This problem is particularly serious when the change of output devices is frequent or when the same change is made for a plurality of ECRs and this means an inevitable increase in the price of the ECR (inclusive of the software). Thus, the above practice is not an effective approach to the problem. From JP-A-63007964 an electronic cash register is known having a memory means in which information on output formats of different printers is stored. The output format can be changed using this information when an abnormal printer is detected and is to be replaced by a printer of another type. EP-A-0 107 513 discloses a printing assembly, as part of an electronic sales equipment, tackling the problem of different formats depending on the kind of peripheral device used. As a solution to this problem, this document in particular teaches discrimination means for discriminating automatically from which of a plurality of possible peripheral input devices (electronic weigh scales) data is received; reading means for reading a printing format out of a memory in accordance with the results of the discrimination operations performed by the discrimination means; and printing means for printing out data in the printing format read out of the memory. The document in particular envisages an arangement where the input devices, such as electronic weigh scales, are detachably connected to the print assembly, which allows the latter to be moved to other peripheral devices. It is, therefore, an object of the present invention to provide an electronic cash register capable of adapting itself to changes in output format due to change of associated output devices (printer and display devices) without requiring change of the software. The invention is as defined in the claim. Other objects and advantages of the invention will become apparent from the following description and accompanying drawings. SUMMARY OF THE INVENTION The ECR according to the present invention is an electronic cash register which can adjust itself to change of associated output devices and, more particularly, is an electronic cash register comprising a memory means for storing information relating to output formats corresponding to different models of output devices, a model designating means which specifies the model of associated output device, a search-reader means for searching said memory means and reading out information on the corresponding output format, and an output data editing means responsive to a demand for output and adapted to edit data for output according to said output format information read by said search-reader means and a predetermined editing rule. The electronic cash register of the invention, which has the above general architecture, does not require change of the mounted software but permits editing of data with flexibility by adapting itself to a change in output format due to change in the model of associated output device (printer or display). BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a schematic-processing flow diagram showing the output operation of an ECR embodying the principle of the invention; Fig. 2 is a schematic diagram illustrating output devices that can be connected to an ECR embodying the invention; Fig. 3 is a schematic diagram showing the internal configuration of the ECR shown in Fig. 2; Fig. 4 is a schematic diagram illustrating the hardware and software interfaces of the ECR shown in Fig. 2; Fig. 5 is a schematic diagram showing the storage area for storage of printing digit data dependent on printer models in the ROM of the ECR shown in Fig. 3; Fig. 6(a) through (f) are schematic diagrams showing the printing rule embodying the principle of the invention; Fig. 7 is a schematic diagram explaining the display rule embodying the principle of the invention; and Fig. 8 is a schematic diagram showing the configuration of designated print/display data embodying the principle of the invention; Fig. 9(a) through (d) are schematic diagrams showing the prints obtained by editing the designated print/display data of Fig. 8 according to the printing rule shown in Fig. 6(a) through (f). DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One preferred embodiment of the present invention is described in detail below with reference to the accompanying drawings. In the following description of the ECR, it is assumed that a printer and a display unit are connected thereto as output devices. It is further assumed that the ECR is connected to one unit each of such printer and display but it is possible to connect the ECR to a plurality of output devices of each kind. Fig. 1 is a generalized processing flow diagram showing an ECR 100 outputting data through the associated output devices in one embodiment of the invention. Fig. 2 is a schematic view explaining the output devices which can be connected to the ECR 100 in one embodiment of the invention. Fig. 3 is a schematic diagram showing the internal functional configuration of the ECR 100 shown in Fig. 2. As shown in Fig. 2, the ECR 100 accepts any one or more of printers 200a through 200d which are dissimilar in the number of printing digits per line and any one or more of displays 300a through 300g which are dissimilar in the number of display digits per line. For example, the number of printing digits of the printer 200a is 20, that of the printer 200b is 25, that of the printer 200c is 30, and that of the printer 200d is 35. The displays 300a through 300c are customer displays, the displays 300d through 300f are operator displays, and the display 300g is a cathode-ray tube (CRT) display. The displays 300a through 300f are connected to the ECR 100 through a display board 400. As shown in Fig. 2, the output data from the ECR 100 are fed to printers 200a through 200d for printing and to displays 300a through 300g for display. The internal functional configuration of the ECR 100 shown in Fig. 2 is now explained with reference to Fig. 3. Referring to Fig. 3, the ECR 100 includes a central processing unit (CPU) 110 which controls and monitors the operation of the ECR 100, a read-only memory (ROM) 120 and a random access memory (RAM) 130 for storing data (inclusive of programs) necessary for the operation of the ECR 100, a printing buffer 140, a display buffer 150 and a printing section 160 and a display section 170. The printing section 160 includes one or more of the printers 200a through 200d which are shown in Fig. 2 and the display section 170 similarly includes one or more of the displays 300a through 300g shown in Fig. 2. The data to be fed to these output devices are temporarily stored in the printing buffer 140 and display buffer 150, respectively, for respective outputs in the forms of hard copy and visual display through said printing section 160 and display section 170. In the functional configuration of the ECR100 presented in Fig. 2, the data input function is not shown, nor is described herein. The interfaces for the hardware and software to be mounted on the ECR 100 are described below. Fig. 4 is a schematic diagram showing the hardware and software interfaces of the ECR 100. As illustrated, the hardware and software of the ECR 100 form a laminar interface, with a hardware layer 500 forming a substratum and a software layer 600 being superimposed thereon. The hardware layer 500 comprises the complete hardware function 500a encompassing the peripheral devices of the ECR 100. The software layer 600 comprises a software layer for control over the operation of said hardware function 500a (hereinafter referred to as the control software layer), an application software layer 600c which includes an application software prepared by the user, and a software layer 600b providing a variety of utility processing and other services necessary for said application software layer 600c (hereinafter referred to as the basic software layer). The processing flow shown in Fig. 1 is included as a program in said basic software layer 600b, and the programs contained in said control software layer 600a and basic software layer 600b are written, as resident programs, into the ROM 120. Thus, the application program prepared by the user is subject to the control software layer 600a and basic software layer 600b, so that various output devices of the ECR100 can be utilized via the hardware function 500a. Fig. 5 is a schematic diagram showing the configuration of a storage area 120a for storing printer model-dependent printing digit data in the ROM 120 illustrated in Fig. 3. As shown, this storage area 120a constituting a part of the ROM 120 is previously supplied with the numbers of printing digits which are dependent solely on printer models which can be connected to the ECR100. More particularly, the numbers of printing digits corresponding to the respective printers 200a through 200d shown in Fig. 2, namely 20, 25, 33 and 35, are stored in the order mentioned. Similarly for the displays 300a through 300g which can be connected to the ECR 100, the numbers of display digits corresponding to the respective displays are previously stored, although these are neither illustrated nor described in further detail. The ECR 100 is previously provided with a printing rule and a display rule, both of which are designed for universal application regardless of models of output devices. Thus, the ECR 100 upon specification of a given model of output device edits and outputs data in an output format corresponding to the specified model in accordance with said printing or display rule. The printing rule and display rule mentioned above are described in detail below. Fig. 6(a) through (f) are schematic views explaining the printing rule employed in one preferred embodiment of the invention. Here it is assumed that the number of printing digits per line is W digits and that each line consists of a right part R and a left part L. As shown in Fig. 6(a), generally when the number of characters L1 available in the left part L and the number of characters R1 available in the right part R satisfy the relation (W > L1 + R1), printing in the left part L is left-justified and that in the right part R is right-justified. On the other hand, if the relation (W ≦ L1 + R1) holds true, printing is done in two lines with the left part L being left-justified and the right part R arranged below said L and right-justified as shown in Fig. 6(b). The above is a general printing rule. The printing rule applicable to the left part L is now described. Referring to Fig. 6(c) showing the printing rule applicable to the left part L, this left part L is further divided into [L.1], [L.2], ..., [L.n]. The number of characters in the part [L.i] is assumed to be Li (hereinafter, i = 1, 2, 3, ..., n). Now, if the relation L 1 + L 2 + ... L n ≦ W holds true, printing is carried out in one line with the left part L being left-justified. On the other hand, if the relation is L 1 + L 2 + ... + L n > W, printing is done in two lines with the left part L being left-justified, as shown in Fig. 6(d). The printing rule applicable to the right part R is now explained. Referring to Fig. 6(e) which shows the printing rule applicable to the right part R, the right part R is subdivided into [R.1], [R.2], ... , [R.n] and the number of characters per [R.n] is assumed to be Rn. Then, if the relation R 1 + R 2 ... + R n ≦ W holds true, printing is performed in one line with the right part R being right-justified. On the other hand, if R 1 + R 2 + ... + R n > W, printing is done in two lines with the right part R being right-justified as shown in Fig. 6(f). The above is an explanation of the printing rule applicable to printers 200a through 200d which can be connected to the ECR100. The display rule applicable to displays 300a through 300g is now described. Fig. 7 is a schematic diagram illustrating the display rule employed in one embodiment of the invention. Let it be assumed that the number of display digits per line is w and the display per line consists of a left part ℓ and a right art r. Referring to Fig. 7, if there holds the relation (w ≧ ℓ1 + r1 + 1) where ℓ1 is the number of display characters in the left part ℓ and r1 is that in the right part r, both parts of data are displayed concurrently in one line with the left part ℓ being left-justified and the right part r right-justified. On the other hand, if the relation (w < ℓ1 + r1 + 1) holds true, it is impossible to display the left part ℓ and right part r concurrently in a single line. Therefore, the left part ℓ is first displayed and, then, the display of the right part r begins to take place. However, if either the left part ℓ or the right part r is to be displayed beyond the right-hand frame of the display, the continued display takes place from the left-hand end. That is to say, the right part r is displayed over the left part ℓ, for instance. Thus, the ECR 100 is provided with the above printing and display rules. Now, how the data according to the user's application program (hereinafter referred to as designated print/display-data PD) is printed according to said printing rule is explained below. The mode of display according to said display rule is not described. Fig. 8 is a schematic diagram showing the configuration of designated print/display data PD in one embodiment of the invention. As shown, the designated print/display data PD has a predetermined data length PDℓ and all the data are registered as left-justified. The designated print/display data PD shown in a data set including variable length records R1 through R5 and said respective records R1 through R5 contain three data items. With regard to the first data items of said three items, the output data D3 to be registered in this record (which is described later) is registered in the left part, or the output part designating code data D1 which specifies the data to be displayed and printed is registered in the right part. In the second data item, an output data length D2 indicating the length (number of bytes) of output data D3 to be recorded in the record is registered. In the third data item, the output data D3 to be recorded in the record is registered. Therefore, the output data D3 of the first record R1 in the designated print/display data PD shown in Fig. 8, for instance, is as long as 9 bytes and the data to be printed or displayed is in the left part L. While the designated print/display data PD shown in Fig. 8 contains records R1 through R5, the number of records that can be registered is not limited unless the data length PDℓ is exceeded. Fig. 9(a) through (f) are schematic diagrams showing the prints obtained by editing the designated print/display data PD of Fig. 8 in accordance with the printing rule shown in Figs. 6(a) through (f). Fig. 9(a) is a schematic diagram of the print obtained by editing the designated print/display data PD according to the printing rule with the printer 200a with a number of printing digits per line of W = 20 digits. Fig. 9(b) is a schematic diagram showing the print obtained by editing the designated print/display data PD according to the printing rule with the printer 200b having a number of printing digits per line of W = 25. Fig. 9(c) is a schematic diagram showing the print obtained by editing the designated print/display data PD according to the printing rule with the printer 200c having a number of printing digits per line of W = 30. Fig. 9(d) is a schematic diagram showing the print obtained by editing the designated print/display data PD according to the printing rule with the printer 200d having a number of printing digits per line of W = 35. As illustrated in Fig. 9(a) through (d), it is clear that even if the number of printing digits is varied, that is to say irrespective of printer model, the use of said printing rule permits the editing and printing of the same designated print/display data PD in a format corresponding to the particular number of printing digits W, that is to say the particular printer model. The details of the printing and display operations of the ECR100 are now described with reference to Figs. 1 thorough 9. The ECR 100 is assumed to be connected to one of said printers 200a through 200d and to one of said displays 300a through 300d. Stored in the storage area 120a of the ROM120 are printing digit data W corresponding to printers 200a through 200d which can be connected (Fig. 5). Similarly display digit data w corresponding to connectable displays 300a through 300g are stored in another storage area of the ROM 120 (Fig. 5). While the ECR 100 gives outputs (print and display) during the routine transaction, this action is initiated as the designated print/display data PD is generated from the user's application program and a demand for output is made. As the ECR 100 is initialized by switching its power supply on, the CPU 110 enquires about the models of the printer and display connected at step S100 as shown in Fig. 1. The model of the output device is ascertained from the state of a signal input from the terminal for connection of the printer or the terminal for connection of the display. In response to this specification of printer and display models connected, the CPU110 proceeds to the next step S200. At S200, using the device model code specified at S 100 as the key, the corresponding storage area is searched to read the printing digit data W and display digit data w corresponding to the respective device models. Thus, the storage area 120a of the ROM120 shown in Fig. 5 is searched using the specified device model code as the key in the normal order to read out the corresponding printing digits data W. Similarly, the display digit data w is read out. In this manner, as the ECR 100 is initialized (this occurs whenever a peripheral device is exchanged), the models of the printer and display connected are specified and the printing digit data w and display digit data w are determined. The printing digit data W and display digit data w are temporarily stored in predetermined storage areas of the RAM130 until the next initialization. At the next step S300, the CPU 110 enquires whether it is receiving a printing or display output demand signal according to the user's application program. As the output demand signal is received at S300, the sequence proceeds to the next step S400. However, until reception of said demand signal, the CPU110 repeats the enquiry at S300. As the sequence proceeds to S400, the printing and display processings are carried out. More particularly, the output demand signal is followed by said designated print/display data PD from the user's application program and therefore, the CPU110 edits the designated print/display data PD in accordance with the aforesaid printing rule and printing digit data W. The printing data thus edited is temporarily stored in a printing buffer 140 and fed to a printer connected to a printing section 160. In parallel with the above operation, display data edited according to the display digit data w and said display rule is similarly stored temporarily in a display buffer 150 and fed to a display connected to a display section 170. Then, the sequence returns to S300 and the output processing in response to the output demand signal from the application program is carried out in the same manner as above. The processing routine illustrated in Fig. 1 unconditionally ends upon completion of all the transactions of the ECR100 or upon termination of power supply from the power source. Thus, even if a change is made in the model of the printer or display connected to the ECR 100, the model is specified and the display digit information w and printing digit information W are specified. Then, the designated print/display data PD are edited in accordance with the printing rule and display rule registered in the basic software layer 600b. Therefore, even if the printer or display is exchanged, it is no longer necessary to modify or make an addition to the existing software. Thus, as shown in Fig. 4, the upper application software layer 600c need not care about the output devices to be connected to the ECR 100 and the application program functions as a universal program for output devices. In addition to the above-mentioned advantage that the software need not be modified, the invention offers the advantage of savings in the time and cost of software maintenance that might be required due to change of output devices. The above description and the accompanying drawings are merely illustrative of a few modes of application of the principles of the present invention and are not limiting. Numerous other arrangements which embody the principles of the invention and which fall within the scope of the claim may be readily devised by those skilled in the art. Accordingly, the invention is not limited by the foregoing description, but is only limited by the scope of the appended claim.

Claims: An electronic cash register (100) adaptable to a change in output devices (200a - 200d, 300a - 300g) connected therewith, comprising: memory means (120) for storing information on output formats corresponding to different types or models of said output devices (200a - 200d, 300a - 300g), model recognition means (S100) for determining the model of output device (200a - 200d, 300a - 300g) that is connected based upon a signal produced by said connected output device at a connecting terminal of the electronic cash register for said output device, search means (110, S200) for searching said memory means (120) for the information on the output format that corresponds to the model of output device determined on the basis of said input signal, and output means (S400) for outputting data in the output format that corresponds to the format of the connected model of output device, said output means comprising format judgement means (110) for determining whether the data should be output as a single line or a plurality of lines based upon the model information as determined by the model recognition means.

Inventors: NISHINO TAKAHISA, NISHINO, TAKAHISA, NISHINO, TAKAHISA, OMRON CORPORATION, INTELLECTUAL
Applicants: OMRON TATEISI ELECTRONICS CO, OMRON CORPORATION
Application year: 1991
Main classification: G07G1
IPC codes: G07G1