[go: up one dir, main page]

US20180004182A1 - Controller system and control method - Google Patents

Controller system and control method Download PDF

Info

Publication number
US20180004182A1
US20180004182A1 US15/636,011 US201715636011A US2018004182A1 US 20180004182 A1 US20180004182 A1 US 20180004182A1 US 201715636011 A US201715636011 A US 201715636011A US 2018004182 A1 US2018004182 A1 US 2018004182A1
Authority
US
United States
Prior art keywords
controller
controllers
buffer memory
output data
plc
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US15/636,011
Other versions
US10606232B2 (en
Inventor
Motoyoshi Miyachi
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fanuc Corp
Original Assignee
Fanuc Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fanuc Corp filed Critical Fanuc Corp
Assigned to FANUC CORPORATION reassignment FANUC CORPORATION ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: MIYACHI, MOTOYOSHI
Publication of US20180004182A1 publication Critical patent/US20180004182A1/en
Application granted granted Critical
Publication of US10606232B2 publication Critical patent/US10606232B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/052Linking several PLC's
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/11Plc I-O input output
    • G05B2219/1105I-O

Definitions

  • the present invention relates to a controller system that includes a plurality of controllers and a higher level control device that controls and manages the plurality of controllers, and a control method.
  • JP2013-168090A discloses a multicontroller system that includes a plurality of PLCs (programmable logic controllers) used as industrial devices, and a shared server that manages the plurality of PLCs. Each of the plurality of PLCs is connected with a control target of each PLC via an I/O (Input/Output) device. Further, when detecting an abnormal PLC, the shared server of the multicontroller system selects a PLC of a small load, i.e., a PLC that can execute an additional program. Then, the selected PLC is made to load a program executed by the PLC determined as an abnormal PLC and execute the program in place of the abnormal PLC.
  • PLCs programmable logic controllers
  • I/O Input/Output
  • data such as an input/output signal of an I/O device (I/O equipment) is stored in a main memory in a PLC.
  • I/O equipment I/O equipment
  • data such as an input/output signal of an I/O device (I/O equipment) is stored in a main memory in a PLC.
  • the other PLC needs to output data that does not contradict execution results obtained so far, to the I/O device connected to the control target of the abnormal PLC.
  • the given PLC needs to copy data stored in the main memory as is to the other PLC that takes over the control.
  • This I/O (input/output) signal and the like have a large size of several hundreds of kilobytes to several megabytes.
  • a copy time substantially exceeds one execution cycle of the PLC for executing the program. Therefore, it is not possible to continue controlling the control target.
  • reliability of data stored in a main memory is also low. Therefore, it is not preferable to copy this data to the other PLC, and continue controlling the control target of the PLC in which the abnormality has occurred.
  • JP2013-168090A cannot avoid probabilities of interruption of the control of the control target or an output of data that contradicts the execution results obtained so far to the control target when the control of the control target is switched to the other PLC.
  • a first aspect of the present invention is a controller system: a plurality of controllers; a plurality of I/O devices each configured to connect and transmit necessary information between a control target of each of the plurality of controllers and each of the plurality of controllers; and a higher level control device configured to control and manage the plurality of controllers
  • the higher level control device includes a storage unit configured to store a plurality of programs to be executed by each of the plurality of controllers, and a processor configured to allocate the plurality of programs stored in the storage unit as self-assigned programs for respective controllers to cause each of the plurality of controllers to control the control target connected to itself via the I/O device, and further allocate all or part of the plurality of programs stored in the storage unit as other programs to the higher level control device and the plurality of controllers to have the all or part of the plurality of programs be doubly executed in parallel in one execution cycle
  • each one of the plurality of controllers includes a communication unit including a first input buffer memory configured to store input data transmitted from the control
  • the first aspect of the present invention is the controller system, and each one of the plurality of controllers may further include a processor configured to generate the first output data by executing the self-assigned program allocated to the one controller based on the input data transmitted from the control target connected to the one controller via the I/O device, and generate the second output data by executing the other program allocated to the one controller based on the input data transmitted from the control target connected to another one of the controllers via another I/O device and controlled according to the other program allocated to the one controller.
  • the one controller can execute the program (the self-assigned program or the other program) based on the input data transmitted from any control target, generate the output data outputted to the control target that has transmitted the input data, and control the control target in the stable state.
  • the first aspect of the present invention is the controller system, and the processor of the higher level control device may be configured to generate the second output data by executing the other program allocated to the higher level control device based on the input data transmitted from the control target controlled according to the other program allocated to the higher level control device. Consequently, the higher level control device can execute the other program based on the input data transmitted by the control target, generate the output data outputted to the control target that has transmitted the input data, and control the control target in the stable state.
  • the first aspect of the present invention is the controller system, and the processor of the higher level control device may be configured to output the selection information to the plurality of controllers to cause one of the controllers determined as a normal controller to output the first output data stored in the first output buffer memory to the control target connected to the normal controller via the I/O device, and cause another of the controllers determined as an abnormal controller to output the second output data stored in the second output buffer memory to the control target connected to the abnormal controller via the I/O device. Accordingly, even when an abnormality occurs in the controller, in place of the controller determined as the abnormal controller, the other normal controller can control the control target connected to the controller determined as the abnormal controller. Consequently, while continuing controlling the control target connected to the controller determined as the abnormal controller in the stable state, it is possible to switch the control subjects of the control target connected to the controller determined as the abnormal controller.
  • the first aspect of the present invention is the controller system, and the processor of the higher level control device may be configured to determine whether each of the plurality of controllers is normal or abnormal based on at least one of error information and a survival signal of each of the plurality of controllers obtained from the plurality of controllers. Consequently, the higher level control device can precisely determine whether the controller is normal or abnormal.
  • the first aspect of the present invention is the controller system, and the communication unit of the controller may further include a selector configured to select one of the first output data and the second output data as output data based on the selection information, wherein the first output data is stored in the first output buffer memory, the second output data is stored in the second output buffer memory, and the output data is outputted to the control target connected to each controller via the I/O device. Consequently, it is possible to easily switch the output data outputted to the I/O device.
  • the first aspect of the present invention is the controller system, and the processor of the higher level control device may be configured to obtain load information via the communication unit of the plurality of controllers and allocate the other program based on the obtained load information, wherein the load information indicates a load applied when each of the plurality of controllers executes the self-assigned program. Consequently, it is possible to allocate the other program such that each of the plurality of controllers finishes processing of the program in one execution cycle.
  • the first aspect of the present invention is the controller system, and the higher level control device may be configured to receive the input data stored in the first input buffer memory of the one controller connected via the I/O device to the control target controlled according to the other program allocated to the higher level control device, and transmit the second output data to the one controller connected via the I/O device to the control target controlled according to the other program allocated to the higher level control device. Consequently, the higher level control device can transmit to the controller the second output data that does not contradict the execution results obtained so far, and control the control target connected to the PLC via the I/O device.
  • the first aspect of the present invention is the controller system, and the each one of the plurality of controllers may further include a second input buffer memory configured to store the input data transmitted from the control target connected to another one of the controllers via the I/O device and controlled according to the other program allocated to the one controller, and a third output buffer memory configured to store the second output data obtained by executing the other program allocated to the one controller to control the control target connected to the other one of the controllers via the I/O device, and is configured to receive the input data via the higher level control device, wherein the input data is stored in the first input buffer memory of the other one of the controllers connected via the I/O device to the control target controlled according to the other program allocated to the one controller, store the received input data in the second input buffer memory, and transmit the second output data to the other one of the controllers via the higher level control device, wherein the second output data is stored in the third output buffer memory, and the other one of the controllers is connected via the I/O device to the control target controlled according to the other program allocated to the one
  • a second aspect of the present invention is a control method of a controller system that includes: a plurality of controllers; a plurality of I/O devices configured to connect a control target of each of the plurality of controllers to each of the plurality of controllers, and transmit necessary information between the control target and each of the controllers; and a higher level control device configured to control and manage the plurality of controllers, the higher level control device includes a storage unit configured to store each of a plurality of programs executed by each of the plurality of controllers, and each of the plurality of controllers includes a communication unit including a first input buffer memory, a first output buffer memory and a second output buffer memory, and the control method includes: an allocating step of, at the higher level control device, allocating each of the plurality of program stored in the storage unit as a self-assigned program to each of the plurality of controllers to cause each of the plurality of controllers to control the control target connected to each controller via the I/O device, and further allocating all or part of the plurality of
  • the second aspect of the present invention is the control method, and may further include: a first generating step of, at the one controller, generating the first output data by executing the self-assigned program allocated to the one controller based on the input data transmitted from the control target connected to the one controller via the I/O device; a second generating step of, at the one controller, generating the second output data by executing the other program allocated to the one controller based on the input data transmitted from the control target connected to another one of the controllers via the I/O device and controlled according to the other program allocated to the one controller; and a third generating step of, at the higher level control device, generating the second output data by executing the other program allocated to the higher level control device based on the input data transmitted from the control target controlled according to the other program allocated to the higher level control device.
  • the controller can execute the program (the self-assigned program or the other program) based on the input data transmitted by the control target, generate the output data outputted to the control target that has transmitted the input data, and control the control target in the stable state.
  • the higher level control device can execute the other program based on the input data transmitted by the control target, generate the output data outputted to the control target that has transmitted the input data, and control the control target in the stable state.
  • the second aspect of the present invention is the control method
  • the communication unit may further include a selector
  • the control method may further include an abnormality determining step of, at the higher level control device, determining whether each of the plurality of controllers is normal or abnormal based on at least one of error information and a survival signal of the each of the plurality of controllers obtained from the plurality of controllers; and a selecting/outputting step of, at the higher level control device, outputting the selection information to the plurality of controllers to cause one of the controllers determined as a normal controller to output the first output data stored in the first output buffer memory to the control target connected to the normal controller via the I/O device, and cause another of the controllers determined as an abnormal controller to output the second output data stored in the second output buffer memory to the control target connected to the abnormal controller via the I/O device; and a selecting step of, at the selector of the communication unit of each of the plurality of controllers, selecting one of the first output data and the second output data as output data based on the selection information, where
  • the higher level control device can precisely determine whether the controller is normal or abnormal. Further, even when an abnormality occurs in the controller, in place of the controller determined as the abnormal controller, another normal controller can control the control target connected to the controller determined as the abnormal controller. Consequently, while continuing controlling the control target connected to the controller determined as the abnormal controller in the stable state, it is possible to switch the control subjects of the control target connected to the controller determined as the abnormal controller. Further, the communication unit can easily switch the output data outputted to the I/O device.
  • the second aspect of the present invention is the control method, and may include an obtaining step of, at the higher level control device, obtaining load information via the communication unit of the plurality of controllers, wherein the load information indicates a load applied when each of the plurality of controllers executes the self-assigned program, and, in the allocating step, the other program may be allocated based on the obtained load information. Consequently, it is possible to allocate the other program to cause each of the plurality of controllers to finish processing of the program in one execution cycle.
  • the second aspect of the present invention is the control method, and may further include: a receiving step of, at the higher level control device, receiving the input data stored in the first input buffer memory of the controller connected via the I/O device to the control target controlled according to the other program allocated to the higher level control device; and a first transmitting step of, at the higher level control device, transmitting the second output data to the controller connected via the I/O device to the control target controlled according to the other program allocated to the higher level control device. Consequently, the higher level control device can transmit to the controller the second output data that does not contradict the execution results obtained so far, and control the control target connected to the PLC via the I/O device.
  • the second aspect of the present invention is the control method
  • the communication unit may further include a second input buffer memory and a third output buffer memory
  • the control method may further include: a second inputting/storing step of, at the one controller, storing the input data in the second input buffer memory, wherein the input data is transmitted from the control target connected to the other controller via the I/O device and controlled according to the other program allocated to the one controller; and a third outputting/storing step of, at the one controller, storing the second output data in the third output buffer memory, wherein the second output data is obtained by executing the other program allocated to the one controller to control the control target connected to the other controller via the I/O device; and a second transmitting step of, at the one controller, transmitting the second output data stored in the third output buffer memory to the other controller via the higher level control device, and the other controller is connected via the I/O device to the control target controlled according to the other program allocated to the one controller, and, in the second inputting/storing step, the one controller may be configured to receive the
  • FIG. 1 is an entire schematic configuration diagram of a PLC system according to an embodiment
  • FIG. 2 is a schematic configuration diagram of a PC shown in FIG. 1 ;
  • FIG. 3 is a schematic configuration diagram of a PLC shown in FIG. 1 ;
  • FIG. 4 is a flowchart showing a program allocating operation of the PLC system
  • FIG. 5 is a view showing an example where all programs stored in a main memory shown in FIG. 2 are respectively allocated to a plurality of PLCs to cause each of the plurality of PLCs to control an I/O device connected to each of the plurality of PLCs;
  • FIG. 6 is a time chart showing that each of the plurality of PLCs executes (processes) a self-assigned program (the allocated self-assigned program by the allocation shown in FIG. 5 );
  • FIG. 7 is a view showing an example where all programs stored in the main memory shown in FIG. 2 are allocated to the PC and the plurality of PLCs to cause all the programs to be doubly executed in parallel in one execution cycle;
  • FIG. 8 is a time chart showing that each of the plurality of PLCs executes (processes) the program(s) (the self-assigned program and other programs allocated by the allocation shown in FIG. 7 );
  • FIG. 9 is a sub flowchart showing a processing operation in step S 6 in FIG. 4 ;
  • FIG. 10 is a view showing an example where, when an abnormality occurs in one of the plurality of PLCs, instead of the abnormal PLC, the PC controls an I/O device connected to the abnormal PLC;
  • FIG. 11 is a detailed configuration diagram of the PLC shown in FIG. 3 ;
  • FIG. 12 is a detailed configuration diagram of the PC shown in FIG. 2 ;
  • FIG. 13 is a flowchart showing processing of determining a logical value of selection information by the PC
  • FIG. 14 is a time chart showing processing of data delivery between a normal PLC and the PC, and between the normal PLC and an I/O device connected to the normal PLC;
  • FIG. 15 is a time chart showing processing of data delivery between an abnormal PLC and the PC, and between the abnormal PLC and an I/O device connected to the abnormal PLC.
  • FIG. 1 is an entire schematic configuration diagram of a PLC (controller) system 10 according to the embodiment.
  • the plurality of I/O devices 16 n are connected with control targets 18 n of the plurality of PLCs 14 n .
  • the plurality of I/O devices 16 n connect the control targets 18 n of the plurality of PLCs 14 n , to the plurality of PLCs 14 n , and transmit necessary information (data) between the control targets 18 n and the PLCs 14 n .
  • 16 1 represents the plurality of I/O devices 16 n connected to the PLC 14 1 by the daisy chain.
  • 16 2 to 16 5 represent the plurality of I/O devices 16 n connected to the PLCs 14 2 to 14 5 , respectively, by the daisy chain.
  • 18 1 represents the control target 18 n connected to the I/O devices 16 1 .
  • 18 2 to 18 5 represent the control targets 18 n connected to the I/O devices 16 2 to 16 5 .
  • the control targets 18 1 are connected to the PLCs 14 1 via the I/O devices 16 1 .
  • the control targets 18 2 to 18 5 are connected to the PLC 14 2 to PLC 14 5 via the I/O devices 16 2 to 16 5 .
  • the control targets 18 n are, for example, motors or pumps.
  • the PC 12 , the plurality of PLCs 14 n and the plurality of I/O devices 16 n are connected by an EtherCAT (registered trademark) system.
  • EtherCAT registered trademark
  • the PC 12 and the PLC 14 n write address information of the transmission destination PC or PLC 14 n and transmission data in a frame, and transmit them.
  • the PC 12 transmits the frame in which address information of the transmission destination PLC 14 n and the transmission data are written, to the PLC 14 1 connected to a subsequent stage of the PC 12 .
  • the PLC 14 n determines whether or not the frame has been transmitted based on the address information included in the frame.
  • the PLC 14 n imports data written in the frame when determining that the transmitted frame is transmitted to itself, and transmits the frame transmitted as is to the PLC 14 n connected to a subsequent stage when determining that the frame is not transmitted to itself.
  • the PLC 14 n transmits the frame addressed to the PC 12 transmitted from the subsequent stage to the PC 12 or the PLC 14 n connected to the previous stage. In this regard, transmission and reception between the PLCs 14 n are performed via the PC 12 .
  • the PLC 14 2 transmits data to the PLC 14 4
  • the PLC 14 2 sends the frame including the data to the PC 12 once, and then the PC 12 transmits the data to the PLC 14 4 .
  • FIG. 2 is a schematic configuration diagram of the PC 12 .
  • FIG. 3 is a schematic configuration diagram of the PLC 14 n .
  • the PC 12 includes a processor 20 such as a CPU, a main memory (storage unit) 22 and a communication unit 24 .
  • the PLC 14 n includes a processor 30 such as a CPU, a main memory (storage unit) 32 and a communication unit 34 .
  • the communication units 34 of the plurality of these PLCs 14 n are connected with the communication unit 24 of the PC 12 by the daisy chain (see FIG. 1 ).
  • the main memory 22 of the PC 12 stores a plurality of programs Pn executed (processed) by each of the plurality of PLCs 14 n .
  • Pn are programs for controlling the control targets 18 n .
  • P 1 represents the program Pn for controlling the control target 18 1 connected to the PLC 14 1 via the I/O device 16 1 .
  • P 2 to P 5 represent the programs Pn for controlling the control targets 18 2 to 18 5 connected to the PLCs 14 2 to 14 5 via the I/O devices 16 2 to 16 5 .
  • the processor 20 of the PC 12 allocates the plurality of programs Pn (P 1 to P 5 ) stored in the main memory 22 to the PC 12 and the plurality of PLCs 14 n (PLC 14 1 to 14 5 ).
  • the allocated programs Pn are loaded to the allocation tar get PLCs 14 n . That is, the processor 20 transmits the program Pn via the communication unit 24 .
  • the processor 30 of the allocation target PLC 14 n obtains the allocated program Pn via the communication unit 34 , and stores the programs Pn in the main memory 32 .
  • step S 1 the processor 20 allocates the plurality of programs Pn stored in the main memory 22 to the plurality of PLCs 14 n to cause each of the plurality of PLCs 14 n to control the control targets 18 n connected to itself via the I/O devices 16 n .
  • the program Pn allocated to the PLC 14 n to control the control target 18 n connected to the PLC 14 n via the I/O devices 16 n will be referred to as the self-assigned program Pn below.
  • the program P 1 as the self-assigned program Pn is allocated to the PLC 14 1 .
  • the self-assigned programs P 2 to P 5 are allocated to the PLC 14 2 to PLC 14 5 .
  • the plurality of PLCs 14 n finish executing the self-assigned programs Pn (P 1 to P 5 ) in one execution cycle of the PLC 14 n (referred to as one execution cycle below).
  • FIG. 6 is a time chart showing that each of the plurality of PLCs 14 n executes (processes) the self-assigned program Pn (the self-assigned program Pn allocated by the allocation shown in FIG. 5 ).
  • the processor 20 of the PC 12 loads the plurality of allocated self-assigned programs Pn (P 1 to P 5 ) to the plurality of PLCs 14 n ( 14 1 to 14 5 ) (step S 2 ).
  • the processor 30 of each of the plurality of PLCs 14 n starts executing the self-assigned program Pn (step S 3 ), calculates the load information resulting from execution of the self-assigned program Pn, and transmits the load information to the processor 20 of the PC 12 (step S 4 ).
  • the processor 20 of the PC 12 causes the plurality of PLCs 14 n ( 14 1 to 14 5 ) to stop executing all self-assigned programs Pn (step S 5 ).
  • the processor 20 causes the processors 30 of all the PLCs 14 n ( 14 1 to 14 5 ) to stop executing the self-assigned programs Pn by outputting stop signals to the processors 30 of all PLCs 14 n ( 14 1 to 14 5 ) via the communication unit 24 and the communication units 34 .
  • the processor 20 further allocates all or part of the plurality of programs Pn to the PC 12 and the plurality of PLCs 14 n based on the load information of all PLCs 14 n ( 14 1 to 14 5 ) collected in step S 4 to cause the PC 12 and the plurality of PLCs 14 n to doubly execute all or part of the plurality of programs Pn stored in the main memory 22 in parallel in one execution cycle (step S 6 ).
  • the programs Pn for controlling the control targets 18 n other than the control targets 18 n connected to one PLC 14 n via the I/O device 16 n i.e., the control targets 18 n connected to the other PLCs 14 n via the I/O devices 16 n are allocated to the one PLC 14 n .
  • the program Pn is allocated to the PC 12 , too, in some cases.
  • the processor 20 allocates the programs Pn so as not to cause one PLC 14 n to execute the same program Pn twice.
  • the programs Pn allocated to the PC 12 and the PLCs 14 n to control the control targets 18 n connected to the other PLCs 14 n via the I/O devices 16 n will be referred to as the other programs Pn below in some cases.
  • FIG. 7 is a view showing an example where all programs Pn (P 1 to P 5 ) are allocated to the PC 12 and the plurality of PLCs 14 n to cause the PC 12 and the plurality of PLCs 14 n to doubly execute all programs Pn (P 1 to P 5 ) stored in the main memory 22 in parallel in one execution cycle.
  • FIG. 8 is a time chart showing that each of the plurality of PLCs 14 n executes (processes) the program Pn (the self-assigned program Pn and the other program Pn allocated by the allocation shown in FIG. 7 ). As shown in FIG. 7 , the other program P 4 is further allocated to the PLC 14 1 , and the other program P 1 is further allocated to the PLC 14 4 .
  • the other programs P 2 , P 3 , P 5 that cannot be allocated to the PLC 14 n are allocated to the PC 12 .
  • Loads (or load factors) of the programs P 2 , P 3 , P 5 allocated to the PLCs 14 2 , 14 3 , 14 5 are high. Therefore, the other programs Pn are not additionally allocated to the PLCs 14 2 , 14 3 , 14 5 . Allocation of these other programs Pn will be described later in detail.
  • the processor 20 of the PC 12 causes the plurality of PLCs 14 n (PLC 14 1 , PLC 14 4 ) to load the other programs Pn (P 4 , P 1 ) allocated to the plurality of PLCs 14 n ( 14 1 , 14 4 ) (step S 7 ).
  • the processor 20 may cause the plurality of PLCs 14 n to load the allocated self-assigned programs Pn again, while having the plurality of PLCs 14 n load the other allocated programs Pn.
  • the PC 12 and the plurality of PLCs 14 n execute the allocated programs Pn (including the self-assigned programs Pn and the other programs Pn) (step S 8 ).
  • FIG. 8 shows that the PLCs 14 n ( 14 1 , 14 4 ) execute the self-assigned programs Pn (P 1 , P 4 ) and then execute the other programs Pn (P 4 , P 1 ).
  • an execution order of the programs Pn may be reverse.
  • Lpmax represents a maximum load that is applicable to the processor 20 of the PC 12 in one execution cycle.
  • Lmax represents a maximum load that is applicable to the processor 30 of each PLC 14 n in one execution cycle.
  • the processing performance of the processor 30 of each PLC 14 n is the same.
  • the processing performance of the processor 20 of the PC 12 is higher than the processing performances of the processors 30 of the PLCs 14 n .
  • Lpmax>Lmax holds.
  • Ln (L 1 to L 5 ) represents a load that is applied during execution of the programs Pn (P 1 to P 5 ).
  • Lpc represents a unique load that is applied in one execution cycle of the processor 20 of the PC 12 .
  • This load Ln (L 1 to L 5 ) is based on load information of each PLC 14 n collected in step S 4 in FIG. 4 .
  • the load factor of the PLC 14 n takes a value obtained by dividing the load applied to the PLC 14 n by the maximum load Lmax.
  • the load factor of the load applied during execution of the program P 1 is L 1 /Lmax.
  • load factors of loads applied during execution of the programs P 2 to P 5 are L 2 /Lmax, L 3 /Lmax, L 4 /Lmax and L 5 /Lmax.
  • the programs Pn of higher priorities are allocated in order.
  • the priorities are in order of P 1 ⁇ P 2 ⁇ P 3 ⁇ P 4 ⁇ P 5
  • the programs Pn are allocated as the other programs Pn in this order to the other PLCs 14 n ( 14 1 to 14 5 ).
  • FIG. 9 is a sub flowchart showing a processing operation in step S 6 in FIG. 4 .
  • the processor 20 of the PC 12 selects a program of the highest priority (step S 11 ).
  • the priorities are in order of P 1 ⁇ P 2 ⁇ P 3 ⁇ P 4 ⁇ P 5 . Therefore, the processor 20 selects the program P 1 in step S 11 .
  • the processor 20 calculates an acceptable load of the PC 12 and each of the plurality of PLCs 14 n ( 14 1 to 14 5 ) by using the load information of each PLC 14 n collected in step S 4 in FIG. 4 (step S 12 ).
  • This acceptable load is a load that can be further processed in one execution cycle.
  • the processor 20 calculates an acceptable load of the PC 12 and each of the plurality of PLCs 14 n ( 14 1 to 14 5 ) based on the program Pn currently allocated to the PC 12 and each of the plurality of PLCs 14 n ( 14 1 to 14 5 ). At this time, no program Pn is allocated to the PC 12 , and only the self-assigned programs Pn are allocated to the plurality of PLCs 14 n .
  • the processor 20 determines whether or not there is the PLC 14 n that affords to accept the currently selected program P 1 as the other program P 1 (step S 13 ). In the present embodiment, LL 2 ⁇ L 1 , LL 3 ⁇ L 1 , LL 4 >L 1 and LL 5 ⁇ L 1 hold (see FIG. 8 ). Therefore, the processor 20 determines that the PLC 14 4 affords to accept the program P 1 as the other program P 1 .
  • the program P 1 is the self-assigned program P 1 for the PLC 14 1 . Therefore, the processor 20 does not determine whether or not the PLC 14 1 can accept the program P 1 . Further, even when there is the PLC 14 n that affords to accept the currently selected program Pn as the other program Pn, if the load factor of this PLC 14 n exceeds a threshold value (e.g., 90%) as a result of acceptance of the other program Pn, the processor 20 may determine that this PLC 14 n does not afford to accept the other program Pn.
  • a threshold value e.g. 90%
  • step S 13 When determining in step S 13 that the PLC 14 4 affords to accept the program P 1 , the processor 20 allocates the currently selected program P 1 as the other program P 1 to the PLCs 14 4 (step S 14 ), and the flow moves to step S 15 .
  • step S 15 the processor 20 determines whether or not there is any program Pn that has not been selected yet.
  • step S 15 the processor 20 newly selects the program Pn of the second highest priority (step S 16 ), and the flow returns to step S 12 .
  • the program Pn to be selected is switched from the program P 1 to the program P 2 . That is, the program P 2 is the second highest priority after the program P 1 . Therefore, at this time, the processor 20 newly selects the program P 2 in step S 16 .
  • step S 12 the processor 20 calculates the acceptable acceptance loads LLp, LL 1 to LL 5 of the PC 12 and the plurality of PLCs 14 n ( 14 1 to 14 5 ).
  • the acceptance loads LL 1 to LL 3 , LL 5 of the other PLCs 14 1 to 14 3 , 14 5 remain the same, and the acceptance load LLp of the PC 12 also remains the same.
  • step S 13 the processor 20 determines whether or not there is the PLC 14 n that affords to accept the currently selected program P 2 as the other program P 2 .
  • the processor 20 determines that there is no PLC 14 n that affords to accept the program P 2 as the other program P 2 .
  • step S 13 when determining that there is no PLC 14 n that affords to accept the program P 2 as the other program P 2 , the processor 20 determines whether or not the PC 12 affords to accept the currently selected program P 2 as the other program Pn (step S 17 ). In the present embodiment, LLp>L 2 holds (see FIG. 8 ). Therefore, the processor 20 determines that the PC 12 affords to accept the program P 2 as the other program P 2 .
  • step S 17 When determining in step S 17 that the PC 12 affords to accept the program P 2 as the other program P 2 , the processor 20 allocates the currently selected program P 2 as the other program P 2 to the PC 12 (step S 18 ), and the flow moves to step S 15 .
  • the plurality of programs Pn (P 1 to P 5 ) are allocated as the other programs Pn (P 1 to P 5 ) to the PC 12 and the plurality of PLCs 14 n as shown in FIG. 7 .
  • step S 15 When determining in step S 15 that there is no program Pn that has not yet been selected, the processor 20 ceases the processing, and the flow moves to step S 7 in FIG. 4 .
  • step S 17 When determining in step S 17 that the PC 12 does not afford to accept the currently selected program Pn as the other program Pn, the flow then moves to step S 15 .
  • any program Pn that is not accepted by the plurality of PLCs 14 n and the PC 12 as the other program Pn is not allocated to any one of the plurality of PLCs 14 n and the PC 12 .
  • step S 17 When determining in step S 17 that the PC 12 does not afford to accept the currently selected program Pn as the other program Pn, the processor 20 may cease the processing, and the flow may move to step S 7 in FIG. 4 .
  • the processor 20 may select the program Pn at random or in a predetermined order, and allocate the selected program Pn as the other program Pn to one of the plurality of PLCs 14 n and the PC 12 .
  • the same program Pn is executed in parallel in one execution cycle. Consequently, even when an abnormality or a failure occurs in one PLC 14 n , the other PLC 14 n that executes as the other program Pn the self-assigned program Pn of the one PLC 14 n in which the abnormality or the failure has occurred (also referred to as an abnormal PLC) can control the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n .
  • an abnormality or a failure
  • the PC 12 executes the self-assigned program P 3 of the PLC 14 3 as the other program P 3 .
  • FIG. 11 is a detailed configuration diagram of the PLC 14 1 .
  • the communication unit 34 of the PLC 14 1 includes a system bus I/F 40 that communicates with the processor 30 , a first input buffer memory 42 , a second input buffer memory 44 , a first output buffer memory 46 , a second output buffer memory 48 , a third output buffer memory 50 , a MAC 52 that communicates with the I/O device 16 1 connected to the PLC 14 1 , a MAC 54 that communicates with the PC 12 and the other PLCs 14 2 than the PLC 14 1 , a selector 56 , and a register 58 .
  • the system bus I/F 40 and the processor 30 are connected via a system bus 60 .
  • the MAC 52 is connected with a PHY (physical layer) chip 64 via a MII (Media Independent Interface) 62 .
  • the communication unit 34 is connected with the I/O device 16 1 of the PLC 14 1 via this PHY chip 64 .
  • the MAC 54 is connected to PHY chips 68 , 70 via the MII 66 .
  • the communication unit 34 is connected with the communication unit 24 of the PC 12 provided at a previous stage via the PHY chip 68 , and is connected with the communication unit 34 of the other PLC provided at a subsequent stage (next stage) via the PHY chip 70 .
  • the PHY chips 68 are connected with the PLCs 14 1 to 14 4 not with the PC 12 . Further, in a case of the PLC 14 5 at the last stage, the PHY chip 70 is not connected to any of the PLC 14 n .
  • the MAC 52 receives a frame including input data sent from the I/O device 16 1 connected to the PLC 14 1 via the PHY chip 64 and the like. This input data is transmitted from the control target 18 1 connected to the I/O device 16 1 .
  • the MAC 52 extracts the input data from the received frame, and stores the extracted input data in the first input buffer memory 42 .
  • the processor 30 of the PLC 14 1 reads the input data stored in the first input buffer memory 42 via the system bus I/F 40 and the system bus 60 , and stores the read input data in the main memory 32 .
  • the processor 30 stores, in the main memory 32 , output data (also referred to as first output data below) obtained by executing the self-assigned program P 1 based on the input data stored in the main memory 32 (first input buffer memory 42 ).
  • the processor 30 stores the first output data stored in the main memory 32 , in the first output buffer memory 46 via the system bus 60 .
  • the MAC 54 receives via the PC 12 a frame including input data sent from the I/O device 16 4 connected to the PLC 14 4 via the PHY chip 68 .
  • the input data sent from this I/O device 16 4 is transmitted from the control target 18 4 controlled according to the other program P 4 (see FIG. 7 ) allocated to the PLC 14 4 .
  • the MAC 54 extracts the input data from the received frame, and stores the extracted input data in the second input buffer memory 44 .
  • the processor 30 of the PLC 14 1 reads the input data stored in the second input buffer memory 44 via the system bus I/F 40 and the system bus 60 , and stores the read input data in the main memory 32 .
  • the main memory 32 and the second input buffer memory 44 store input data per other program Pn (per I/O device 16 n or PLC 14 n that has outputted the input data).
  • the processor 30 stores, in the main memory 32 , output data (also referred to as second output data below) obtained by executing the other program P 4 based on the input data (the input data from the control target 18 4 ) stored in the main memory 32 (second input buffer memory 44 ).
  • the processor 30 stores the second output data stored in the main memory 32 , in the third output buffer memory 50 via the system bus 60 .
  • the main memory 32 and the third output buffer memory 50 store the second output data per other program Pn (per I/O device 16 n or PLC 14 n that is a second output data output target).
  • the MAC 54 writes the second output data in the frame to transmit the second output data stored in the third output buffer memory 50 to the PLC 14 4 , and transmits the written frame to the PC 12 via the PHY chip 68 .
  • Address information of the transmission destination PLC 14 4 is added to this frame.
  • the PC 12 writes selection information to the received frame to transmit to the PLC 14 4 .
  • the second output data included in this frame is stored in the second output buffer memory 48 of the PLC 14 4 , and the selection information is stored in the register 58 of the PLC 14 4 .
  • the PLC 14 1 can control the control target 18 4 connected to the PLC 14 4 via the I/O device 16 4 .
  • the selection information is information indicating which one of the first output data stored in the first output buffer memory 46 and the second output data stored in the second output buffer memory 48 is selected as output data outputted (transmitted) from the PLC 14 n to the I/O device 16 n .
  • this selection information is one-bit data.
  • a logical value “0” of the selection information means that the PLC 14 n outputs the first output data stored in the first output buffer memory 46 to the I/O device 16 n .
  • a logical value “1” of the selection information means that the PLC 14 n outputs the second output data stored in the second output buffer memory 48 to the I/O device 16 n .
  • the MAC 54 To transmit the input data stored in the first input buffer memory 42 to the PLC 14 4 to which the self-assigned program P 1 allocated to the PLC 14 1 has been allocated as the other program P 1 (see FIG. 7 ), the MAC 54 writes this input data in the frame and transmits the written frame to the PC 12 via the PHY chip 68 . Address information of the transmission destination PLC 14 4 is added to this frame. The PC 12 transmits this received frame to the PLC 14 4 . The input data included in this frame is stored in the second input buffer memory 44 of the PLC 14 4 .
  • the MAC 54 receives through the PHY chip 68 the frame including the second output data sent via the PC 12 from the PLC 14 4 to which the self-assigned program P 1 allocated to the PLC 14 1 has been allocated as the other program P 1 .
  • This second output data transmitted from the PLC 14 4 to the PLC 14 1 is data stored in the third output buffer memory 50 of the PLC 14 4 .
  • the MAC 54 extracts the second output data and the selection information from the received frame, and stores the extracted second output data in the second output buffer memory 48 and the extracted selection information in the register 58 . Consequently, the PLC 14 4 can control the control target 18 1 connected to the PLC 14 1 via the I/O device 16 1 .
  • the selector 56 selects one of the first output data stored in the first output buffer memory 46 and the second output data stored in the second output buffer memory 48 based on the selection information stored in the register 58 , and transmits the selected one to the MAC 52 .
  • the selector 56 transmits the first output data to the MAC 52 in a case of the logical value “0” of the selection information, and transmits the second output data to the MAC 52 in a case of the logical value “1” of the selection information.
  • the MAC 52 writes in the frame the output data sent from the selector 56 and outputs (transmits) the written frame to the I/O device 16 1 .
  • the I/O device 16 1 extracts the output data from the sent frame, and outputs the extracted output data to the control target 18 1 .
  • the selector 56 and the register 58 can switch whether the PLC 14 1 or the PLC 14 4 controls the control target 18 1 connected to the PLC 14 1 via the I/O device 16 1 .
  • the MAC 54 receives the frame via the PHY chip 68 . However, when this frame is not addressed to the PLC 14 1 , the MAC 54 transmits the received frame as is to the PLC 14 2 connected to a subsequent stage via the PHY chip 70 . Similarly, the MAC 54 receives the frame via the PHY chip 70 . However, when this frame is not addressed to the PLC 14 1 , the MAC 54 transmits the received frame as is to the PC 12 connected to a previous stage via the PHY chip 68 . That is, the MAC 54 extracts the input data or the second output data from the frame only in a case of the frame addressed to the PLC 14 1 .
  • FIG. 12 is a detailed configuration diagram of the PC 12 .
  • the communication unit 24 of the PC 12 includes a system bus I/F 80 that communicates with the processor 20 , an input buffer memory 82 , an output buffer memory 84 and a MAC 86 that communicates with the PLC 14 1 .
  • the system bus I/F 80 and the processor 20 are connected by a system bus 88 .
  • the MAC 86 is connected with a PHY chip 92 via a MII 90 .
  • the communication unit 24 is connected with the communication unit 34 of the PLC 14 1 connected to a subsequent stage via the PHY chip 92 .
  • the MAC 86 receives frames including items of input data sent from the plurality of PLCs 14 n ( 14 1 to 14 5 ), i.e., the plurality of I/O devices 16 n ( 16 1 to 16 5 ) via the PHY chip 92 . These items of input data are sent from the plurality of control targets 18 n ( 18 1 to 18 5 ) connected to the plurality of PLCs 14 n via the plurality of I/O devices 16 n . The MAC 86 extracts at least the input data from the frame transmitted to the PC 12 , and stores the extracted input data in the input buffer memory 82 .
  • the PLCs 14 2 , 14 3 , 14 5 connected to the control targets 18 2 , 18 3 , 18 5 controlled according to the other program P 2 , P 3 , P 5 allocated to the PC 12 designate the PC 12 as the address information of the transmission destination and transmit the frame (the frame including the input data).
  • the processor 20 of the PC 12 reads the input data stored in the input buffer memory 82 via the system bus I/F 80 and the system bus 88 , and stores the read input data in the main memory 22 .
  • the main memory 22 and the input buffer memory 82 store the input data per PLC 14 2 , 14 3 , 14 5 that has transmitted the input data or per I/O device 16 n (per other program Pn).
  • the processor 20 stores in the main memory 22 the second output data obtained by executing the other program P 2 , P 3 , P 5 based on the input data of each of the PLCs 14 2 , 14 3 , 14 5 (each of the I/O devices 16 2 , 16 3 , 16 5 ) stored in the main memory 22 .
  • the processor 20 stores the second output data stored in the main memory 22 , in the output buffer memory 84 via the system bus 88 or the like.
  • the main memory 22 and the output buffer memory 84 store the second output data per other program Pn (per PLC 14 n or per I/O device 16 2 , 16 3 , 16 5 that is a second output data output target).
  • the MAC 86 writes in the frame the second output data stored in the output buffer memory 84 , and transmits the written frame to the PLCs 14 2 , 14 3 , 14 5 via the PHY chip 92 .
  • the MAC 86 writes the selection information, too, in the frame to be transmitted under control of the processor 20 . Consequently, the PC 12 can control the I/O devices 16 2 , 16 3 , 16 5 connected to the PLCs 14 2 , 14 3 , 14 5 .
  • the MAC 86 writes selection information in the frame including the second output data transmitted from one PLC 14 n to another PLC 14 n via the PC 12 , too, and transmits the frame to the transmission destination PLC 14 n .
  • the processing shown in FIG. 13 is performed per execution cycle. Principally, the processor 20 of the PC 12 writes the selection information of the logical value “0” in the frame transmitted to each PLC 14 n ( 14 1 to 14 5 ).
  • the frame in which the selection information is written is the frame including second output data transmitted to each of the plurality of PLCs 14 n (PLCs 14 1 to 14 5 ).
  • the frame in which the selection information is written may be a frame different from the frame including the second output data.
  • the processor 20 of the PC 12 collects state information sent from the plurality of PLCs 14 n ( 14 1 to 14 5 ) via the communication unit 24 and the communication units 34 of the plurality of PLCs 14 n ( 14 1 to 14 5 ) (step S 21 ).
  • the processor 30 of each of the plurality of PLCs 14 n ( 14 1 to 14 5 ) transmits state information such as a survival signal and error information to the PC 12 via a dedicated line that is not shown.
  • the processor 30 of each of the plurality of PLCs 14 n ( 14 1 to 14 5 ) transmits the survival signal to the PC 12 . This survival signal is transmitted per execution cycle.
  • the error information is, for example, error information indicating a failure of the main memory 32 breaks down, and error information indicating disconnection with the control target 18 n connected to self (PLC 14 n ) via the I/O device 16 n .
  • PLC 14 n outputs the error information to the PC 12 .
  • the processor 20 determines whether or not there is the abnormal PLC 14 n (the PLC 14 n in which an abnormality or a failure occurs) based on each collected state information (a survival signal or error information) of each of the plurality of PLCs 14 n ( 14 1 to 14 5 ) (step S 22 ).
  • the processor 20 determines this PLC 14 n that does not output the survival signal as the abnormal PLC 14 n .
  • the processor 20 determines this PLC 14 n that outputs the error information as the abnormal PLC 14 n .
  • step S 22 when determining that there is no abnormal PLC 14 n , the processor 20 finishes the processing.
  • the PC 12 writes the selection information of the logical value “0” in the frame (the frame including the second output data), and transmits the frame to each of the plurality of PLCs 14 n (PLC 14 1 to 14 5 ).
  • step S 22 when determining in step S 22 that there is an abnormal PLC 14 n , the processor 20 determines whether or not the self-assigned program Pn allocated to the abnormal PLC 14 n is executed in parallel by PC 12 or another normal PLC 14 n as the other program Pn (step S 23 ).
  • step S 23 the processor 20 determines in step S 23 parallel execution by the PC 12 or the other PLC 14 n , the flow moves to step S 24 .
  • the processor 20 determines whether or not the PC 12 or the other PLC 14 n that executes the self-assigned program of the abnormal PLC 14 n as the other program can continuously control the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n .
  • the state information of the abnormal PLC 14 n includes error information of disconnection
  • the processor 30 determines that it is not possible to continuously control the control target 18 n connected to the abnormal PLC 14 n .
  • the main memory 32 of the abnormal PLC 14 n simply breaks down or when a survival signal is merely not sent, the processor 30 determines that it is possible to continuously control the control target 18 n connected to the abnormal PLC 14 n .
  • the processor 20 When determining in step S 24 that it is possible to continuously control the control target 18 n connected to the abnormal PLC 14 n , the processor 20 writes selection information of the logical value “1” in the frame (the frame including the second output data) outputted to the abnormal PLC 14 n , and transmits the frame to the abnormal PLC 14 n (step S 25 ).
  • the second output data outputted to this abnormal PLC 14 n is output data obtained when the PC 12 or the other PLC 14 n executes the other program Pn for controlling the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n .
  • step S 22 it is determined in step S 22 that the PLC 14 3 is abnormal, and it is determined in step S 23 that the PC 12 executes the other program P 3 in parallel.
  • step S 24 it is determined in step S 24 that it is possible to continuously control the control target 18 3
  • the PC 12 writes the selection information of the logical value “1” in the frame and transmits the frame to the abnormal PLC 14 3 in step S 25 .
  • the PC 12 transmits the frame in which the selection information of the logical value “0” is written, to the normal PLC 14 n than the abnormal PLC 14 n .
  • the processor 20 when determining in step S 23 that the self-assigned program Pn allocated to the abnormal PLC 14 n is not executed by the PC 12 or the other normal PLC 14 n as the other program Pn in parallel or when determining in step S 24 that it is not possible to continuously control the control target 18 n connected to the abnormal PLC 14 n , the processor 20 causes a display unit (e.g., a liquid crystal display) that is not shown to display this determination in step S 26 . That is, the display unit displays an error. Further, the processor 20 may output a warning sound from a speaker that is not shown.
  • a display unit e.g., a liquid crystal display
  • the program P 2 is the self-assigned program P 2 for the PLC 14 2 , and the other program P 2 for the PC 12 (see FIG. 7 ).
  • the PC 12 and the PLC 14 2 start communication at a stage at which execution of the program P 2 is finished and all items of output data are determined.
  • the PC 12 and the PLC 14 2 After receiving all items of input data from the I/O device 16 2 , the PC 12 and the PLC 14 2 start executing the program P 2 in a next execution cycle.
  • the PC 12 and the PLC 14 2 finish communications, the PC 12 and the PLC 14 2 perform communication. In this case, by providing the PC 12 and the PLC 14 2 with clocks that indicate the same time and are not shown, it is possible to synchronize the PC 12 and the PLC 14 2 .
  • the processor 30 of the PLC 14 2 finishes executing the self-assigned program P 2 of one execution cycle, and then stores in the main memory 32 the first output data generated by executing the self-assigned program P 2 .
  • the processor 30 of the PLC 14 2 stores the first output data stored in the main memory 32 , in the first output buffer memory 46 of the communication unit 34 . By this means, the first output data stored in the main memory 32 and the first output buffer memory 46 is updated.
  • This self-assigned program P 2 is executed based on the input data currently stored in the first input buffer memory 42 .
  • the communication unit 34 of the PLC 14 2 writes in the frame the first output data stored in the first output buffer memory 46 , and transmits the frame to the I/O device 16 2 (a logical value stored in the register 58 is “0”). By this means, the first output data is outputted to the control target 18 2 via the I/O device 16 2 .
  • the communication unit 34 of the PLC 14 2 receives the frame including the input data transmitted from the I/O device 16 2 (control target 18 2 ), extracts the input data from the received frame, and stores the input data in the first input buffer memory 42 .
  • the processor 30 of the PLC 14 2 stores in the main memory 32 the input data stored in the first input buffer memory 42 .
  • the input data (the input data transmitted from the I/O device 16 2 ) stored in the first input buffer memory 42 and the main memory 32 is updated.
  • the processor 30 of the PLC 14 2 starts executing the self-assigned program P 2 at an arrival timing of the next execution cycle.
  • the processor 20 of the PC 12 finishes executing the other program P 2 of one execution cycle, and then stores in the main memory 22 the second output data generated by executing the other program P 2 .
  • the processor 20 of the PC 12 stores the second output data stored in the main memory 22 , in the output buffer memory 84 of the communication unit 24 .
  • the second output data (the second output data outputted to the I/O device 16 2 ) stored in the main memory 22 and the output buffer memory 84 is updated.
  • the other program P 2 is executed based on the input data (the input data transmitted from the I/O device 16 2 ) currently stored in the input buffer memory 82 .
  • the communication unit 24 of the PC 12 writes in the frame the second output data stored in the output buffer memory 84 , and transmits the frame to the PLC 14 2 .
  • the PC 12 writes selection information of a logical value “0”, too, in the frame including the second output data transmitted to the PLC 14 2 , and transmits the frame.
  • the communication unit 34 of the PLC 14 2 extracts the second output data (second output data outputted to the I/O device 16 2 ) from the frame sent from the PC 12 , and stores the extracted second output data in the second output buffer memory 48 .
  • the second output data (the second output data outputted to the I/O device 16 2 ) stored in the second output buffer memory 48 is updated.
  • the communication unit 34 of the PLC 14 2 extracts the selection information from the frame sent from the PC 12 , and stores the logical value “0” of the extracted selection information in the register 58 .
  • the selector 56 of the PLC 14 2 selects the first output data stored in the first output buffer memory 46 as the output data transmitted to the I/O device 16 2 .
  • the communication unit 34 of the PLC 14 2 writes in the frame the input data stored in the first input buffer memory 42 , and transmits the frame to the PC 12 .
  • the communication unit 24 of the PC 12 receives the frame including the input data (the input data transmitted from the I/O device 16 2 ) sent from the PLC 14 2 , extracts the input data from the received frame, and stores the input data in the input buffer memory 82 .
  • the processor 20 of the PC 12 stores in the main memory 22 the input data stored in the input buffer memory 82 . By this means, the input data (the input data transmitted from the I/O device 16 2 ) stored in the input buffer memory 82 and the main memory 22 is updated.
  • the processor 20 of the PC 12 starts executing the other program P 2 at an arrival timing of a next execution cycle.
  • the processor 30 of the abnormal PLC 14 2 When detecting an error, the processor 30 of the abnormal PLC 14 2 generates error information, and transmits the generated error information to the PC 12 via the above dedicated line. In this case, the processor 30 of the abnormal PLC 14 2 does not execute the self-assigned program P 2 , and therefore the first output data stored in the first output buffer memory 46 is not updated.
  • the communication unit 34 of the abnormal PLC 14 2 writes in the frame the first output data stored in the first output buffer memory 46 , and transmits the frame to the I/O device 16 2 (the logical value stored in the register 58 in this case is “0”). At this time, the first output data stored in the first output buffer memory 46 is not updated, and therefore the previously transmitted first output data is retransmitted to the I/O device 16 2 .
  • the communication unit 34 of the abnormal PLC 14 2 receives the frame including the input data transmitted from the I/O device 16 2 , extracts the input data from the received frame, and stores the input data in the first input buffer memory 42 . Subsequently, the processor 30 of the abnormal PLC 14 2 stores in the main memory 32 the input data stored in the first input buffer memory 42 . By this means, the input data (the input data transmitted from the I/O device 16 2 ) stored in the first input buffer memory 42 and the main memory 32 is updated.
  • the processor 20 of the PC 12 finishes executing the other program P 2 of one execution cycle, and then stores in the main memory 22 the second output data generated by executing the other program P 2 .
  • the processor 20 of the PC 12 stores the second output data stored in the main memory 22 , in the output buffer memory 84 of the communication unit 24 .
  • the second output data (the second output data outputted to the I/O device 16 2 ) stored in the main memory 22 and the output buffer memory 84 is updated.
  • the other program P 2 is executed based on the input data (the input data transmitted from the I/O device 16 2 ) currently stored in the input buffer memory 82 .
  • the communication unit 24 of the PC 12 writes in the frame the second output data stored in the output buffer memory 84 , and transmits the frame to the abnormal PLC 14 2 .
  • the PC 12 writes the selection information of the logical value “1”, too, in the frame including the second output data transmitted to the abnormal PLC 14 2 , and transmits the frame.
  • the communication unit 34 of the abnormal PLC 14 2 extracts the second output data (the second output data outputted to the I/O device 16 2 ) from the frame sent from the PC 12 , and stores the extracted second output data in the second output buffer memory 48 .
  • the second output data (the second output data outputted to the I/O device 16 2 ) stored in the second output buffer memory 48 is updated.
  • the communication unit 34 of the abnormal PLC 14 2 extracts the selection information from the frame sent from the PC 12 , and stores the logical value “1” of the extracted selection information in the register 58 .
  • the selector 56 of the abnormal PLC 14 2 selects the second output data stored in the second output buffer memory 48 as the output data transmitted to the I/O device 16 2 .
  • the second output data stored in the second output buffer memory 48 is outputted to the I/O device 16 2 . Consequently, it is possible to switch the control subject that controls the I/O device 16 2 from the abnormal PLC 14 2 to the PC 12 .
  • the communication unit 34 of the abnormal PLC 14 2 writes in the frame the input data stored in the first input buffer memory 42 , and transmits the frame to the PC 12 .
  • the communication unit 24 of the PC 12 receives the frame including the input data (the input data transmitted from the I/O device 16 2 ) sent from the abnormal PLC 14 2 , extracts the input data from the received frame, and stores the input data in the input buffer memory 82 .
  • the processor 20 of the PC 12 stores in the main memory 22 the input data stored in the input buffer memory 82 .
  • the input data (the input data transmitted from the I/O device 16 2 ) stored in the input buffer memory 82 and the main memory 22 is updated.
  • the processor 20 of the PC 12 starts executing the other program P 2 of an arriving next execution cycle.
  • the control subjects that control the I/O device 16 2 are switched from the abnormal PLC 14 2 to the PC 12 .
  • a response (update) of the output data to the input data from the I/O device 16 2 delays by one execution cycle compared to a normal time. To avoid this delay, after the second output buffer memory 48 of the abnormal PLC 14 2 is updated, the abnormal PLC 14 2 and the I/O device 16 2 may communicate once again in the current execution cycle.
  • FIGS. 14 and 15 An example of data delivery between the PLC 14 n and the PC 12 to which the self-assigned program Pn of the PLC 14 n has been allocated as the other program Pn has been described with reference to FIGS. 14 and 15 .
  • data delivery between one PLC 14 n and the other PLC 14 n to which the self-assigned program Pn of the one PLC 14 n has been allocated as the other program Pn can be performed likewise.
  • Processing of data delivery between the PLC 14 1 and the PLC 14 4 will be briefly described with reference to FIGS. 14 and 15 .
  • the PLC 14 2 and PC 12 in FIGS. 14 and 15 are replaced with the PLC 14 1 and the PLC 14 4 , and only execution of the program P 1 will be described.
  • the processor 30 of the PLC 14 1 finishes executing the self-assigned program P 1 (see FIG. 7 ) of one execution cycle, and then stores in the main memory 32 the first output data generated by executing the self-assigned program P 1 .
  • the processor 30 of the PLC 14 1 stores the first output data stored in the main memory 32 , in the first output buffer memory 46 of the communication unit 34 . By this means, the first output data stored in the main memory 32 and the first output buffer memory 46 is updated.
  • this self-assigned program P 1 is executed based on the input data currently stored in the first input buffer memory 42 .
  • the communication unit 34 of the PLC 14 1 writes in the frame the first output data stored in the first output buffer memory 46 , and transmits the frame to the I/O device 16 1 (the logical value stored in the register 58 is “0”). By this means, the first output data is outputted to the control target 18 1 via the I/O device 16 1 .
  • the communication unit 34 of the PLC 14 1 receives the frame including the input data transmitted from the I/O device 16 1 (control target 18 1 ), extracts the input data from the received frame, and stores the input data in the first input buffer memory 42 .
  • the processor 30 of the PLC 14 1 stores in the main memory 32 the input data stored in the first input buffer memory 42 .
  • the input data (the input data transmitted from the I/O device 16 1 ) stored in the first input buffer memory 42 and the main memory 32 is updated.
  • the processor 30 of the PLC 14 1 starts executing the self-assigned program P 1 at an arrival timing of a next execution cycle.
  • the processor 30 of the PLC 14 4 finishes executing the other program P 1 (see FIG. 7 ) of one execution cycle, and then stores in the main memory 32 the second output data generated by executing the other program P 1 .
  • the processor 30 of the PLC 14 4 stores the second output data stored in the main memory 32 , in the third output buffer memory 50 of the communication unit 34 .
  • the second output data (the second output data outputted to the I/O device 16 1 ) stored in the main memory 32 and the third output buffer memory 50 is updated.
  • the other program P 1 is executed based on the input data (the input data transmitted from the I/O device 16 1 ) currently stored in the second input buffer memory 44 .
  • the communication unit 34 of the PLC 14 4 writes in the frame the second output data stored in the third output buffer memory 50 , and transmits the frame to the PLC 14 1 via the PC 12 .
  • the PC 12 writes the selection information of the logical value “0”, too, in the frame including the second output data transmitted to the PLC 14 1 .
  • the communication unit 34 of the PLC 14 1 extracts the second output data (the second output data outputted to the I/O device 16 1 ) from the frame sent from the PLC 14 4 , and stores the extracted second output data in the second output buffer memory 48 .
  • the second output data (the second output data outputted to the I/O device 16 1 ) stored in the second output buffer memory 48 is updated.
  • the communication unit 34 of the PLC 14 1 extracts the selection information from the frame sent from the PLC 14 4 via the PC 12 , and stores the logical value “0” of the extracted selection information in the register 58 .
  • the selector 56 of the PLC 14 1 selects the first output data stored in the first output buffer memory 46 as the output data transmitted to the I/O device 16 1 .
  • the communication unit 34 of the PLC 14 1 writes in the frame the input data stored in the first input buffer memory 42 , and transmits the frame to the PLC 14 4 via the PC 12 .
  • the communication unit 34 of the PLC 14 4 receives the frame including the input data (the input data transmitted from the I/O device 16 1 ) sent from the PLC 14 1 via the PC 12 , extracts the input data from the received frame, and stores the input data in the second input buffer memory 44 .
  • the processor 30 of the PLC 14 4 stores in the main memory 32 the input data stored in the second input buffer memory 44 . By this means, the input data (the input data transmitted from the I/O device 16 1 ) stored in the second input buffer memory 44 and the main memory 32 is updated.
  • the processor 30 of the main memory 32 starts executing the other program P 1 at an arrival of the next execution cycle.
  • the processor 30 of the abnormal PLC 14 1 When detecting an error, the processor 30 of the abnormal PLC 14 1 generates error information, and transmits the generated error information to the PC 12 via the above dedicated line. In this case, the processor 30 of the abnormal PLC 14 1 does not execute the self-assigned program P 1 , and therefore the first output data stored in the first output buffer memory 46 is not updated.
  • the communication unit 34 of the abnormal PLC 14 1 writes in the frame the first output data stored in the first output buffer memory 46 , and transmits the frame to the I/O device 16 1 (the logical value stored in the register 58 in this case is “0”). In this case, the first output data stored in the first output buffer memory 46 is not updated, and therefore the previously transmitted first output data is retransmitted to the I/O device 16 1 .
  • the communication unit 34 of the abnormal PLC 14 1 receives the frame including the input data transmitted from the I/O device 16 1 , extracts the input data from the received frame, and stores the input data in the first input buffer memory 42 . Subsequently, the processor 30 of the abnormal PLC 14 1 stores in the main memory 32 the input data stored in the first input buffer memory 42 . By this means, the input data (the input data transmitted from the I/O device 16 1 ) stored in the first input buffer memory 42 and the main memory 32 is updated.
  • the processor 30 of the PLC 14 4 finishes executing the other program P 1 of one execution cycle, and stores in the main memory 32 the second output data generated by executing the other program P 1 .
  • the processor 30 of the PLC 14 4 stores the second output data stored in the main memory 32 , in the third output buffer memory 50 of the communication unit 34 .
  • the second output data (the second output data outputted to the I/O device 16 1 ) stored in the main memory 32 and the third output buffer memory 50 is updated.
  • the other program P 1 is executed based on the input data (the input data transmitted from the I/O device 16 1 ) currently stored in the second input buffer memory 44 .
  • the communication unit 34 of the PLC 14 4 writes in the frame the second output data stored in the third output buffer memory 50 , and transmits the frame to the abnormal PLC 14 1 via the PC 12 .
  • the PC 12 writes the selection information of the logical value “1”, too, in the frame including the second output data transmitted to the abnormal PLC 14 1 , and transmits the frame.
  • the communication unit 34 of the abnormal PLC 14 1 extracts the second output data (the second output data outputted to the I/O device 16 1 ) from the frame sent from the PLC 14 4 via the PC 12 , and stores the extracted second output data in the second output buffer memory 48 .
  • the second output data (the second output data outputted to the I/O device 16 1 ) stored in the second output buffer memory 48 is updated.
  • the communication unit 34 of the abnormal PLC 14 1 extracts the selection information from the frame sent from the PLC 14 4 via the PC 12 , and stores the logical value “1” of the extracted selection information in the register 58 .
  • the selector 56 of the abnormal PLC 14 1 selects the second output data stored in the second output buffer memory 48 as the output data transmitted to the I/O device 16 1 .
  • the second output data stored in the second output buffer memory 48 is outputted to the I/O device 16 1 . Consequently, it is possible to switch the control subject that controls the I/O device 16 1 from the abnormal PLC 14 1 to the PLC 14 4 .
  • the communication unit 34 of the abnormal PLC 14 1 writes in the frame the input data stored in the first input buffer memory 42 , and transmits the frame to the PLC 14 4 via the PC 12 .
  • the communication unit 34 of the PLC 14 4 receives the frame including the input data (the input data transmitted from the I/O device 16 1 ) sent from the abnormal PLC 14 1 via the PC 12 , extracts the input data from the received frame, and stores the input data in the second input buffer memory 44 .
  • the processor 30 of the PLC 14 4 stores in the main memory 32 the input data stored in the second input buffer memory 44 .
  • the input data (the input data transmitted from the I/O device 16 1 ) stored in the second input buffer memory 44 and the main memory 32 is updated.
  • the processor 30 of the PLC 14 4 starts executing the other program P 1 of an arriving next execution cycle.
  • the first input buffer memory 42 and the second input buffer memory 44 may be configured as one storage medium.
  • a storage area of one storage medium may be partitioned into at least two to cause one storage area to function as the first input buffer memory 42 and the other storage area to function as the second input buffer memory 44 .
  • the first output buffer memory 46 , the second output buffer memory 48 and the third output buffer memory 50 may also be configured as one storage medium.
  • a storage area of one storage medium may be partitioned into at least three to cause each of the three partitioned storage areas to respectively function as the first output buffer memory 46 , the second output buffer memory 48 and the third output buffer memory 50 .
  • the first input buffer memory 42 , the second input buffer memory 44 , the first output buffer memory 46 , the second output buffer memory 48 and the third output buffer memory 50 may be configured as one storage medium.
  • the control subject that controls the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n is switched. However, even when the abnormality does not occur in the PLC 14 n , the control subject may be switched. That is, the control subject may be switched to cause the PC 12 or another normal PLC 14 n to control the control target 18 n connected to the normal PLC 14 n via the I/O device 16 n .
  • the PLC system (controller system) 10 described in the above embodiment includes the plurality of PLCs (controllers) 14 n , the plurality of I/O devices 16 n that connect the control target 18 n of each of the plurality of PLCs 14 n and each of the plurality of PLCs 14 n , and transmit necessary information between the control target 18 n and the PLC 14 n , and the PC (higher level control device) 12 that controls and manages the plurality of PLCs 14 n .
  • the PC 12 includes the main memory (storage unit) 22 and the processor 20 .
  • the main memory 22 stores the plurality of programs Pn executed by each of the plurality of PLCs 14 n .
  • the processor 20 allocates each of the plurality of programs Pn stored in the main memory 22 as the self-assigned program Pn to each of the plurality of PLCs 14 n to cause each of the plurality of PLCs 14 n to control the control target 18 n connected to each PLC 14 n via the I/O device 16 n .
  • the processor 20 further allocates all or part of the plurality of programs Pn as the other programs Pn to the PC 12 and the plurality of PLCs 14 n to cause the PC 12 and the plurality of PLCs 14 n to doubly execute all or part of the plurality of programs Pn stored in the main memory 22 in parallel in one execution cycle.
  • Each of the plurality of PLCs 14 n includes the first input buffer memory 42 , the first output buffer memory 46 and the second output buffer memory 48 .
  • the first input buffer memory 42 stores input data transmitted from the control target 18 n connected to each PLC 14 n via the I/O device 16 n .
  • the first output buffer memory 46 stores the first output data obtained by executing the self-assigned program Pn allocated to each PLC 14 n to control the control target 18 n connected to each PLC 14 n via the I/O device 16 n .
  • the second output buffer memory 48 stores the second output data obtained when the PC 12 or the other PLC 14 n executes the other program Pn allocated to the PC 12 or the other PLC 14 n to control the control target 18 n connected to the PLC 14 n other than the PC 12 or the other PLC 14 n via the I/O device 16 n .
  • Each of the plurality of PLCs 14 n outputs one of the first output data stored in the first output buffer memory 46 and the second output data stored in the second output buffer memory 48 , to the control target 18 n connected to each PLC 14 n via the I/O device 16 n based on the selection information transmitted from the PC 12 .
  • Each of the plurality of PLCs 14 n further includes the processor 30 .
  • the processor 30 generates the first output data by executing the self-assigned program Pn allocated to each PLC 14 n based on the input data transmitted from the control target 18 n connected to each PLC 14 n via the I/O device 16 n .
  • Each of the plurality of PLCs 14 n generates the second output data by executing the other program Pn allocated to each PLC 14 n based on the input data transmitted from the control target 18 n that is connected to the other PLC 14 n via the I/O device 16 n and is controlled according to the other program Pn allocated to each PLC 14 n .
  • the PLC 14 n executes the program Pn (the self-assigned program Pn or the other program Pn) based on the input data transmitted from the control target 18 n and generates the output data outputted to the control target 18 n that has transmitted the input data. Consequently, it is possible to control the control target 18 n in a stable state.
  • the program Pn the self-assigned program Pn or the other program Pn
  • the processor 20 of the PC 12 generates the second output data by executing the other program Pn allocated to the PC 12 based on the input data transmitted from the control target 18 n controlled according to the other program Pn allocated to the PC 12 .
  • the PC 12 executes the other program Pn based on the input data transmitted from the control target 18 n and generates the output data outputted to the control target 18 n that has transmitted the input data. Consequently, it is possible to control the control target 18 n in the stable state.
  • the processor 20 of the PC 12 outputs selection information to the plurality of PLCs 14 n to cause the PLC 14 n determined as a normal PLC to output the first output data stored in the first output buffer memory 46 to the control target 18 n connected to each PLC 14 n via the I/O device 16 n , and cause the PLC 14 n determined as an abnormal PLC 14 n to output the second output data stored in the second output buffer memory 48 to the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n .
  • the other normal PLC 14 n can control the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n . While continuing controlling the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n in the stable state, it is possible to switch the control subjects of the control target 18 n connected to the abnormal PLC 14 n .
  • the processor 20 of the PC 12 determines whether each of the plurality of PLCs 14 n is normal or abnormal based on at least one of error information and a survival signal of each of the plurality of PLCs 14 n obtained from the plurality of PLCs 14 n .
  • the PC 12 can precisely determine whether the PLC 14 n is normal or abnormal.
  • the communication unit 34 of the PLC 14 n further includes the selector 56 that selects one of the first output data stored in the first output buffer memory 46 and the second output data stored in the second output buffer memory 48 as the output data outputted to the control target 18 n connected to each PLC 14 n via the I/O device 16 n . Consequently, it is possible to easily switch the output data outputted to the I/O device 16 n .
  • the processor 20 of the PC 12 obtains load information indicating a load applied when each of the plurality of PLCs 14 executes the self-assigned program Pn, via the communication units 34 of the plurality of PLCs 14 n , and allocates the other program Pn based on the obtained load information. Consequently, it is possible to allocate the other program Pn to cause each of the plurality of PLCs 14 n to finish the processing of the program Pn in one execution cycle.
  • the PC 12 receives the input data stored in the first input buffer memory 42 of the PLC 14 n connected via the I/O device 16 n to the control target 18 n controlled according to the other program Pn allocated to each PLC 14 n , and transmits the second output data to the PLC 14 n connected via the I/O device 16 n to the control target 18 n controlled according to the other program Pn allocated to each PLC 14 n . Consequently, the PC 12 can transmit to the PLC 14 n the second output data that does not contradict execution results obtained so far, and control the control target 18 n connected to the PLC 14 n via the I/O device 16 n .
  • Each of the plurality of PLCs 14 n further includes the second input buffer memory 44 and the third output buffer memory 50 .
  • the second input buffer memory 44 stores the input data transmitted from the control target 18 n that is connected to the other PLC 14 n via the I/O device 16 n and is controlled according to the other program Pn allocated to each PLC 14 n .
  • the third output buffer memory 50 stores the second output data obtained by executing the other program Pn allocated to each PLC 14 n to control the control target 18 n connected to the other PLC 14 n via the I/O device 16 n .
  • Each of the plurality of PLCs 14 n receives via the PC 12 the input data stored in the first input buffer memory 42 of the other PLC 14 n connected via the I/O device 16 n to the control target 18 n controlled according to the other program Pn allocated to each PLC 14 n , and stores the received input data in the second input buffer memory 44 .
  • Each of the plurality of PLC 14 n transmits the second output data stored in the third output buffer memory 50 via the PC 12 to the other PLC 14 n connected via the I/O device 16 n to the control target 18 n controlled according to the other program Pn allocated to each PLC 14 n . Consequently, the PLC 14 n can transmit to the other PLC 14 n the second output data that does not contradict execution results obtained so far, and control the control target 18 n connected to the other PLC 14 n via the I/O device 16 n .

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)
  • Safety Devices In Control Systems (AREA)

