LINKING SYSTEM FOR PROGRAMMABLE CONTROLLER

Abstract: In a programmable controller linking system, a plurality of programmable controllers PC1,PC2 ...PCN are connected to one master controller MC and sequences of the programmable controllers are programmed in used of addresses representing optional input/output memory areas MA1 to MAN. Link tables are prepared by automatically alotting input/output memory areas MA1 to MAN of the programmable controllers PC1,PC2,...PCN, to the inner relays, with respect to addresses of the respective programmable controllers PC1,PC2...PCN except for the subject programmable controller,the thus prepared link tables 2 are registered in the master controller MC, and all the link tables are collected from the respective programmable controllers in the master controller MC at the link starting time to prepare an editorial link table by collecting common portions of the collected link tables. The input/output side address tables are provided for the master controller MC and the respective programmable controllers, respectively, so that the data is periodically accossed and linked between the master controller MC and the respective programmable controllers in accordance with the input/output side address tables.

Description: This invention relates to a method for interconnecting a plurality of programmable controllers. Such a method is e.g. known from US-A-4 354 226. Recently a programmable controller or sequence controller has been widely utilized for working, assembling, delivering and the like operations of a machine control in accordance with the development of computer utilizing techniques. With these operative controls, only one programmable controller controls the whole system, but it has become impossible to control the whole system with one programmable controller because of requirements of high performance and high speed operation based on the enlargement and the intricacy of the system. On the basis of these technical requirements a plurality of programmable controllers have been recently installed for a large system provided with an intricate structure so as to carry out separately the group control thereof. Since it is necessary to establish an interlock between the separate programmable controller groups with the separate type control system, a data linking means therebetween has been required. FIGS. 1 and 2 represent examples of the data link system in the conventional technique wherein FIG. 1 represents an example for a parallel link established by mutually interconnecting a plurality of programmable controllers PC1, PC2, PC3,... PCN. In order to establish the data link between optional programmable controllers PC1 to PCN in this manner, memory areas MA1 to MAN provided for respective input/output areas or inner relays or the like of the programmable controllers are split into N numbers of memory area groups which are to be allocated to the respective programmable controllers thereby to establish the fixed interconnection therebetween in which the memory areas MA1 to MAN can always well correspond to the programmable controllers, respectively. However, since in this interconnecting manner memory areas each having the same capacity are allocated to the respectively corresponding programmable controllers regardless of the frequencies of the interconnections, it has to be said that this interconnecting manner is not economical in the hardware technique, and there may be a case where memory areas which are not substantially utilized are prepared for the requirement of few frequencies of the interconnections thus being not economical. In addition, in a case where a large number of the programmable controllers constituting a system are to be disposed, the whole memory capacity therefor extremely increases and furthermore, actually memory areas of blanks are substantially not utilized. This will cause time loss in the data transferring time. On the contrary, when for eliminating this problem the memory areas are made small, the interconnectings between the respective programmable controllers are freely established. Moreover, since the fixed area type connecting manner is adapted, it is necessary to arrange the sequence programs so as to input or output signals into or from the predetermined memory areas. This may cause loss of the programming operation. FIG. 2 represents another interconnecting manner in which a plurality of programmable controllers PC1 to PCN are operatively connected to one master controller MC which is provided with a memory area MA including all link areas of the respective program memories and the memory area MA is allocated to the link areas of the programmable controllers, respectively. According to this arrangement, it is possible to establish the interconnection of all the programmable controllers PC1 to PCN through the master controller MC, but the direct interconnection between the respective programmable controllers PC1 to PCN is prohibited. In addition, the interconnection is performed through memory area MA of the master controller MC, so that the numbers of the interconnecting means are naturally limited. A communications terminal disclosed in US-A-4 354 226 provides a means for interconnecting a plurality of programmable controllers into a large programmable controller network permitting communication of control information between remotely located programmable controllers. This interconnection results in a distributed control system with a communication loop for connection of the communications terminals. US-A-4 304 001 relates to control systems of the type having a plurality of remotely located process control units connected together for a communication connection and, more particularly, to a control system in which each other remote unit sequentially assumes supervisory communication control of the communication connection and in which high reliability information transfer is achieved between remotes. The object underlying the invention is to improve connection of programmable controllers and to save data transfer time. This object is solved by the method of the invention. Further advantageous examples of the method according to the invention are subject of the dependent claims. The invention results in improving connecting systems for programmable controllers capable of connecting optional memory areas of the programmable controllers regardless of the used numbers thereof and saving the data transferring time by connecting only the memory areas actually used in accordance with a sequence program. The invention allows automatically connecting optional memory areas of the programmable controllers regardless of their numbers to the inner relays with respect to addresses of the respective programmable controllers. As mentioned above only the memory areas actually used are connected in accordance with a sequence program, i.e. the data are periodically accessed and linked between the master controller and the respective programmable controllers in accordance with the input side and output side address tables by the operation of the programmable controllers. Thereby the data transfer time is effectively reduced. The preparation of tables and allotting of addresses allows periodically accessing and linking the data between the master controller and the respective programmable controllers in accordance with the input and output address tables and the operation of the programmable controller. The nature, principle and utility of the invention will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. In the drawings: FIGS. 1 and 2 are schematic diagrams showing examples of a conventional connecting system; FIG. 3 is an interconnection diagram according to the invention showing the interconnection between a master controller and a plurality of programmable controllers; FIG. 4 is a block diagram showing the construction of the master controller and the programmable controllers according to the invention; Fig. 5 is a block diagram showing the construction of the processing unit of the programmable controller shown in FIG. 4; FIG. 6 shows one example of a sequence program utilized for the data linking according to the invention; FIG. 7 shows one example of a link table for the programmable controller; FIG. 8 shows one example of an editorial link table for the master controller; and FIG. 9 shows an example of a pointer table and an address table for the programmable controller. The interconnecting system for a plurality of programmable controllers according to the invention will be described in conjunction with FIGS. 3 to 9. Referring to FIG.3 in which a plurality, i.e. N numbers, of programmable controllers PC1 to PCN are operatively connected to one master controller MC by means of light loop which is formed with optical fibers 1. The programmable controllers PC1 to PCN control predetermined portions or units in the whole system and the flow of the control in the whole system is preliminarily determined so that the data link between the respective programmable controllers PC1 to PCN can be made together with the designing of the whole system. FIG.4 shows an example in which three programmable controllers PC1 to PC3 are connected to the master controller MC in a loop form by means of the optical fibers 1. The master controller MC is provided with an editorial link table 2, described in detail hereinafter, and a processing unit 3 carrying out the necessary data processing using of a micro computer and so on. An information transferred from the optical fibers 1 is converted by the receiver 4 into an electric signal which is then inputted into the processing unit 3. The information from the processing unit 3 is converted by a transmitter 5 into a light signal which is then transferred to the optical fibers 1. Since the programmable controllers PC1 to PC3 have the same constructions, only the construction of the programmable controller PC1 will only be explained hereunder. The programmable controller PC1 is provided with a processing unit 10 having the construction shown in detail in FIG.5. The information transferred through the optical fibers 1 is converted by a receiver 12 into an electric signal which is then inputted into a processing unit 10 as shown in FIG.4 and the information from the processing unit 10 is converted by a transmitter 13 into a light signal to be outputted therefrom. A switching unit 11 provided with contacts a and b is located at the junction points of the optical fibers 1 of the programmable controller PC1 and the optical fibers 1 are usually connected to the contact a as shown in FIG.4 so that the information from the optical fibers 1 is transferred to the receiver 12 and the succeeding programmable controllers PC2 and PC3 and is then returned to the receiver 4 of the master controller MC. The switching unit 11 is thereafter switched by the processing unit 10 and when the connection to the contact a is established to the contact b , the information to be inputted into the programmable controller PC1 is interrupted and the information outputted from the transmitter 13 is transferred to the optical fibers 1. The programmable controller PC1 is connected to a unit 20 to be controlled so as to output signals to an electromagnetic valve, a relay contact, a display lamp and the like of the unit 20 and to receive signals from a push button, a limit switch, a relay and the like in the unit 20. The schematic construction of the processing unit 10 such as in the programmable controller PC1 is described hereunder with reference to FIG.5. The processing unit 10 is provided with a CPU (central processing unit) 101 such as a microprocessor which controls the data transfer between the processing unit 10 and the master controller MC and further with a CPU 102 which controls the data transfer between the processing unit 10 and the unit 20 to be controlled. The CPUs 101 and 102 are operatively connected to a common RAM (random access memory) 103 through a bus line 106. A sequence memory 104 storing a program with respect to the unit 20 is operatively connected to the CPU 102 so as to transmit and receive data and instructions through a buffer memory 105 between the CPU 102 and the unit 20 to be controlled. The RAM 103 is provided with a storage area (i.e. input area) for storing information transferred from another programmable controller linked to the RAM 103 and with a storage area (i.e. output area) for storing information of the subject programmable controller PC1 so as to transfer that information to the other programmable controller through the master controller MC. The transfer between the buffer memory 105 and the RAM 103 is controlled by the CPU 102 and the transfer between the subject programmable controller PC1 and the other programmable controller is controlled by the CPU 102. FIG.6 shows a sequence program for the data link in use of the memory area such as optional input/output areas or inner relays of an optional programmable controller PC according to this invention. A necessary sequence for the operation of each programmable controller PC is first programmed with respect to the programmable controller PC in use of the optional input/output areas of the optional programmable controller PC. Next, for the preparation of a link table, the respective programmable controllers PC, as a portion from which the data are transferred (called transfer origin hereinafter) automatically allocated the input/output areas of the programmable controllers PC other than the subject one to the inner relays for the data link as shown in FIG.6. FIG.6 shows one example of the sequence program representing the numbers of the programmable controllers, the contents to be processed, and the processing addresses of the respective programable controllers to be interconnected with respect to the programmable controllers PC0 and PC1 and the inner relays for the data link are allocated to the respective sequences. In FIG.6, the symbols "X" represents the input, "Y" the output, "R" the inner relay and "E" represents the inner relay for the link, and for example, concerning the programmable controller PC0, a symbol "1X000" represents the address "000" of the input of the programmable controller PC1 and is allocated in the address "000" of the inner relay for the link. A symbol "Y050" represents the address "050" of the output of the programmable controller PC0 itself and is not allocated to the inner relay for the link. A symbol "3R000" represents the address "000" of the inner relay of the programmable controller PC3 and is allocated to the address "002" of the inner relay for the linking. FIG.7 shows link tables of the respective programmable controllers. These link tables are prepared before the starting of the connecting operation as a preparation stage for editting the final link table in the master controller to clarify the transfer origin and the portion to which the data is transferred (called transfer destination hereinafter) with respect to the input and output sides, respectively. The link tables prepared for the respective programmable controllers are registered into the master controller after the preparation of the link tables. On the input side of the link tables the number, the content and the addresses of the programmable controller as the transfer origin are collected in a table in accordance with the order of the addresses of the inner relay for the link with respect to the programmable controllers as the transfer destination. On the output side of the link tables the addresses of the programmable controller are present into which the data are transferred in accordance with the order of the addresses of the inner relay for the link with respect to the programmable controller as the data transfer origin. FIG.8 shows a part of an editorial link table in the master controller, which operates to collect link tables prepared in the respective programmable controllers which have already been accommodated in the master controller at the data link starting time and to prepare an editorial link table by combining the addresses of the programmable controllers to which the data are transferred and which are provided with addresses of the programmable controllers as the transfer origins commonly in accordance with the order of the addresses. The data link condition between the respective programmable controllers can be immediately recognized by monitoring the master controller in utilization of the thus prepared editorial link table. For example, with reference to FIG.8, it will be understood that the address "X000" of the programmable controller Cl as the data transfer origin is linked with the addresses "E000" and "E004" of the programmable controllers PC0 and PC3, respectively, as the data transfer destination. Furthermore, in order to accomplish the data transfer between the respective programmable controllers by one interconnecting operation, the editorial link table of the master controller is provided with pointers for designating the address of an area into which is stored data to be accessed and a pointer table consisting of ON-OFF information of the pointers. In this connection, each of the respective programmable controllers is provided therein with input side and output side address tables in accordance with the input side and output side pointer tables of the master controller as shown in FIG.9. For example, the input side pointers are pointers "0", "1", "2", and "4" and the output side pointer is a pointer 3 as shown FIG.8. This means that only memory areas of the programmable controllers which are actually utilized by using the pointers are linked. During the data link operation, the master controller operates to write the information from the programmable controllers in the ON-OFF area of the editorial link table shown in FIG.8 in accordance with the order of the pointers of the input side pointer table, to read out the data from the editorial link table in FIG.8 in accordance with the order of the pointers of the output side pointer table, and then to transfer the read-out data into the area of the programmable controller the address of which is designated by the pointer. In connection with the operation of the master controller, each of the respective programmable controllers operates to read out the data in accordance with the order of the input side address table of FIG.9, to transfer the read-out data into the master controller, and then to write the data transferred from the master controller into the input/output areas or inner relay with the address numbers of the output side address table. In the data transfer between the master controller and the programmable controllers, the number of the programmable controller is fed before the data transfer to respond only to he designated programmable controller. According to the interconnecting method of this invention utilizing the link table and the pointer of the type described hereinbefore, a programmable sequence can be programmed by utilizing input/output areas of optional ones of the respective programmable controllers thereby to connect only the actually required areas, thus saving data transfer time. Accordingly, the programmable controllers can be interconnected with no limitation of the connection numbers thereof and optional areas of optional programmable controllers can be connected with the possibly shortest transfer time. In addition, a sequence program requiring the interconnection between the programmable controllers can easily be prepared without paying specific attention to the memory areas of the programmable controllers.

