Control system, support device and machine-readable storage medium
By designing the working time of coordinated control instructions in the FA system, the problem of fixed and conflicting control program configurations between multiple PLCs is solved, and free configuration and efficient control instruction updates between PLCs are realized.
Patent Information
- Application Number
- CN202080046811.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-07-03
- Filing Date
- 2020-03-10
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2040-03-10
AI Technical Summary
In the existing FA system, the control program configurations between multiple PLCs are fixed, making it difficult to achieve free configuration, and there is a problem of conflict when the control instructions are updated.
A control system is designed with a program storage unit, a work unit and a coordination unit. By coordinating the working time between multiple control devices, it ensures that updates of the same control instructions do not conflict with each other, and generates identification information to facilitate control object identification and deal with.
It realizes the ability to freely configure control programs between multiple PLCs, avoids conflicts when updating control instructions, and improves the system's configuration freedom.
Smart Images

Figure CN114072739B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a control system, a support device, and a setting program for controlling an object. Background Art
[0002] FA (Factory Automation) systems using control devices such as PLC (Programmable Logic Controller) have become widely used in various production sites. PLC gives control instructions to the control objects by making the control programs of the control objects such as field equipment including robots work (execute). In recent years, the scale of FA systems has tended to increase, and with this, FA systems are composed of multiple PLCs connected to a network.
[0003] As a system including a plurality of PLCs, for example, Japanese Patent Application Laid-Open No. 10-164167 (Patent Document 1) discloses a programmable controller that performs cyclic communication with other programmable controllers via a communication device.
[0004] Prior art literature
[0005] Patent Literature
[0006] Patent Document 1: Japanese Patent Application Laid-Open No. 10-164167 Summary of the invention
[0007] Problems to be solved by the invention
[0008] Conventionally, even in a system having a plurality of PLCs, a PLC that operates each control program in accordance with the control program is fixed. On the other hand, there is a demand from users to freely arrange control programs among a plurality of PLCs in an FA system.
[0009] The present disclosure provides a control system, a support device, and a setting program that can meet the above-mentioned needs.
[0010] Means for solving problems
[0011] A control system of one example of the present disclosure is a control system having a plurality of control devices connected over a network, the control system comprising: a program storage unit, which is provided in each control device and is used to store a control program, wherein the control program has a command for calculating and updating a control instruction, wherein the control instruction is a value related to the control of a control object; a working unit, which is provided in each control device and causes the control program of the program storage unit of the control device to work; and a coordination unit, which configures a plurality of control programs having a command for calculating and updating the same control instruction in one or more of the plurality of control devices and coordinates working times between the plurality of control programs so that updates of the same control instruction between the plurality of control programs do not conflict with each other.
[0012] According to the present disclosure, even when multiple control programs that calculate and update control instructions for the same control object are configured in one or more of the multiple control devices, the working time is automatically coordinated between the multiple control programs in a manner that the updates of the same control instructions between the multiple control programs do not conflict with each other. Therefore, the user can freely configure the control program between multiple PLCs without being aware of the conflict.
[0013] In the above disclosure, the coordination unit statically determines the working time of multiple control programs so that the updates of the same control instruction among the multiple control programs do not conflict with each other.
[0014] According to the present disclosure, the operation times of a plurality of control programs can be statically determined in a manner that eliminates conflicts.
[0015] In the above disclosure, the coordination unit distributes the plurality of control programs to the plurality of control devices, and coordinates the operation time according to the progress of the process so that the plurality of control programs respectively operate in sequence.
[0016] According to the present disclosure, when the operation times of a plurality of control programs are determined so as to eliminate conflicts, the operation times can be determined according to the progress of the process.
[0017] In the above disclosure, the control instruction includes the control instruction given to the control object, and the coordination unit further generates identification information for the control object to identify the control instruction issued to itself.
[0018] According to the present disclosure, in the case of implementing non-conflicting working time coordination, identification information that can identify the control instruction issued to the control object can be generated for the control object.
[0019] In the above disclosure, the identification information used by the controlled object to identify the control instruction issued to itself includes an identifier of the control program in which the control instruction for the controlled object is updated.
[0020] According to the present disclosure, a controlled object can use an identifier of a control program in order to identify a control instruction issued to itself.
[0021] In the above disclosure, when a plurality of control instructions are given to a control object, the identification information used by the control object to identify the control instruction issued to itself includes the order in which the plurality of control instructions are given to the control object.
[0022] According to the present disclosure, in order for a control object to recognize a control instruction issued to itself, it can use the order in which the control instructions should be issued to itself.
[0023] In the above disclosure, the order in which the plurality of control instructions are given to the control object is based on the working time coordinated between the plurality of control programs that update the plurality of control instructions.
[0024] According to the present disclosure, the order of giving control instructions to control objects can be determined based on the working time after coordination between control programs.
[0025] In the above disclosure, when the control device operates multiple control programs by switching them according to the coordinated operation time through the operation unit, it notifies the control object of the switch to one control program, and the notification includes identification information for identifying the control instruction to be updated by one control program after the switch.
[0026] According to the present disclosure, when the control program to be operated is switched, the control device can output a notification of the switching, and use the notification to provide the controlled object with identification information for identifying the control command updated by the switched control program.
[0027] In the above disclosure, the identification information includes the type of the control instruction. According to the present disclosure, the identification information that can be provided to the controlled object can include the type corresponding to the control instruction given to the controlled object, for example, the type of the variable.
[0028] In the above disclosure, the control-related values include the values of variables updated by the control program when it is running. According to the present disclosure, the control-related values include the values of variables updated when the control program is running, such as the state value of the control object shared between control programs, control instructions, instruction values, etc.
[0029] The support device disclosed in the present invention is a support device that can be connected to a control system, and the control system has multiple control devices connected to a network, wherein each control device has: a program storage unit, which is used to store a control program, and the control program has a command to calculate and update a control instruction, and the control instruction is a value related to the control of the control object; and a working unit, which makes the control program of the program storage unit of the control device work, and the support device has: a configuration unit, which configures multiple control programs with commands to calculate and update the same control instruction to one or more of the multiple control devices; and a coordination unit, which coordinates the working time between the multiple control programs so that the update of the same control instruction between the multiple control programs does not conflict with each other.
[0030] According to the present disclosure, even when multiple control programs that calculate and update control instructions for the same control object are configured in one or more of the multiple control devices, the operating time is automatically coordinated between the multiple control programs in a manner that the updates of the control instructions from each control program do not conflict with each other. Therefore, the user can freely configure the control program between multiple PLCs without being aware of the conflict.
[0031] The setting program disclosed in the present invention is a setting program for setting the behavior of a control system of multiple control devices connected to a network, wherein each control device has: a program storage unit, which is used to store a control program, wherein the control program has a command for calculating and updating a control instruction, wherein the control instruction is a value related to the control of a control object; and a working unit, which causes the control program of the program storage unit of the control device to work, and the setting program causes the computer to perform the following steps: configuring multiple control programs having a command for calculating and updating the same control instruction to one or more of the multiple control devices; and coordinating working times between the multiple control programs so that updates of the same control instruction between the multiple control programs do not conflict with each other.
[0032] According to the present disclosure, even when multiple control programs that calculate and update control instructions for the same control object are configured in one or more of the multiple control devices, the operation time is automatically coordinated between the multiple control programs in a manner that the control instructions from each control program do not conflict with each other. Therefore, the user can freely configure the control program between multiple PLCs without being aware of the conflict.
[0033] Effects of the Invention
[0034] According to the present disclosure, it is possible to improve the degree of freedom in configuring a control program between control devices in a control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is a diagram schematically showing the overall configuration of a system 1 according to the present embodiment.
[0036] Figure 2 It is a diagram schematically showing the overall configuration of a system 1 according to the present embodiment.
[0037] Figure 3 1 is a schematic diagram showing a main part structure of the PLC 100 according to the present embodiment.
[0038] Figure 4 1 is a diagram schematically showing a main part configuration of a field device 90 according to an embodiment of the present invention.
[0039] Figure 5 It is a diagram schematically showing the structure of the support device 500 according to the present embodiment.
[0040] Figure 6 An example of a basic communication frame 20 is shown. Figure 7 An example of the communication frame 20 for transmitting the notification 31 of switching of the “variable manager” of variable management is shown.
[0041] Figure 7 It is a diagram schematically showing an example of the structure of the communication frame 20 according to the present embodiment.
[0042] Figure 8 This is a diagram for explaining the flow ID 29 according to this embodiment.
[0043] Fig. 9 It is a flowchart schematically showing the coordination process of the setting tool 600 according to the present embodiment.
[0044] Fig.10 It is a diagram for explaining an example of the UPG timetable 65 according to the present embodiment.
[0045] Fig.11 It is a diagram for explaining an example of the UPG timetable 65 according to the present embodiment.
[0046] Fig.12 It is a diagram schematically showing an example of the UPG timetable 65 according to the present embodiment.
[0047] Fig.13 This is a diagram schematically showing an example of the flow information 87 according to this embodiment.
[0048] Fig.14 This is a flowchart showing an example of the configuration process of the UPG 69 according to the present embodiment.
[0049] Fig.15 It is a diagram showing an example of information 150 related to the UPG 69 of the present embodiment.
[0050] Fig.16 It means according to Fig.15 FIG. 1 is a diagram of a field device 90 that is actuated by a control instruction of a variable 153 .
[0051] Fig.17 It is a diagram schematically showing the functions of the field device 90 according to the present embodiment.
[0052] Fig.18 It is a diagram schematically showing the functions of the PLC 100 according to the present embodiment.
[0053] Fig.19 It is a diagram schematically illustrating a static fixing mode according to an embodiment of the present invention.
[0054] Fig. 20 This is a flowchart showing an example of processing in the static fixing mode according to the embodiment of the present invention.
[0055] Fig.21 It is a diagram schematically illustrating a dynamic change pattern according to an embodiment of the present invention.
[0056] Fig. 22 It is a timing diagram of the dynamic change mode according to the embodiment of the present invention.
[0057] Fig.23 : is a flowchart schematically showing the assist tool processing in the dynamic change mode according to the present embodiment.
[0058] Fig.24 This is a flowchart showing an example of processing before the UPG is executed in the dynamic change mode of the present embodiment.
[0059] Fig.25 This is a flowchart showing an example of processing at the start of UPG execution in the dynamic change mode of the present embodiment.
[0060] Fig.26 This is a flowchart showing an example of processing during UPG execution according to this embodiment.
[0061] Fig. 27 This is a flowchart showing an example of processing during UPG execution according to this embodiment.
[0062] Fig.28 This is a diagram schematically showing a processing example of variable manager switching in the dynamic change mode according to the present embodiment.
[0063] Fig.29 This is a diagram showing, in a tabular format, the relationship between the notification 31 of the administrator switching and the device operation according to the present embodiment.
[0064] Fig.30 It is a diagram schematically showing another example of the UPG schedule according to the present embodiment.
[0065] Fig.31 This is a flowchart showing an outline of processing by the field device 90 in the dynamic change mode (first case) according to the present embodiment.
[0066] Fig.32 This is a flowchart showing an outline of processing by the field device 90 in the dynamic change mode (first case) according to the present embodiment.
[0067] Fig.33 This is a flowchart showing an outline of processing by the field device 90 according to the present embodiment (second case).
[0068] Fig.34It is a diagram showing an example of flow information according to the present embodiment (second case).
[0069] Fig.35 It is a flowchart showing the device processing according to (the third case) of this embodiment.
[0070] Fig.36 This is a diagram showing an example of flow information according to the present embodiment (the third case).
[0071] Fig.37 This is a diagram schematically showing the concept of variable management in this embodiment. DETAILED DESCRIPTION
[0072] Hereinafter, the embodiments of the present invention will be described with reference to the accompanying drawings. In the following description, the same components and structural elements are marked with the same reference numerals. Their names and functions are also the same. Therefore, their detailed description will not be repeated.
[0073] <A. Application examples>
[0074] First, refer to Figure 1 and Figure 2 , an example of a scenario in which the present invention is applied is described. Figure 1 and Figure 2 Schematically shows the overall structure of the system 1 according to the present embodiment. Figure 1 The system 1 applied to FA includes device groups 3A, 3B, 3C, and 3D. The device groups 3A, 3B, 3C, and 3D include PLCs 100A, 100B, 100C, and 100D connected to a network 11, and one or more field devices 90 connected to each PLC. Figure 1 The field device 90 of the device group 3A includes Figure 2 The robot controller 90A of the robot 900A, the field device 90 of the equipment group 3B includes Figure 2 The field device 90 is an example of a “control object”.
[0075] PLC 100A, 100B, 100C, and 100D are, for example, an embodiment of a "control device" and have the same functions, so they are collectively referred to as PLC 100 without distinguishing them. System 1 can also be connected to support device 500 on network 11. In addition, a management server of system 1 that communicates with PLC 100 via network 11 can also be connected to system 1.
[0076] Each PLC 100 is connected to one or more field devices 90 on the field side via a network 11. Each field device 90 includes an actuator that provides a certain physical effect to a manufacturing device or a production line (hereinafter, also collectively referred to as a "field"), an input / output device that exchanges information with the field, and a robot controller 90A, 90B that controls the robots 900A and 900B. In addition, the types of field devices are not limited to these. Here, two robots 900A and 900B are shown, but the number of robots is not limited to two.
[0077] In system 1, timer 101A of PLC 100A, timer 101B of PLC 100B, timer 101C of PLC 100C, and timer 101D of PLC 100D are synchronized with each other at all times. In addition, PLC 100 and one or more field devices 90 connected to the PLC 100 are synchronized with each other at all times. Thus, in system 1, all devices are synchronized with each other at all times.
[0078] In system 1, a unified communication protocol is also applied to the network 11 between PLCs 100 and the network 11 on the field side. In the present embodiment, as the unified communication protocol, for example, TSN (Time-Sensitive Networking) is adopted. Therefore, when exchanging data between all devices (PLC 100 and field device 90) of system 1, the conversion of the communication protocol can be omitted, and communication can be performed at a high speed accordingly, compared with the case where the communication protocols between the PLCs 100 and the communication protocols between the PLCs 100 and the field device 90 are different. The communication time of TSN is sufficiently short compared to the control cycle of system 1. Therefore, data can be shared among all devices in each control cycle.
[0079] The PLC 100 implements IO refresh 72 for exchanging data with the field in each control cycle, and executes the UPG (User Program) 69 described later based on the field values collected from the field. The UPG 69 is an embodiment of a "control program" having a command to calculate and update control instructions, which are values related to the control of the control object. The field values collected from the field may include a status value indicating the state of the control object. The PLC 100 performs control operation processing based on the field value by executing the command of the UPG 69, and sends the calculated value of the control operation processing to the field device 90. The calculated value is equivalent to an embodiment of a "control instruction" for controlling the field device 90. "Control instructions" are not limited as long as they are values related to control, but include values shared between UPGs 69 (for example, values (status values) indicating the behavior of the control object, etc.) or values given to the control object (for example, instruction values, control quantities, etc.).
[0080] In this way, the PLC 100 collects field values from the field device 90 in each control cycle, and executes the IO refresh 72 that outputs the control instructions calculated by the execution of the UPG 69 to the field device 90. In the system 1, for example, the control operation processing of the UPG 69 in the PLC 100 and the IO refresh 72 can be executed within the control cycle, and the control cycle is based on the above-mentioned time synchronization and the time shared between the PLC 100 and the field device 90.
[0081] The support device 500 provides auxiliary tools to assist the user in operating the system 1. The auxiliary tools include setting tools prepared for the execution environment of the UPG 69 or the communication environment with the PLC 100. The auxiliary tools are provided to the user through a UI (User Interface), for example. The support device 500 can be connected to the network 11, but can also be built into the PLC 100.
[0082] exist Figure 2 For example, a robot 900A connected to a PLC 100A and a robot 900B connected to a PLC 100B are used in a collaborative manner to process a workpiece 912. Specifically, in the processing step, when the robot 900A grabs the workpiece 912 on the tray 911 with its arm (pick up: Pick) and holds the workpiece 912 (support: Support), the held workpiece 912 is processed (Manufacture) by a processing kit at the end of the arm of the robot 900B, and then the robot 900A places the workpiece 912 at a specified position (placement: Place).
[0083] In such a series of processes of picking → supporting → processing → placing, the UPG 69 corresponding to each process is switched and executed, and the control instructions output from each UPG 69 are given to the robot controllers 90A, 90B of the robots 900A, 900B which are the corresponding control objects. The robot controllers 90A, 90B act according to the control instructions, thereby implementing the process.
[0084] In the system 1, the UPG 69 executed by the PLC 100 includes UPG (1) outputting a control instruction of "pick up", UPG (2) outputting a control instruction of "support", UPG (3) outputting a control instruction of "processing", and UPG (4) outputting a control instruction of "place". Figure 2In the present invention, the robot controller 90A that receives the control instructions of "pick up", "support" and "place" is connected to the PLC 100A. Therefore, taking into account the communication delay of the control instructions (the time required for communication), in order to minimize the communication delay, it is preferred that UPG (1), UPG (2) and UPG (4) are fixedly configured on the PLC 100A and executed by the PLC 100A, and UPG (3) is fixedly configured on the PLC 100B and executed by the PLC 100B.
[0085] In contrast, in the system 1 of the present embodiment, as described above, by applying a unified protocol to the network 11, data can be shared between devices within a control cycle (more specifically, during an IO refresh 72), so that the configuration of the UPG 69 for outputting control instructions for the robot 900A or 900B can be freely configured in any PLC 100 without being aware of communication delays.
[0086] The setting tool 600 provided by the support device 500 includes a configuration tool 63 and a schedule generation tool 64 for freely determining the configuration of the UPG 69 between the PLCs 100. The configuration tool 63 can determine to configure (download) a plurality of control programs (UPG 69) for giving control instructions to the same control object (robot 900A) to one or more of the plurality of control devices (PLC 100).
[0087] For example, the configuration tool 63 first measures the communication delay time when UPG (1) is executed in each PLC 100, and determines the PLC 100 with the smallest communication delay time as the loading destination of the UPG (1). Similarly, for each of the remaining UPGs (2), (3), and (4), the PLC 100 as the loading destination is determined based on its communication delay time. According to this determination, Figure 1 In the embodiment, UPG (1) and UPG (2) are configured in PLC 100A, UPG (3) is configured in PLC 100B, and UPG (4) is configured in PLC 100D. In this way, multiple UPG (1), UPG (2), and UPG (4) for giving control instructions to the same control object are not fixed to PLC 100A, but can be configured in PLCs 100A and 100D according to their communication delay times. In addition, the basis for configuration is not limited to the communication delay time.
[0088] The schedule generation tool 64 is an embodiment of a "coordination unit" that coordinates the working time (execution time) between a plurality of UPGs 69 having a command to calculate and update the same control instruction so that the updates of the control instructions between the UPGs 69 do not conflict with each other. The schedule generation tool 64 generates a UPG schedule 65 that coordinates the working time of executing UPGs (1) to (4) so that when executing UPGs (1) to (4) each having a command to calculate and update the same control instruction, the updates of the control instructions by each UPG do not conflict with each other. The generated UPG schedule 65 is provided to each PLC 100.
[0089] The PLC 100 executes the UPG configured in itself according to the generated UPG schedule 65. Therefore, even when UPGs (1) to (4) are freely configured, control instructions can be given to the controlled objects (robot controllers 90A, 90B) while avoiding the above-mentioned conflicts. In this embodiment, "updates of the same control instruction conflict with each other between multiple UPGs 69" means that by executing multiple UPGs 69, the same control instruction is updated (written) (or to be updated) by multiple UPGs 69 at the same time.
[0090] In this way, in the system 1 of the present embodiment, the above-mentioned conflict is avoided, so even if the user freely configures the UPG 69 in any PLC 100, the control instructions updated by executing each UPG 69 can be provided to the controlled object while avoiding interference of the control instructions. In the present embodiment, "interference" of the control instructions refers to the situation where multiple control instructions of the same type are given to the same controlled object at the same time. Therefore, the user can configure the UPG 69 without being aware of the above-mentioned conflict between the UPGs 69 and the interference between the control instructions, and a higher degree of freedom can be obtained in the configuration of the UPG 69.
[0091] (a1. Concept of variable manager)
[0092] In the system 1 of the present embodiment, the UPG 69 can be arranged in any PLC 100, and therefore the variable manager is not the PLC 100 but the UPG 69 itself. The concept of the variable manager will be described.
[0093] The UPG 69 of this embodiment is a so-called variable program. That is, the UPG 69 is configured so that the input data (field values), output data (control instructions), internal calculation data, etc. referred to by the program when it is executed can be used by using input variables, output variables, and temporary variables, etc. In this embodiment, the variable manager who manages these input variables and output variables is changed from the PLC 100 to the UPG 69. In this embodiment, the "variable manager" means a subject having the authority to rewrite the value of the variable.
[0094] The switching of the variable manager is described. For example, the input variable for setting the current position (field value) of the arm of the robot 900A and the output variable for setting the command value (control command) for changing the position of the arm of the robot 900A are referenced by the UPG 69 that uses (declares) the variable. In the present embodiment, the UPG (1), UPG (2) and UPG (4) for implementing the above-mentioned "pick up", "support" and "place" all use the input variable for setting the current position (field value) of the arm of the robot 900A and the output variable for setting the command value (control command) for changing the position of the arm of the robot 900A to read and write these variables so as to control the arm of the robot 900A. Therefore, when UPG (1), UPG (2) and UPG (4) are executed in sequence according to the UPG schedule 65 in order to implement "pick up", "support" and "place", the "variable manager" for setting the output variable of the command value (control command) is switched to UPG (1), UPG (2) and UPG (4) in sequence according to the UPG schedule 65. Thus, as the variable manager is changed from PLC 100 to UPG 69, in this embodiment, the control command includes the identifier of the variable manager (UPG 69). Therefore, the controlled object can determine whether the control command is addressed to itself based on the identifier of the variable manager of the control command.
[0095] <B. Hardware structure of PLC 100>
[0096] Figure 3 Schematic diagram showing the main structure of the PLC 100 according to the present embodiment. Figure 3 The PLC 100 includes a processing unit 110 , a communication circuit 130 , a DMA (Direct Memory Access) controller 140 , a high-precision timer 160 , a communication controller 107 , communication ports 136 and 137 connected to a network 11 , and a memory card interface 108 .
[0097] The operation processing unit 110 includes a processor 112, a storage unit 114, and a memory 119. For ease of explanation, the PLC 100 has only one processor 112, but multiple processors may be installed. In addition, each processor may have multiple cores. In the operation processing unit 110, the processor 112 periodically executes one or more tasks. When the operation processing unit 110 executes multiple tasks, different priorities may be set for the multiple tasks.
[0098] The processor 112 transfers the communication frame 20 (for example, input data 134 and output data 135) stored in the buffer 132 (for example, the input data 134 and the output data 135) of the communication circuit 130 to the storage unit 114. The storage unit 114 is configured to have a DRAM (Dynamic Random Access Memory) or an SRAM (Static Random Access Memory), etc., and provides a work area required for the execution of the program in the processor 112.
[0099] The storage 119 is composed of a flash memory or a hard disk, etc., and stores a peripheral processing program 120, a time synchronization program 121 for implementing the above-mentioned time synchronization, an IO refresh program 125, a system program 122, a scheduler 123, a UPG library 170 including one or more UPGs 69, a communication program 127, and a configuration 126. The storage 119 is an embodiment of a "program storage unit".
[0100] The system program 122 includes an OS (Operating System) and a library of functions for executing the UPG 69 in the processor 112. When the IO refresh program 125 is executed, the IO refresh 72 is implemented. In the IO refresh 72, the field value (input data) included in the communication frame 20 received via the communication circuit 130 is sent to the operation processing unit 110. In addition, the IO refresh program 125 sends the control command (output data) calculated by the PLC 100 to the field device 90. In this way, the IO refresh program 125 implements the IO refresh 72 of transmitting at least one of the input data and the output data.
[0101] UPG 69 is a program for "control operation processing" arbitrarily created according to the machinery or equipment as the control object. Specifically, UPG 69 includes: a control operation program, which has a command for calculating and updating control instructions based on the input data 134 of the storage unit 114 for "sequence control" of the control object; and a motion program, which has a command for calculating and updating control instructions based on the input data 134 for "motion control" of robots 900A, 900B, etc. Motion control calculates instruction values including numerical values such as position, speed, acceleration, and angle for actuators such as servo motors as the control object. Through motion control, the servo motors associated with the arms of robots 900A and 900B are controlled, and the arms move according to the control instructions. The calculated values of the control instructions and the like of the control operation processing of these UPG 69 are stored in the storage unit 114 as output data 135.
[0102] The communication program 127 controls the communication circuit 130 to generate the communication frame 20 using the output data 135 of the storage unit 114 and to transmit and receive the communication frame 20. The communication program 127 includes a manager switching program 128 for transmitting a manager switching notification 31 described later and a stream processing program 129 for performing stream processing.
[0103] The peripheral processing program 120 is a process that is different from the control operation process and the like executed by the UPG 69 and is executed outside the control operation process, and includes, for example, a recording process of the communication frame 20 exchanged via the network 11 and the like.
[0104] The scheduler 123 is a program that manages resource allocation, execution timing, etc. for processes or tasks of the PLC 100 according to priority. Such processes or tasks include processes or tasks that can be generated by the processor 112 executing the peripheral processing program 120, UPG 69, IO refresh program 125, time synchronization program 121, communication program 127, etc. The scheduler 123 adjusts the execution timing of each program according to the time synchronization timer 160, for example, based on a cycle of a predetermined control cycle. As a result, the PLC 100 can cyclically implement control operation processing and IO refresh 72 based on a cycle of time synchronization with other PLCs 100 and with the field device 90.
[0105] The configuration 126 includes various setting values for defining various setting values or network configurations required for program execution in the PLC 100. The configuration 126 includes, for example, the UPG schedule 65 generated by the support device 500.
[0106] The communication controller 107 receives the UPG 69 or the UPG schedule 65 via the network 11 or other communication paths. The memory card interface 108 is configured to be able to load and unload the memory card 116, write data to the memory card 116, and read various data (user programs or data, etc.) from the memory card 116. The UPG 69 or the UPG schedule 65 can be loaded from the memory card 116 into the storage 119.
[0107] The communication circuit 130 is connected to the communication ports 136 and 137 of the physical connection network 11. Although not limited, for example, the communication port 136 is connected to the network 11 connected to the other PLC 100 side, and the communication port 137 is connected to the network 11 connected to the field device 90 side. The communication circuit 130 exchanges communication frames 20 with other devices via the communication ports 136 and 137. The communication circuit 130 has a buffer 132 for temporarily storing the communication frames 20 sent and received via the network 11. The communication frame 20 temporarily stored in the buffer 132 includes, for example, input data 134 and output data 135.
[0108] The communication circuit 130 performs transmission and reception of the communication frame 20 as follows, for example. The communication circuit 130 copies the communication frame 20 based on the output data 135 from the storage unit 114 via the DMA controller 140 according to the instruction of the processor 112, stores the copy in the buffer 132 as the output data 135, and transmits the communication frame 20 to the network 11.
[0109] In accordance with the instruction of the processor 112, the communication circuit 130 copies the communication frame 20 received from the network 11, stores the copy in the buffer 132 as input data 134, and outputs the communication frame 20 to the operation processing unit 110. The communication frame 20 is stored in the storage unit 114 as input data.
[0110] The storage unit 114 may store the data of the communication frame 20 transmitted and received for a period longer than the control cycle, or may store only the data of the communication frame 20 of the most recent control cycle.
[0111] In this embodiment, the "IO refresh 72" of the PLC 100 includes at least one of sending output data 135 (communication frame 20) to other devices and receiving input data 134 from other devices. In the "IO refresh 72", the input data 134 corresponds to the communication frame 20 of the field value collected and transmitted by the field device 90, and the output data 135 corresponds to the communication frame 20 of the control instruction calculated by the control operation processing of the UPG 69 of the PLC 100.
[0112] The DMA controller 140 is connected to the arithmetic processing unit 110 and the communication circuit 130, and has a function of accelerating data access between the arithmetic processing unit 110 and the communication circuit 130. This can shorten the IO refresh processing time and reduce the jitter of the transmission timing.
[0113] exist Figure 3 In the illustrated structure, for the sake of convenience, a structure divided into the operation processing unit 110, the communication circuit 130, and the DMA controller 140 is depicted, but it is not limited to this, and any installation method can be adopted. For example, all or part of the operation processing unit 110 and all or part of the communication circuit 130 can also be composed of a SoC (System on Chip) installed on the same chip. Alternatively, an SoC in which the processor 112 of the operation processing unit 110 and the main functions of the DMA controller 140 are installed on the same chip can also be used. These installation methods can be appropriately selected.
[0114] <C. Hardware Configuration of Field Device 90>
[0115] Figure 4 1 is a diagram schematically showing a main part configuration of a field device 90 according to an embodiment of the present invention. Figure 4 The structure can also be applied to robot controllers 90A and 90B. Figure 4 The field device 90 includes a processor 91, a memory 92, a communication I / F (Interface) 93 connected to a servo motor, etc., a communication circuit 94 connected to the network 11, a timer 99 having the same structure as the timer 160 of the PLC 100, and a memory card interface 95 to which a memory card 96 can be detachably mounted. Such a device may not have a function or circuit for processing the memory card 96. Therefore, the field device 90 may also include a device that does not have a function or circuit associated with the memory card 96.
[0116] The communication I / F 93 receives field values from the controlled object according to the instructions from the processor 91, and transmits control instructions from the processor 91 to the controlled object. Thus, the controlled object is controlled according to the instruction value and the control amount, and the field value as the result is output.
[0117] The communication circuit 94 has communication ports 971 and 972 that are physically connected to the network 11. The communication circuit 94 exchanges communication frames 20 with other devices via the communication ports 971 and 972. Although not limited, the communication port 971 is connected to the network 11 connected to the PLC 100 side, and the communication port 972 is connected to the network 11 connected to the field device 90 side.
[0118] Furthermore, the communication circuit 94 has a buffer 941 that temporarily stores the communication frame 20 transmitted and received via the network 11. In the buffer 941, the communication frame 20 is temporarily stored as input data 944 or output data 943, for example.
[0119] The memory 92 is composed of a flash memory, a hard disk, a DRAM, or an SRAM, etc., and provides a work area required for the execution of the program in the processor 91. The memory 92 stores the system program 81, the application program 82 including a program for operating the control object (servo motor, robot) connected to the field device 90, etc., the communication program 83, the scheduler 84 for periodically executing the program, the variable management module 85 including the flow information 87 or the dynamic flow information 870 described later, the output data 943 and the input data 944, etc. The output data 943 and the input data 944 correspond to the communication frame 20. In the memory 92, programs or data can be saved from the support device 500 via the PLC 100 or from the memory card 96 via the memory card interface 95.
[0120] The communication program 83 is a program for controlling the communication I / F 93 and the communication circuit 94. The communication program 83 includes a time synchronization program 831 for performing time synchronization.
[0121] The communication circuit 94 copies the communication frame 20 of the output data 943 of the memory 92 according to the instruction of the processor 91, stores the copy in the buffer 941 as the output data 943, and transmits the communication frame 20 to the network 11. In addition, the communication circuit 94 receives the communication frame 20 arriving from the network 11 according to the instruction of the processor 91, copies the communication frame 20, and stores the copy in the buffer 941 as the input data 944. In addition, the processor 91 stores the input data 944 of the communication frame 20 in the memory 92.
[0122] <D. Hardware Configuration of Support Device 500>
[0123] Figure 5 1 is a diagram schematically showing the structure of the support device 500 of this embodiment. Figure 5The support device 500 is a computer system having a CPU (Central Processing Unit) 502 and a storage unit for storing programs and data, and operating according to the program. The storage unit includes a ROM (Read Only Memory) 503, a RAM (Random Access Memory) 504, and a HDD (Hard Disk Drive) 505. The support device 500 also includes a communication controller 507 and an I / O (Input / Output) interface 508. The support device 500 also includes a keyboard 509 and a display 510. The keyboard 509 accepts input including instructions from the user to the support device 500. The support device 500 may also include other devices such as a mouse to accept the input. The display 510 includes an LCD (Liquid Crystal Display) or an organic EL (Electro Luminescence) display, and displays an image or picture according to a video signal or image signal output from the support device 500. The support apparatus 500 has an external storage medium 501 detachably mounted thereon, and includes a R / W (reader / writer) device 506 for reading and writing programs and / or data to and from the mounted storage medium 501 .
[0124] The communication controller 507 controls the communication between the support device 500 and external devices via the network 11. The communication controller 507 is configured to include, for example, a NIC (Network Interface Card). The I / O interface 508 controls data exchange between the CPU 502 and the keyboard 509 and the display 510.
[0125] The HDD 505 includes a system program 71 including an OS, a UPG generation program 68 for generating a UPG 69, one or more generated UPGs 69, a UPG schedule 65, flow information 87, a configuration program 62 for determining the configuration of the UPG 69, a schedule generation program 66 for generating a UPG schedule 65, and a flow information generation program 67 for generating flow information 87. The schedule generation program 66 includes a conflict detection program 611 for determining whether there is a conflict of variable managers in the UPG schedule 65. The conflict of variable managers will be described later. When the schedule generation program 66 is started, the schedule generation tool 64 is provided.
[0126] The UPG generation program 68 includes an editor for editing (generating) the UPG 69 according to user operations received from the keyboard 509, a compiler for compiling the edited UPG 69, a builder for converting the UPG 69 into an executable format, etc. The builder may also include a compile function.
[0127] <E. Structure of Communication Frame 20>
[0128] Figure 6 and Figure 7 It is a diagram schematically showing an example of the structure of the communication frame 20 according to the present embodiment. Figure 6 An example of a basic communication frame 20 is shown. Figure 7 An example of the communication frame 20 for transmitting the notification 31 of switching of the “variable manager” of variable management is shown.
[0129] (e1. Basic communication frame)
[0130] Reference Figure 6 The basic communication frame 20 includes: an area 21 for storing the preamble code, an area 22 for storing the destination of the frame, an area 23 for storing the source of the frame, an area 24 for the label, an area 25 for storing the network type, and an area 27 for error correction, and also includes an area for storing the payload 26 which is the main body of the data to be transmitted. The destination 22 of the communication frame 20 and the source of area 23 contain information that uniquely identifies each device, such as MAC (Media Access Control address). Figure 6 In the case of the basic communication frame 20, the payload 26 includes, for example, input data 134, 944 corresponding to a field value or output data 135, 943 corresponding to a control command.
[0131] The area of the destination 22 also contains a flow ID (identifier) 29 for managing the transmission of the communication frame 20 . Figure 8 29 is a diagram for explaining the flow ID 29 of the present embodiment. In the present embodiment, the communication frame 20 transmitted on the network 11 is managed in units of flows 12. Figure 8 As shown, a device connected to the network 11 can be a transmission source (TALKER) or a transmission destination (LISTENER) of the communication frame 20. A flow ID specified by a combination of a TALKER identifier and a LISTENER identifier is allocated to each flow 12.
[0132] In the present embodiment, when the payload 26 is a control command, the TALKER is assigned the identifier of the UPG 69 that is the source of the payload 26 (control command), and the LISTENER is assigned the MAC address of the destination device (field device 90). In the present embodiment, when the payload 26 is a field value, the TALKER is assigned the MAC address of the source device, and the LISTENER is assigned the MAC address of the destination device. Therefore, each device can uniquely identify each communication frame 20 to be exchanged based on the stream ID 29.
[0133] (e2. Payload of communication frame 20)
[0134] For example, in Figure 6 In the communication frame 20, control system data can be stored as a payload 26. The area of the payload 26 includes an area for storing field values in the control system data and an area for storing control commands in the control system data.
[0135] When reading or writing the area of the payload 26, each field device 90 determines the position in the area of the payload 26 based on the offset (for example, the offset from the beginning of the communication frame 20) assigned individually to the device, and reads or writes the data at the determined position. Specifically, the communication program 83 reads the command value and the control amount (input data 944 or output data 135) from the position of the offset of the device itself in the area of the payload 26 of the incoming communication frame 20, and writes the field value (output data 943 or input data 134) to the position of the offset in the area of the payload 26 of the communication frame 20 to be sent.
[0136] On the other hand, the PLC 100 stores offset information assigned to each field device 90. Therefore, the PLC 100 can read the field value (output data 943 or input data 134) of each field device 90 from the area of the payload 26 of the incoming communication frame 20 based on the offset information, and write the control instruction (input data 944 or output data 135) at the offset position of each field device 90 in the area of the payload 26 of the communication frame 20 to be sent based on the offset information.
[0137] Thus, the PLC 100 can read and write the control system data of each field device 90 in the payload 26 area of the communication frame 20 , and each field device 90 can read and write the control system data of its own device in the payload 26 area of the communication frame 20 .
[0138] (e3. Communication frame of notification 31 of switching of "variable manager")
[0139] Reference Figure 7In the communication frame 20, for example, the MAC address of the device of the transmission source (TALKER) of the notification 31 is stored in the area 23, the multicast address 30 is stored as the transmission destination (LISTENER) of the notification 31 in the area of the destination 22, and the payload 26 of the notification 31 including the switching indicating the "variable manager" is stored. In this embodiment, the multicast address is stored in the area of the destination 22, so that the device (PLC 100 or field device 90) connected to the network 11 can receive the stored multicast address. Figure 7 The communication frame 20 of the notification 31 is detected, and the switching of the "variable manager" is detected based on the notification 31.
[0140] <F. Support tools>
[0141] The following describes the support tool provided by the support device 500. First, the generation of the UPG 69 and the processing of generating the UPG schedule 65 and the flow information 87 executed in each step will be described.
[0142] (f1. Generation process)
[0143] Fig. 9 6 is a flowchart schematically showing the coordination process of the setting tool 600 of the present embodiment. The setting tool 600 implements the following steps: a step of configuring multiple control programs (UPG 69) for giving control instructions to the same control object (field device 90) to one or more of the multiple PLCs 100; and a step of coordinating the working time between the multiple control programs so that the control instructions from each control program do not interfere with each other (S1 to S7). The configuration steps are as follows: Fig.14 To be described later.
[0144] When the UPG generation program 68 of the support device 500 is started, the UPG generation program 68 receives a process definition according to a user operation via the keyboard 509 (step S1). As process definitions, for example, "pick", "support", "place", and "manufacture" are received. Fig.10 and Fig.11 FIG. 6 is a diagram illustrating an example of the UPG schedule 65 of the present embodiment. For example, in step S1, Fig.10 As shown, among the processes Pick, Support, Manufacture, and Place, the processes Pick, Support, and Place are assigned to the control target (robot 900A), and the process Manufacture is assigned to the control target (robot 900B).
[0145] The schedule generating program 66 is started and receives a schedule for executing the process defined in step S1 according to the user operation via the keyboard 509 (step S3). The schedule indicates, for example, the execution order of the UPG 69 (execution time and execution timing of each UPG 69).
[0146] The UPG generation program 68 generates the UPG 69 corresponding to each process defined in step S1 according to the user operation via the keyboard 509 (step S5). Thus, UPG (1) to (4) are generated as UPG 69 and stored in the HDD 505.
[0147] The conflict detection program 611 of the schedule generation program 66 determines whether there is a conflict in variable managers between the UPG 69 and other UPG 69 during the execution time of each UPG 69 based on the schedule received from the user in step S3 (step S7). That is, it determines whether coordination is required.
[0148] When the conflict detection program 611 determines that there is a conflict between variable managers (YES in step S7), it displays a message prompting the user to set a schedule to resolve the conflict via the display 510, and returns to step S3. In step S3, the schedule creation program 66 can accept a schedule to resolve the conflict from the user.
[0149] When the conflict detection program 611 determines that there is no conflict in the variable managers ("No" in step S7), the schedule generation program 66 generates a UPG schedule 65 without conflict according to the user operation accepted in step S3, and the flow information generation program 67 generates Fig.11 The support device 500 stores the generated UPG schedule 65 and the flow information 87 in the HDD 505 , or transmits (downloads) them to the PLC 100 or the field device 90 .
[0150] (f2. Detection of conflict among variable managers and coordination of working hours)
[0151] In the present embodiment, when there are two or more variable managers (UPG 69) corresponding to one output variable for setting a control instruction (instruction value) given to the same control object, the duplication of the working time of the two or more UPG 69 (for example, execution at the same time) is called "variable manager conflict". In the case of "variable manager conflict", a situation occurs where multiple UPG 69 with commands to calculate and update the same control instruction conflict with each other in implementing the update of the same control instruction. Therefore, in the present embodiment, by avoiding "variable manager conflict", it is possible to avoid the situation where multiple UPG 69 conflict with each other in implementing the update of the same control instruction. For example, in Fig.11 In the UPG schedule 65, the time for executing UPG (4) indicated by the dotted arrow overlaps with the time for executing UPG (2), resulting in a "variable manager conflict" between UPG (2) and UPG (4).
[0152] The conflict detection program 611 detects whether there is a "conflict of variable managers" from the UPG schedule 65. Specifically, the conflict detection program 611 extracts the output variable names used (declared) in the UPG 69 from each UPG 69 generated by step S5. Then, it is determined whether there are two or more UPGs 69 that use (declare) the common variable names among the extracted output variable names in the UPG 69 generated by step S5. The conflict detection program 611 determines whether the time (process) for executing these two or more UPGs 69 in the UPG schedule 65 is the same (whether it is repeated). When it is determined that the time for executing these two or more UPGs 69 is the same (repeated), the conflict detection program 611 detects a "conflict of variable managers".
[0153] When the UPG 69 is executed according to the UPG schedule 65 with conflicting variable managers, multiple control instructions corresponding to the same output variable are simultaneously given to the same control object, so that the control instructions interfere with each other. If this "interference" occurs, the control object given the interfering control instruction may not be able to determine which control instruction to act according to, and may erroneously act.
[0154] Therefore, in this embodiment, in order to prevent "interference" of control instructions, when the schedule generation program 66 generates the UPG schedule 65, when the conflict detection program 611 detects "conflict of variable managers", based on user operations, the schedule generation program 66 generates (modifies) the UPG schedule 65 in a manner that eliminates the "conflict of variable managers". Fig.11 The time of executing UPG (4) is changed from the time of arrow 111A to the time of arrow 111B. In this way, the schedule generation tool 64 (schedule generation program 66) can statically determine the operation time of multiple UPG schedules 65 so that the control instructions from each UPG schedule 65 do not interfere with each other.
[0155] Therefore, even if UPG 69 is freely configured in any PLC 100 through the configuration tool 63 (configuration program 62), since the schedule generation tool 64 generates a UPG schedule 65 without "variable manager conflicts", the PLC 100 can execute UPG 69 according to the UPG schedule 65 while coordinating the working times between multiple UPGs 69, so that the control instructions from each UPG 69 do not interfere with each other.
[0156] <G. Example of UPG schedule 65 and flow information 87>
[0157] Fig.12 It is a diagram schematically showing an example of the UPG timetable 65 according to the present embodiment. Fig.12 The UPG schedule 65 includes information of UPG(1), UPG(2), and UPG(4), and UPG(1), UPG(2), and UPG(4) use the same output variables (a, b) for which control instructions are set. Fig.12 The UPG schedule 65 includes, in correspondence with each UPG 69, an execution time 651 corresponding to the order in which the UPG 69 operates, an identifier 652 of the UPG 69, an output variable 653 used in the UPG 69, and a flow ID 654 for identifying a communication frame 20 for transmitting a control instruction for setting the output variable 653. The flow ID 654 is defined in correspondence with each output variable of each corresponding UPG. In addition, the UPG schedule 65 includes a flag 655 in association with each UPG 69. The flag 655 is set to 0 when the corresponding UPG 69 is not operating (not executing), and is set to 1 when it is operating (executing).
[0158] like Fig.12 As shown, when the UPG schedule 65 is distributed in a plurality of PLCs 100, the schedule generating program 66 coordinates the operation time of the timer 651 according to the progress of the process so that the plurality of UPG schedules 65 are operated in sequence.
[0159] exist Fig.12 , the UPG schedule 65 of UPG (1), UPG (2), and UPG (4) of the robot 900A is shown, but the UPG schedule 65 of UPG (3) of the robot 900B also has the same structure. Fig.12 By using the UPG schedule 65, each PLC 100 can coordinate the working time between multiple UPGs 69 so that the control instructions from each UPG 69 do not interfere with each other.
[0160] When the UPG schedule 65 is generated, the flow information generation program 67 generates flow information 87 corresponding to identification information used by the field device 90 to be controlled to identify the control command issued to itself.
[0161] Fig.13 Schematically shows an example of the flow information 87 of this embodiment. Fig.13, the flow information 87 is information extracted from the UPG schedule 65, and is generated corresponding to each output variable 653 of the UPG schedule 65. The flow information 87 corresponding to each variable includes a group consisting of a time 871 and a flow ID 872 in each UPG 69 that calculates the control instruction of the variable. Each group includes the time 871 when the UPG 69 works (executed) and the flow ID 872 of the communication frame 20 of the variable. The time 871 corresponds to the time 651 of the UPG schedule 65, and the flow ID 872 corresponds to the flow ID 654 of the UPG schedule 65. The flow information 87 is transmitted (downloaded, etc.) to the control object (robot controllers 90A, 90B of robots 900A, 900B).
[0162] The flow information 87 includes information for determining when the field device 90 should receive which variable from which UPG 69, time 871, and flow ID 872. When a plurality of control instructions are given to the field device 90, the time 871 represents a concept including the order in which the plurality of control instructions are given to the field device 90. The order is based on the operation times (time T1 to T2, time T2 to T3, time T3 to T4) coordinated between the plurality of UPG schedules 65 that output the plurality of control instructions.
[0163] Stream ID 872 includes an identifier of UPG 69 and an identifier of a control instruction. The identifier of the control instruction includes the type of the control instruction, and the type of the control instruction includes the value of a variable accessed by the UPG 69 when the UPG 69 operates (more specifically, the variable to which the control instruction is written).
[0164] The field device 90 compares the flow ID 29 of the communication frame 20 received at the time 871 indicated by the flow information 87 with the flow ID 872 corresponding to the time 871. If they do not match, the field device 90 can discard the communication frame 20 (i.e., the control instruction). Thus, the field device 90 can extract the communication frame 20 having the control instruction calculated by the specified UPG 69 from the communication frames 20 sent on the network 11 at the time specified by the UPG schedule 65. Therefore, in the present embodiment, the UPG 69 can be freely configured in any PLC 100, but even in this case, the field device 90 can reliably avoid malfunctions caused by "interference" of the control instruction.
[0165] <H.UPG 69 Configuration>
[0166] Fig.14 This is a flowchart showing an example of the configuration process of the UPG 69 according to the present embodiment. Fig.15 It is a diagram showing an example of information 150 related to the UPG 69 of the present embodiment. Fig.15The information 150 includes, in correspondence with each UPG 69 to be arranged, an identifier 151 thereof, an execution time 152 required for execution of the UPG 69, and a variable 153 of a control command outputted in the UPG 69. The information 150 is stored in the HDD 505 of the support device 500.
[0167] Fig.16 It means according to Fig.15 FIG. 90 is a diagram of the field device 90 that controls the action of the variable 153. Fig.16 , exemplified Fig.15 The variables 153 of the UPG 69 are variables corresponding to which field device 90 the control command is given to. Fig.14 Flow chart of Fig.10 As shown, a plurality of control programs (UPG (1), UPG (2) and UPG (4)) for giving control instructions to the same control object (robot controller 90A) can be arbitrarily configured in one or more of a plurality of control devices (PLC100).
[0168] Reference Fig.15 and Fig.16 , instructions follow Fig.14 When the configuration program 62 is started, the configuration tool 63 operates. The configuration tool 63 selects the UPG 69 (herein referred to as UPG-max) corresponding to the identifier 151 with the largest execution time from the UPG 69 in the HDD 505 (step T3).
[0169] Configuration tool 63 is for example Fig.15 In the case of execution time 152, according to (t1<t2<t3), UPG(3) is selected as UPG-max.
[0170] The configuration tool 63 downloads the selected UPG-max to each PLC 100, and each PLC 100 executes the downloaded UPG-max, calculates (measures) the communication delay time, and sends the calculated communication delay time to the support device 500 (step T5). After calculating the communication delay time, the PLC 100 deletes the downloaded UPG-max.
[0171] For example, as calculation of the communication delay time, the maximum value of the communication delay time of each variable when downloading UPG-max to each PLC 100 is calculated. Here, the communication delay time between adjacent devices via the network 11 is assumed to be one step.
[0172] When UPG-max is downloaded to PLC 100A, the communication delay times of variables a3, b3, and c3 calculated by UPG (3) are respectively a3: 3 steps, b3: 5 steps, and c3: 6 steps, so 6 steps are extracted.
[0173] When UPG-max is downloaded to PLC 100B, the communication delay times of variables a3, b3, and c3 calculated by UPG (3) are a3: 4 steps, b3: 4 steps, and c3: 5 steps, respectively, so 5 steps are extracted.
[0174] When UPG-max is downloaded to PLC 100C, the communication delay times of variables a3, b3, and c3 calculated by UPG (3) are respectively a3: 5 steps, b3: 3 steps, and c3: 4 steps, so 5 steps are extracted.
[0175] When UPG-max is downloaded to PLC 100D, the communication delay times of variables a3, b3, and c3 calculated by UPG (3) are a3: 6 steps, b3: 4 steps, and c3: 3 steps, respectively, so 6 steps are extracted.
[0176] The configuration tool 63 determines the PLC 100 with the smallest maximum value from the communication delay times received from each PLC 100 (steps T7 and T9). According to the above example, the configuration tool 63 extracts PLC 100B and PLC 100C. When a plurality of PLCs 100 are extracted in this way, the configuration tool 63 determines, for example, the one with a larger free area of the memory as the download (configuration) destination of UPG-max. The configuration tool 63 determines, for example, PLC 100B as the download destination of UPG-max.
[0177] The configuration tool 63 downloads UPG-max to the determined PLC 100 (step T11). In this way, the PLC 100 that determines to download the UPG 69 or the UPG 69 that downloads the determined PLC 100 is referred to as UPG configuration.
[0178] The configuration tool 63 determines whether there are any remaining UPGs 69 for which UPG configuration has not been performed among the UPGs 69 indicated by the identifiers 151 of the information 150 (step T13). When the configuration tool 63 determines that there are remaining UPGs 69 ("Yes" in step T13), the configuration tool 63 returns to step T3 and performs the processing after step T3 on the remaining UPGs 69. When the configuration tool 63 determines that there are no remaining UPGs 69 ("No" in step T13), the processing ends.
[0179] according to Fig.14By processing, the UPG 69 of the HDD 505 can be downloaded to the best PLC 100. That is, the PLC 100 with the shortest communication delay time can be configured in order from the UPG 69 with the longest execution time. In addition, in the present embodiment, the PLC 100 as the download destination of the UPG 69 is determined based on the communication delay time, but the determination method is not limited to the method based on the communication delay time.
[0180] <I. Functional Configuration of Field Device 90 and PLC 100>
[0181] Fig.17 Schematically shows the functions of the field device 90 of this embodiment. The robot controllers 90A and 90B also have Fig.17 function.
[0182] Reference Fig.17 The field device 90 includes: an application processing unit 901 that executes the application program 82; a scheduling processing unit 902 corresponding to the scheduler 84; a variable management processing unit 903 that manages variables of data (including control instructions or field values) accessed (read or written) by the application program 82; and a basic communication processing unit 906 that executes the communication program 83 according to the communication protocol for the communication between the field device 90 and the external device. The variable management processing unit 903 corresponds to the variable management module 85.
[0183] The variable management processing unit 903 executes the stream processing program 89. The variable management processing unit 903 includes: a receiving variable / stream confirmation processing unit 904 that detects and receives the stream (communication frame 20) of the control command (variable) sent to itself based on the stream information 87; a stream generation processing unit 905 that generates the stream (communication frame 20) of the measured (detected) field value; and a stream information registration unit 910. The stream information registration unit 910 registers (saves) the stream information 87 in the memory 92. The communication basic processing unit 906 corresponding to the communication program 83 includes a transmission processing unit 907 and a reception processing unit 908 for transmitting and receiving the stream (communication frame 20), and a time synchronization processing unit 909 corresponding to the time synchronization program 831.
[0184] Fig.18 Schematically shows the functions of the PLC 100 according to the present embodiment. Fig.18 , PLC100 includes a UPG library 170 for storing the downloaded (configured) UPG 69 , a scheduling processing unit 171 corresponding to the scheduler 123 , a variable management processing unit 173 , and a communication basic processing unit 176 corresponding to the communication program 127 .
[0185] The scheduling processing unit 171 adjusts the execution timing to periodically execute various application programs including the UPG 69. The scheduling processing unit 171 includes a UPG scheduling processing unit 172, which adjusts the execution timing to periodically execute the UPG 69 of the UPG library 170 according to the UPG schedule 65. The UPG scheduling processing unit 172 includes a manager switching unit 180 corresponding to the manager switching program 128. The manager switching unit 180 performs a switching process of the variable manager.
[0186] The variable management processing unit 173 executes the stream processing program 129. The variable management processing unit 173 includes a receiving variable / stream confirmation processing unit 174 that detects and receives the stream (communication frame 20) sent to itself based on the stream information 87, and a stream generation processing unit 175 that generates the stream (communication frame 20) of the control command calculated by executing the UPG 69. The basic communication processing unit 176 includes a transmission processing unit 177 and a reception processing unit 178 for transmitting and receiving the stream (communication frame 20), and a time synchronization processing unit 179 corresponding to the time synchronization program 121.
[0187] <How J.UPG manages variables>
[0188] In the present embodiment, the modes of the variable manager by the UPG 69 of the system 1 include (static fixation), (static change), and (dynamic change) modes. The user can designate any one of the modes by operating the support device 500. Each mode will be described below.
[0189] (j1. Static fixed mode)
[0190] In the static fixed mode, the UPG schedule 65 is statically set so that a certain output variable is overwritten by one UPG 69 . Fig.19 It is a diagram schematically illustrating a static fixing mode according to an embodiment of the present invention. Fig. 20 It is a flowchart showing an example of the processing of the static fixed mode of an embodiment of the present invention. Here, UPG 691 calculates the output variable of the arm position of the robot 900A connected to the PLC 100A in the order of Pick, Support and Place in synchronization with the control cycle according to the UPG schedule 65, generates a communication frame 20 of the value of the calculated output variable (control instruction), and sends it to the robot controller 90A. In addition, UPG 692 calculates the control instruction corresponding to the variable of the arm position of Manufacture for the robot 900B connected to the PLC 100B in synchronization with the control cycle according to the UPG schedule 65, and sends it to the robot controller 90B of the robot 900B. Fig.19In the process, the UPG 69 that calculates the control instructions for each of the tasks C and D provides the calculated control instructions to the robot controllers of the robots connected to the PLCs 100C and 100D, respectively.
[0191] In the present embodiment, when the UPG generation program 68 is activated and the UPG 69 is generated by the UPG generation program 68 , the schedule generation program 66 performs processing in accordance with the designated static fixed mode.
[0192] Reference Fig. 20 , the UPG generation program 68 generates the UPG 69 (for example, UPG (1) to UPG (4)) according to the user operation, the schedule generation program 66 generates the UPG schedule 65, and the flow information generation program 67 generates the flow information 87 (step S10). At this time, the conflict detection program 611 is activated, and the activated conflict detection program 611 determines whether there is a conflict of variable managers based on the UPG schedule 65 (step S13).
[0193] Specifically, the conflict detection program 611 determines whether the variable managers of the same output variable of the control command (command value) indicating the position of the arm of the robot 900A conflict (whether a plurality of UPG 691 including UPG (1), UPG (2) and UPG (4) are executed in parallel) (step S13). Specifically, the conflict detection program 611 determines whether the variable managers conflict for all variables of the variable 153 of the UPG 691 of the information 150. If it is determined that the variable manager conflicts for any output variable ("No" in step S13), the process proceeds to step S10 to generate the UPG program 69, the UPG schedule 65 and the flow information 87 in a manner that avoids the conflict of the variable managers.
[0194] When the conflict detection program 611 determines that there is no conflict among variable managers for all output variables ("Yes" in step S13), it downloads UPG 69 and UPG schedule 65 to PLC 100, and configures (downloads) flow information 87 to field device 90 including robot controllers 90A and 90B (step S15).
[0195] (j2. Static change mode)
[0196] In the static change mode, a certain variable is rewritten by multiple UPGs 69. The method of creating a UPG program 69 in the static change mode and generating a UPG schedule 65 and flow information 87 according to user operations is the same as Fig. 9 The processing shown is the same, so the description will not be repeated.
[0197] (j3. Dynamic change mode)
[0198] In the static fixed mode and static variable mode described above, the flow information 87 obtained when the UPG schedule 65 is generated is pre-set (statically set) in each field device 90, and based on the set flow information 87, the field device 90 receives the communication frame 20 that matches the flow ID sent to itself.
[0199] In contrast, in the dynamic change mode, each field device 90 does not have the statically set flow information 87. Specifically, in the process of the PLC 100 operating according to the UPG schedule 65, the field device 90 obtains the dynamic flow information 870 based on the manager switching notification 31 output by the manager switching unit 180 according to the switching of the UPG 69 by the UPG scheduling processing unit 172 (that is, the dynamic switching of the variable manager of the variable). In the dynamic change mode, the above-mentioned "coordination unit" is also provided, and the "coordination unit" is configured to include the UPG scheduling processing unit 71, and the UPG scheduling processing unit 71 includes the manager switching unit 180.
[0200] In the dynamic change mode, a variable can be overwritten by multiple UPG 69s. Fig.21 It is a diagram schematically illustrating a dynamic change pattern according to an embodiment of the present invention. Fig. 22 is a timing diagram of a dynamic change mode according to an embodiment of the present invention. Fig.21 , UPG(1), UPG(2) and UPG(4) are generated as UPG 69 for outputting (rewriting) control instructions corresponding to variables such as arm position of Pick, Support and Place to robot 900A connected to PLC 100A. UPG(3) is generated as UPG 69 for outputting (rewriting) control instructions corresponding to variables such as arm position of Manufacture to robot 900B connected to PLC 100B. Fig. 22 Schematically showing the Fig.21 The UPG schedule 65 generated by the system 1 and the flow information 87 sent to the field device 90 by the UPG 69 during operation are shown in FIG.
[0201] Reference Fig. 22 , explaining the scheduling of the variable manager switching according to the UPG schedule 65 in the dynamic change mode. First, after the execution (work) of UPG (1) is completed, an execution instruction 211 ( Fig. 22 The execution instruction 211 includes the identifier 652 of the next UPG 69 and the execution start time 221 of the next UPG 69. In the present embodiment, the "next UPG" indicates the UPG to be executed next when the execution of a certain UPG is completed.
[0202] When the next UPG 69 is located in the UPG library 170 in the PLC 100, the PLC 100 executes the next UPG 69 according to the execution instruction 211 when the timer 160 counts the execution start time 221. Fig. 22 step (2)).
[0203] When the next UPG 69 is not in the UPG library 170 in the PLC 100, that is, another PLC 100 has the next UPG 69, the PLC 100 notifies the other PLC 100 of the execution instruction 211, for example, through a multicast address. When the other PLC 100 counts the execution start time 221 according to the received execution instruction 211, the next UPG 69 in the UPG library 170 of the PLC 100 is executed. Fig. 22 step (3)).
[0204] In this embodiment, the next UPG 69 to be executed after the execution of the plurality of associated UPGs 69 is completed is executed when the execution of the plurality of associated UPGs 69 is completed. Specifically, after receiving the execution instructions 211 corresponding to all associated UPGs 69, the PLC 100 executes the next UPG 69 ( Fig. 22 In this case, the time to start executing the next UPG 69 corresponds to the latest time among the execution start times 221 specified by the received execution instructions 211.
[0205] When the PLC 100 switches the UPG 69 to be executed to the next UPG 69, it sends the notification 31 of the manager switching to the network 11 by multicast. In addition, when sending the notification 31, the PLC 100 sends the flow information 87 for identifying the communication frame 20 with the control command output by the UPG 69 (the next UPG 69) after the switching and the information of the time when the reception of the flow (communication frame 20) with the flow ID 29 starts to be sent to the field device 90. When receiving the notification 31, the field device 90 (including the robot controllers 90A and 90B) can receive the flow information 87 received from the PLC 100, and based on the flow information, selectively receive the communication frame 20 with the control command addressed to itself from the communication frame 20 sent on the network 11 after the switching.
[0206] Fig.23 : is a flowchart schematically showing the assist tool processing in the dynamic change mode according to the present embodiment. Fig.23 The processing will Fig. 9 Step S9 is changed to step S9a. Fig.23 Other processing and Fig. 9The same, therefore, will not be repeated.
[0207] In step S9a, the UPG 69 generated in steps S1 to S7 and the statically set UPG time table 65 are downloaded to the PLC 100 (step S9a).
[0208] (j3-1. Processing before execution)
[0209] Fig.24 FIG. 2 is a flowchart showing an example of processing before the UPG is executed in the dynamic change mode of the present embodiment. Fig.24 For example, before executing UPG 69 in system 1 when system 1 is started, each PLC 100 receives UPG 69 and UPG schedule 65 determined by the configuration tool 63 (step S20), saves the received UPG 69 into the UPG library 170, and saves the UPG schedule 65 into the storage 119 (steps S21, S22).
[0210] (j3-2.UPG 69 execution start processing)
[0211] Fig.25 2 is a flowchart showing an example of processing at the start of UPG execution in the dynamic change mode of this embodiment. Fig.25 In the dynamic change mode, when the PLC 100 is started, the PLC 100 determines whether the initially executed UPG 69 is registered in the UPG schedule 65 (step S23). Specifically, the calculation processing unit 110 retrieves the UPG 69 to be initially executed from the UPG schedule 65 according to the initially executed UPG flag. When the calculation processing unit 110 determines that the initially executed UPG 69 is not registered in the UPG schedule 65 through the search ("No" in step S23), the operation ends. Fig.25 processing.
[0212] On the other hand, when the calculation processing unit 110 determines that the initial execution UPG 69 is registered in the UPG schedule 65 ("Yes" in step S23), the initial execution UPG 69 is determined as the UPG 69 to be executed (step S25), and the UPG scheduling processing unit 172 calculates the execution start time 221 of the UPG 69 (step S27). For example, the execution start time 221 is calculated based on (execution start time = current time output by the timer 160 + execution interval of the UPG 69). Here, the execution interval of the UPG 69 is an interval corresponding to a predetermined cycle synchronized with the control cycle.
[0213] The UPG scheduling processing unit 172 generates the execution instruction 211 for starting execution of the initial execution UPG 69 at the execution start time 221 calculated in step S27 (step S29 ), and registers the generated execution instruction 211 in the scheduling processing unit 171 (step S31 ).
[0214] The manager switching unit 180 generates a communication frame 20 having a manager switching notification 31 indicating that a switch of the UPG 69 to be executed exists, and transmits the communication frame 20 to the network 11 by multicast via the communication basic processing unit 176 (step S32). Thus, when the PLC 100 executes the initial execution of the UPG 69, it is possible to notify all devices in the system 1 that a variable manager has been switched. In addition, the PLC 100 notifies the field device 90 as the control object of the communication frame 20 that the specific flow information should be processed from the execution start time 221 included in the execution instruction 211.
[0215] When detecting that the timer 160 has counted the execution start time 221 of the registered execution instruction 211, the scheduling processing unit 171 notifies the initial execution UPG 69 of the UPG library 170 of an execution command in order to execute the initial execution UPG 69 (step S33).
[0216] (j3-3. PLC 100 receives execution instructions from within)
[0217] Fig.26 FIG. 1 is a flowchart showing an example of processing in the UPG execution of this embodiment. Fig.26 , which illustrates the situation where PLC 100 executes UPG 69 of the UPG library 170 of PLC 100 and outputs an execution instruction 211 upon completion of the execution.
[0218] When the PLC 100 executes the UPG 69, the UPG scheduling processing unit 172 determines whether the notification of the completion of the execution of the UPG 69 is received from the scheduling processing unit 171 (step S35). While the scheduling processing unit 171 determines that the notification of the completion of the execution of the UPG 69 being executed has not been received ("No" in step S35), step S35 is repeated. On the other hand, when the scheduling processing unit 171 determines that the notification of the completion of the execution is received ("Yes" in step S35), the UPG scheduling processing unit 172 searches the UPG schedule 65, and determines whether the next UPG 69 is registered in the UPG schedule 65 based on the search result (step S37).
[0219] When the UPG schedule processing unit 172 determines that the next UPG 69 is not registered in the UPG schedule 65 ("No" in step S37), it notifies the user or other PLCs 100 of the abnormality (step S57). Fig.26 On the other hand, when the UPG scheduling processing unit 172 determines that the next UPG 69 is registered in the UPG schedule 65 ("Yes" in step S37), it determines the next UPG 69 as the UPG 69 to be executed (step S39). Then, the scheduling processing unit 171 calculates the execution start time 221 in the same way as steps S27 and S29, and generates the execution instruction 211 including the calculated execution start time 221 (steps S41 and S43).
[0220] The UPG scheduling processing unit 172 determines whether there is a UPG 69 (the next UPG 69) determined as the execution target in the UPG library 170 (step S45). Specifically, the UPG scheduling processing unit 172 searches the UPG library 170 based on the identifier 652 of the UPG 69, and performs the determination based on the search result (step S45). In this case, UPG (2) is searched from the UPG library 170 as the next UPG 69.
[0221] The UPG scheduling processing unit 172 follows Fig.12 The UPG schedule 65 determines that there is a UPG (2) following UPG (1) in the UPG library 170 in the PLC 100 ("Yes" in step S45), and transfers to step S47. On the other hand, when the UPG scheduling processing unit 172 determines that the next UPG (2) does not exist in the UPG library 170 in the PLC 100 ("No" in step S45), it transfers to step S49.
[0222] The UPG scheduling processing unit 172 registers the execution instruction 211 of the next UPG (2) in the scheduling processing unit 171 (step S47), and transfers to step S49. Thus, similarly to steps S31 and S32, the scheduling processing unit 171 notifies the next UPG (2) of the UPG library 170 of the execution command based on the registered execution instruction 211 when the execution start time 221 indicated by the execution instruction 211 is reached.
[0223] In step S49, the UPG scheduling processing unit 172 determines whether the next UPG (2) exists in other PLCs 100 based on the determination result of step S45 (step S49). When the UPG scheduling processing unit 172 determines that the next UPG (2) does not exist in other PLCs 100 (i.e., exists in the UPG library 170 of the present PLC 100) ("No" in step S49), it transfers to step S55. In step S55, the manager switching unit 180 generates a communication frame 20 having a notification 31 of manager switching in the same manner as in step S33, and sends it to the network 11 via the basic communication processing unit 176 by multicast.
[0224] When the UPG scheduling processing unit 172 determines that the next UPG (2) does not exist in the UPG library 170 within the PLC 100 ("No" in step S45), it first determines that UPG (2) exists in other PLCs 100 ("Yes" in step S49), and when the variable management processing unit 173 sends the above-mentioned administrator switching notification 31 (step S50), it generates a communication frame 20 that saves the flow information 87 (step S51), and sends the generated communication frame 20 to the network 11 (step S53).
[0225] (j3-4. Case where PLC 100 receives execution instruction from another PLC 100)
[0226] Fig. 27 FIG. 1 is a flowchart showing an example of processing in the UPG execution of this embodiment. Fig. 27 , a case where PLC 100 receives an execution instruction 211 of the next UPG 69 from another PLC 100 is described.
[0227] The communication basic processing unit 176 determines whether the execution instruction 211 is received from the external PLC 100 via the network 11 (step S60). When the communication basic processing unit 176 determines that the execution instruction 211 is not received via the network 11 (No in step S60), it repeats step S60.
[0228] When the basic communication processing unit 176 determines that the execution instruction 211 is received via the network 11 ("Yes" in step S60), the UPG scheduling processing unit 172 searches the UPG library 170 based on the identifier 652 of the received execution instruction 211, and determines whether the next UPG 69 is registered in the UPG library 170 based on the search result (step S63).
[0229] When the UPG scheduling processing unit 172 determines that the next UPG 69 is not registered in the UPG library 170 ("No" in step S63), it does not register (output) the execution instruction 211 to the scheduling processing unit 171 (step S67). When it determines that the next UPG 69 is registered in the UPG library 170 ("Yes" in step S63), it registers the execution instruction 211 to the scheduling processing unit 171 (step S65).
[0230] according to Fig. 27 When multiple PLCs 100 receive an execution instruction 211 sent via multicast, they can execute the next UPG 69 according to the execution instruction 211 only when the next UPG 69 indicated by the execution instruction 211 exists in the PLC 100 of its own UPG library 170.
[0231] (j4. Linkage between execution instruction and switching of variable manager)
[0232] Fig.28 FIG. 2 is a diagram schematically showing an example of a process of switching a variable manager in a dynamic change mode according to the present embodiment. Fig.28 In the example, PLCs 100A, 100B, and 100C are capable of executing UPG 69, the UPG library 170 of PLC 100A has UPG (1) and UPG (2), the UPG library 170 of PLC 100B has UPG (4), and the UPG library 170 of PLC 100C does not have UPG (4). Fig.12 As shown, in the UPG time table 65 , the execution order of UPG( 1 )→UPG( 2 )→UPG( 4 ) is specified according to time 651 .
[0233] In the dynamic change mode, in PLC 100A, UPG (1) outputs a completion notification 220 when execution is completed. When receiving the completion notification 220, the UPG scheduling processing unit 172 sets the flag 655 of UPG (1) in the UPG timetable 65 to "0" (step (1)).
[0234] The scheduling processing unit 171 determines the next UPG (2) according to the UPG schedule 65, and generates an execution instruction 211 for the determined next UPG (2). When the next UPG (2) exists in the UPG library 170 of the PLC 100A, the UPG scheduling processing unit 172 registers the execution instruction 211 in the scheduling processing unit 171 (step (2)).
[0235] When the execution start time 221 indicated by the registered execution instruction 211 is reached, the scheduling processing unit 171 outputs an execution command to the next UPG (2) in the UPG library 170 (step (3)).
[0236] On the other hand, when the next UPG (2) does not exist in the UPG library 170, the UPG scheduling processing unit 172 sends the execution instruction 211 to the network 11 by multicast (step (4)).
[0237] PLC 100B and PLC 100C receive execution instruction 211 on network 11. PLC 100B of PLC 100B and PLC 100C determines that it has UPG (2) (next UPG 69) corresponding to identifier 652 of received execution instruction 211 in its own UPG library 170. When PLC 100B reaches execution start time 221 indicated by received execution instruction 211, similarly to PLC 100A, it sets corresponding flag 655 to "1" and outputs execution command to next UPG (2) of UPG library 170 (step (5)). On the other hand, PLC 100C receives execution instruction 211 via network 11, but since it does not have next UPG (2) corresponding to identifier 652 of execution instruction 211, even if PLC 100C receives multicast execution instruction 211, it does not perform the action according to execution instruction 211 (step (7)).
[0238] After executing step (3) or step (4), the manager switching unit 180 of the PLC 100A generates a communication frame 20 of a notification 31 of manager switching and transmits it to the network 11 by multicast (step (6)).
[0239] according to Fig.28 When the UPG scheduling processing unit 172 outputs the execution instruction 211 of the next UPG (2) according to the UPG schedule 65, the manager switching unit 180 sends the manager switching notification 31 to the network 11 by multicast. As a result, other devices (PLC 100 and field device 90) can detect the status of the PLC 100 ( Fig.28 The UPG 69 executed by PLC 100A in the above example has been switched to the next UPG 69 ( Fig.28 in UPG(2).
[0240] <K. Notification 31 of administrator switching and device behavior>
[0241] Fig.29 This is a diagram showing, in a tabular form, the relationship between the notification 31 of the administrator switching and the operation of the device according to the present embodiment. Fig.29The table corresponds to the first case, the second case, and the third case, respectively, and shows a set consisting of the content of the notification 31, the information that the device (field device 90) has in advance, and the action (behavior). Fig.29 The notifications 31 in the first, second, and third cases all have the execution start time 291 of the next UPG 69 and the stream ID 292 used in the communication of the data (control command) of the output variable.
[0242] Fig.30 is a diagram schematically showing another example of a UPG schedule of this embodiment. The schedule generation program 66 of the support device 500 generates a schedule corresponding to a dynamic change mode according to a user operation. Fig.30 The generated UPG timetable 65A is downloaded to each PLC 100.
[0243] Reference Fig.30 The UPG schedule 65A stores information for each UPG 69. The information of the UPG 69 includes a UPG number 666 corresponding to the execution order of the UPGs, an identifier 652 of the UPG 69, an initial execution flag 667 for specifying the UPG 69 to be executed first according to the UPG schedule 65A, a previous UPG number 668, a next UPG number 669, an output variable 653, and a flow ID 654. The previous UPG number 668 and the next UPG number 669 respectively indicate the UPG number 666 of the UPG 69 executed before and after the corresponding UPG 69. The following will describe the UPG number 666 of the UPG 69 executed before and after the corresponding UPG 69 in the dynamic change mode. Fig.29 The first, second and third situations.
[0244] (k1. Case 1)
[0245] Fig.31 as well as Fig.32 Each of them is a flowchart showing an outline of processing by the field device 90 in the dynamic change mode (first case) according to the present embodiment. Fig.31 The following is an overview of the processing (first case) according to this embodiment. Fig.31 The flow information registration unit 910 of the field device 90 determines whether the notification 31 of the manager switching is received via the communication basic processing unit 906 (step S70).
[0246] When the flow information registration unit 910 determines that the notification 31 has not been received (No in step S70), it repeats the determination in step S70, but when it determines that the notification 31 has been received (Yes in step S70), it moves to step S71.
[0247] The flow information registration unit 910 stores the execution start time 291 and the flow ID 292 of the received notification 31 in the memory 92 as dynamic flow information 870 (step S71).
[0248] In this way, even when the flow information 87 is not statically set in the field device 90 , the field device 90 can obtain the dynamic flow information 870 by receiving the notification 31 of the manager switching during the execution of the UPG 69 .
[0249] Reference Fig.32 , the description is based on Fig.31 First, the basic communication processing unit 906 of the field device 90 determines whether the communication frame 20 storing the flow ID 29 is received (step S73), and while it is determined that the communication frame 20 is not received ("No" in step S73), the processing of step S73 is repeated.
[0250] On the other hand, when the basic communication processing unit 906 determines that a communication frame 20 storing flow ID 29 is received ("Yes" in step S73), the receiving variable / flow confirmation processing unit 904 compares the flow ID 29 of the received communication frame 20 with the flow ID 292 of the dynamic flow information 870 to determine whether the two are consistent (step S75).
[0251] When the received variable / flow confirmation processing unit 904 determines that the flow ID 29 of the received communication frame 20 does not match the flow ID 292 of the dynamic flow information 870 (No in step S75), it discards the communication frame 20 (step S83) and ends the processing.
[0252] On the other hand, when the received variable / flow confirmation processing unit 904 determines that the flow ID 29 of the received communication frame 20 matches the flow ID 292 of the dynamic flow information 870 (YES in step S75 ), it processes the communication frame 20 .
[0253] Specifically, the received variable / flow confirmation processing unit 904 determines whether the current time counted by the timer 99 indicates a time after the execution start time 291 of the dynamic flow information 870 (ie, whether the current time has passed the execution start time 291) (step S77).
[0254] When determining that the current time has not passed the execution start time 291 (No in step S77), the received variable / flow confirmation processing unit 904 notifies the PLC 100 of the reception before the execution start time using the communication frame 20 (step S81).
[0255] On the other hand, when the received variable / stream confirmation processing unit 904 determines that the current time has passed the execution start time 291 ("Yes" in step S77), it obtains the control command of the payload 26 of the communication frame 20 and sets it as the input data 944 (step S79). Thus, the processor 91 operates the servo motor and the like according to the control command of the input data 944.
[0256] (k2. Case 2)
[0257] Fig.33 This is a flowchart showing an outline of processing by the field device 90 according to the present embodiment (second case). Fig.34 1 is a diagram showing an example of flow information according to the present embodiment (second scenario). In the first scenario described above, the flow information 87 is not statically set in the field device 90 (i.e., it is not downloaded before the execution of the UPG 69), but in the second scenario, Fig.34 As shown, the field device 90 only statically sets the flow ID 872 in the flow information 87.
[0258] Reference Fig.33 The flow information registration unit 910 of the device determines whether the notification 31 of the administrator's switch is received via the basic communication processing unit 906 (step S70). If it is determined that the notification 31 is not received ("No" in step S70), the determination of step S70 is repeated, but if it is determined that the notification 31 is received ("Yes" in step S70), it transfers to step S70a.
[0259] The flow information registration unit 910 determines whether the flow ID 292 indicated in the received notification 31 matches the flow ID 292 statically (previously) set. Fig.34 The flow information registration unit 910 determines that the flow information 872 is consistent with the flow ID 872 (step S70a). When the flow information registration unit 910 determines that the flow information 872 is inconsistent (No in step S70a), it sends an abnormality notification to the PLC 100 that is the transmission source of the notification 31 (step S70b).
[0260] On the other hand, the flow information registration unit 910 determines that the flow ID 292 indicated in the received notification 31 is consistent with Fig.34 If the stream ID 872 of the notification 31 matches the stream ID 872 of the notification 31 ("Yes" in step S70a), in step S71, the execution start time 291 of the notification 31 matches the corresponding stream ID 872 of the notification 31. Fig.34 The dynamic stream information 870 (execution start time 291 and stream ID 872) is stored in the memory 92 in correspondence with the stream ID 872 (step S71).
[0261] As in the second case, even when the flow ID 872 is only statically set, the field device 90 can acquire the dynamic flow information 870 by receiving the notification 31 of manager switching transmitted from the PLC 100 via the network 11 .
[0262] Based on Fig.33 The dynamic flow information 870 obtained by processing, the reception processing of the communication frame 20 in the field device 90 and Fig.32 The processing is the same, so it will not be repeated.
[0263] (k3. 3rd case)
[0264] Fig.35 It is a flowchart showing the device processing according to (the third case) of this embodiment. Fig.36 FIG. 1 is a diagram showing an example of flow information according to the third scenario of the present embodiment. In the third scenario, the memory 92 of the field device 90 stores Fig.36 The diagram shows one or more flow IDs 872 and sequences 873 corresponding to the one or more flow IDs 872. The sequence 873 indicates the relative sequence in which the communication frames 20 of the corresponding flow IDs 872 are transmitted on the network 11.
[0265] Reference Fig.35 The flow information registration unit 910 of the device determines whether the notification 31 of the administrator's switch is received via the basic communication processing unit 906 (step S70). If it is determined that the notification 31 is not received ("No" in step S70), the determination of step S70 is repeated, but if it is determined that the notification 31 is received ("Yes" in step S70), it transfers to step S70a.
[0266] The flow information registration unit 910 determines whether the flow ID 292 indicated in the received notification 31 matches the flow ID 292 of the received notification 31. Fig.34 If it is determined that the flow ID 872 is consistent with that of the flow ID 872 (step S70a), and if it is determined that it is inconsistent (No in step S70a), an abnormality notification is sent to the PLC 100 that is the sending source of the notification 31 (step S70b).
[0267] On the other hand, the flow information registration unit 910 determines that the flow ID 292 indicated in the received notification 31 is consistent with Fig.34 When the flow ID 872 is consistent with that of FIG. 870 (“Yes” in step S70a), transfer to step S70c.
[0268] In step S70c, the flow information registration unit 910 determines whether the order of receiving the flow ID 292 (notification 31) from the PLC 100 is consistent with the order of receiving the flow ID 292 (notification 31) from the PLC 100. Fig.36For example, when the received order is 1→3→2 of the order 873, the flow information registration unit 910 determines that the received order of the flow ID 292 matches the order of the received order 873 (for example, ascending order). Fig.36 The order of 873 does not match ("No" in step S70c), and transfer to step S70b.
[0269] On the other hand, the flow information registration unit 910 determines that the reception order of the notification 31 (flow ID 292) from the PLC 100 follows Fig.36 When the execution start time 291 of the notification 31 is consistent with the execution start time 291 of the notification 31, the execution start time 291 of the notification 31 is consistent with the execution start time 291 of the notification 31. Fig.36 The dynamic stream information 870 (execution start time 291 and stream ID 872) is stored in the memory 92 in correspondence (step S71).
[0270] As in the third case, even when the field device 90 stores only the flow ID 872 , it is possible to obtain the dynamic flow information 870 based on the notification 31 received in the order 873 thereof.
[0271] Based on Fig.35 The received processing of the communication frame 20 in the device and the flow information 87 obtained by the processing Fig.32 The processing is the same, so it will not be repeated.
[0272] <L. Variables and their management methods>
[0273] Describes the variables accessed by UPG 69 and how to manage them. Fig.37 FIG. 2 is a diagram schematically showing the concept of variable management in this embodiment. Fig.37 , describes the management of variables accessed by UPG 69 during execution. Fig.37In the example, the UPG library 170 of the first PLC 100 has UPG (1) and UPG (2), and the UPG library 170 of the second PLC 100 has UPG (4). The variable management processing unit 173 of the second PLC 100 manages the local variable (3) of UPG 69 as input data 134 or output data 135. During execution, the data of the variables accessed (read / written) by UPG 69 is managed by the variable management processing unit 173 as input data 134 or output data 135. The variables of the data managed by the variable management processing unit 173 include local variables of each UPG 69 and global variables that can be accessed by multiple UPG 69. A UPG 69 cannot (is prohibited from) accessing the local variables of other UPG 69. A UPG 69 can access a global variable when other UPG 69 is not accessing the global variable, but cannot access the global variable when other UPG 69 is accessing the global variable (prohibited (5)). In Fig.37 In the example, UPG(2) cannot access the local variable (1) of UPG(1) (prohibited by (4)). Similarly, UPG(1) cannot access the local variable (2) of UPG(2).
[0274] When the variable management processing unit 173 receives a request to access a local variable from the UPG 69, it accesses the data of the local variable according to the received access request (local variable access (1)). In addition, when the variable management processing unit 173 receives a request to access a global variable from the UPG 69, when other UPGs 69 are not in execution, it accesses the data of the global variable according to the received access request (global variable access (2)). For example, the variable management processing unit 173 can determine whether other UPGs 69 are in execution based on the flag 655. In addition, the access requests to local variables and global variables from the UPG 69 are not provided to the variable management processing unit 173 via the scheduling processing unit 172.
[0275] Whenever the variable management processing unit 173 rewrites (writes) the global variable through the global variable access (2) during the execution of UPG (1) or UPG (2), the global variable synchronization is performed between the first PLC 100 and the second PLC 100 (processing (3)). Specifically, in the synchronization process, the variable management processing unit 173 of the first PLC 100 sends a rewrite request so that the value of the global variable of the second PLC 100 represents the rewritten value of the global variable of the first PLC 100. When the global variable is a variable for setting a control instruction, the rewrite request will have the rewritten value of the global variable (control instruction) in the payload 26. Figure 6The communication frame 20 is sent from the first PLC 100 to the network 11. The variable management processing unit 173 of the second PLC 100 writes the value of the payload 26 of the received communication frame 20 into its own global variable. Thus, even if UPG (1), UPG (2) and UPG (4) are loaded (configured) to different PLCs 100, whenever the value of the global variable is rewritten (written), the same value after rewriting can be referenced (read).
[0276] <M. Computer Program>
[0277] The configuration tool 63 and the schedule generation tool 64 are configured by the configuration tool 600. Figure 5 The structure provided by the CPU 502 of the support device 500 executes the program stored in the memory such as the HDD 505, but a part or all of these provided structures can also be installed using a dedicated hardware circuit (for example, ASIC (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array)). Alternatively, the main part of the support device 500 can also be implemented using hardware that follows a general architecture. In this case, virtualization technology can also be used to execute multiple OS (Operating System) with different purposes in parallel, and the required applications can be executed on each OS.
[0278] In addition, the support device 500 may also include a plurality of processors such as the CPU 502. In this case, Figure 5 The various parts shown can be executed by multiple processors. In addition, when CPU 502 includes multiple cores, Figure 5 The portions shown are capable of being executed by multiple cores within CPU 502 .
[0279] The PLC 100 includes a processor 112 equivalent to a CPU, and a storage 119 including an HDD, a ROM, a RAM, etc. The storage 119 stores programs and data executed by the PLC 100. A dedicated hardware circuit (such as an ASIC or an FPGA, etc.) may be used to install part or all of the structure provided by the PLC 100 executing the program of the storage 119. Alternatively, the main part of the PLC 100 may be implemented using hardware that complies with a general architecture. In this case, virtualization technology may be used to execute multiple OSs with different purposes in parallel, and the required applications may be executed on each OS.
[0280] In addition, PLC 100 may also have a plurality of processors such as CPUs. In this case, Figure 3Each program shown can be executed by multiple processors. In addition, when the CPU includes multiple cores, Figure 3 Each of the programs shown can be executed by multiple cores in the CPU.
[0281] In addition, the field device 90 includes a processor 91 equivalent to a CPU, and a memory 92 composed of an HDD, a ROM, a RAM, etc. The memory 92 stores programs and data executed by the processor 91. A dedicated hardware circuit (such as an ASIC or an FPGA, etc.) may be used to install a part or all of the structure provided by the processor 91 executing the program of the memory 92. Alternatively, the main part of the PLC 100 may be implemented using hardware that complies with a general architecture. In this case, virtualization technology may be used to execute multiple OSs with different purposes in parallel, and the required applications may be executed on each OS.
[0282] In addition, the processor 91 may also include a plurality of processors such as CPUs. In this case, Figure 4 Each program shown can be executed by multiple processors. In addition, when the CPU includes multiple cores, Figure 4 Each of the programs shown can be executed by multiple cores in the CPU.
[0283] The storage medium 501 of the support device 500, the memory card 116 of the PLC 100, and the memory card 96 of the field device 90 are media that store information such as programs through electrical, magnetic, optical, mechanical, or chemical action in a manner that allows computers and other devices, machines, etc. to read the recorded information such as programs. The CPU 502 of the support device 500, the processor 112 of the PLC 100, and the processor 91 of the field device 90 can also obtain the above-mentioned programs from these storage media.
[0284] <N. Notes>
[0285] The present embodiment described above includes the following technical ideas.
[0286] [Structure 1]
[0287] A control system having a plurality of control devices (100) connected by a network (11), the control system having:
[0288] a program storage unit (119) provided in each control device and used for storing a control program (69) having a command for calculating and updating a control instruction, wherein the control instruction is a value related to the control of a control object (90, 90A, 90B);
[0289] A working unit (112, 110) is provided in each control device to operate the control program of the program storage unit of the control device; and
[0290] A coordination unit (64, 66) configures multiple control programs having commands for calculating and updating the same control instruction in one or more of the multiple control devices, and coordinates working times between the multiple control programs so that updates of the same control instruction between the multiple control programs do not conflict with each other.
[0291] [Structure 2]
[0292] In the control system described in Structure 1,
[0293] The coordination unit statically determines the working time of the plurality of control programs so that the updating of the same control instruction among the plurality of control programs does not conflict with each other.
[0294] [Structure 3]
[0295] In the control system described in structure 1 or 2,
[0296] The coordination unit distributes the plurality of control programs to the plurality of control devices, and coordinates the operation time according to the progress of the process so that the plurality of control programs are respectively operated in sequence.
[0297] [Structure 4]
[0298] In the control system described in any one of structures 1 to 3,
[0299] The control instruction includes the control instruction given to the control object,
[0300] The coordination unit also generates identification information (87) for the control object to identify the control instruction sent to itself.
[0301] [Structure 5]
[0302] In the control system described in Structure 4,
[0303] The identification information used by the control object to identify the control instruction issued to itself includes an identifier of the control program that updated the control instruction for the control object (872).
[0304] [Structure 6]
[0305] In the control system described in Structure 5,
[0306] In the case where a plurality of control instructions are given to the control object, the identification information used by the control object to identify the control instructions issued to itself includes the order in which the plurality of control instructions are given to the control object (871).
[0307] [Structure 7]
[0308] In the control system described in Structure 6,
[0309] The order in which the plurality of control instructions are given to the control object is based on the working time coordinated between the plurality of control programs that update the plurality of control instructions (651).
[0310] [Structure 8]
[0311] In the control system described in Structure 3,
[0312] The control device notifies the controlled object of switching to one control program when the plurality of control programs are operated by the operation unit while being switched according to the coordinated operation time.
[0313] The notification (31) includes identification information (292) for identifying the control command to be updated by the one control program after the switching.
[0314] [Structure 9]
[0315] In the control system described in any one of structures 4 to 8,
[0316] The identification information includes the type of the control instruction.
[0317] [Structure 10]
[0318] In the control system described in any one of structures 1 to 9,
[0319] The values associated with the control include the values of variables updated by the control program during operation.
[0320] [Structure 11]
[0321] A support device (500) capable of being connected to a control system, the control system having a plurality of control devices (100) connected via a network (11), wherein:
[0322] Each of the control devices has:
[0323] a program storage unit (119) for storing a control program (69) having a command for calculating and updating a control instruction, the control instruction being a value related to control of a control object; and
[0324] an operating unit (110, 112) for operating the control program of the program storage unit of the control device,
[0325] The supporting device comprises:
[0326] a configuration unit (63) for configuring a plurality of control programs having commands for calculating and updating the same control instruction in at least one of the plurality of control devices; and
[0327] A coordination unit (64) coordinates the working time between the plurality of control programs so that the updates of the same control instructions between the plurality of control programs do not conflict with each other.
[0328] [Structure 12]
[0329] A setting program (600) is used to set the behavior of a control system having a plurality of control devices (100) connected via a network (11), wherein:
[0330] Each of the control devices has:
[0331] a program storage unit (119) for storing a control program (69) having a command for calculating and updating a control instruction, the control instruction being a value related to control of a control object; and
[0332] an operating unit (110, 112) for operating the control program of the program storage unit of the control device,
[0333] The setting program causes the computer (502) to perform the following steps:
[0334] Steps (S1, S3, S5), configuring a plurality of control programs having commands for calculating and updating the same control instruction in at least one of the plurality of control devices; and
[0335] Step (S7), coordinating the working time among the plurality of control programs so that the updates of the same control instruction among the plurality of control programs do not conflict with each other.
[0336] The embodiments disclosed this time should be considered as illustrative in all aspects and not restrictive. The scope of the present invention is indicated by the claims rather than the above description, and is intended to include all modifications within the meaning and scope equivalent to the claims.
[0337] Description of symbols
[0338] 1: System; 3A, 3B, 3C: Device group; 11: Network; 20: Communication frame; 26: Payload; 30: Multicast address; 31: Notification; 62: Configuration program; 63: Configuration tool; 64: Schedule generation tool; 65, 65A: UPG schedule; 66: Schedule generation program; 67: Stream information generation program; 68: UPG generation program; 69: UPG program; 87: Stream information; 90: Field device; 90A, 90B: Robot controller; 91, 112: Processor; 92: Memory; 110: Operation processing unit; 114: Storage unit; 119: Storage; 120: Peripheral processing program; 121, 831: Time synchronization program; 125: Refresh Program; 126: Configuration; 128: Administrator switching program; 170: UPG library; 171, 172, 902: Scheduling processing unit; 173, 903: Variable management processing unit; 174, 904: Flow confirmation processing unit; 175, 905: Flow generation processing unit; 176, 906: Basic communication processing unit; 179, 909: Time synchronization processing unit; 180: Administrator switching unit; 211: Execution instruction; 220: Completion notification; 221, 291: Execution start time; 500: Support device; 870: Dynamic flow information; 873: Sequence; 900A, 900B: Robot; 901: Application processing unit; 910: Flow information registration unit; 611: Conflict detection program.
Claims
1. A control system having a plurality of control devices connected via a network, the control system having: a program storage unit, which is provided in each control device and is used to store a control program, wherein the control program has a command for calculating and updating a control instruction, wherein the control instruction is a value related to the control of a control object, and the control object is applied to a process of a production line; A working unit, which is provided in each control device and causes the control program of the program storage unit of the control device to operate; as well as a coordination unit that distributes a plurality of control programs having commands for calculating and updating the same control instruction to the plurality of control devices, and coordinates working times between the plurality of control programs so that updates of the same control instruction between the plurality of control programs do not conflict with each other, The coordination unit coordinates the operation time among the plurality of control programs according to the progress of the process in the coordination so that the plurality of control programs are respectively operated in sequence.
2. The control system according to claim 1, wherein: The control instruction includes the control instruction given to the control object, The coordination unit further generates identification information for the control object to identify the control instruction sent to itself.
3. The control system according to claim 2, wherein: The identification information used by the controlled object to identify the control instruction issued to the controlled object includes an identifier of the control program that updated the control instruction for the controlled object.
4. The control system according to claim 3, wherein: In the case where a plurality of control instructions are given to the control object, the identification information used by the control object to identify the control instruction issued to itself includes the order in which the plurality of control instructions are given to the control object.
5. The control system according to claim 4, wherein: The order in which the plurality of control instructions are given to the control object is based on working times coordinated between the plurality of control programs that update the plurality of control instructions.
6. The control system according to claim 1, wherein: The control device notifies the controlled object of switching to one control program when the plurality of control programs are operated by the operation unit while being switched according to the coordinated operation time. The notification includes identification information for identifying the control command to be updated by the one control program after the switching.
7. The control system according to claim 2, wherein: The identification information includes the type of the control instruction.
8. The control system according to claim 1, wherein: The values associated with the control include the values of variables updated by the control program during operation.
9. A support device capable of being connected to a control system having a plurality of control devices connected via a network, wherein: Each of the control devices has: a program storage unit for storing a control program having a command for calculating and updating a control instruction, wherein the control instruction is a value related to the control of a control object, and the control object is applied to a process of a production line; as well as an operating unit that causes the control program of the program storage unit of the control device to operate, The supporting device comprises: a configuration unit for distributing a plurality of control programs having commands for calculating and updating the same control instruction to the plurality of control devices; as well as a coordination unit, which coordinates the working time between the plurality of control programs so that the updates of the same control instruction between the plurality of control programs do not conflict with each other, The coordination unit coordinates the operation time among the plurality of control programs according to the progress of the process in the coordination so that the plurality of control programs are respectively operated in sequence.
10. A machine-readable storage medium storing a setting program for setting the behavior of a control system having a plurality of control devices connected to a network, wherein: Each of the control devices has: a program storage unit for storing a control program having a command for calculating and updating a control instruction, wherein the control instruction is a value related to the control of a control object, and the control object is applied to a process of a production line; as well as an operating unit that causes the control program of the program storage unit of the control device to operate, The setting program enables the computer to perform the following steps: Distributing a plurality of control programs having commands for calculating and updating the same control instruction to the plurality of control devices; as well as Coordinating working time between the plurality of control programs so that updates of the same control instruction between the plurality of control programs do not conflict with each other, In the coordination, the operation time is coordinated among the plurality of control programs according to the progress of the process so that the plurality of control programs are respectively operated in sequence.