Abstract

A PLC system includes a plurality of I/O devices each connecting a control target of each of a plurality of PLCs to each of the plurality of PLCs, and a PC. Each one of the plurality of PLCs stores first output data obtained by executing a self-assigned program to control the control target connected to each PLC, and stores second output data obtained when the PC or another PLC executes another program allocated to the PC or the other PLC to control the control target connected to the one PLC. Each of the plurality of PLCs outputs one of the first output data and the second output data to the I/O device connected to each PLC based on selection information transmitted from the PC.

Description

    CROSS-REFERENCE TO RELATED APPLICATION
  • This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2016-128493 filed on Jun. 29, 2016, the contents of which are incorporated herein by reference.
  • BACKGROUND OF THE INVENTION Field of the Invention
  • The present invention relates to a controller system that includes a plurality of controllers and a higher level control device that controls and manages the plurality of controllers, and a control method.
  • Description of the Related Art
  • Japanese Laid-Open Patent Publication No. 2013-168090 (referred to as JP2013-168090A below) discloses a multicontroller system that includes a plurality of PLCs (programmable logic controllers) used as industrial devices, and a shared server that manages the plurality of PLCs. Each of the plurality of PLCs is connected with a control target of each PLC via an I/O (Input/Output) device. Further, when detecting an abnormal PLC, the shared server of the multicontroller system selects a PLC of a small load, i.e., a PLC that can execute an additional program. Then, the selected PLC is made to load a program executed by the PLC determined as an abnormal PLC and execute the program in place of the abnormal PLC.
  • SUMMARY OF THE INVENTION
  • Generally, data such as an input/output signal of an I/O device (I/O equipment) is stored in a main memory in a PLC. Hence, when an abnormality occurs in a given PLC and when another PLC takes over the control of a control target which has been controlled by the PLC in which an abnormality has occurred, the other PLC needs to output data that does not contradict execution results obtained so far, to the I/O device connected to the control target of the abnormal PLC. Hence, the given PLC needs to copy data stored in the main memory as is to the other PLC that takes over the control.
  • This I/O (input/output) signal and the like have a large size of several hundreds of kilobytes to several megabytes. Hence, when data is copied from the main memory of the PLC in which the abnormality has occurred to the other PLC via the Ethernet (registered trademark), a copy time substantially exceeds one execution cycle of the PLC for executing the program. Therefore, it is not possible to continue controlling the control target. Further, when an abnormality occurs in a control unit of a PLC, reliability of data stored in a main memory is also low. Therefore, it is not preferable to copy this data to the other PLC, and continue controlling the control target of the PLC in which the abnormality has occurred.
  • Therefore, a technique disclosed in above JP2013-168090A cannot avoid probabilities of interruption of the control of the control target or an output of data that contradicts the execution results obtained so far to the control target when the control of the control target is switched to the other PLC.
  • It is therefore an object of the present invention to provide a controller system and a control method that can switch control subjects for a control target while continuing controlling the control target in a stable state.
  • A first aspect of the present invention is a controller system: a plurality of controllers; a plurality of I/O devices each configured to connect and transmit necessary information between a control target of each of the plurality of controllers and each of the plurality of controllers; and a higher level control device configured to control and manage the plurality of controllers, the higher level control device includes a storage unit configured to store a plurality of programs to be executed by each of the plurality of controllers, and a processor configured to allocate the plurality of programs stored in the storage unit as self-assigned programs for respective controllers to cause each of the plurality of controllers to control the control target connected to itself via the I/O device, and further allocate all or part of the plurality of programs stored in the storage unit as other programs to the higher level control device and the plurality of controllers to have the all or part of the plurality of programs be doubly executed in parallel in one execution cycle, and each one of the plurality of controllers includes a communication unit including a first input buffer memory configured to store input data transmitted from the control target connected to the one controller via the I/O device, a first output buffer memory configured to store first output data obtained by executing the self-assigned program allocated to the one controller to control the control target connected to the one controller via the I/O device, and a second output buffer memory configured to store second output data obtained when the higher level control device or another controller executes the other program allocated to the higher level control device or the other controller to control the control target connected to the one controller via the I/O device, and the one controller is configured to output one of the first output data and the second output data to the control target connected to the one controller via the I/O device, based on selection information transmitted from the higher level control device, wherein the first output data is stored in the first output buffer memory, the second output data is stored in the second output buffer memory.
  • According to this configuration, even when control subjects for controlling the control target are switched, it is possible to output the output data that does not contradict execution results obtained so far, to the I/O device connected to the control target. Consequently, while continuing controlling the control target in the stable state, it is possible to switch the control subjects for the control target.
  • The first aspect of the present invention is the controller system, and each one of the plurality of controllers may further include a processor configured to generate the first output data by executing the self-assigned program allocated to the one controller based on the input data transmitted from the control target connected to the one controller via the I/O device, and generate the second output data by executing the other program allocated to the one controller based on the input data transmitted from the control target connected to another one of the controllers via another I/O device and controlled according to the other program allocated to the one controller. In this manner, the one controller can execute the program (the self-assigned program or the other program) based on the input data transmitted from any control target, generate the output data outputted to the control target that has transmitted the input data, and control the control target in the stable state.
  • The first aspect of the present invention is the controller system, and the processor of the higher level control device may be configured to generate the second output data by executing the other program allocated to the higher level control device based on the input data transmitted from the control target controlled according to the other program allocated to the higher level control device. Consequently, the higher level control device can execute the other program based on the input data transmitted by the control target, generate the output data outputted to the control target that has transmitted the input data, and control the control target in the stable state.
  • The first aspect of the present invention is the controller system, and the processor of the higher level control device may be configured to output the selection information to the plurality of controllers to cause one of the controllers determined as a normal controller to output the first output data stored in the first output buffer memory to the control target connected to the normal controller via the I/O device, and cause another of the controllers determined as an abnormal controller to output the second output data stored in the second output buffer memory to the control target connected to the abnormal controller via the I/O device. Accordingly, even when an abnormality occurs in the controller, in place of the controller determined as the abnormal controller, the other normal controller can control the control target connected to the controller determined as the abnormal controller. Consequently, while continuing controlling the control target connected to the controller determined as the abnormal controller in the stable state, it is possible to switch the control subjects of the control target connected to the controller determined as the abnormal controller.
  • The first aspect of the present invention is the controller system, and the processor of the higher level control device may be configured to determine whether each of the plurality of controllers is normal or abnormal based on at least one of error information and a survival signal of each of the plurality of controllers obtained from the plurality of controllers. Consequently, the higher level control device can precisely determine whether the controller is normal or abnormal.
  • The first aspect of the present invention is the controller system, and the communication unit of the controller may further include a selector configured to select one of the first output data and the second output data as output data based on the selection information, wherein the first output data is stored in the first output buffer memory, the second output data is stored in the second output buffer memory, and the output data is outputted to the control target connected to each controller via the I/O device. Consequently, it is possible to easily switch the output data outputted to the I/O device.
  • The first aspect of the present invention is the controller system, and the processor of the higher level control device may be configured to obtain load information via the communication unit of the plurality of controllers and allocate the other program based on the obtained load information, wherein the load information indicates a load applied when each of the plurality of controllers executes the self-assigned program. Consequently, it is possible to allocate the other program such that each of the plurality of controllers finishes processing of the program in one execution cycle.
  • The first aspect of the present invention is the controller system, and the higher level control device may be configured to receive the input data stored in the first input buffer memory of the one controller connected via the I/O device to the control target controlled according to the other program allocated to the higher level control device, and transmit the second output data to the one controller connected via the I/O device to the control target controlled according to the other program allocated to the higher level control device. Consequently, the higher level control device can transmit to the controller the second output data that does not contradict the execution results obtained so far, and control the control target connected to the PLC via the I/O device.
  • The first aspect of the present invention is the controller system, and the each one of the plurality of controllers may further include a second input buffer memory configured to store the input data transmitted from the control target connected to another one of the controllers via the I/O device and controlled according to the other program allocated to the one controller, and a third output buffer memory configured to store the second output data obtained by executing the other program allocated to the one controller to control the control target connected to the other one of the controllers via the I/O device, and is configured to receive the input data via the higher level control device, wherein the input data is stored in the first input buffer memory of the other one of the controllers connected via the I/O device to the control target controlled according to the other program allocated to the one controller, store the received input data in the second input buffer memory, and transmit the second output data to the other one of the controllers via the higher level control device, wherein the second output data is stored in the third output buffer memory, and the other one of the controllers is connected via the I/O device to the control target controlled according to the other program allocated to the one controller. Consequently, the one controller can transmit to the other controller the second output data that does not contradict the execution results obtained so far, and control the control target connected to the other controller via the I/O device.
  • A second aspect of the present invention is a control method of a controller system that includes: a plurality of controllers; a plurality of I/O devices configured to connect a control target of each of the plurality of controllers to each of the plurality of controllers, and transmit necessary information between the control target and each of the controllers; and a higher level control device configured to control and manage the plurality of controllers, the higher level control device includes a storage unit configured to store each of a plurality of programs executed by each of the plurality of controllers, and each of the plurality of controllers includes a communication unit including a first input buffer memory, a first output buffer memory and a second output buffer memory, and the control method includes: an allocating step of, at the higher level control device, allocating each of the plurality of program stored in the storage unit as a self-assigned program to each of the plurality of controllers to cause each of the plurality of controllers to control the control target connected to each controller via the I/O device, and further allocating all or part of the plurality of programs as another program to the higher level control device and the plurality of controllers to cause the higher level control device and the plurality of controllers to doubly execute the all or part of the plurality of programs stored in the storage unit in parallel in one execution cycle; and a first inputting/storing step of, at each one of the plurality of controllers, storing input data in the first input buffer memory, wherein the input data is transmitted from the control target connected to the one controller via the I/O device; a first outputting/storing step of, at the one controller, storing first output data in the first output buffer memory, wherein the first output data is obtained by executing the self-assigned program allocated to the one controller to control the control target connected to the one controller via the I/O device; a second outputting/storing step, at the one controller, storing second output data in the second output buffer memory, wherein the second output data is obtained when the higher level control device or another of the controllers executes the other program allocated to the higher level control device or the other controller to control the control target connected to the one controller via the I/O device; and an outputting step of, at the one controller, outputting one of the first output data and the second output data to the control target connected to the one controller via the I/O device, based on selection information transmitted from the higher level control device, wherein the first output data is stored in the first output buffer memory, the second output data is stored in the second output buffer memory.
  • According to this configuration, even when the control subject that controls the control target is switched, it is possible to output the output data that does not contradict the execution results obtained so far, to the I/O device connected to this control target. Consequently, while continuing controlling the control target in the stable state, it is possible to switch the control subject of the control target.
  • The second aspect of the present invention is the control method, and may further include: a first generating step of, at the one controller, generating the first output data by executing the self-assigned program allocated to the one controller based on the input data transmitted from the control target connected to the one controller via the I/O device; a second generating step of, at the one controller, generating the second output data by executing the other program allocated to the one controller based on the input data transmitted from the control target connected to another one of the controllers via the I/O device and controlled according to the other program allocated to the one controller; and a third generating step of, at the higher level control device, generating the second output data by executing the other program allocated to the higher level control device based on the input data transmitted from the control target controlled according to the other program allocated to the higher level control device. Consequently, the controller can execute the program (the self-assigned program or the other program) based on the input data transmitted by the control target, generate the output data outputted to the control target that has transmitted the input data, and control the control target in the stable state. Further, the higher level control device can execute the other program based on the input data transmitted by the control target, generate the output data outputted to the control target that has transmitted the input data, and control the control target in the stable state.
  • The second aspect of the present invention is the control method, the communication unit may further include a selector, and the control method may further include an abnormality determining step of, at the higher level control device, determining whether each of the plurality of controllers is normal or abnormal based on at least one of error information and a survival signal of the each of the plurality of controllers obtained from the plurality of controllers; and a selecting/outputting step of, at the higher level control device, outputting the selection information to the plurality of controllers to cause one of the controllers determined as a normal controller to output the first output data stored in the first output buffer memory to the control target connected to the normal controller via the I/O device, and cause another of the controllers determined as an abnormal controller to output the second output data stored in the second output buffer memory to the control target connected to the abnormal controller via the I/O device; and a selecting step of, at the selector of the communication unit of each of the plurality of controllers, selecting one of the first output data and the second output data as output data based on the selection information, wherein the first output data is stored in the first output buffer memory, the second output data is stored in the second output buffer memory, and the output data is outputted to the control target connected to each controller via the I/O device. Consequently, the higher level control device can precisely determine whether the controller is normal or abnormal. Further, even when an abnormality occurs in the controller, in place of the controller determined as the abnormal controller, another normal controller can control the control target connected to the controller determined as the abnormal controller. Consequently, while continuing controlling the control target connected to the controller determined as the abnormal controller in the stable state, it is possible to switch the control subjects of the control target connected to the controller determined as the abnormal controller. Further, the communication unit can easily switch the output data outputted to the I/O device.
  • The second aspect of the present invention is the control method, and may include an obtaining step of, at the higher level control device, obtaining load information via the communication unit of the plurality of controllers, wherein the load information indicates a load applied when each of the plurality of controllers executes the self-assigned program, and, in the allocating step, the other program may be allocated based on the obtained load information. Consequently, it is possible to allocate the other program to cause each of the plurality of controllers to finish processing of the program in one execution cycle.
  • The second aspect of the present invention is the control method, and may further include: a receiving step of, at the higher level control device, receiving the input data stored in the first input buffer memory of the controller connected via the I/O device to the control target controlled according to the other program allocated to the higher level control device; and a first transmitting step of, at the higher level control device, transmitting the second output data to the controller connected via the I/O device to the control target controlled according to the other program allocated to the higher level control device. Consequently, the higher level control device can transmit to the controller the second output data that does not contradict the execution results obtained so far, and control the control target connected to the PLC via the I/O device.
  • The second aspect of the present invention is the control method, the communication unit may further include a second input buffer memory and a third output buffer memory, the control method may further include: a second inputting/storing step of, at the one controller, storing the input data in the second input buffer memory, wherein the input data is transmitted from the control target connected to the other controller via the I/O device and controlled according to the other program allocated to the one controller; and a third outputting/storing step of, at the one controller, storing the second output data in the third output buffer memory, wherein the second output data is obtained by executing the other program allocated to the one controller to control the control target connected to the other controller via the I/O device; and a second transmitting step of, at the one controller, transmitting the second output data stored in the third output buffer memory to the other controller via the higher level control device, and the other controller is connected via the I/O device to the control target controlled according to the other program allocated to the one controller, and, in the second inputting/storing step, the one controller may be configured to receive the input data via the higher level control device, wherein the input data is stored in the first input buffer memory of the other controller connected via the I/O device to the control target controlled according to the other program allocated to the one controller, and store the received input data in the second input buffer memory. Consequently, the one controller can transmit to the other controller the second output data that does not contradict the execution results obtained so far, and control the control target connected to the other controller via the I/O device.
  • According to the present invention, even when control subjects that controls the control target are switched, it is possible to output the output data that does not contradict execution results obtained so far, to the I/O device connected to this control target. Consequently, while continuing controlling the control target in the stable state, it is possible to switch the control subject of the control target.
  • The above and other objects features and advantages of the present invention will become more apparent from the following description when taken in conjunction with the accompanying drawings in which a preferred embodiment of the present invention is shown by way of illustrative example.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • FIG. 1 is an entire schematic configuration diagram of a PLC system according to an embodiment;
  • FIG. 2 is a schematic configuration diagram of a PC shown in FIG. 1;
  • FIG. 3 is a schematic configuration diagram of a PLC shown in FIG. 1;
  • FIG. 4 is a flowchart showing a program allocating operation of the PLC system;
  • FIG. 5 is a view showing an example where all programs stored in a main memory shown in FIG. 2 are respectively allocated to a plurality of PLCs to cause each of the plurality of PLCs to control an I/O device connected to each of the plurality of PLCs;
  • FIG. 6 is a time chart showing that each of the plurality of PLCs executes (processes) a self-assigned program (the allocated self-assigned program by the allocation shown in FIG. 5);
  • FIG. 7 is a view showing an example where all programs stored in the main memory shown in FIG. 2 are allocated to the PC and the plurality of PLCs to cause all the programs to be doubly executed in parallel in one execution cycle;
  • FIG. 8 is a time chart showing that each of the plurality of PLCs executes (processes) the program(s) (the self-assigned program and other programs allocated by the allocation shown in FIG. 7);
  • FIG. 9 is a sub flowchart showing a processing operation in step S6 in FIG. 4;
  • FIG. 10 is a view showing an example where, when an abnormality occurs in one of the plurality of PLCs, instead of the abnormal PLC, the PC controls an I/O device connected to the abnormal PLC;
  • FIG. 11 is a detailed configuration diagram of the PLC shown in FIG. 3;
  • FIG. 12 is a detailed configuration diagram of the PC shown in FIG. 2;
  • FIG. 13 is a flowchart showing processing of determining a logical value of selection information by the PC;
  • FIG. 14 is a time chart showing processing of data delivery between a normal PLC and the PC, and between the normal PLC and an I/O device connected to the normal PLC; and
  • FIG. 15 is a time chart showing processing of data delivery between an abnormal PLC and the PC, and between the abnormal PLC and an I/O device connected to the abnormal PLC.
  • DESCRIPTION OF THE PREFERRED EMBODIMENTS
  • A preferred embodiment of a controller system and a control method according to the present invention will be described in detail below with reference to the accompanying drawings.
  • FIG. 1 is an entire schematic configuration diagram of a PLC (controller) system 10 according to the embodiment. The PLC system 10 includes a PC 12 that is a higher level control device, a plurality of (five in the present embodiment) PLCs (programmable logic controllers) 14 n (n=1, 2, . . . and 5) that are connected with the PC 12 by a daisy chain, and a plurality of I/O devices (external signal input/output devices) 16 n that are respectively connected to a plurality of PLCs 14 n (PLC 14 1 to PLC 14 5) connected by the daisy chain. The plurality of I/O devices 16 n are connected with control targets 18 n of the plurality of PLCs 14 n. That is, the plurality of I/O devices 16 n connect the control targets 18 n of the plurality of PLCs 14 n, to the plurality of PLCs 14 n, and transmit necessary information (data) between the control targets 18 n and the PLCs 14 n.
  • In this description, 16 1 represents the plurality of I/O devices 16 n connected to the PLC 14 1 by the daisy chain. Similarly, 16 2 to 16 5 represent the plurality of I/O devices 16 n connected to the PLCs 14 2 to 14 5, respectively, by the daisy chain. 18 1 represents the control target 18 n connected to the I/O devices 16 1. Similarly, 18 2 to 18 5 represent the control targets 18 n connected to the I/O devices 16 2 to 16 5. Hence, the control targets 18 1 are connected to the PLCs 14 1 via the I/O devices 16 1. Similarly, the control targets 18 2 to 18 5 are connected to the PLC 14 2 to PLC 14 5 via the I/O devices 16 2 to 16 5. The control targets 18 n are, for example, motors or pumps.
  • The PC 12, the plurality of PLCs 14 n and the plurality of I/O devices 16 n are connected by an EtherCAT (registered trademark) system. Hence, when transmitting data (signal), the PC 12 and the PLC 14 n write address information of the transmission destination PC or PLC 14 n and transmission data in a frame, and transmit them. When transmitting the data to the PLC 14 n, the PC 12 transmits the frame in which address information of the transmission destination PLC 14 n and the transmission data are written, to the PLC 14 1 connected to a subsequent stage of the PC 12. When the frame is sent from the PC 12 or the PLC 14 n connected to a previous stage, the PLC 14 n determines whether or not the frame has been transmitted based on the address information included in the frame. The PLC 14 n imports data written in the frame when determining that the transmitted frame is transmitted to itself, and transmits the frame transmitted as is to the PLC 14 n connected to a subsequent stage when determining that the frame is not transmitted to itself. The same applies to the case of data transmission from each PLC 14 n to the PC 12, the PLC 14 n transmits the frame addressed to the PC 12 transmitted from the subsequent stage to the PC 12 or the PLC 14 n connected to the previous stage. In this regard, transmission and reception between the PLCs 14 n are performed via the PC 12. When, for example, the PLC 14 2 transmits data to the PLC 14 4, the PLC 14 2 sends the frame including the data to the PC 12 once, and then the PC 12 transmits the data to the PLC 14 4.
  • FIG. 2 is a schematic configuration diagram of the PC 12. FIG. 3 is a schematic configuration diagram of the PLC 14 n. The PC 12 includes a processor 20 such as a CPU, a main memory (storage unit) 22 and a communication unit 24. The PLC 14 n includes a processor 30 such as a CPU, a main memory (storage unit) 32 and a communication unit 34. The communication units 34 of the plurality of these PLCs 14 n are connected with the communication unit 24 of the PC 12 by the daisy chain (see FIG. 1). The main memory 22 of the PC 12 stores a plurality of programs Pn executed (processed) by each of the plurality of PLCs 14 n. These programs Pn are programs for controlling the control targets 18 n. In this description, P1 represents the program Pn for controlling the control target 18 1 connected to the PLC 14 1 via the I/O device 16 1. Similarly, P2 to P5 represent the programs Pn for controlling the control targets 18 2 to 18 5 connected to the PLCs 14 2 to 14 5 via the I/O devices 16 2 to 16 5.
  • The processor 20 of the PC 12 allocates the plurality of programs Pn (P1 to P5) stored in the main memory 22 to the PC 12 and the plurality of PLCs 14 n (PLC 14 1 to 14 5). The allocated programs Pn are loaded to the allocation tar get PLCs 14 n. That is, the processor 20 transmits the program Pn via the communication unit 24. The processor 30 of the allocation target PLC 14 n obtains the allocated program Pn via the communication unit 34, and stores the programs Pn in the main memory 32.
  • An operation of allocating the program Pn in the PLC system 10 will be described in detail below with reference to a flowchart in FIG. 4.
  • During activation of the PLC system 10 or at a predetermined timing, the processor 20 of the PC 12 performs an operation of step S1. In step S1, the processor 20 allocates the plurality of programs Pn stored in the main memory 22 to the plurality of PLCs 14 n to cause each of the plurality of PLCs 14 n to control the control targets 18 n connected to itself via the I/O devices 16 n. For ease of description, the program Pn allocated to the PLC 14 n to control the control target 18 n connected to the PLC 14 n via the I/O devices 16 n will be referred to as the self-assigned program Pn below. By this means, as shown in FIG. 5, the program P1 as the self-assigned program Pn is allocated to the PLC 14 1. Similarly, the self-assigned programs P2 to P5 are allocated to the PLC 14 2 to PLC 14 5. The plurality of PLCs 14 n (PLC 14 1 to PLC 14 5) finish executing the self-assigned programs Pn (P1 to P5) in one execution cycle of the PLC 14 n (referred to as one execution cycle below).
  • When data sizes (the number of steps) of these programs Pn (P1 to P5) are different from each other, times (execution times and processing times) taken to execute the programs Pn, and loads (or load factors) are also different from each other. In an example shown in FIG. 6, execution times and loads (or load factors) of the five programs Pn (P1 to P5) have a relationship of P4<P1<P3=P5<P2. Information indicating the load or the load factor will be referred to as load information. FIG. 6 is a time chart showing that each of the plurality of PLCs 14 n executes (processes) the self-assigned program Pn (the self-assigned program Pn allocated by the allocation shown in FIG. 5).
  • Next, as shown in FIG. 5, the processor 20 of the PC 12 loads the plurality of allocated self-assigned programs Pn (P1 to P5) to the plurality of PLCs 14 n (14 1 to 14 5) (step S2). Next, the processor 30 of each of the plurality of PLCs 14 n starts executing the self-assigned program Pn (step S3), calculates the load information resulting from execution of the self-assigned program Pn, and transmits the load information to the processor 20 of the PC 12 (step S4). When obtaining all pieces of load information of the processors 30 from the plurality of PLCs 14 n (14 1 to 14 5), the processor 20 of the PC 12 causes the plurality of PLCs 14 n (14 1 to 14 5) to stop executing all self-assigned programs Pn (step S5). The processor 20 causes the processors 30 of all the PLCs 14 n (14 1 to 14 5) to stop executing the self-assigned programs Pn by outputting stop signals to the processors 30 of all PLCs 14 n (14 1 to 14 5) via the communication unit 24 and the communication units 34.
  • The processor 20 further allocates all or part of the plurality of programs Pn to the PC 12 and the plurality of PLCs 14 n based on the load information of all PLCs 14 n (14 1 to 14 5) collected in step S4 to cause the PC 12 and the plurality of PLCs 14 n to doubly execute all or part of the plurality of programs Pn stored in the main memory 22 in parallel in one execution cycle (step S6). Hence, the programs Pn for controlling the control targets 18 n other than the control targets 18 n connected to one PLC 14 n via the I/O device 16 n, i.e., the control targets 18 n connected to the other PLCs 14 n via the I/O devices 16 n are allocated to the one PLC 14 n. The program Pn is allocated to the PC 12, too, in some cases. In this case, the processor 20 allocates the programs Pn so as not to cause one PLC 14 n to execute the same program Pn twice. For ease of description, the programs Pn allocated to the PC 12 and the PLCs 14 n to control the control targets 18 n connected to the other PLCs 14 n via the I/O devices 16 n will be referred to as the other programs Pn below in some cases.
  • FIG. 7 is a view showing an example where all programs Pn (P1 to P5) are allocated to the PC 12 and the plurality of PLCs 14 n to cause the PC 12 and the plurality of PLCs 14 n to doubly execute all programs Pn (P1 to P5) stored in the main memory 22 in parallel in one execution cycle. FIG. 8 is a time chart showing that each of the plurality of PLCs 14 n executes (processes) the program Pn (the self-assigned program Pn and the other program Pn allocated by the allocation shown in FIG. 7). As shown in FIG. 7, the other program P4 is further allocated to the PLC 14 1, and the other program P1 is further allocated to the PLC 14 4. The other programs P2, P3, P5 that cannot be allocated to the PLC 14 n are allocated to the PC 12. Loads (or load factors) of the programs P2, P3, P5 allocated to the PLCs 14 2, 14 3, 14 5 are high. Therefore, the other programs Pn are not additionally allocated to the PLCs 14 2, 14 3, 14 5. Allocation of these other programs Pn will be described later in detail.
  • Next, as shown in FIG. 7, the processor 20 of the PC 12 causes the plurality of PLCs 14 n (PLC 14 1, PLC 14 4) to load the other programs Pn (P4, P1) allocated to the plurality of PLCs 14 n (14 1, 14 4) (step S7). The processor 20 may cause the plurality of PLCs 14 n to load the allocated self-assigned programs Pn again, while having the plurality of PLCs 14 n load the other allocated programs Pn.
  • The PC 12 and the plurality of PLCs 14 n (14 1 to 14 5) execute the allocated programs Pn (including the self-assigned programs Pn and the other programs Pn) (step S8). In this case, FIG. 8 shows that the PLCs 14 n (14 1, 14 4) execute the self-assigned programs Pn (P1, P4) and then execute the other programs Pn (P4, P1). However, an execution order of the programs Pn may be reverse.
  • Next, processing of allocating the other programs Pn in step S6 will be described in detail. Lpmax represents a maximum load that is applicable to the processor 20 of the PC 12 in one execution cycle. Lmax represents a maximum load that is applicable to the processor 30 of each PLC 14 n in one execution cycle. The processing performance of the processor 30 of each PLC 14 n is the same. The processing performance of the processor 20 of the PC 12 is higher than the processing performances of the processors 30 of the PLCs 14 n. Hence, Lpmax>Lmax holds. Ln (L1 to L5) represents a load that is applied during execution of the programs Pn (P1 to P5). Lpc represents a unique load that is applied in one execution cycle of the processor 20 of the PC 12. This load Ln (L1 to L5) is based on load information of each PLC 14 n collected in step S4 in FIG. 4. The load factor of the PLC 14 n takes a value obtained by dividing the load applied to the PLC 14 n by the maximum load Lmax. For example, the load factor of the load applied during execution of the program P1 is L1/Lmax. Similarly, load factors of loads applied during execution of the programs P2 to P5 are L2/Lmax, L3/Lmax, L4/Lmax and L5/Lmax.
  • First, taking into account the priorities of the programs Pn executed in parallel, the programs Pn of higher priorities are allocated in order. In the present embodiment, the priorities are in order of P1→P2→P3→P4→P5, and the programs Pn are allocated as the other programs Pn in this order to the other PLCs 14 n (14 1 to 14 5).
  • FIG. 9 is a sub flowchart showing a processing operation in step S6 in FIG. 4. First, the processor 20 of the PC 12 selects a program of the highest priority (step S11). In the present embodiment, the priorities are in order of P1→P2→P3→P4→P5. Therefore, the processor 20 selects the program P1 in step S11.
  • Next, the processor 20 calculates an acceptable load of the PC 12 and each of the plurality of PLCs 14 n (14 1 to 14 5) by using the load information of each PLC 14 n collected in step S4 in FIG. 4 (step S12). This acceptable load is a load that can be further processed in one execution cycle. The processor 20 calculates an acceptable load of the PC 12 and each of the plurality of PLCs 14 n (14 1 to 14 5) based on the program Pn currently allocated to the PC 12 and each of the plurality of PLCs 14 n (14 1 to 14 5). At this time, no program Pn is allocated to the PC 12, and only the self-assigned programs Pn are allocated to the plurality of PLCs 14 n.
  • Hence, the load applicable to the PC 12 (referred to as an acceptance load LLp below) is LLp=Lpmax−Lpc. A load applicable to the PLC 14 1 (referred to as an acceptance load LL1) is LL1=Lmax−L1. Similarly, loads applicable to the PLCs 14 2 to the PLCs 14 5 (referred to as acceptance loads LL2 to LL5) are LL2=Lmax−L2, LL3=Lmax−L3, LL4=Lmax−L4, and LL5=Lmax−L5.
  • The processor 20 determines whether or not there is the PLC 14 n that affords to accept the currently selected program P1 as the other program P1 (step S13). In the present embodiment, LL2<L1, LL3<L1, LL4>L1 and LL5<L1 hold (see FIG. 8). Therefore, the processor 20 determines that the PLC 14 4 affords to accept the program P1 as the other program P1.
  • The program P1 is the self-assigned program P1 for the PLC 14 1. Therefore, the processor 20 does not determine whether or not the PLC 14 1 can accept the program P1. Further, even when there is the PLC 14 n that affords to accept the currently selected program Pn as the other program Pn, if the load factor of this PLC 14 n exceeds a threshold value (e.g., 90%) as a result of acceptance of the other program Pn, the processor 20 may determine that this PLC 14 n does not afford to accept the other program Pn.
  • When determining in step S13 that the PLC 14 4 affords to accept the program P1, the processor 20 allocates the currently selected program P1 as the other program P1 to the PLCs 14 4 (step S14), and the flow moves to step S15.
  • When the flow has moved to step S15, the processor 20 determines whether or not there is any program Pn that has not been selected yet. When determining in step S15 that there is any program Pn that has not been selected yet, the processor 20 newly selects the program Pn of the second highest priority (step S16), and the flow returns to step S12. By this means, the program Pn to be selected is switched from the program P1 to the program P2. That is, the program P2 is the second highest priority after the program P1. Therefore, at this time, the processor 20 newly selects the program P2 in step S16.
  • In step S12, as described above, the processor 20 calculates the acceptable acceptance loads LLp, LL1 to LL5 of the PC 12 and the plurality of PLCs 14 n (14 1 to 14 5). The other program P1 has been allocated to the PLC 14 4 in previous step S14, and therefore the acceptance load LL4 of the PLC 14 4 is changed to LL4=Lmax−L4−L1. In this regard, the acceptance loads LL1 to LL3, LL5 of the other PLCs 14 1 to 14 3, 14 5 remain the same, and the acceptance load LLp of the PC 12 also remains the same.
  • Next, in step S13, the processor 20 determines whether or not there is the PLC 14 n that affords to accept the currently selected program P2 as the other program P2. In the present embodiment, LL1<L2, LL3<L2, LL4<L2 and LL5<L2 hold (see FIG. 8). Therefore, the processor 20 determines that there is no PLC 14 n that affords to accept the program P2 as the other program P2.
  • In step S13, when determining that there is no PLC 14 n that affords to accept the program P2 as the other program P2, the processor 20 determines whether or not the PC 12 affords to accept the currently selected program P2 as the other program Pn (step S17). In the present embodiment, LLp>L2 holds (see FIG. 8). Therefore, the processor 20 determines that the PC 12 affords to accept the program P2 as the other program P2.
  • When determining in step S17 that the PC 12 affords to accept the program P2 as the other program P2, the processor 20 allocates the currently selected program P2 as the other program P2 to the PC 12 (step S18), and the flow moves to step S15. By repeating the above operation, the plurality of programs Pn (P1 to P5) are allocated as the other programs Pn (P1 to P5) to the PC 12 and the plurality of PLCs 14 n as shown in FIG. 7.
  • When determining in step S15 that there is no program Pn that has not yet been selected, the processor 20 ceases the processing, and the flow moves to step S7 in FIG. 4. When determining in step S17 that the PC 12 does not afford to accept the currently selected program Pn as the other program Pn, the flow then moves to step S15. By this means, any program Pn that is not accepted by the plurality of PLCs 14 n and the PC 12 as the other program Pn is not allocated to any one of the plurality of PLCs 14 n and the PC 12.
  • When determining in step S17 that the PC 12 does not afford to accept the currently selected program Pn as the other program Pn, the processor 20 may cease the processing, and the flow may move to step S7 in FIG. 4. When there is no priority among the programs Pn, the processor 20 may select the program Pn at random or in a predetermined order, and allocate the selected program Pn as the other program Pn to one of the plurality of PLCs 14 n and the PC 12.
  • Thus, the same program Pn is executed in parallel in one execution cycle. Consequently, even when an abnormality or a failure occurs in one PLC 14 n, the other PLC 14 n that executes as the other program Pn the self-assigned program Pn of the one PLC 14 n in which the abnormality or the failure has occurred (also referred to as an abnormal PLC) can control the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n. When, for example, an abnormality (or a failure) occurs in the PLC 14 3 as shown in FIG. 10, the PC 12 executes the self-assigned program P3 of the PLC 14 3 as the other program P3. Consequently, it is possible for the PC 12 to control the control target 18 3 connected to the abnormal PLC 14 3 via the I/O device 16 3. Consequently, while continuing controlling the control target 18 3 in a stable state, it is possible to switch a subject that controls the control target 18 3. Determination on whether or not there is the PLC 14 n in which an abnormality occurs will be described later.
  • Next, a configuration (main configurations of the communication units 34, 24 in particular) of the PLCs 14 n and the PC 12 will be specifically described with reference to FIGS. 11 and 12.
  • FIG. 11 is a detailed configuration diagram of the PLC 14 1. Each PLC 14 n employs the same configuration. Therefore, the PLC 14 1 will be described as an example hereinafter. The communication unit 34 of the PLC 14 1 includes a system bus I/F 40 that communicates with the processor 30, a first input buffer memory 42, a second input buffer memory 44, a first output buffer memory 46, a second output buffer memory 48, a third output buffer memory 50, a MAC 52 that communicates with the I/O device 16 1 connected to the PLC 14 1, a MAC 54 that communicates with the PC 12 and the other PLCs 14 2 than the PLC 14 1, a selector 56, and a register 58.
  • The system bus I/F 40 and the processor 30 are connected via a system bus 60. The MAC 52 is connected with a PHY (physical layer) chip 64 via a MII (Media Independent Interface) 62. The communication unit 34 is connected with the I/O device 16 1 of the PLC 14 1 via this PHY chip 64. The MAC 54 is connected to PHY chips 68, 70 via the MII 66. The communication unit 34 is connected with the communication unit 24 of the PC 12 provided at a previous stage via the PHY chip 68, and is connected with the communication unit 34 of the other PLC provided at a subsequent stage (next stage) via the PHY chip 70. In a case of the PLCs 14 2 to 14 5, the PHY chips 68 are connected with the PLCs 14 1 to 14 4 not with the PC 12. Further, in a case of the PLC 14 5 at the last stage, the PHY chip 70 is not connected to any of the PLC 14 n.
  • The MAC 52 receives a frame including input data sent from the I/O device 16 1 connected to the PLC 14 1 via the PHY chip 64 and the like. This input data is transmitted from the control target 18 1 connected to the I/O device 16 1. The MAC 52 extracts the input data from the received frame, and stores the extracted input data in the first input buffer memory 42. The processor 30 of the PLC 14 1 reads the input data stored in the first input buffer memory 42 via the system bus I/F 40 and the system bus 60, and stores the read input data in the main memory 32.
  • The processor 30 stores, in the main memory 32, output data (also referred to as first output data below) obtained by executing the self-assigned program P1 based on the input data stored in the main memory 32 (first input buffer memory 42). The processor 30 stores the first output data stored in the main memory 32, in the first output buffer memory 46 via the system bus 60.
  • The MAC 54 receives via the PC 12 a frame including input data sent from the I/O device 16 4 connected to the PLC 14 4 via the PHY chip 68. The input data sent from this I/O device 16 4 is transmitted from the control target 18 4 controlled according to the other program P4 (see FIG. 7) allocated to the PLC 14 4. The MAC 54 extracts the input data from the received frame, and stores the extracted input data in the second input buffer memory 44. The processor 30 of the PLC 14 1 reads the input data stored in the second input buffer memory 44 via the system bus I/F 40 and the system bus 60, and stores the read input data in the main memory 32. In this regard, when there are the plurality of other programs Pn allocated to the PLC 14 1, the main memory 32 and the second input buffer memory 44 store input data per other program Pn (per I/O device 16 n or PLC 14 n that has outputted the input data).
  • The processor 30 stores, in the main memory 32, output data (also referred to as second output data below) obtained by executing the other program P4 based on the input data (the input data from the control target 18 4) stored in the main memory 32 (second input buffer memory 44). The processor 30 stores the second output data stored in the main memory 32, in the third output buffer memory 50 via the system bus 60. In this regard, when there are the plurality of other program Pn allocated to the PLC 14 1, the main memory 32 and the third output buffer memory 50 store the second output data per other program Pn (per I/O device 16 n or PLC 14 n that is a second output data output target).
  • The MAC 54 writes the second output data in the frame to transmit the second output data stored in the third output buffer memory 50 to the PLC 14 4, and transmits the written frame to the PC 12 via the PHY chip 68. Address information of the transmission destination PLC 14 4 is added to this frame. The PC 12 writes selection information to the received frame to transmit to the PLC 14 4. The second output data included in this frame is stored in the second output buffer memory 48 of the PLC 14 4, and the selection information is stored in the register 58 of the PLC 14 4. By this means, the PLC 14 1 can control the control target 18 4 connected to the PLC 14 4 via the I/O device 16 4.
  • The selection information is information indicating which one of the first output data stored in the first output buffer memory 46 and the second output data stored in the second output buffer memory 48 is selected as output data outputted (transmitted) from the PLC 14 n to the I/O device 16 n. In the present embodiment, this selection information is one-bit data. A logical value “0” of the selection information means that the PLC 14 n outputs the first output data stored in the first output buffer memory 46 to the I/O device 16 n. A logical value “1” of the selection information means that the PLC 14 n outputs the second output data stored in the second output buffer memory 48 to the I/O device 16 n.
  • To transmit the input data stored in the first input buffer memory 42 to the PLC 14 4 to which the self-assigned program P1 allocated to the PLC 14 1 has been allocated as the other program P1 (see FIG. 7), the MAC 54 writes this input data in the frame and transmits the written frame to the PC 12 via the PHY chip 68. Address information of the transmission destination PLC 14 4 is added to this frame. The PC 12 transmits this received frame to the PLC 14 4. The input data included in this frame is stored in the second input buffer memory 44 of the PLC 14 4.
  • The MAC 54 receives through the PHY chip 68 the frame including the second output data sent via the PC 12 from the PLC 14 4 to which the self-assigned program P1 allocated to the PLC 14 1 has been allocated as the other program P1. This second output data transmitted from the PLC 14 4 to the PLC 14 1 is data stored in the third output buffer memory 50 of the PLC 14 4. The MAC 54 extracts the second output data and the selection information from the received frame, and stores the extracted second output data in the second output buffer memory 48 and the extracted selection information in the register 58. Consequently, the PLC 14 4 can control the control target 18 1 connected to the PLC 14 1 via the I/O device 16 1.
  • The selector 56 selects one of the first output data stored in the first output buffer memory 46 and the second output data stored in the second output buffer memory 48 based on the selection information stored in the register 58, and transmits the selected one to the MAC 52. The selector 56 transmits the first output data to the MAC 52 in a case of the logical value “0” of the selection information, and transmits the second output data to the MAC 52 in a case of the logical value “1” of the selection information.
  • The MAC 52 writes in the frame the output data sent from the selector 56 and outputs (transmits) the written frame to the I/O device 16 1. The I/O device 16 1 extracts the output data from the sent frame, and outputs the extracted output data to the control target 18 1. Thus, the selector 56 and the register 58 can switch whether the PLC 14 1 or the PLC 14 4 controls the control target 18 1 connected to the PLC 14 1 via the I/O device 16 1.
  • The MAC 54 receives the frame via the PHY chip 68. However, when this frame is not addressed to the PLC 14 1, the MAC 54 transmits the received frame as is to the PLC 14 2 connected to a subsequent stage via the PHY chip 70. Similarly, the MAC 54 receives the frame via the PHY chip 70. However, when this frame is not addressed to the PLC 14 1, the MAC 54 transmits the received frame as is to the PC 12 connected to a previous stage via the PHY chip 68. That is, the MAC 54 extracts the input data or the second output data from the frame only in a case of the frame addressed to the PLC 14 1.
  • FIG. 12 is a detailed configuration diagram of the PC 12. The communication unit 24 of the PC 12 includes a system bus I/F 80 that communicates with the processor 20, an input buffer memory 82, an output buffer memory 84 and a MAC 86 that communicates with the PLC 14 1.
  • The system bus I/F 80 and the processor 20 are connected by a system bus 88. The MAC 86 is connected with a PHY chip 92 via a MII 90. The communication unit 24 is connected with the communication unit 34 of the PLC 14 1 connected to a subsequent stage via the PHY chip 92.
  • The MAC 86 receives frames including items of input data sent from the plurality of PLCs 14 n (14 1 to 14 5), i.e., the plurality of I/O devices 16 n (16 1 to 16 5) via the PHY chip 92. These items of input data are sent from the plurality of control targets 18 n (18 1 to 18 5) connected to the plurality of PLCs 14 n via the plurality of I/O devices 16 n. The MAC 86 extracts at least the input data from the frame transmitted to the PC 12, and stores the extracted input data in the input buffer memory 82. The PLCs 14 2, 14 3, 14 5 connected to the control targets 18 2, 18 3, 18 5 controlled according to the other program P2, P3, P5 allocated to the PC 12 designate the PC 12 as the address information of the transmission destination and transmit the frame (the frame including the input data). The processor 20 of the PC 12 reads the input data stored in the input buffer memory 82 via the system bus I/F 80 and the system bus 88, and stores the read input data in the main memory 22. The main memory 22 and the input buffer memory 82 store the input data per PLC 14 2, 14 3, 14 5 that has transmitted the input data or per I/O device 16 n (per other program Pn).
  • The processor 20 stores in the main memory 22 the second output data obtained by executing the other program P2, P3, P5 based on the input data of each of the PLCs 14 2, 14 3, 14 5 (each of the I/ O devices 16 2, 16 3, 16 5) stored in the main memory 22. The processor 20 stores the second output data stored in the main memory 22, in the output buffer memory 84 via the system bus 88 or the like. The main memory 22 and the output buffer memory 84 store the second output data per other program Pn (per PLC 14 n or per I/ O device 16 2, 16 3, 16 5 that is a second output data output target).
  • The MAC 86 writes in the frame the second output data stored in the output buffer memory 84, and transmits the written frame to the PLCs 14 2, 14 3, 14 5 via the PHY chip 92. In this case, the MAC 86 writes the selection information, too, in the frame to be transmitted under control of the processor 20. Consequently, the PC 12 can control the I/ O devices 16 2, 16 3, 16 5 connected to the PLCs 14 2, 14 3, 14 5. In this regard, the MAC 86 writes selection information in the frame including the second output data transmitted from one PLC 14 n to another PLC 14 n via the PC 12, too, and transmits the frame to the transmission destination PLC 14 n.
  • Next, processing of determining a logical value of selection information in the PC 12 will be described with reference to a flowchart in FIG. 13. The processing shown in FIG. 13 is performed per execution cycle. Principally, the processor 20 of the PC 12 writes the selection information of the logical value “0” in the frame transmitted to each PLC 14 n (14 1 to 14 5). In the present embodiment, the frame in which the selection information is written is the frame including second output data transmitted to each of the plurality of PLCs 14 n (PLCs 14 1 to 14 5). However, the frame in which the selection information is written may be a frame different from the frame including the second output data.
  • First, the processor 20 of the PC 12 collects state information sent from the plurality of PLCs 14 n (14 1 to 14 5) via the communication unit 24 and the communication units 34 of the plurality of PLCs 14 n (14 1 to 14 5) (step S21). The processor 30 of each of the plurality of PLCs 14 n (14 1 to 14 5) transmits state information such as a survival signal and error information to the PC 12 via a dedicated line that is not shown. When normally operating, the processor 30 of each of the plurality of PLCs 14 n (14 1 to 14 5) transmits the survival signal to the PC 12. This survival signal is transmitted per execution cycle. The error information is, for example, error information indicating a failure of the main memory 32 breaks down, and error information indicating disconnection with the control target 18 n connected to self (PLC 14 n) via the I/O device 16 n. When these errors occur, the PLC 14 n outputs the error information to the PC 12.
  • The processor 20 determines whether or not there is the abnormal PLC 14 n (the PLC 14 n in which an abnormality or a failure occurs) based on each collected state information (a survival signal or error information) of each of the plurality of PLCs 14 n (14 1 to 14 5) (step S22). When, for example, there is the PLC 14 n that does not output the survival signal, the processor 20 determines this PLC 14 n that does not output the survival signal as the abnormal PLC 14 n. Also, when there is the PLC 14 n that outputs the error information, the processor 20 determines this PLC 14 n that outputs the error information as the abnormal PLC 14 n.
  • In step S22, when determining that there is no abnormal PLC 14 n, the processor 20 finishes the processing. In this case, principally as described above, the PC 12 writes the selection information of the logical value “0” in the frame (the frame including the second output data), and transmits the frame to each of the plurality of PLCs 14 n (PLC 14 1 to 14 5).
  • Meanwhile, when determining in step S22 that there is an abnormal PLC 14 n, the processor 20 determines whether or not the self-assigned program Pn allocated to the abnormal PLC 14 n is executed in parallel by PC 12 or another normal PLC 14 n as the other program Pn (step S23). When the processor 20 determines in step S23 parallel execution by the PC 12 or the other PLC 14 n, the flow moves to step S24.
  • When the flow moves to step S24, the processor 20 determines whether or not the PC 12 or the other PLC 14 n that executes the self-assigned program of the abnormal PLC 14 n as the other program can continuously control the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n. When, for example, the state information of the abnormal PLC 14 n includes error information of disconnection, the processor 30 determines that it is not possible to continuously control the control target 18 n connected to the abnormal PLC 14 n. On the other hand, when the main memory 32 of the abnormal PLC 14 n simply breaks down or when a survival signal is merely not sent, the processor 30 determines that it is possible to continuously control the control target 18 n connected to the abnormal PLC 14 n.
  • When determining in step S24 that it is possible to continuously control the control target 18 n connected to the abnormal PLC 14 n, the processor 20 writes selection information of the logical value “1” in the frame (the frame including the second output data) outputted to the abnormal PLC 14 n, and transmits the frame to the abnormal PLC 14 n (step S25). The second output data outputted to this abnormal PLC 14 n is output data obtained when the PC 12 or the other PLC 14 n executes the other program Pn for controlling the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n. By adding the selection information of the logical value “1” to this frame, it is possible to output the second output data to the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n. Then, the normal PLCs 14 n other than the abnormal PLC 14 n can control the control target 18 n connected to the abnormal PLC 14 n. Consequently, even when the control subject that controls the control target 18 n is switched, it is possible to output data that does not contradict execution results obtained so far, to the I/O device 16 n connected to the abnormal PLC 14 n. That is, while continuing controlling the control target 18 n in a stable state, it is possible to switch the control subject of the control target 18 n.
  • In a case of, for example, a state shown in FIG. 10, it is determined in step S22 that the PLC 14 3 is abnormal, and it is determined in step S23 that the PC 12 executes the other program P3 in parallel. When it is determined in step S24 that it is possible to continuously control the control target 18 3, the PC 12 writes the selection information of the logical value “1” in the frame and transmits the frame to the abnormal PLC 14 3 in step S25. By so doing, even when an abnormality occurs in the PLC 14 n, the PC 12 or the other normal PLC 14 n can continuously control the control target 18 n connected to the abnormal PLC 14 n. Principally as described above, the PC 12 transmits the frame in which the selection information of the logical value “0” is written, to the normal PLC 14 n than the abnormal PLC 14 n.
  • Meanwhile, when determining in step S23 that the self-assigned program Pn allocated to the abnormal PLC 14 n is not executed by the PC 12 or the other normal PLC 14 n as the other program Pn in parallel or when determining in step S24 that it is not possible to continuously control the control target 18 n connected to the abnormal PLC 14 n, the processor 20 causes a display unit (e.g., a liquid crystal display) that is not shown to display this determination in step S26. That is, the display unit displays an error. Further, the processor 20 may output a warning sound from a speaker that is not shown.
  • Next, processing of data delivery between the normal PLC 14 n and the I/O device 16 n connected to the PC 12 and the normal PLC 14 n will be described with reference to a time chart shown in FIG. 14. Subsequently, processing of data delivery between the abnormal PLC 14 n and the I/O device 16 n connected to the PC 12 and the abnormal PLC 14 n will be described with reference to the time chart shown in FIG. 15. In FIGS. 14 and 15, the normal PLC 14 n and the abnormal PLC 14 n are both PLCs 14 2 for ease of description. Hence, the I/O device 16 n connected to the PLC 14 2 is the I/O device 16 2. The PC 12 writes selection information in the frame including the second output data transmitted to the PLC 14 2.
  • Only execution of the program P2 will be described with reference to FIGS. 14 and 15. That is, the program P2 is the self-assigned program P2 for the PLC 14 2, and the other program P2 for the PC 12 (see FIG. 7). The PC 12 and the PLC 14 2 start communication at a stage at which execution of the program P2 is finished and all items of output data are determined. After receiving all items of input data from the I/O device 16 2, the PC 12 and the PLC 14 2 start executing the program P2 in a next execution cycle. After the PLC 14 2 and the I/O device 16 2 finish communications, the PC 12 and the PLC 14 2 perform communication. In this case, by providing the PC 12 and the PLC 14 2 with clocks that indicate the same time and are not shown, it is possible to synchronize the PC 12 and the PLC 14 2.
  • <Communication Between Normal PLC 14 2 and I/O Device 16 2 (See FIG. 14)>
  • The processor 30 of the PLC 14 2 finishes executing the self-assigned program P2 of one execution cycle, and then stores in the main memory 32 the first output data generated by executing the self-assigned program P2. The processor 30 of the PLC 14 2 stores the first output data stored in the main memory 32, in the first output buffer memory 46 of the communication unit 34. By this means, the first output data stored in the main memory 32 and the first output buffer memory 46 is updated. This self-assigned program P2 is executed based on the input data currently stored in the first input buffer memory 42.
  • Subsequently, the communication unit 34 of the PLC 14 2 writes in the frame the first output data stored in the first output buffer memory 46, and transmits the frame to the I/O device 16 2 (a logical value stored in the register 58 is “0”). By this means, the first output data is outputted to the control target 18 2 via the I/O device 16 2. The communication unit 34 of the PLC 14 2 receives the frame including the input data transmitted from the I/O device 16 2 (control target 18 2), extracts the input data from the received frame, and stores the input data in the first input buffer memory 42. Subsequently, the processor 30 of the PLC 14 2 stores in the main memory 32 the input data stored in the first input buffer memory 42. By this means, the input data (the input data transmitted from the I/O device 16 2) stored in the first input buffer memory 42 and the main memory 32 is updated. The processor 30 of the PLC 14 2 starts executing the self-assigned program P2 at an arrival timing of the next execution cycle.
  • <Communication Between PC 12 and Normal PLC 14 2 (See FIG. 14>
  • The processor 20 of the PC 12 finishes executing the other program P2 of one execution cycle, and then stores in the main memory 22 the second output data generated by executing the other program P2. The processor 20 of the PC 12 stores the second output data stored in the main memory 22, in the output buffer memory 84 of the communication unit 24. By this means, the second output data (the second output data outputted to the I/O device 16 2) stored in the main memory 22 and the output buffer memory 84 is updated. The other program P2 is executed based on the input data (the input data transmitted from the I/O device 16 2) currently stored in the input buffer memory 82.
  • Subsequently, the communication unit 24 of the PC 12 writes in the frame the second output data stored in the output buffer memory 84, and transmits the frame to the PLC 14 2. In this case, the PC 12 writes selection information of a logical value “0”, too, in the frame including the second output data transmitted to the PLC 14 2, and transmits the frame. The communication unit 34 of the PLC 14 2 extracts the second output data (second output data outputted to the I/O device 16 2) from the frame sent from the PC 12, and stores the extracted second output data in the second output buffer memory 48. By this means, the second output data (the second output data outputted to the I/O device 16 2) stored in the second output buffer memory 48 is updated. The communication unit 34 of the PLC 14 2 extracts the selection information from the frame sent from the PC 12, and stores the logical value “0” of the extracted selection information in the register 58. By this means, the selector 56 of the PLC 14 2 selects the first output data stored in the first output buffer memory 46 as the output data transmitted to the I/O device 16 2.
  • The communication unit 34 of the PLC 14 2 writes in the frame the input data stored in the first input buffer memory 42, and transmits the frame to the PC 12. The communication unit 24 of the PC 12 receives the frame including the input data (the input data transmitted from the I/O device 16 2) sent from the PLC 14 2, extracts the input data from the received frame, and stores the input data in the input buffer memory 82. The processor 20 of the PC 12 stores in the main memory 22 the input data stored in the input buffer memory 82. By this means, the input data (the input data transmitted from the I/O device 16 2) stored in the input buffer memory 82 and the main memory 22 is updated. The processor 20 of the PC 12 starts executing the other program P2 at an arrival timing of a next execution cycle.
  • <Communication Between Abnormal PLC 14 2 and I/O Device 16 2 (See FIG. 15)>
  • When detecting an error, the processor 30 of the abnormal PLC 14 2 generates error information, and transmits the generated error information to the PC 12 via the above dedicated line. In this case, the processor 30 of the abnormal PLC 14 2 does not execute the self-assigned program P2, and therefore the first output data stored in the first output buffer memory 46 is not updated.
  • The communication unit 34 of the abnormal PLC 14 2 writes in the frame the first output data stored in the first output buffer memory 46, and transmits the frame to the I/O device 16 2 (the logical value stored in the register 58 in this case is “0”). At this time, the first output data stored in the first output buffer memory 46 is not updated, and therefore the previously transmitted first output data is retransmitted to the I/O device 16 2. The communication unit 34 of the abnormal PLC 14 2 receives the frame including the input data transmitted from the I/O device 16 2, extracts the input data from the received frame, and stores the input data in the first input buffer memory 42. Subsequently, the processor 30 of the abnormal PLC 14 2 stores in the main memory 32 the input data stored in the first input buffer memory 42. By this means, the input data (the input data transmitted from the I/O device 16 2) stored in the first input buffer memory 42 and the main memory 32 is updated.
  • <Communication Between PC 12 and Abnormal PLC 14 2 (See FIG. 15)>
  • The processor 20 of the PC 12 finishes executing the other program P2 of one execution cycle, and then stores in the main memory 22 the second output data generated by executing the other program P2. The processor 20 of the PC 12 stores the second output data stored in the main memory 22, in the output buffer memory 84 of the communication unit 24. By this means, the second output data (the second output data outputted to the I/O device 16 2) stored in the main memory 22 and the output buffer memory 84 is updated. In this regard, the other program P2 is executed based on the input data (the input data transmitted from the I/O device 16 2) currently stored in the input buffer memory 82.
  • Subsequently, the communication unit 24 of the PC 12 writes in the frame the second output data stored in the output buffer memory 84, and transmits the frame to the abnormal PLC 14 2. In this case, the PC 12 writes the selection information of the logical value “1”, too, in the frame including the second output data transmitted to the abnormal PLC 14 2, and transmits the frame. The communication unit 34 of the abnormal PLC 14 2 extracts the second output data (the second output data outputted to the I/O device 16 2) from the frame sent from the PC 12, and stores the extracted second output data in the second output buffer memory 48. By this means, the second output data (the second output data outputted to the I/O device 16 2) stored in the second output buffer memory 48 is updated. The communication unit 34 of the abnormal PLC 14 2 extracts the selection information from the frame sent from the PC 12, and stores the logical value “1” of the extracted selection information in the register 58. By this means, the selector 56 of the abnormal PLC 14 2 selects the second output data stored in the second output buffer memory 48 as the output data transmitted to the I/O device 16 2. Hence, when the PLC 14 2 and the I/O device 16 2 communicate next time, the second output data stored in the second output buffer memory 48 is outputted to the I/O device 16 2. Consequently, it is possible to switch the control subject that controls the I/O device 16 2 from the abnormal PLC 14 2 to the PC 12.
  • The communication unit 34 of the abnormal PLC 14 2 writes in the frame the input data stored in the first input buffer memory 42, and transmits the frame to the PC 12. The communication unit 24 of the PC 12 receives the frame including the input data (the input data transmitted from the I/O device 16 2) sent from the abnormal PLC 14 2, extracts the input data from the received frame, and stores the input data in the input buffer memory 82. The processor 20 of the PC 12 stores in the main memory 22 the input data stored in the input buffer memory 82. The input data (the input data transmitted from the I/O device 16 2) stored in the input buffer memory 82 and the main memory 22 is updated. The processor 20 of the PC 12 starts executing the other program P2 of an arriving next execution cycle.
  • Thus, when an abnormality occurs in the PLC 14 2, the control subjects that control the I/O device 16 2 are switched from the abnormal PLC 14 2 to the PC 12. However, a response (update) of the output data to the input data from the I/O device 16 2 delays by one execution cycle compared to a normal time. To avoid this delay, after the second output buffer memory 48 of the abnormal PLC 14 2 is updated, the abnormal PLC 14 2 and the I/O device 16 2 may communicate once again in the current execution cycle.
  • An example of data delivery between the PLC 14 n and the PC 12 to which the self-assigned program Pn of the PLC 14 n has been allocated as the other program Pn has been described with reference to FIGS. 14 and 15. However, data delivery between one PLC 14 n and the other PLC 14 n to which the self-assigned program Pn of the one PLC 14 n has been allocated as the other program Pn can be performed likewise. Processing of data delivery between the PLC 14 1 and the PLC 14 4 will be briefly described with reference to FIGS. 14 and 15. The PLC 14 2 and PC 12 in FIGS. 14 and 15 are replaced with the PLC 14 1 and the PLC 14 4, and only execution of the program P1 will be described.
  • <Communication Between Normal PLC 14 1 and I/O Device 16 1 (See FIG. 14)>
  • The processor 30 of the PLC 14 1 finishes executing the self-assigned program P1 (see FIG. 7) of one execution cycle, and then stores in the main memory 32 the first output data generated by executing the self-assigned program P1. The processor 30 of the PLC 14 1 stores the first output data stored in the main memory 32, in the first output buffer memory 46 of the communication unit 34. By this means, the first output data stored in the main memory 32 and the first output buffer memory 46 is updated. In this regard, this self-assigned program P1 is executed based on the input data currently stored in the first input buffer memory 42.
  • Subsequently, the communication unit 34 of the PLC 14 1 writes in the frame the first output data stored in the first output buffer memory 46, and transmits the frame to the I/O device 16 1 (the logical value stored in the register 58 is “0”). By this means, the first output data is outputted to the control target 18 1 via the I/O device 16 1. The communication unit 34 of the PLC 14 1 receives the frame including the input data transmitted from the I/O device 16 1 (control target 18 1), extracts the input data from the received frame, and stores the input data in the first input buffer memory 42. Subsequently, the processor 30 of the PLC 14 1 stores in the main memory 32 the input data stored in the first input buffer memory 42. By this means, the input data (the input data transmitted from the I/O device 16 1) stored in the first input buffer memory 42 and the main memory 32 is updated. The processor 30 of the PLC 14 1 starts executing the self-assigned program P1 at an arrival timing of a next execution cycle.
  • <Communication Between Normal PLC 14 1 and Normal PLC 14 4 (See FIG. 14>
  • The processor 30 of the PLC 14 4 finishes executing the other program P1 (see FIG. 7) of one execution cycle, and then stores in the main memory 32 the second output data generated by executing the other program P1. The processor 30 of the PLC 14 4 stores the second output data stored in the main memory 32, in the third output buffer memory 50 of the communication unit 34. By this means, the second output data (the second output data outputted to the I/O device 16 1) stored in the main memory 32 and the third output buffer memory 50 is updated. In this regard, the other program P1 is executed based on the input data (the input data transmitted from the I/O device 16 1) currently stored in the second input buffer memory 44.
  • Subsequently, the communication unit 34 of the PLC 14 4 writes in the frame the second output data stored in the third output buffer memory 50, and transmits the frame to the PLC 14 1 via the PC 12. In this case, the PC 12 writes the selection information of the logical value “0”, too, in the frame including the second output data transmitted to the PLC 14 1. The communication unit 34 of the PLC 14 1 extracts the second output data (the second output data outputted to the I/O device 16 1) from the frame sent from the PLC 14 4, and stores the extracted second output data in the second output buffer memory 48. By this means, the second output data (the second output data outputted to the I/O device 16 1) stored in the second output buffer memory 48 is updated. The communication unit 34 of the PLC 14 1 extracts the selection information from the frame sent from the PLC 14 4 via the PC 12, and stores the logical value “0” of the extracted selection information in the register 58. By this means, the selector 56 of the PLC 14 1 selects the first output data stored in the first output buffer memory 46 as the output data transmitted to the I/O device 16 1.
  • The communication unit 34 of the PLC 14 1 writes in the frame the input data stored in the first input buffer memory 42, and transmits the frame to the PLC 14 4 via the PC 12. The communication unit 34 of the PLC 14 4 receives the frame including the input data (the input data transmitted from the I/O device 16 1) sent from the PLC 14 1 via the PC 12, extracts the input data from the received frame, and stores the input data in the second input buffer memory 44. The processor 30 of the PLC 14 4 stores in the main memory 32 the input data stored in the second input buffer memory 44. By this means, the input data (the input data transmitted from the I/O device 16 1) stored in the second input buffer memory 44 and the main memory 32 is updated. The processor 30 of the main memory 32 starts executing the other program P1 at an arrival of the next execution cycle.
  • <Communication Between Abnormal PLC 14 1 and I/O Device 16 1 (See FIG. 15)>
  • When detecting an error, the processor 30 of the abnormal PLC 14 1 generates error information, and transmits the generated error information to the PC 12 via the above dedicated line. In this case, the processor 30 of the abnormal PLC 14 1 does not execute the self-assigned program P1, and therefore the first output data stored in the first output buffer memory 46 is not updated.
  • The communication unit 34 of the abnormal PLC 14 1 writes in the frame the first output data stored in the first output buffer memory 46, and transmits the frame to the I/O device 16 1 (the logical value stored in the register 58 in this case is “0”). In this case, the first output data stored in the first output buffer memory 46 is not updated, and therefore the previously transmitted first output data is retransmitted to the I/O device 16 1. The communication unit 34 of the abnormal PLC 14 1 receives the frame including the input data transmitted from the I/O device 16 1, extracts the input data from the received frame, and stores the input data in the first input buffer memory 42. Subsequently, the processor 30 of the abnormal PLC 14 1 stores in the main memory 32 the input data stored in the first input buffer memory 42. By this means, the input data (the input data transmitted from the I/O device 16 1) stored in the first input buffer memory 42 and the main memory 32 is updated.
  • <Communication Between Abnormal PLC 14 1 and Normal PLC 14 4 (See FIG. 15)>
  • The processor 30 of the PLC 14 4 finishes executing the other program P1 of one execution cycle, and stores in the main memory 32 the second output data generated by executing the other program P1. The processor 30 of the PLC 14 4 stores the second output data stored in the main memory 32, in the third output buffer memory 50 of the communication unit 34. Thus, the second output data (the second output data outputted to the I/O device 16 1) stored in the main memory 32 and the third output buffer memory 50 is updated. In this regard, the other program P1 is executed based on the input data (the input data transmitted from the I/O device 16 1) currently stored in the second input buffer memory 44.
  • Subsequently, the communication unit 34 of the PLC 14 4 writes in the frame the second output data stored in the third output buffer memory 50, and transmits the frame to the abnormal PLC 14 1 via the PC 12. At this time, the PC 12 writes the selection information of the logical value “1”, too, in the frame including the second output data transmitted to the abnormal PLC 14 1, and transmits the frame. The communication unit 34 of the abnormal PLC 14 1 extracts the second output data (the second output data outputted to the I/O device 16 1) from the frame sent from the PLC 14 4 via the PC 12, and stores the extracted second output data in the second output buffer memory 48. By this means, the second output data (the second output data outputted to the I/O device 16 1) stored in the second output buffer memory 48 is updated. The communication unit 34 of the abnormal PLC 14 1 extracts the selection information from the frame sent from the PLC 14 4 via the PC 12, and stores the logical value “1” of the extracted selection information in the register 58. Thus, the selector 56 of the abnormal PLC 14 1 selects the second output data stored in the second output buffer memory 48 as the output data transmitted to the I/O device 16 1. Hence, when the PLC 14 1 and the I/O device 16 1 communicate next time, the second output data stored in the second output buffer memory 48 is outputted to the I/O device 16 1. Consequently, it is possible to switch the control subject that controls the I/O device 16 1 from the abnormal PLC 14 1 to the PLC 14 4.
  • The communication unit 34 of the abnormal PLC 14 1 writes in the frame the input data stored in the first input buffer memory 42, and transmits the frame to the PLC 14 4 via the PC 12. The communication unit 34 of the PLC 14 4 receives the frame including the input data (the input data transmitted from the I/O device 16 1) sent from the abnormal PLC 14 1 via the PC 12, extracts the input data from the received frame, and stores the input data in the second input buffer memory 44. The processor 30 of the PLC 14 4 stores in the main memory 32 the input data stored in the second input buffer memory 44. The input data (the input data transmitted from the I/O device 16 1) stored in the second input buffer memory 44 and the main memory 32 is updated. The processor 30 of the PLC 14 4 starts executing the other program P1 of an arriving next execution cycle.
  • Thus, when an abnormality occurs in the PLC 14 1, the control subjects that control the I/O device 16 1 are switched. However, a response (update) of the output data to the input data from the I/O device 16 1 delays by one execution cycle compared to a normal time. To avoid this delay, after the second output buffer memory 48 is updated, the abnormal PLC 14 1 and the I/O device 16 1 may communicate once again in the current execution cycle.
  • The first input buffer memory 42 and the second input buffer memory 44 may be configured as one storage medium. In this case, a storage area of one storage medium may be partitioned into at least two to cause one storage area to function as the first input buffer memory 42 and the other storage area to function as the second input buffer memory 44. Similarly, the first output buffer memory 46, the second output buffer memory 48 and the third output buffer memory 50 may also be configured as one storage medium. In this case, too, a storage area of one storage medium may be partitioned into at least three to cause each of the three partitioned storage areas to respectively function as the first output buffer memory 46, the second output buffer memory 48 and the third output buffer memory 50. Further, the first input buffer memory 42, the second input buffer memory 44, the first output buffer memory 46, the second output buffer memory 48 and the third output buffer memory 50 may be configured as one storage medium.
  • When an abnormality occurs in the PLC 14 n, the control subject that controls the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n is switched. However, even when the abnormality does not occur in the PLC 14 n, the control subject may be switched. That is, the control subject may be switched to cause the PC 12 or another normal PLC 14 n to control the control target 18 n connected to the normal PLC 14 n via the I/O device 16 n.
  • The PLC system (controller system) 10 described in the above embodiment includes the plurality of PLCs (controllers) 14 n, the plurality of I/O devices 16 n that connect the control target 18 n of each of the plurality of PLCs 14 n and each of the plurality of PLCs 14 n, and transmit necessary information between the control target 18 n and the PLC 14 n, and the PC (higher level control device) 12 that controls and manages the plurality of PLCs 14 n. The PC 12 includes the main memory (storage unit) 22 and the processor 20. The main memory 22 stores the plurality of programs Pn executed by each of the plurality of PLCs 14 n. The processor 20 allocates each of the plurality of programs Pn stored in the main memory 22 as the self-assigned program Pn to each of the plurality of PLCs 14 n to cause each of the plurality of PLCs 14 n to control the control target 18 n connected to each PLC 14 n via the I/O device 16 n. The processor 20 further allocates all or part of the plurality of programs Pn as the other programs Pn to the PC 12 and the plurality of PLCs 14 n to cause the PC 12 and the plurality of PLCs 14 n to doubly execute all or part of the plurality of programs Pn stored in the main memory 22 in parallel in one execution cycle. Each of the plurality of PLCs 14 n includes the first input buffer memory 42, the first output buffer memory 46 and the second output buffer memory 48. The first input buffer memory 42 stores input data transmitted from the control target 18 n connected to each PLC 14 n via the I/O device 16 n. The first output buffer memory 46 stores the first output data obtained by executing the self-assigned program Pn allocated to each PLC 14 n to control the control target 18 n connected to each PLC 14 n via the I/O device 16 n. The second output buffer memory 48 stores the second output data obtained when the PC 12 or the other PLC 14 n executes the other program Pn allocated to the PC 12 or the other PLC 14 n to control the control target 18 n connected to the PLC 14 n other than the PC 12 or the other PLC 14 n via the I/O device 16 n. Each of the plurality of PLCs 14 n outputs one of the first output data stored in the first output buffer memory 46 and the second output data stored in the second output buffer memory 48, to the control target 18 n connected to each PLC 14 n via the I/O device 16 n based on the selection information transmitted from the PC 12.
  • Consequently, even when the control subject that controls the control target 18 n is switched, it is possible to output data that does not contradict execution results obtained so far, to the I/O device 16 n connected to this control target 18 n. Consequently, while continuing controlling the control target 18 n in a stable state, it is possible to switch the control subjects of the control target 18 n.
  • Each of the plurality of PLCs 14 n further includes the processor 30. The processor 30 generates the first output data by executing the self-assigned program Pn allocated to each PLC 14 n based on the input data transmitted from the control target 18 n connected to each PLC 14 n via the I/O device 16 n. Each of the plurality of PLCs 14 n generates the second output data by executing the other program Pn allocated to each PLC 14 n based on the input data transmitted from the control target 18 n that is connected to the other PLC 14 n via the I/O device 16 n and is controlled according to the other program Pn allocated to each PLC 14 n. Thus, the PLC 14 n executes the program Pn (the self-assigned program Pn or the other program Pn) based on the input data transmitted from the control target 18 n and generates the output data outputted to the control target 18 n that has transmitted the input data. Consequently, it is possible to control the control target 18 n in a stable state.
  • The processor 20 of the PC 12 generates the second output data by executing the other program Pn allocated to the PC 12 based on the input data transmitted from the control target 18 n controlled according to the other program Pn allocated to the PC 12. Thus, the PC 12 executes the other program Pn based on the input data transmitted from the control target 18 n and generates the output data outputted to the control target 18 n that has transmitted the input data. Consequently, it is possible to control the control target 18 n in the stable state.
  • The processor 20 of the PC 12 outputs selection information to the plurality of PLCs 14 n to cause the PLC 14 n determined as a normal PLC to output the first output data stored in the first output buffer memory 46 to the control target 18 n connected to each PLC 14 n via the I/O device 16 n, and cause the PLC 14 n determined as an abnormal PLC 14 n to output the second output data stored in the second output buffer memory 48 to the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n. Consequently, even when an abnormality occurs in the PLC 14 n, in place of the abnormal PLC 14 n, the other normal PLC 14 n can control the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n. While continuing controlling the control target 18 n connected to the abnormal PLC 14 n via the I/O device 16 n in the stable state, it is possible to switch the control subjects of the control target 18 n connected to the abnormal PLC 14 n.
  • The processor 20 of the PC 12 determines whether each of the plurality of PLCs 14 n is normal or abnormal based on at least one of error information and a survival signal of each of the plurality of PLCs 14 n obtained from the plurality of PLCs 14 n. Thus, the PC 12 can precisely determine whether the PLC 14 n is normal or abnormal.
  • The communication unit 34 of the PLC 14 n further includes the selector 56 that selects one of the first output data stored in the first output buffer memory 46 and the second output data stored in the second output buffer memory 48 as the output data outputted to the control target 18 n connected to each PLC 14 n via the I/O device 16 n. Consequently, it is possible to easily switch the output data outputted to the I/O device 16 n.
  • The processor 20 of the PC 12 obtains load information indicating a load applied when each of the plurality of PLCs 14 executes the self-assigned program Pn, via the communication units 34 of the plurality of PLCs 14 n, and allocates the other program Pn based on the obtained load information. Consequently, it is possible to allocate the other program Pn to cause each of the plurality of PLCs 14 n to finish the processing of the program Pn in one execution cycle.
  • The PC 12 receives the input data stored in the first input buffer memory 42 of the PLC 14 n connected via the I/O device 16 n to the control target 18 n controlled according to the other program Pn allocated to each PLC 14 n, and transmits the second output data to the PLC 14 n connected via the I/O device 16 n to the control target 18 n controlled according to the other program Pn allocated to each PLC 14 n. Consequently, the PC 12 can transmit to the PLC 14 n the second output data that does not contradict execution results obtained so far, and control the control target 18 n connected to the PLC 14 n via the I/O device 16 n.
  • Each of the plurality of PLCs 14 n further includes the second input buffer memory 44 and the third output buffer memory 50. The second input buffer memory 44 stores the input data transmitted from the control target 18 n that is connected to the other PLC 14 n via the I/O device 16 n and is controlled according to the other program Pn allocated to each PLC 14 n. The third output buffer memory 50 stores the second output data obtained by executing the other program Pn allocated to each PLC 14 n to control the control target 18 n connected to the other PLC 14 n via the I/O device 16 n. Each of the plurality of PLCs 14 n receives via the PC 12 the input data stored in the first input buffer memory 42 of the other PLC 14 n connected via the I/O device 16 n to the control target 18 n controlled according to the other program Pn allocated to each PLC 14 n, and stores the received input data in the second input buffer memory 44. Each of the plurality of PLC 14 n transmits the second output data stored in the third output buffer memory 50 via the PC 12 to the other PLC 14 n connected via the I/O device 16 n to the control target 18 n controlled according to the other program Pn allocated to each PLC 14 n. Consequently, the PLC 14 n can transmit to the other PLC 14 n the second output data that does not contradict execution results obtained so far, and control the control target 18 n connected to the other PLC 14 n via the I/O device 16 n.

Claims (15)

What is claimed is:
1. A controller system comprising:
a plurality of controllers;
a plurality of I/O devices configured to connect a control target of each of the plurality of controllers and each of the plurality of controllers, and transmit necessary information between the control target and each of the controllers; and
a higher level control device configured to control and manage the plurality of controllers, wherein:
the higher level control device includes
a storage unit configured to store each of a plurality of programs executed by each of the plurality of controllers, and
a processor configured to allocate each of the plurality of programs stored in the storage unit as a self-assigned program to each of the plurality of controllers to cause each of the plurality of controllers to control the control target connected to each controller via the I/O device, and further allocate all or part of the plurality of programs as another program to the higher level control device and the plurality of controllers to cause the higher level control device and the plurality of controllers to doubly execute the all or part of the plurality of programs stored in the storage unit in parallel in one execution cycle; and
each one of the plurality of controllers includes a communication unit including:
a first input buffer memory configured to store input data transmitted from the control target connected to the one controller via the I/O device,
a first output buffer memory configured to store first output data obtained by executing the self-assigned program allocated to the one controller to control the control target connected to itself via the I/O device, and
a second output buffer memory configured to store second output data obtained when the higher level control device or another of the controllers executes the other program allocated to the higher level control device or the other of the controllers to control the control target connected to the one controller via the I/O device, and
the one controller is configured to output one of the first output data and the second output data to the control target connected to the one controller via the I/O device, based on selection information transmitted from the higher level control device, the first output data being stored in the first output buffer memory, the second output data being stored in the second output buffer memory.
2. The controller system according to claim 1, wherein the each one of the plurality of controllers further includes a processor configured to generate the first output data by executing the self-assigned program allocated to the one controller based on the input data transmitted from the control target connected to the one controller via the I/O device, and generate the second output data by executing the other program allocated to the one controller based on the input data transmitted from the control target connected to the other of the controllers via the I/O device and controlled according to the other program allocated to the one controller.
3. The controller system according to claim 1, wherein the processor of the higher level control device is configured to generate the second output data by executing the other program allocated to the higher level control device based on the input data transmitted from the control target controlled according to the other program allocated to the higher level control device.
4. The controller system according to claim 1, wherein the processor of the higher level control device is configured to output the selection information to the plurality of controllers to cause one of the controllers determined as a normal controller to output the first output data stored in the first output buffer memory to the control target connected to the normal controller via the I/O device, and cause another of the controllers determined as an abnormal controller to output the second output data stored in the second output buffer memory to the control target connected to the abnormal controller via the I/O device.
5. The controller system according to claim 4, wherein the processor of the higher level control device is configured to determine whether each of the plurality of controllers is normal or abnormal based on at least one of error information and a survival signal of each of the plurality of controllers obtained from the plurality of controllers.
6. The controller system according to claim 1, wherein the communication unit of the controller further includes a selector configured to select one of the first output data and the second output data as output data based on the selection information, the first output data being stored in the first output buffer memory, the second output data being stored in the second output buffer memory, and the output data being outputted to the control target connected to each controller via the I/O device.
7. The controller system according to claim 1, wherein the processor of the higher level control device is configured to obtain load information via the communication unit of the plurality of controllers and allocate the other program based on the obtained load information, the load information indicating a load applied when each of the plurality of controllers executes the self-assigned program.
8. The controller system according to claim 1, wherein the higher level control device is configured to:
receive the input data stored in the first input buffer memory of the one controller connected via the I/O device to the control target controlled according to the other program allocated to the higher level control device, and
transmit the second output data to the one controller connected via the I/O device to the control target controlled according to the other program allocated to the higher level control device.
9. The controller system according to claim 1, wherein the each one of the plurality of controllers further includes
a second input buffer memory configured to store the input data transmitted from the control target connected to another one of the controllers via the I/O device and controlled according to the other program allocated to the one controller, and
a third output buffer memory configured to store the second output data obtained by executing the other program allocated to the one controller to control the control target connected to the other one of the controllers via the I/O device, and
is configured to receive the input data via the higher level control device, the input data being stored in the first input buffer memory of the other one of the controllers connected via the I/O device to the control target controlled according to the other program allocated to the one controller, store the received input data in the second input buffer memory, and transmit the second output data to the other one of the controllers via the higher level control device, the second output data being stored in the third output buffer memory, and the other one of the controllers being connected via the I/O device to the control target controlled according to the other program allocated to the one controller.
10. A control method of a controller system that comprises:
a plurality of controllers;
a plurality of I/O devices each configured to connect a control target of each of the plurality of controllers to each of the plurality of controllers, and transmit necessary information between the control target and each of the controllers; and
a higher level control device configured to control and manage the plurality of controllers, wherein:
the higher level control device includes a storage unit configured to store each of a plurality of programs executed by each of the plurality of controllers; and
each of the plurality of controllers includes a communication unit including a first input buffer memory, a first output buffer memory and a second output buffer memory;
the control method comprises:
an allocating step of, at the higher level control device, allocating each of the plurality of programs stored in the storage unit as a self-assigned program to each of the plurality of controllers to cause each of the plurality of controllers to control the control target connected to each controller via the I/O device, and further allocating all or part of the plurality of programs as another program to the higher level control device and the plurality of controllers to cause the higher level control device and the plurality of controllers to doubly execute the all or part of the plurality of programs stored in the storage unit in parallel in one execution cycle; and
a first inputting/storing step of, at each one of the plurality of controllers, storing input data in the first input buffer memory, the input data being transmitted from the control target connected to the one controller via the I/O device;
a first outputting/storing step of, at the one controller, storing first output data in the first output buffer memory, the first output data being obtained by executing the self-assigned program allocated to the one controller to control the control target connected to the one controller via the I/O device;
a second outputting/storing step, at the one controller, storing second output data in the second output buffer memory, the second output data being obtained when the higher level control device or another of the controllers executes the other program allocated to the higher level control device or the other controller to control the control target connected to the one controller via the I/O device; and
an outputting step of, at the one controller, outputting one of the first output data and the second output data to the control target connected to the one controller via the I/O device, based on selection information transmitted from the higher level control device, the first output data being stored in the first output buffer memory, the second output data being stored in the second output buffer memory.
11. The control method according to claim 10, further comprising:
a first generating step of, at the one controller, generating the first output data by executing the self-assigned program allocated to the one controller based on the input data transmitted from the control target connected to the one controller via the I/O device;
a second generating step of, at the one controller, generating the second output data by executing the other program allocated to the one controller based on the input data transmitted from the control target connected to another one of the controllers via the I/O device and controlled according to the other program allocated to the one controller; and
a third generating step of, at the higher level control device, generating the second output data by executing the other program allocated to the higher level control device based on the input data transmitted from the control target controlled according to the other program allocated to the higher level control device.
12. The control method according to claim 10, wherein:
the communication unit further includes a selector; and
the control method further comprises:
an abnormality determining step of, at the higher level control device, determining whether each of the plurality of controllers is normal or abnormal based on at least one of error information and a survival signal of the each of the plurality of controllers obtained from the plurality of controllers; and
a selecting/outputting step of, at the higher level control device, outputting the selection information to the plurality of controllers to cause one of the controllers determined as a normal controller to output the first output data stored in the first output buffer memory to the control target connected to the normal controller via the I/O device, and cause another of the controllers determined as an abnormal controller to output the second output data stored in the second output buffer memory to the control target connected to the abnormal controller via the I/O device; and
a selecting step of, at the selector of the communication unit of each of the plurality of controllers, selecting one of the first output data and the second output data as output data based on the selection information, the first output data being stored in the first output buffer memory, the second output data being stored in the second output buffer memory, and the output data being outputted to the control target connected to each controller via the I/O device.
13. The control method according to claim 10, further comprising an obtaining step of, at the higher level control device, obtaining load information via the communication unit of the plurality of controllers, the load information indicating a load applied when each of the plurality of controllers executes the self-assigned program,
wherein, in the allocating step, the other program is allocated based on the obtained load information.
14. The control method according to claim 10, further comprising:
a receiving step of, at the higher level control device, receiving the input data stored in the first input buffer memory of the controller connected via the I/O device to the control target controlled according to the other program allocated to the higher level control device; and
a first transmitting step of, at the higher level control device, transmitting the second output data to the controller connected via the I/O device to the control target controlled according to the other program allocated to the higher level control device.
15. The control method according to claim 10, wherein:
the communication unit further includes a second input buffer memory and a third output buffer memory;
the control method further comprises:
a second inputting/storing step of, at of the one controller, storing the input data in the second input buffer memory, the input data being transmitted from the control target connected to another of the controllers via the I/O device and controlled according to the other program allocated to the one controller; and
a third outputting/storing step of, at the one controller, storing the second output data in the third output buffer memory, the second output data being obtained by executing the other program allocated to the one controller to control the control target connected to the other controller via the I/O device; and
a second transmitting step of, at the one controller, transmitting the second output data stored in the third output buffer memory to the other controller via the higher level control device, the other controller being connected via the I/O device to the control target controlled according to the other program allocated to the one controller; and
in the second inputting/storing step, the one controller is configured to receive the input data via the higher level control device, the input data being stored in the first input buffer memory of the other controller connected via the I/O device to the control target controlled according to the other program allocated to the one controller, and store the received input data in the second input buffer memory.
US15/636,011 2016-06-29 2017-06-28 Controller system and control method Active US10606232B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2016128493A JP6356736B2 (en) 2016-06-29 2016-06-29 Controller system and control method
JP2016-128493 2016-06-29

Publications (2)

Publication Number Publication Date
US20180004182A1 true US20180004182A1 (en) 2018-01-04
US10606232B2 US10606232B2 (en) 2020-03-31

Family

ID=60662572

Family Applications (1)

Application Number Title Priority Date Filing Date
US15/636,011 Active US10606232B2 (en) 2016-06-29 2017-06-28 Controller system and control method

Country Status (4)

Country Link
US (1) US10606232B2 (en)
JP (1) JP6356736B2 (en)
CN (1) CN107544240B (en)
DE (1) DE102017005879B4 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113748387A (en) * 2019-05-29 2021-12-03 欧姆龙株式会社 Control system, support device, and support program
US12498689B2 (en) * 2018-06-01 2025-12-16 Selectron Systems Ag Virtualized programmable logic controllers to allow multiple applications to run in parallel on the same hardware

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
IT201900009351A1 (en) * 2019-06-18 2019-09-18 Brovind Vibratori S P A REMOTE CONTROL SYSTEM FOR VIBRATING POWER SUPPLIES

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5870301A (en) * 1995-03-30 1999-02-09 Fujitsu Limited System control apparatus including a master control unit and a slave control unit which maintain coherent information
US20020023117A1 (en) * 2000-05-31 2002-02-21 James Bernardin Redundancy-based methods, apparatus and articles-of-manufacture for providing improved quality-of-service in an always-live distributed computing environment
US20050091410A1 (en) * 2003-09-12 2005-04-28 Gibart Anthony G. Safety controller with simplified interface
US20060259160A1 (en) * 2005-05-13 2006-11-16 Rockwell Automation Technologies, Inc. Distributed database in an industrial automation environment
US20070277023A1 (en) * 2003-06-24 2007-11-29 Reinhard Weiberle Method For Switching Over Between At Least Two Operating Modes Of A Processor Unit, As Well Corresponding Processor Unit
US20080197797A1 (en) * 2006-09-29 2008-08-21 Reliance Electric Technologies, Llc Motor having integral programmable logic controller
US20080208361A1 (en) * 2007-02-27 2008-08-28 Rockwell Automation Technologies, Inc. Dynamic load balancing using virtual controller instances
US20130111456A1 (en) * 2011-11-01 2013-05-02 Eric W. Bonnell Code synchronization
US20130282148A1 (en) * 2010-12-28 2013-10-24 Hitachi, Ltd. Motion controller
US20140005805A1 (en) * 2011-03-15 2014-01-02 Omron Corporation Cpu of plc, system program for plc, and recording medium storing system program for plc
US20150277406A1 (en) * 2014-03-26 2015-10-01 Rockwell Automation Technologies, Inc. Multiple controllers configuration management interface for system connectivity
US20160274552A1 (en) * 2015-03-16 2016-09-22 Rockwell Automation Technologies, Inc. Cloud-based industrial controller
US20160381127A1 (en) * 2012-09-10 2016-12-29 William James Gibson Systems and methods for dynamic networked peer-to-peer content distribution
US20170075335A1 (en) * 2014-03-14 2017-03-16 Omron Corporation Controller and control system
US20180095441A1 (en) * 2016-02-15 2018-04-05 Mitsubishi Electric Corporation Load distribution device

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06266685A (en) * 1993-03-15 1994-09-22 Toshiba Corp Decentralized control system
JP3478386B2 (en) * 2000-05-26 2003-12-15 村田機械株式会社 Carrier system
JP2004362133A (en) * 2003-06-03 2004-12-24 Omron Corp PLC system and its backup method
JP4791909B2 (en) 2006-08-21 2011-10-12 株式会社東芝 Control device having high-speed input / output function and control method of control data thereof
US8856522B2 (en) 2007-02-27 2014-10-07 Rockwell Automation Technologies Security, safety, and redundancy employing controller engine instances
JP5141905B2 (en) * 2007-12-28 2013-02-13 オムロン株式会社 Safety master
JP4950243B2 (en) * 2009-04-13 2012-06-13 三菱電機株式会社 Plant monitoring and control system
JP4809497B2 (en) 2010-02-25 2011-11-09 ファナック株式会社 Programmable controller that executes multiple independent sequence programs in parallel
JP2013168090A (en) 2012-02-17 2013-08-29 Hitachi Ltd Multi-controller system, control method, and program
CN103941648A (en) 2014-03-07 2014-07-23 东莞市升力智能科技有限公司 Multi-axis motion control system and control method thereof
DE112014004709B4 (en) 2014-04-24 2021-09-30 Mitsubishi Electric Corporation Control system, control station, externally controlled station
US10437212B2 (en) 2015-04-28 2019-10-08 Schneider Electric Systems Usa, Inc. Distributed computing in a process control environment

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5870301A (en) * 1995-03-30 1999-02-09 Fujitsu Limited System control apparatus including a master control unit and a slave control unit which maintain coherent information
US20020023117A1 (en) * 2000-05-31 2002-02-21 James Bernardin Redundancy-based methods, apparatus and articles-of-manufacture for providing improved quality-of-service in an always-live distributed computing environment
US20070277023A1 (en) * 2003-06-24 2007-11-29 Reinhard Weiberle Method For Switching Over Between At Least Two Operating Modes Of A Processor Unit, As Well Corresponding Processor Unit
US20050091410A1 (en) * 2003-09-12 2005-04-28 Gibart Anthony G. Safety controller with simplified interface
US20060259160A1 (en) * 2005-05-13 2006-11-16 Rockwell Automation Technologies, Inc. Distributed database in an industrial automation environment
US20080197797A1 (en) * 2006-09-29 2008-08-21 Reliance Electric Technologies, Llc Motor having integral programmable logic controller
US20080208361A1 (en) * 2007-02-27 2008-08-28 Rockwell Automation Technologies, Inc. Dynamic load balancing using virtual controller instances
US20130282148A1 (en) * 2010-12-28 2013-10-24 Hitachi, Ltd. Motion controller
US20140005805A1 (en) * 2011-03-15 2014-01-02 Omron Corporation Cpu of plc, system program for plc, and recording medium storing system program for plc
US20130111456A1 (en) * 2011-11-01 2013-05-02 Eric W. Bonnell Code synchronization
US20160381127A1 (en) * 2012-09-10 2016-12-29 William James Gibson Systems and methods for dynamic networked peer-to-peer content distribution
US20170075335A1 (en) * 2014-03-14 2017-03-16 Omron Corporation Controller and control system
US20150277406A1 (en) * 2014-03-26 2015-10-01 Rockwell Automation Technologies, Inc. Multiple controllers configuration management interface for system connectivity
US20160274552A1 (en) * 2015-03-16 2016-09-22 Rockwell Automation Technologies, Inc. Cloud-based industrial controller
US20180095441A1 (en) * 2016-02-15 2018-04-05 Mitsubishi Electric Corporation Load distribution device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12498689B2 (en) * 2018-06-01 2025-12-16 Selectron Systems Ag Virtualized programmable logic controllers to allow multiple applications to run in parallel on the same hardware
CN113748387A (en) * 2019-05-29 2021-12-03 欧姆龙株式会社 Control system, support device, and support program

Also Published As

Publication number Publication date
CN107544240B (en) 2019-07-30
US10606232B2 (en) 2020-03-31
CN107544240A (en) 2018-01-05
JP2018005372A (en) 2018-01-11
JP6356736B2 (en) 2018-07-11
DE102017005879A1 (en) 2018-01-04
DE102017005879B4 (en) 2022-11-10

Similar Documents

Publication Publication Date Title
US11061580B2 (en) Storage device and controllers included in storage device
US9110843B2 (en) Rack and method thereof for simultaneously updating basic input output systems
US8588228B1 (en) Nonvolatile memory controller with host controller interface for retrieving and dispatching nonvolatile memory commands in a distributed manner
CN115865866B (en) Address allocation method and device
CN112599082A (en) Adaptive addressing and addressing method, device, equipment and storage medium
JP6275320B2 (en) COMMUNICATION DEVICE, COMMUNICATION METHOD, AND PROGRAM
US10606232B2 (en) Controller system and control method
CN111988240B (en) Data transmission method and device, electronic equipment and storage medium
CN110580235B (en) SAS expander communication method and device
JP2017068345A (en) Bus system
US7996715B2 (en) Multi nodal computer system and method for handling check stops in the multi nodal computer system
US20200272532A1 (en) Communication apparatus, communication method, program, and communication system
JP2019139631A (en) Control device, control system, control method, and control program
US11561922B2 (en) Communication apparatus, communication method, program, and communication system
JP6981290B2 (en) Slave device, control system, response data communication method, and response data communication program
US20130145025A1 (en) Programmable controller
JP6878705B1 (en) Communication devices, communication systems, communication methods, and programs
JP2016058835A (en) Relay system and switch device
US20100185838A1 (en) Processor assigning control system and method
CN116599830B (en) Communication node and link configuration method and device, storage medium and electronic equipment
JP7277206B2 (en) Communication control device and method
US10372361B2 (en) Data storage device including multiple memory modules and circuitry to manage communication among the multiple memory modules
JP6305813B2 (en) Standby time calculation device, user node, and standby time calculation method
JP2018019209A (en) Transmission path switching control device and transmission path switching control method
JP4258372B2 (en) Common memory management method

Legal Events

Date Code Title Description
AS Assignment

Owner name: FANUC CORPORATION, JAPAN

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:MIYACHI, MOTOYOSHI;REEL/FRAME:042852/0326

Effective date: 20170519

STPP Information on status: patent application and granting procedure in general

Free format text: FINAL REJECTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: RESPONSE AFTER FINAL ACTION FORWARDED TO EXAMINER

STPP Information on status: patent application and granting procedure in general

Free format text: ADVISORY ACTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: DOCKETED NEW CASE - READY FOR EXAMINATION

STPP Information on status: patent application and granting procedure in general

Free format text: NON FINAL ACTION MAILED

STPP Information on status: patent application and granting procedure in general

Free format text: NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS

STPP Information on status: patent application and granting procedure in general

Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT RECEIVED

STPP Information on status: patent application and granting procedure in general

Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED

STCF Information on status: patent grant

Free format text: PATENTED CASE

MAFP Maintenance fee payment

Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Year of fee payment: 4