Claims: A method for interconnecting a plurality of programmable controllers (PC1, PC2, PC3) which respectively have inner relays and input/output areas (103) for data linking, wherein data tables are stored in one programmable controller (PC1) and transferred therefrom to one or more of the other programmable controllers (PC2, PC3) and the data tables are provided with designation data identifying the programmable controller(s) (PC2, PC3) for which the data in the data tables are intended, characterised in that the method comprises the steps of serially interconnecting the respective programmable controllers (PC1, PC2, PC3) to one master controller (MC) for transferring data tables; preparing sequence programs for transfer of data tables between the programmable controllers (PC1, PC2, PC3) by using addresses of optional input/output areas (103) in optional ones of the programmable controllers (PC1, PC2, PC3); automatically allocating the input/output areas (103) and the inner relays (e.g. 1X000, 2X000, 3R000, 6Y050 in Fig. 6) of programmable controllers (PC2, PC3) of the programmed sequence except for its own addresses to its own inner relays (E000, E001, E002, E003 in Fig. 6) by means of the respective programmable controller (PC1); preparing data link tables containing output and input addresses (Fig. 7) from which and to which data in the data tables are transferred; storing the prepared data link tables in the master controller (MC); preparing an editorial data link table (Fig. 8) collecting common addresses to which the data in the data tables are transferred with respect to addresses of the data link tables from which the data are transferred at the beginning of the operation interconnecting the master controller (MC) and the programmable controllers (PC1, PC2, PC3); preparing an address designation table (Fig. 9) with respect to the addresses from which the data in the data tables are transferred at the beginning; providing address tables (Fig. 9) of input and output addresses corresponding to the address designation table in the respective programmable controllers (PC1, PC2, PC3); and interconnecting required areas of the master controller (MC) with those of the programmable controllers (PC1, PC2, PC3) in accordance with the address designation table and the address tables thereby to transfer the data in the data tables to the respective programmable controllers. The connecting method according to claim 1 wherein the master controller is specifically selected out of the programmable controllers. The connecting method according to claim 1 or 2 wherein the inner elements are inner relays. The connecting method according to any of claims 1 to 3 wherein the connection of the master controller and the programmable controllers is performed by using optical fibers through the inner elements. The connecting method according to any of claims 1 to 4 wherein the master controller includes the editorial data link table, and further provides a processing unit which carries out data processing by using a microprocessor and so on, a receiver which receives the data from the programmable controller and inputs into the processing unit, and a transmitter which receives the data from the processing unit and transmits to the programmable controller. The connecting method according to any of claims 1 to 5 wherein the programmable controllers respectively include a processing unit which carries out data processing by using a microprocessor and so on, a switching unit controlled by the processing unit, a receiver which receives the data from the master controller and/or another programmable controller and inputs into said processing unit, and a transmitter which receives the data from the processing unit and transmits to the master controller and/or another programmable controller through the switching unit. The connecting method according to claim 6 wherein the processing unit in the programmable controllers comprises a first CPU which controls the data transfer between the processing unit and the master controller, a second CPU which controls the data transfer between the processing unit and a unit to be controlled, a RAM which is connected to the first and second CPU's through a bus line, and a sequence memory which stores a program with respect to the processing unit and which is connected to the second CPU. The connecting method according to claim 7 wherein the processing unit further includes a buffer memory which transmits and receives the data and instructs an operation between the second CPU and said unit to be controlled. The connecting method according to claim 7 or 8 wherein the RAM includes a storage area for storing the data transferred from another programmable controller and a storage area for storing the data of a programmable controller. The connecting method according to any of claims 1 to 9 wherein the data link tables are prepared prior to starting the connecting operation. The connecting method according to claim 10 wherein the data link tables have a transfer origin and a transfer destination with respect to input and output. The connecting method according to any of claims 1 to 11 wherein the editorial data link table is prepared by combining first addresses of the programmable controllers to which the data are transferred and second addresses which are commonly provided in the programmable controllers as transfer origins in accordance with the order of the first addresses. The connecting method according to any of claims 1 to 12 wherein the editorial data link table has address designation areas for designating the address of an area into which data are stored to be accessed and an address designation table consisting of binary information. The connecting method according to claim 13 wherein the programmable controllers further respectively provide an input address table and an output address table in accordance with an input address designation table and an output address designation table of the master controller.

Inventors: OKAYAMA, YOSHIHIKO
Applicants: TOSHIBA KIKAI KABUSHIKI KAISHA
Application year: 1986
Main classification: G05B19
IPC codes: G05B19