ELECTRONIC CASH REGISTER

Abstract: An electronic cash register comprising a key input device (17) having a plurality of operation keys, a memory unit (13) whose memory region is divided into a plurality of storage regions (19, 20) for storing a plurality of different accumulated data, and a control unit (12) for controlling the key input device and the memory unit. The control unit controls the memory unit so as to change the memory capacity of a desired storage region, generate a required storage region, or erase a particular storage region of the memory unit.

Description: The present invention relates to an electronic cash register useful for recording a cash transfer accompanying the sale of commodities, say, at a store. Conventionally, electronic cash registers contain a random-access-memory (RAM) for storing accumulated sales data. One such electronic cash register is described in EP-A-0,114,261. The present invention aims to provide an electronic cash register that makes effective use of the built-in RAM. In accordance with the present invention, there is provided an electronic cash register comprising: key input means having a plurality of operation keys; a data memory for storing data relating to the operation of the cash register in a plurality of file storage regions of the memory; and control means for controlling the content of the data memory in dependence upon operation of the key input means, characterised in that: each file storage region comprises a respective file data region and a respective file descriptor region for storing a start address, an end address and a data structure of said file data region, and in that said control means is operable to change the manner of division of said data memory into said file storage regions. An electronic cash register in accordance with the invention is thus capable of setting, as desired, the memory capacity of each of the regions of the RAM allocated for the storage of different accumulated data. A preferred embodiment of the invention additionally provides for the creation of a required storage region and/or the removal of a particular storage region of the RAM. The present invention will become more fully understood from the detailed description given hereinbelow and the accompanying drawings, in which: Fig. 1 is a block diagram of an embodiment of an electronic cash register 11 of the present invention; Fig. 2 is a plan view of the key input means 17; Fig. 3 shows the structure of the storage regions in a RAM 13; Fig. 4 shows the file allocation in the RAM 13; Fig. 5 is a flow chart for explaining the procedure for setting the number of records in a particular file; Fig. 6 is a flow chart for explaining the procedure for erasing an unnecessary file; Fig. 7 shows the structure of a file which is not divided into blocks; Fig. 8 shows the structure of a file which is divided into a plurality of blocks; Fig. 9 shows an example of record data stored in a file; Fig. 10 is another example of record data in a file; Fig. 11 is a flow chart for explaining the procedure for changing the number of blocks in a file; and Fig. 12 is a flow chart for explaining the procedure for generating a new file in the RAM 13. Fig. 1 is a block diagram of an embodiment of an electronic cash register (hereinafter abbreviated to ECR) 11 of the present invention. The ECR 11 comprises a central processing unit (CPU) 12 as control means, a random-access-memory (RAM) 13 as memory means, a read-only-memory (ROM) 14, display means 15, printing means 16, key input means 17 having a plurality of operation keys, and a drawer 18 for storing cash. Fig. 2 is a plan view of the key input means 17. As shown, a plurality of operation keys are arranged on the key input means 17. The ROM 14 stores control procedures (programs) according to which the CPU 12 executes control operation when instructed by a signal input given by key operation from the key input means 17. The control result is stored in the RAM 13, and if required by the operator, presented on the display means 15 and printed out by the printing means 16. Fig. 3 shows the structure of the storage regions in the RAM 13. The RAM 13 comprises file descriptor regions 19 and file data regions 20. The file descriptor regions 19 have a fixed memory capacity and store start address, end address and data structure of the file data regions (described later) 20 for each file (here, a file referred to each storage region allocated in the RAM 13). Write/read for each file is controlled through the file descriptor regions. Specifically, write/read for the No. 1 file data region DA1 is controlled through the descriptor region DS1, and that for subsequent file data regions through the corresponding descriptor regions DS2, DS3, etc. The file data regions 20 store various accumulated data by file. The memory capacity of each file data region for a file is variable; when there is no file, the capacity of the file data region is zero. Operation of the ECR 11 of the above construction is described below: It is assumed that the ECR 11 with the RAM 13 having such file allocation as shown in Fig. 4(1) is used in a store. Each file is allotted with a file number. A department memory region 21 which is one of the files is set in advance to have a memory capacity for storing up to 40 departments. The number of departments may increase or decrease as the store is expanded or reduced in scale. The memory capacity of the department memory region 21 may be increased or decreased to accomodate a change in the number of departments. A specified unit of data storage such as the memory capacity for one department is called a record. The operation procedure for changing the number of departments is now described with reference to Fig. 5, which shows the flow chart of the operation for setting the number of records in a particular file. The operator inputs "971" for designating the program for this operation (Step n1), depresses "." key 23 on the key input means 17 (Step n2) and "@/FOR" key 24 (Step n3), inputs the file No. of the department memory region (Step n4), depresses "@/FOR" key 24 again (Step n5), and inputs the desired number of records (Step n6). Finally, the operator depresses "CA" key 25 to end the procedure. A desired memory capacity is thus set for the file. Figs. 4(2) and 4(3) show the file allocation in the RAM 13 where the memory capacity of the department memory region 21 is increased from 40 departments to 100 departments and where the memory capacity of the department memory 21 is decreased to 20 departments, respectively. Description is made now on the operation for erasing a time-depending memory region 22, another file in the RAM 13 shown in Fig. 4(1), with reference to the flow chart of Fig. 6. The operator inputs "973" for designating the program for this operation (Step m1), depresses "." key 23 on the key input means 17 (Step m2) and "@/FOR" key 24 (Step m3), inputs file No. of the time-depending memory region 22 (Step m4), and depresses "CA" key 25 to end the procedure (Step m5). The file of the time-depending memory region 22 can be erased in this way. Fig. 4(4) shows the file allocation in the RAM 13 where the time-depending memory region 22 has been erased. If data of the records in a file have independent meanings, the records need not be divided into blocks. In other cases ,the records may be grouped into several blocks for convenience. Fig. 7 shows the structure of a file in which the records are not grouped, and Fig. 8 shows the structure of a file in which the records are grouped into a plurality of blocks. Figs. 9 and 10 show two specific examples of record data arrangement in a file. In Fig. 7, M records are stored in a file capable of storing up to N records. Each of the records R1, R2, ..., RM comprises sixteen fields. The first field F1 stores label data L1, L2, ..., LM. The memory capacity for each record is 256 bytes. Here, M and N have the relationship expressed as: 0 ≦ M ≦ N ≦ 65535 (1). As shown in Fig. 7, the records are stored successively in a file with no open space between adjacent records. The area indicated by E in Fig. 7 is empty with no data stored. Fig. 9 shows the data arrangement in the record R1, one of the records in Fig. 7. The data "1A" in the first field F1 represents the department name "department of fruit". The data "0000098400" in the second field F2 represents the sale proceeds of ¥9840. "00001230" in the third field F3 indicates that the number of commodities sold is 123. The data "4F52414E47452020" in the sixth field F6 is the ASCII code indicating that the data is related to "oranges". Fig. 8 shows the structure of a file for accumulated sales data for each salesman. The memory capacity of the 4th to the 16th fields of each record is set to zero. This file is divided into a plurality of blocks, each containing data for a different salesman. Each block is capable of storing up to H records. In Fig. 8, I records are stored in each block. The file structure of the first block B1 is identical with that shown in Fig. 7. The second block B2 and the subsequent blocks do not contain the first field; the first field in the first block B1 is shared by all the other blocks. For instance, the first record Rb21 in the second block B2 uses the label data "Label 1" of the first record Rb11 in the first block B1. Fig. 10 shows the data arrangement in the record Rb11 shown in Fig. 8. "434131" in the first field Fb1 is the ASCII code representing a record data name. "0001234000" in the second field Fb2 represents the sale proceeds of ¥123400. The data "007890" in the third field Fb3 indicates that the number of transactions is 789. The type of the data thus stored in each record of a file is limited to two kinds: so-called packed decimal data and binary data. The packed decimal data is a numeric data having a number of two figures in a byte plus a sign. The sign is set in the lower four bits in the last byte; the lower four bits are set to "0000" for a positive number, "1101" for a negative number, "1010" for a positive overflow data, and "1011" for a negative overflow data. The data in the second field F2 and in the third field F3 shown in Fig. 9 are packed decimal data. The binary data is a byte of data expressed in the hexadecimal notation "00"(H) to "FF"(H) or by binary numbers "00000000" to "11111111" in the binary notation. The data in the first field F1 and in the sixth field F6 of Fig 9 are binary data. According to the present invention, as described earlier, the ECR 11 is capable of changing the number of blocks in a particular field. Fig. 11 is a flow chart showing the procedure of changing the number of blocks. Referring to the flow chart, the operator inputs "972" for designating the program for this operation (Step S1), depresses "." key 23 (Step S2) and then "@/FOR" key 24 (Step S3), inputs file No. of the file whose number of blocks is to be changed (Step S4), depresses "@/FOR" key 24 again (Step S5), inputs desired number of blocks (Step S6), and depresses "CA" key 25 to end the procedure (Step S7). Fig. 12 is a flow chart showing the procedure of generating a new file in the RAM 13. The new file is stored in advance in separate storage means (not shown). To generate a new file, therefore, it is necessary to connect the separate storage means to the ECR 11. Referring to Fig. 12, the operator inputs "970" to designate the program for the new file generation (Step Q1), depresses "." key 23 (Step Q2) and then "@/FOR" key 24 (Step Q3), inputs file No. of the file to be generated (Step Q4), and depresses "CA" key 24 to end the procedure (Step Q5). A desired file can be thus generated in the RAM 13. The operation of generating/erasing a file and that of changing the number of records or blocks as mentioned above are executed under control of the CPU 12. It is understood that the ECR 11 of the present invention is capable of varying the memory capacity of a particular storage region as desired, erasing any particular storage portion, and generating a new storage region in the RAM 13. According to the present invention, as appreciated from the above, control means controls memory means so as to change the memory capacity of any particular storage region, erase an unnecessary storage region, or generate a new storage region in the memory means. Accordingly, it is possible to select only necessary data for storage from various accumulated data and to vary the memory capacity depending on the amount of data to be stored. The present invention therefore allows the memory means to be used as effectively as possible, enhancing the usefulness of the electronic cash register remarkably. According to the present invention, the memory capacities of the storage regions allocated in the memory means for storing various accumulated data are varied, any particular storage regions are erased, and new storage regions are generated in the memory means, under control of the control means simply by key operation on the key input means, so that the operation for, say, increasing the memory capacity for a particular accumulated data is very easy. It should be understood, therefore, that the present invention permits the most effective use of the memory means.

Claims: An electronic cash register comprising: key input means (17) having a plurality of operation keys; a data memory (13) for storing data relating to the operation of the cash register in a plurality of file storage regions of the memory; and control means (12, 14) for controlling the content of the data memory in dependence upon operation of the key input means, characterised in that: each file storage region comprises a respective file data region (20) and a respective file descriptor region (19) for storing a start address, an end address and a data structure of said file data region, and in that said control means is operable to change the manner of division of said data memory into said file storage regions. An electronic cash register according to claim 1, wherein said control means is operable to change the data storage capacity of a said file storage region. An electronic cash register according to claim 1 or claim 2, wherein said control means is operable to generate and/or erase a said file storage region. An electronic cash register according to any one of claims 1 to 3, wherein there is no space between adjacent file storage regions. An electronic cash register according to any one of the preceding claims, wherein said file descriptor region (19) has a fixed memory space allocation. An electronic cash register according to any one of the preceding claims, wherein said file data region (20) has a variable memory space allocation.

Inventors: GOTO, KAZUYUKI, KOMAI, KENSAKU, NAKAMURA, YASUHIDE, OHNISHI, SOUICHI
Applicants: SHARP KABUSHIKI KAISHA
Application year: 1987
Main classification: G07G1
IPC codes: G07G1