Purpose of the present invention is exactly in order to address this is that, when changing or newly being provided with under the situation of terminal control section, can automatically to upgrade the control program of main control part, in the work that can alleviate operation, can preventing error in operation.
In order to address the above problem, the described control device of automatic vendor in the present invention the 1st aspect is characterised in that: comprise that a plurality of terminal control sections are controlled the automatic vending machine each several part respectively separately; The main control part, communicate these terminal control sections of overhead control on one side between one side and these terminal control sections, above-mentioned each terminal control section, keep the manufacturer identification code of each manufacturer and the version of the control program corresponding with them, with initial communication of main control part in, above-mentioned manufacturer identification code and version are sent to the main control part, the main control part, according to the manufacturer identification code and the version that receive from each terminal control section, obtain and the corresponding control program of connected terminal control section.So, changing or newly being provided with under the situation of terminal control section, can automatically upgrade the control program of main control part, in the work that can alleviate operation, can also prevent error in operation.
The described control device of automatic vendor in the present invention the 2nd aspect is characterised in that: above-mentioned main control part, according to above-mentioned manufacturer identification code and version, suitable control program is obtained from one of them in the inside of the exterior storage medium that sequential search is set at ROM in the main control part, be inserted in storage card in the expansion slot, can communicate by letter.So, can with the control program of automatically finding linkedly thereafter that is connected of terminal control section, can automatically rewrite.
In addition, the described control device of automatic vendor in the present invention the 3rd aspect is characterised in that: above-mentioned main control part, the program area that predetermined function is different in program storage portion, extender zone are unit part rewrite control program with these zones.So just can reduce the data volume of rewriting, rewrite operation expeditiously.
Have again, the described control device of automatic vendor in the present invention the 4th aspect is characterised in that: in terminal control section inside, store the main control control program partly that is used to control this terminal control section, the main control part, when being loaded into the terminal control section, obtain control program from this terminal control section.So need in the storer of main control part and storage card and supervisory computer, not store this program, make management become easy.
And then, the described control device of automatic vendor in the present invention the 5th aspect is characterised in that: in above-mentioned terminal control section, store above-mentioned control program with the form of intermediate language, in the main control part, be built-in with the intermediate language interpretive routine, it changes into the partly machine language of usefulness of main control to the control program of this intermediate language form.Like this, even the microcomputer of main control part is replaced by other microcomputer, also can continue to use the control program of each terminal control section.
Below, describe embodiment of the present invention with reference to the accompanying drawings in detail.
Fig. 1 is system's skeleton diagram of control device of automatic vendor of the present invention.Main control part 1 on one side and the terminal control section 2,3,4 that grades of the control section of selling goods, coin processing controls part, display control unit these parts of one side overhead control of communicating by letter.
Each terminal control section 2,3,4 is kept for controlling the control program of commodity delivering mechanism and Coin processing device structure and amount of money display respectively, the control of being stipulated by them.In addition, main control part 1, the control program of these terminal control sections 2,3,4 of maintenance overhead control carries out overhead control by them.While the control program of main control part 1 is because carry out controlling with the data access of each terminal control section 2,3,4, so according to the manufacturer of each terminal control section 2,3,4 and content difference different with the machine kind.
Thereby a terminal control section is replaced by new model terminal therein, under the situation of the new terminal control section that does not have before perhaps being provided with, correspondingly needs to rewrite the control program of main control part.
The control program of main control part 1 is stored among the storer 1A that is made up of EPROM, flash memory etc.In storer 1A, suppose to install certain terminal control section, store a plurality of control programs corresponding in advance with the combination of terminal control section, from these programs, selection and the control program that the terminal control section that is loaded into this moment is fit to use it to control.Then, be changed to new terminal one of in terminal control section 2,3,4 before this, when perhaps expanding the terminal control section 5 of packing into new for function, from storer 1A, find the control program of the combination that is fit to terminal control section after changing, carry out the switching of program, according to this control program operate thereafter.
In each terminal control section 2~5,, remain on and be set in inner separately non-volatile storer the version of the cognizance code of each manufacturer and the control program corresponding etc. with them.In addition, in each control program in being stored in the storer 1A of main control part 1,, record the manufacturer identification code and the version of corresponding terminal control section in order to discern separately.
Then, when change takes place the terminal control section, after energized, to main control part 1, send separately manufacturer identification code, version etc. from each terminal control section.And then the transmission of manufacturer identification code, version etc. also can be, at first, 1 pair of each terminal control section of main control part sends requirement, and each terminal control section requires transmission information according to this.
In any case, main control part 1 is if receive manufacturer identification code, version etc. from each terminal control section, then according to manufacturer identification code, version etc., from storer 1A, find the control program that is fit to these combinations, control by this control program thereafter.
, as the terminal control section 5 of function expansion usefulness, the situation of not taking out before this by the terminal control section of predefined new type is inferior installing, and the control program that is fit to newly-installed terminal control section sometimes is not stored among the storer 1A.In this case, in the expansion slot 6 in being set at main control part 1, insert the storage card 7 store the control program that comprises the control program that newly-installed terminal control section uses, from this storage card 7, read in suitable control program.And then, also record above-mentioned manufacturer identification code, version etc. in the control program in being recorded in storage card 7.
Perhaps, communication terminal 8 is set in main control part 1, can from supervisory computer 10, reads in suitable control program by communication terminal 9 in administrative center.And then communication in this case can be undertaken by the public telephone line, also can be undertaken by wireless.Then, main control part 1 under the new connected situation of terminal control section, at first, searches in the own inner storer 1A whether suitable control program is arranged.If wherein do not have, then check the inside of next storage card 7, if also do not have, then automatically switch the address of acquisition program, obtain from supervisory computer 10 by communication terminal 8,9.If do like this, then with the control program of finding automatically linkedly thereafter that is connected of terminal control section, because can automatically rewrite, so there is not the program rewriting operating mistake.
In addition, the rewriting of control program, also can rewrite control program all, can also only rewrite necessary part.Under whole situation of rewrite control program, as shown in Figure 2, differentiate the zone of start-up routine of rewriting processing etc. that above-mentioned manufacturer device code, version etc. are used to carry out program except storing, rewrite zone all of storing control program.
On the other hand, in whole control programs, when only rewriting and change, under the situation of the part of perhaps newly-installed terminal control section correspondence, the program storage portion of storer, it is regional and predesignate to be divided into function distinct program zone and extender.Promptly, as shown in Figure 3, carrying out whole procedure stores of part of the whole processing in the control program in certain zone including above-mentioned start-up routine and being used for, the program of control terminal control section 2,3,4 is stored in respectively in certain several zone, in the future during extended function, whether predesignate the extender of the new terminal control section of control is stored in certain zone, be unit part rewrite control program with these zones.
Then, for example, when terminal control section 2 is replaced by new control section, the zone of the control program that stores terminal control section 2 usefulness all is rewritten as new program.In addition, when newly being provided for the new terminal control section of expanded function, write the control program of newly-installed terminal control section in program area in expansion.
Then, from whole programs, branch out the control program that is fit to each terminal control section, carry out whole control according to branch's order.At this moment, for extender,,, indicate whether branch by it so prepare the such branch's identifying unit of admin table because also there is the situation that does not have extender.
In addition, the main control part control program in that new terminal control section storage inside of installing has this terminal control section to use when having connected this terminal control section, can send to the main control part to the control program that is stored in this terminal control section.So, just need be in the storer 1A of main control part 1 and storage card 7 and supervisory computer 10 the corresponding program of storage, make management become easy.
, each above-mentioned program is if store then efficient is higher with machine language, if but use the machine language stored programme, then when the microcomputer because of certain reason main control part 1 is replaced by another microcomputer, need be rewritten as the machine language program that new microcomputer is used, thereby need a lot of work.At this, store each control program with the form of intermediate language, in main control part, as shown in Figure 4, be built-in with the intermediate language interpretive routine that the control program of intermediate language form is transformed to the machine language that the master control part sub microcomputer uses.
So, even the microcomputer of main control part 1 is replaced by another microcomputer, also can directly use the control program of each terminal control section.
Have again, in the above-described embodiment, the control program of main control part 1, be stored among the storer 1A that forms by EPROM, flash memory etc., under this state, carry out and handle, but also can temporarily be stored in control program as in the flash memory of No. 2 memory storages etc., thereafter, in SRAM or DRAM, launch the back and carry out.So, when improving processing speed, can freely determine the memory address of the control program corresponding with each terminal control section.
The present invention is because adopted formation described above, so played following effect.
That is, the described control device of automatic vendor of first aspect present invention is at each terminal control Keep the cognizance code of each manufacturer and the version of the control program corresponding with them in the part, With the initial communications of main control part in, manufacturer identification code and version are sent to master control Part processed, the main control part is according to the manufacturer's identification generation that partly receives from each terminal control Code and version are obtained the control program corresponding with the terminal control part that is connected. Its result, When changing or the terminal control part newly is set, can automatically upgrade the control of main control part The processing procedure order when can alleviating the operation work, can also prevent error in operation.
Then, the described control device of automatic vendor of second aspect present invention, its master control part Divide according to above-mentioned manufacturer identification code and version, ordered retrieval is arranged in the main control part ROM, be inserted into storage card in the expansion slot, the exterior storage medium that can communicate by letter in Section is from wherein obtaining suitable control program. Its result, can with the company of terminal control part Connect the control program that automatically detects linkedly thereafter, can automatically rewrite.
In addition, the described control device of automatic vendor of third aspect present invention, above-mentioned main control Part, in program storage portion, predetermined function distinct program zone, extender zone, Because can be take these zones unit part rewrite control program, so the data volume of rewriting subtracts Few, make and rewrite the operating efficiency raising.
Also have, the described control device of automatic vendor of fourth aspect present invention is at terminal control Partial interior stores the control program for the main control part of this terminal control part of control, The main control part because when being loaded into the terminal control part, partly obtains from this terminal control So control program is not need to be at memory and storage card and the supervisory computer of main control part Middle storage corresponding program makes management become easy.
And then the described control device of automatic vendor of fifth aspect present invention is in above-mentioned terminal In the control section, store above-mentioned control program with the form of intermediate language, because in master control part In the branch, be built-in with the intermediate language interpretive program, it becomes the control program of this intermediate language form Be changed to the partly machine language of usefulness of main control, so even the microcomputer of main control part is little by another Machine is replaced, and also can directly use the control program of each terminal control part.